xsos icon indicating copy to clipboard operation
xsos copied to clipboard

xsos --lspci showing 2 1.5-port (3) QLogic Corp... or 3 3.33333-port NICs

Open ryran opened this issue 10 years ago • 1 comments

This is really common:

[rsaw:tmp]$ cat fc
03:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
03:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)                                                                                                       
08:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
[rsaw:tmp]$ xsos --L fc
LSPCI
  Net/Storage:
    2 1.5-port (3) QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)

This, not as much:

[rsaw:tmp]$ cat i350 
01:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
01:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
05:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)
05:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)
21:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
21:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
21:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
21:00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
61:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
61:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
61:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
61:00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
[rsaw:tmp]$ xsos --L i350
LSPCI
  Net/Storage:
    3 3.33333-port (10) Intel Corporation I350 Gigabit Network Connection (rev 01)
    1 dual-port (2) Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)

ryran avatar Jan 17 '14 18:01 ryran

The problem with the second system is that it has three cards that identify exactly the same ... except for the fact that two of them are 4-port cards, and one of them is a 2-port card. xsos assumes that if cards identify the same ... that they'll have the same number of ports.

Yikes.

The fibre channel situation certainly appears similar from the lspci output, but I have no hands-on experience with these systems ... it's so common that it makes me wonder if it really is a 2-port card that identifies the same as a 1-port card.

Here's the code from LSPCI():

  awk -vH_IMP="${c[Imp]}" -vH2="${c[H2]}" -vH0="${c[0]}" '
    /Ethernet controller:|Network controller:|Fibre Channel:|Mass storage controller:|InfiniBand:/ {
      # Save 
      split($1, slot, ":")
      $1 = ""
      sub(" ", "")
      split($0, type, ":")
      dev[type[2]] ++
      if (!(slot[1] SUBSEP type[2] in slots)) {
        slots[slot[1], type[2]]
        slotcount[type[2]] ++
      }
    }
    END {
      printf "%s  Net/Storage:%s\n", H2, H0
      for (devtype in dev) {
        slotc = slotcount[devtype]
        typec = dev[devtype]
        ports = ""
        if (typec > 1) {
          numports = typec/slotc
          if      (numports == 1) numports = "single"
          else if (numports == 2) numports = "dual"
          else if (numports == 3) numports = "triple"
          else if (numports == 4) numports = "quad"
          ports = " "slotc " " numports "-port"
        }
        printf "   %s%s (%s)%s%s\n", H_IMP, ports, typec, H0, devtype
      }
    }
  ' <<<"$lspci_input"

ryran avatar Jan 17 '14 18:01 ryran