svn commit: r259150 - head/sys/dev/cxgbe

Gleb Smirnoff glebius at FreeBSD.org
Sun Dec 15 03:05:46 UTC 2013


  Anton,

On Wed, Dec 11, 2013 at 02:39:16PM +0400, Anton Yuzhaninov wrote:
A> On 12/10/13 23:30, Alexander Motin wrote:
A> >> A> New Revision: 259150
A> >> A> URL: http://svnweb.freebsd.org/changeset/base/259150
A> >> A>
A> >> A> Log:
A> >> A>   Print out the full PCIe link negotiation during dmesg.
A> >>
A> >> Shouldn't this be done with common code for all drivers
A> >> on PCI bus(es)?
A> >>
A> >> This is definitely useful for all devices, not to cxgbe(4) only.
A> >
A> > Why not just read `pciconf -lc` output for that?
A> 
A> 1. pciconf output is cryptic. At least units of measurement should be added.
A> 
A> e. g. current output:
A> 
A>      cap 10[a0] = PCI-Express 2 endpoint max data 256(512) FLR link x4(x4)
A>                   speed 5.0(5.0) ASPM disabled(L0s/L1)
A> 
A> better to print like:
A> 
A>      cap 10[a0] = PCI-Express 2 endpoint max data 256(512) FLR link width x4(x4)
A>                   speed 5.0 GT/s (5.0 GT/s) ASPM disabled(L0s/L1)
A> 
A> 2. It is not obvious for system administrators, that pciconf should be used to 
A> inquire link speed. This feature is not documented in handbook or man pages.
A> 
A> 3. I agree, that adding more noise to dmesg is not good, but if current 
A> bandwidth is not enough for optimal work of the device - error should be printed 
A> in dmesg.
A> 
A> Example can be found in sys/dev/ixgbe/ixgbe.c
A> 
A>          if ((hw->bus.width <= ixgbe_bus_width_pcie_x4) &&
A>              (hw->bus.speed == ixgbe_bus_speed_2500)) {
A>                  device_printf(dev, "PCI-Express bandwidth available"
A>                      " for this card\n     is not sufficient for"
A>                      " optimal performance.\n");
A>                  device_printf(dev, "For optimal performance a x8 "
A>                      "PCIE, or x4 PCIE 2 slot is required.\n");
A>          }
A> 
A> 4. Similar speed check will be useful for many devices, not only for ixgbe or 
A> cxgbe and should be done in some generic way.

I think, that if you submit patches, that implement above features, someone
will take them and commit :)

-- 
Totus tuus, Glebius.


More information about the svn-src-all mailing list