Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2013 07:05:35 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Anton Yuzhaninov <citrin@citrin.ru>
Cc:        svn-src-all@freebsd.org
Subject:   Re: svn commit: r259150 - head/sys/dev/cxgbe
Message-ID:  <20131215030535.GC29088@glebius.int.ru>
In-Reply-To: <52A840D4.9020407@citrin.ru>
References:  <201312100007.rBA074Qq055579@svn.freebsd.org> <20131210192650.GK4615@FreeBSD.org> <52A76BBE.5030903@FreeBSD.org> <52A840D4.9020407@citrin.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
  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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131215030535.GC29088>