[E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread 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: struct ethtool

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread David Miller
From: Ben Greear Date: Wed, 05 Dec 2012 13:35:01 -0800 > 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 ju

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread Ben Greear
On 12/05/2012 02:36 PM, David Miller wrote: > From: Ben Greear > Date: Wed, 05 Dec 2012 13:35:01 -0800 > >> 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

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread David Miller
From: Ben Greear Date: Wed, 05 Dec 2012 15:09:11 -0800 > On 12/05/2012 02:36 PM, David Miller wrote: >> From: Ben Greear >> Date: Wed, 05 Dec 2012 13:35:01 -0800 >> >>> It seems the only way to get the current pci-e bus speed & width >>> in ixgbe (and probably many other NICs) is by parsing outp

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread Rick Jones
On 12/05/2012 04:01 PM, David Miller wrote: > 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 thoug

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread Ben Greear
On 12/05/2012 04:20 PM, Brice Goglin wrote: > Le 05/12/2012 16:01, David Miller a écrit : >> 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 a

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread Brice Goglin
Le 05/12/2012 16:01, David Miller a écrit : > 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

Re: [E1000-devel] Should we report bus width/speed via ethtool?

2012-12-05 Thread Ben Hutchings
On Wed, 2012-12-05 at 13:35 -0800, Ben Greear wrote: > 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