Should we report bus width/speed via ethtool?
Subsystems (2)
It seems the only way to get the current pci-e bus speed & width in ixgbe (and probably many other NICs) is by parsing output of lspci -vvv.
I'd personally find it easier if this info were available via ethtool API.
Any opinions on adding this info? I was thinking something like:
struct ethtool_bus_speed {
u32 cur_speed; /* millions of transactions per sec, or Mhz for older PCI busses */ u32 cur_width; /* bus width */
/* Maximum values supported by NIC */
u32 max_speed;
u32 max_width;
#define BELOW_OPTIMAL_SPEED 0x1 /* Set if NIC cannot run at max speed with current bus settings */ u32 flags;
/* Plenty of space to grow, set to zero until defined */ u32 reserved[32];
};
This could also fit in the reserved space of the struct ethtool_drvinfo if that were preferred (and width and flags could be a u16 to save a bit of space in that case).
Any opinions...or suggestions for other interesting bits to add?
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
David Miller
maintainerFrom: Ben Greear <[email protected]>
Date: Wed, 05 Dec 2012 13:35:01 -0800
Quoted 6 lines
It seems the only way to get the current pci-e bus speed & width in ixgbe (and probably many other NICs) is by parsing output of lspci -vvv.
I'd personally find it easier if this info were available via ethtool API.
You could just as easily have ethtool determine the PCI device location (using existing facilities) and fetch the PCI-e info from the PCI sysfs files.
There is no reason to extend ethtool for this.
Quoted 7 lines · David Miller
From: Ben Greear <[email protected]>
Date: Wed, 05 Dec 2012 13:35:01 -0800Quoted 4 lines
It seems the only way to get the current pci-e bus speed & width in ixgbe (and probably many other NICs) is by parsing output of lspci -vvv.
Quoted 6 lines
Quoted 2 lines
I'd personally find it easier if this info were available via ethtool API.
You could just as easily have ethtool determine the PCI device location (using existing facilities) and fetch the PCI-e info from the PCI sysfs files.
Any particular sysfs file? I've been grubbing around in there and I don't see anything that specifies bus width or speed..
Maybe it's some binary blob that needs decoding?
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
David Miller
maintainerFrom: Ben Greear <[email protected]>
Date: Wed, 05 Dec 2012 15:09:11 -0800
Quoted 11 lines · David Miller
Quoted 10 lines
From: Ben Greear <[email protected]>
Date: Wed, 05 Dec 2012 13:35:01 -0800Quoted 6 lines
It seems the only way to get the current pci-e bus speed & width in ixgbe (and probably many other NICs) is by parsing output of lspci -vvv.
I'd personally find it easier if this info were available via ethtool API.
Quoted 8 lines
Quoted 3 lines
You could just as easily have ethtool determine the PCI device location (using existing facilities) and fetch the PCI-e info from the PCI sysfs files.
Any particular sysfs file? I've been grubbing around in there and I don't see anything that specifies bus width or speed..
Maybe it's some binary blob that needs decoding?
lspci might be a good place to figure this out :-) It's probably grovelling around in PCI config space to determine these things.
Quoted 2 lines · David Miller
lspci might be a good place to figure this out :-) It's probably grovelling around in PCI config space to determine these things.
And if not lspci, "pcitop" used to grub around for such things, though its source may be rather moldy. I'm sure though that if various chipset providers were willing to document their PCI performance counters, *someone* would be happy to bring pcitop into the present day...
happy benchmarking,
rick jones
Quoted 2 lines · David Miller
lspci might be a good place to figure this out :-) It's probably grovelling around in PCI config space to determine these things.
Right, it looks from PCI_EXP_LNKSTA in the config space (only works as root). Here's how we do the same in hwloc (using the pciutils lib underneath):
https://svn.open-mpi.org/trac/hwloc/browser/trunk/src/topology-libpci.c#L399
Brice
Quoted 9 lines · Brice Goglin
Quoted 2 lines · David Miller
lspci might be a good place to figure this out :-) It's probably grovelling around in PCI config space to determine these things.
Right, it looks from
PCI_EXP_LNKSTAin the config space (only works as root). Here's how we do the same in hwloc (using the pciutils lib underneath):https://svn.open-mpi.org/trac/hwloc/browser/trunk/src/topology-libpci.c#L399
Thanks..but it seems easier to just parse the text output of lspci -vvv
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 8 lines · Ben Greear
It seems the only way to get the current pci-e bus speed & width in ixgbe (and probably many other NICs) is by parsing output of lspci -vvv.
I'd personally find it easier if this info were available via ethtool API.
Any opinions on adding this info? I was thinking something like:
[...]
This is nothing specific to network devices, so putting it in ethtool info is totally inappropriate.
Ben.
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.