Le 20/03/2012 20:12, Jeffrey Squyres a écrit :
> On Mar 20, 2012, at 3:09 PM, Brice Goglin wrote:
>> Looks like we just need to read /sys/class/net/ib*/dev_id, make that
>> decimal, add one, and we get the port number.
>> How would you like this to appear in the topology? Is a object info such
>> as "Port=%d" in each network interface in a OFED object ok?
> You mean attached to the "ib0" (etc.) PCI devices? If so, I think that would be fine.
> Are the other info keys capitalized?
> Will you display this info in lstopo output?
Yes other info name are usually capitalized.
All of them appear in lstopo verbose, but not in the default output
(because we don't want a huge text output by default and it's hard to
decide which ones matter).
I just wrote a patch that adds Port=1/2 to all Net devices:
PCI 15b3:673c (P#28672 busid=0000:07:00.0 class=0c06(IB) PCIVendor="Mellanox Technologies" PCIDevice="MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE]") "Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE]"
Net L#6 (Address=80:34:00:48:fe:80:00:00:00:00:00:01:00:02:c9:03:00:0b:53:49 Port=1) "ib0"
Net L#7 (Address=80:34:00:49:fe:80:00:00:00:00:00:00:00:02:c9:03:00:0b:53:4a Port=2) "ib1"
OpenFabrics L#8 "mlx4_0"
PCI 14c1:0008 (P#24576 busid=0000:06:00.0 class=0200(Ether) PCIVendor="MYRICOM Inc." PCIDevice="Myri-10G Dual-Protocol NIC") "MYRICOM Inc. Myri-10G Dual-Protocol NIC"
Net L#5 (Address=00:60:dd:47:c3:cd Port=1) "myri0"
PCI 14e4:1639 (P#4096 busid=0000:01:00.0 class=0200(Ether) PCIVendor="Broadcom Corporation" PCIDevice="NetXtreme II BCM5709 Gigabit Ethernet") "Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet"
Net L#0 (Address=b8:ac:6f:83:df:80 Port=1) "eth0"
PCI 14e4:1639 (P#4097 busid=0000:01:00.1 class=0200(Ether) PCIVendor="Broadcom Corporation" PCIDevice="NetXtreme II BCM5709 Gigabit Ethernet") "Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet"
Net L#1 (Address=b8:ac:6f:83:df:82 Port=1) "eth1"
By the way, do you want Port numbers to start at 0 or 1?