Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-18 Thread Mike Belopuhov
On Fri, Nov 18, 2016 at 15:37 +0100, Mike Belopuhov wrote:
> The remaining diff after the interrupt change was committed.  I have
> kept KERNEL_LOCK/UNLOCK dance since those functions can run in
> parallel with similar code triggered by ifconfig so better safe than
> sorry.
> 
> I still need to go through changes in ixgbe_initialize_receive_units.
> One thing that is obvious is that Intel driver calls RSS setup even
> if one queue is configured which we haven't done before.  My and
> others tests don't show any regression regarding this however.
> 
> "Wait for a last completion before clearing buffers" change in the
> ixgbe_clear_tx_pending was committed upstream without any explanation
> but "looks safe".
> 
> FCRTH related change also looks strange, needs to get checked against
> documentation.
>

Quoting the spec for 82599: "The content of the Flow Control Receive
Threshold High (FCRTH) register determines at what point the 82599
transmits the first PAUSE frame." Then it mentions that FCRTL (low
threshold) when enabled controls sending of XON messages.

There are two modes of operation regarding flow control: the regular
one and Priority Flow Control that we don't enable.  Then depending
on a few other features (DCB, Flow director) and whether or not we
enable jumbo frames the FCRTH is set relative to the packet buffer
size (which is 384k for X540 and 512k for 82599).

The way FCRTH is calculated in *our* case (no DCB, no flow director,
etc) is basically Rx packet buffer size minus the delay value which
is somewhere in the range of [24..60]k.  But the changed code below
is a branch that handles the default not configured case: it sets
FCRTL to 0, disable XON and low threshold and seems to be setting
the FCRTH to a "default" value, which might or might not be poorly
chosen.  However it definitely makes more sense than the "-32" we
have there now.

> Ditto regarding changes regarding PHY power and ixgbe_handle_mod.
> Hrvoje has already reported that X550 SFP doesn't seem to be able to
> detect different SFP+ modules when replugged as opposed to X520.
> 

ixgbe_handle_mod change is relevant when you swap different SFP+
modules (fiber, copper, etc), it also handles the unknown PHY
case by dropping out early.  I intend to commit this as one of
the last changes so that it will get a bit more testing.

The PHY power change is explained here:
https://svnweb.freebsd.org/base?view=revision&revision=295093
"This fixes link not detected on X540-AT2 after booting to Linux
which turns the phy power off on detach" -- explains why we
we haven't seen this while some users have reported weird
problems with X540...

diff --git sys/dev/pci/files.pci sys/dev/pci/files.pci
index a6b91fb..34ce9bf 100644
--- sys/dev/pci/files.pci
+++ sys/dev/pci/files.pci
@@ -351,20 +351,21 @@ file  dev/pci/ixgb_ee.c   ixgb
 file   dev/pci/ixgb_hw.c   ixgb
 
 # Intel 82598 10GbE
 device ix: ether, ifnet, ifmedia
 attach ix at pci
 file   dev/pci/if_ix.c ix
 file   dev/pci/ixgbe.c ix
 file   dev/pci/ixgbe_82598.c   ix
 file   dev/pci/ixgbe_82599.c   ix
 file   dev/pci/ixgbe_x540.cix
+file   dev/pci/ixgbe_x550.cix
 file   dev/pci/ixgbe_phy.c ix
 
 # Neterion Xframe 10 Gigabit ethernet 
 device xge: ether, ifnet, ifmedia
 attach xge  at pci
 file   dev/pci/if_xge.cxge
 
 # NetXen NX2031/NX2035 10Gb Ethernet
 device nxe: ether, ifnet, ifmedia
 attach nxe at pci
diff --git sys/dev/pci/if_ix.c sys/dev/pci/if_ix.c
index c41a443..755d40d 100644
--- sys/dev/pci/if_ix.c
+++ sys/dev/pci/if_ix.c
@@ -64,24 +64,34 @@ const struct pci_matchid ixgbe_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82598_DA_DUAL },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_KX4 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_KX4_MEZZ },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_XAUI },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_COMBO_BP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_BPLANE_FCOE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_CX4 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_T3_LOM },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_EM },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_SF_QP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_SF2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_FCOE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599EN_SFP },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_QSFP_SF_QP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X540T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X540T1 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550T1 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_KX4 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_KR },
+   { PC

Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-18 Thread Mike Belopuhov
On Fri, Nov 18, 2016 at 13:27 +0100, Mike Belopuhov wrote:
> On Thu, Nov 17, 2016 at 23:23 +0100, Mike Belopuhov wrote:
> > On Thu, Nov 17, 2016 at 22:24 +0100, Mike Belopuhov wrote:
> > > On Wed, Nov 16, 2016 at 23:04 +0100, Mike Belopuhov wrote:
> > > > Hi,
> > > > 
> > > > I've done a massive update of our ix(4) driver that brings
> > > > support for X550 family of controllers including those
> > > > integrated into new Xeon chips as well as QSFP support for
> > > > X520 (82599) but this needs thorough testing.  If you're
> > > > using Intel 10Gb controllers, please make sure that you
> > > > either (or both!) test the complete diff found at this URL:
> > > > http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
> > > > that will (hopefully) contain bits of this monster diff.
> > > > 
> > > > To test the monster diff, make sure that you are running a
> > > > recent snapshot and your kernel source code is up-to-date,
> > > > then reset a few files to the specified revisions and
> > > > remove the support file for X550:
> > > > 
> > > > % pwd
> > > > /usr/src
> > > > % cvs up -r1.326 sys/dev/pci/files.pci
> > > > % cvs up -r1.133 sys/dev/pci/if_ix.c
> > > > % cvs up -r1.14 sys/dev/pci/ixgbe.c
> > > > % cvs up -r1.23 sys/dev/pci/ixgbe.h
> > > > % cvs up -r1.11 sys/dev/pci/ixgbe_82598.c
> > > > % cvs up -r1.12 sys/dev/pci/ixgbe_82599.c
> > > > % cvs up -r1.13 sys/dev/pci/ixgbe_phy.c
> > > > % cvs up -r1.22 sys/dev/pci/ixgbe_type.h
> > > > % cvs up -r1.4 sys/dev/pci/ixgbe_x540.c
> > > > % rm -f sys/dev/pci/ixgbe_x550.c
> > > > 
> > > > To verify that files have been reset:
> > > > 
> > > > % pwd
> > > > /usr/src
> > > > % fgrep "//T1" sys/dev/pci/CVS/Entries
> > > > /files.pci/1.326/Mon Sep 12 09:45:53 2016//T1.326
> > > > /if_ix.c/1.133/Thu Oct 27 05:00:50 2016//T1.133
> > > > /ixgbe.c/1.14/Wed Nov 26 17:03:52 2014//T1.14
> > > > /ixgbe.h/1.23/Tue Oct  4 09:24:02 2016//T1.23
> > > > /ixgbe_82598.c/1.11/Mon Aug  5 19:58:06 2013//T1.11
> > > > /ixgbe_82599.c/1.12/Fri May  1 04:15:00 2015//T1.12
> > > > /ixgbe_phy.c/1.13/Fri May  1 04:15:00 2015//T1.13
> > > > /ixgbe_type.h/1.22/Wed Nov 16 21:53:57 2016//T1.22
> > > > /ixgbe_x540.c/1.4/Wed May 20 14:34:27 2015//T1.4
> > > > 
> > > > And then test and apply the diff:
> > > > 
> > > > % pwd
> > > > /usr/src
> > > > % patch -Csp0  > > > 
> > > > Make sure to reset files every time the source tree gets updated.
> > > > 
> > > > Cheers,
> > > > Mike
> > > 
> > > As of today and file revisions below, most of the boilerplate
> > > code is now committed.  I've tried very hard to not introduce
> > > any noticeable changes in behavior so far.
> > > 
> > > if_ix.c/1.133
> > > ixgbe_82598.c/1.15
> > > ixgbe_x550.c/1.1
> > > ixgbe.c/1.19
> > > ixgbe.h/1.26
> > > ixgbe_82599.c/1.16
> > > ixgbe_x540.c/1.9
> > > ixgbe_type.h/1.29
> > > ixgbe_phy.c/1.18
> > > 
> > > Remaining bits are below.  I'll start picking at low hanging fruits,
> > > but won't mind another pair of eyes.
> > > 
> > 
> > I've just realised I forgot to commit one small bit that is
> > also not part of this diff that might fail the kernel compile.
> > I'll post an update in about 12 hours.
> 
> OK, the issue is resolved now. ixgbe_x550.c should be at 1.2 now.
> 
> Here's an updated diff (Hrvoje Popovski has found out that
> enable_tx_laser function pointers can be not set by X550).
> 

The remaining diff after the interrupt change was committed.  I have
kept KERNEL_LOCK/UNLOCK dance since those functions can run in
parallel with similar code triggered by ifconfig so better safe than
sorry.

I still need to go through changes in ixgbe_initialize_receive_units.
One thing that is obvious is that Intel driver calls RSS setup even
if one queue is configured which we haven't done before.  My and
others tests don't show any regression regarding this however.

"Wait for a last completion before clearing buffers" change in the
ixgbe_clear_tx_pending was committed upstream without any explanation
but "looks safe".

FCRTH related change also looks strange, needs to get checked against
documentation.

Ditto regarding changes regarding PHY power and ixgbe_handle_mod.
Hrvoje has already reported that X550 SFP doesn't seem to be able to
detect different SFP+ modules when replugged as opposed to X520.

diff --git sys/dev/pci/files.pci sys/dev/pci/files.pci
index a6b91fb..34ce9bf 100644
--- sys/dev/pci/files.pci
+++ sys/dev/pci/files.pci
@@ -351,20 +351,21 @@ file  dev/pci/ixgb_ee.c   ixgb
 file   dev/pci/ixgb_hw.c   ixgb
 
 # Intel 82598 10GbE
 device ix: ether, ifnet, ifmedia
 attach ix at pci
 file   dev/pci/if_ix.c ix
 file   dev/pci/ixgbe.c ix
 file   dev/pci/ixgbe_82598.c   ix
 file   dev/pci/ixgbe_82599.c   ix
 file   dev/pci/ixgbe_x540.cix
+file   dev/pci/ixgbe_x550.cix

Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-18 Thread Mike Belopuhov
On Thu, Nov 17, 2016 at 23:23 +0100, Mike Belopuhov wrote:
> On Thu, Nov 17, 2016 at 22:24 +0100, Mike Belopuhov wrote:
> > On Wed, Nov 16, 2016 at 23:04 +0100, Mike Belopuhov wrote:
> > > Hi,
> > > 
> > > I've done a massive update of our ix(4) driver that brings
> > > support for X550 family of controllers including those
> > > integrated into new Xeon chips as well as QSFP support for
> > > X520 (82599) but this needs thorough testing.  If you're
> > > using Intel 10Gb controllers, please make sure that you
> > > either (or both!) test the complete diff found at this URL:
> > > http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
> > > that will (hopefully) contain bits of this monster diff.
> > > 
> > > To test the monster diff, make sure that you are running a
> > > recent snapshot and your kernel source code is up-to-date,
> > > then reset a few files to the specified revisions and
> > > remove the support file for X550:
> > > 
> > > % pwd
> > > /usr/src
> > > % cvs up -r1.326 sys/dev/pci/files.pci
> > > % cvs up -r1.133 sys/dev/pci/if_ix.c
> > > % cvs up -r1.14 sys/dev/pci/ixgbe.c
> > > % cvs up -r1.23 sys/dev/pci/ixgbe.h
> > > % cvs up -r1.11 sys/dev/pci/ixgbe_82598.c
> > > % cvs up -r1.12 sys/dev/pci/ixgbe_82599.c
> > > % cvs up -r1.13 sys/dev/pci/ixgbe_phy.c
> > > % cvs up -r1.22 sys/dev/pci/ixgbe_type.h
> > > % cvs up -r1.4 sys/dev/pci/ixgbe_x540.c
> > > % rm -f sys/dev/pci/ixgbe_x550.c
> > > 
> > > To verify that files have been reset:
> > > 
> > > % pwd
> > > /usr/src
> > > % fgrep "//T1" sys/dev/pci/CVS/Entries
> > > /files.pci/1.326/Mon Sep 12 09:45:53 2016//T1.326
> > > /if_ix.c/1.133/Thu Oct 27 05:00:50 2016//T1.133
> > > /ixgbe.c/1.14/Wed Nov 26 17:03:52 2014//T1.14
> > > /ixgbe.h/1.23/Tue Oct  4 09:24:02 2016//T1.23
> > > /ixgbe_82598.c/1.11/Mon Aug  5 19:58:06 2013//T1.11
> > > /ixgbe_82599.c/1.12/Fri May  1 04:15:00 2015//T1.12
> > > /ixgbe_phy.c/1.13/Fri May  1 04:15:00 2015//T1.13
> > > /ixgbe_type.h/1.22/Wed Nov 16 21:53:57 2016//T1.22
> > > /ixgbe_x540.c/1.4/Wed May 20 14:34:27 2015//T1.4
> > > 
> > > And then test and apply the diff:
> > > 
> > > % pwd
> > > /usr/src
> > > % patch -Csp0  > > 
> > > Make sure to reset files every time the source tree gets updated.
> > > 
> > > Cheers,
> > > Mike
> > 
> > As of today and file revisions below, most of the boilerplate
> > code is now committed.  I've tried very hard to not introduce
> > any noticeable changes in behavior so far.
> > 
> > if_ix.c/1.133
> > ixgbe_82598.c/1.15
> > ixgbe_x550.c/1.1
> > ixgbe.c/1.19
> > ixgbe.h/1.26
> > ixgbe_82599.c/1.16
> > ixgbe_x540.c/1.9
> > ixgbe_type.h/1.29
> > ixgbe_phy.c/1.18
> > 
> > Remaining bits are below.  I'll start picking at low hanging fruits,
> > but won't mind another pair of eyes.
> > 
> 
> I've just realised I forgot to commit one small bit that is
> also not part of this diff that might fail the kernel compile.
> I'll post an update in about 12 hours.

OK, the issue is resolved now. ixgbe_x550.c should be at 1.2 now.

Here's an updated diff (Hrvoje Popovski has found out that
enable_tx_laser function pointers can be not set by X550).

diff --git sys/dev/pci/files.pci sys/dev/pci/files.pci
index a6b91fb..34ce9bf 100644
--- sys/dev/pci/files.pci
+++ sys/dev/pci/files.pci
@@ -356,10 +356,11 @@ attachix at pci
 file   dev/pci/if_ix.c ix
 file   dev/pci/ixgbe.c ix
 file   dev/pci/ixgbe_82598.c   ix
 file   dev/pci/ixgbe_82599.c   ix
 file   dev/pci/ixgbe_x540.cix
+file   dev/pci/ixgbe_x550.cix
 file   dev/pci/ixgbe_phy.c ix
 
 # Neterion Xframe 10 Gigabit ethernet 
 device xge: ether, ifnet, ifmedia
 attach xge  at pci
diff --git sys/dev/pci/if_ix.c sys/dev/pci/if_ix.c
index d13baea..c07758b 100644
--- sys/dev/pci/if_ix.c
+++ sys/dev/pci/if_ix.c
@@ -69,14 +69,24 @@ const struct pci_matchid ixgbe_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_BPLANE_FCOE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_CX4 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_T3_LOM },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_EM },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_SF_QP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_SF2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_FCOE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599EN_SFP },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_QSFP_SF_QP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X540T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X540T1 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550T1 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_KX4 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550

Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-17 Thread Mike Belopuhov
On Thu, Nov 17, 2016 at 22:24 +0100, Mike Belopuhov wrote:
> On Wed, Nov 16, 2016 at 23:04 +0100, Mike Belopuhov wrote:
> > Hi,
> > 
> > I've done a massive update of our ix(4) driver that brings
> > support for X550 family of controllers including those
> > integrated into new Xeon chips as well as QSFP support for
> > X520 (82599) but this needs thorough testing.  If you're
> > using Intel 10Gb controllers, please make sure that you
> > either (or both!) test the complete diff found at this URL:
> > http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
> > that will (hopefully) contain bits of this monster diff.
> > 
> > To test the monster diff, make sure that you are running a
> > recent snapshot and your kernel source code is up-to-date,
> > then reset a few files to the specified revisions and
> > remove the support file for X550:
> > 
> > % pwd
> > /usr/src
> > % cvs up -r1.326 sys/dev/pci/files.pci
> > % cvs up -r1.133 sys/dev/pci/if_ix.c
> > % cvs up -r1.14 sys/dev/pci/ixgbe.c
> > % cvs up -r1.23 sys/dev/pci/ixgbe.h
> > % cvs up -r1.11 sys/dev/pci/ixgbe_82598.c
> > % cvs up -r1.12 sys/dev/pci/ixgbe_82599.c
> > % cvs up -r1.13 sys/dev/pci/ixgbe_phy.c
> > % cvs up -r1.22 sys/dev/pci/ixgbe_type.h
> > % cvs up -r1.4 sys/dev/pci/ixgbe_x540.c
> > % rm -f sys/dev/pci/ixgbe_x550.c
> > 
> > To verify that files have been reset:
> > 
> > % pwd
> > /usr/src
> > % fgrep "//T1" sys/dev/pci/CVS/Entries
> > /files.pci/1.326/Mon Sep 12 09:45:53 2016//T1.326
> > /if_ix.c/1.133/Thu Oct 27 05:00:50 2016//T1.133
> > /ixgbe.c/1.14/Wed Nov 26 17:03:52 2014//T1.14
> > /ixgbe.h/1.23/Tue Oct  4 09:24:02 2016//T1.23
> > /ixgbe_82598.c/1.11/Mon Aug  5 19:58:06 2013//T1.11
> > /ixgbe_82599.c/1.12/Fri May  1 04:15:00 2015//T1.12
> > /ixgbe_phy.c/1.13/Fri May  1 04:15:00 2015//T1.13
> > /ixgbe_type.h/1.22/Wed Nov 16 21:53:57 2016//T1.22
> > /ixgbe_x540.c/1.4/Wed May 20 14:34:27 2015//T1.4
> > 
> > And then test and apply the diff:
> > 
> > % pwd
> > /usr/src
> > % patch -Csp0  > 
> > Make sure to reset files every time the source tree gets updated.
> > 
> > Cheers,
> > Mike
> 
> As of today and file revisions below, most of the boilerplate
> code is now committed.  I've tried very hard to not introduce
> any noticeable changes in behavior so far.
> 
> if_ix.c/1.133
> ixgbe_82598.c/1.15
> ixgbe_x550.c/1.1
> ixgbe.c/1.19
> ixgbe.h/1.26
> ixgbe_82599.c/1.16
> ixgbe_x540.c/1.9
> ixgbe_type.h/1.29
> ixgbe_phy.c/1.18
> 
> Remaining bits are below.  I'll start picking at low hanging fruits,
> but won't mind another pair of eyes.
> 

I've just realised I forgot to commit one small bit that is
also not part of this diff that might fail the kernel compile.
I'll post an update in about 12 hours.



Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-17 Thread Mike Belopuhov
On Wed, Nov 16, 2016 at 23:04 +0100, Mike Belopuhov wrote:
> Hi,
> 
> I've done a massive update of our ix(4) driver that brings
> support for X550 family of controllers including those
> integrated into new Xeon chips as well as QSFP support for
> X520 (82599) but this needs thorough testing.  If you're
> using Intel 10Gb controllers, please make sure that you
> either (or both!) test the complete diff found at this URL:
> http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
> that will (hopefully) contain bits of this monster diff.
> 
> To test the monster diff, make sure that you are running a
> recent snapshot and your kernel source code is up-to-date,
> then reset a few files to the specified revisions and
> remove the support file for X550:
> 
> % pwd
> /usr/src
> % cvs up -r1.326 sys/dev/pci/files.pci
> % cvs up -r1.133 sys/dev/pci/if_ix.c
> % cvs up -r1.14 sys/dev/pci/ixgbe.c
> % cvs up -r1.23 sys/dev/pci/ixgbe.h
> % cvs up -r1.11 sys/dev/pci/ixgbe_82598.c
> % cvs up -r1.12 sys/dev/pci/ixgbe_82599.c
> % cvs up -r1.13 sys/dev/pci/ixgbe_phy.c
> % cvs up -r1.22 sys/dev/pci/ixgbe_type.h
> % cvs up -r1.4 sys/dev/pci/ixgbe_x540.c
> % rm -f sys/dev/pci/ixgbe_x550.c
> 
> To verify that files have been reset:
> 
> % pwd
> /usr/src
> % fgrep "//T1" sys/dev/pci/CVS/Entries
> /files.pci/1.326/Mon Sep 12 09:45:53 2016//T1.326
> /if_ix.c/1.133/Thu Oct 27 05:00:50 2016//T1.133
> /ixgbe.c/1.14/Wed Nov 26 17:03:52 2014//T1.14
> /ixgbe.h/1.23/Tue Oct  4 09:24:02 2016//T1.23
> /ixgbe_82598.c/1.11/Mon Aug  5 19:58:06 2013//T1.11
> /ixgbe_82599.c/1.12/Fri May  1 04:15:00 2015//T1.12
> /ixgbe_phy.c/1.13/Fri May  1 04:15:00 2015//T1.13
> /ixgbe_type.h/1.22/Wed Nov 16 21:53:57 2016//T1.22
> /ixgbe_x540.c/1.4/Wed May 20 14:34:27 2015//T1.4
> 
> And then test and apply the diff:
> 
> % pwd
> /usr/src
> % patch -Csp0  
> Make sure to reset files every time the source tree gets updated.
> 
> Cheers,
> Mike

As of today and file revisions below, most of the boilerplate
code is now committed.  I've tried very hard to not introduce
any noticeable changes in behavior so far.

if_ix.c/1.133
ixgbe_82598.c/1.15
ixgbe_x550.c/1.1
ixgbe.c/1.19
ixgbe.h/1.26
ixgbe_82599.c/1.16
ixgbe_x540.c/1.9
ixgbe_type.h/1.29
ixgbe_phy.c/1.18

Remaining bits are below.  I'll start picking at low hanging fruits,
but won't mind another pair of eyes.

diff --git sys/dev/pci/files.pci sys/dev/pci/files.pci
index a6b91fb..34ce9bf 100644
--- sys/dev/pci/files.pci
+++ sys/dev/pci/files.pci
@@ -356,10 +356,11 @@ attachix at pci
 file   dev/pci/if_ix.c ix
 file   dev/pci/ixgbe.c ix
 file   dev/pci/ixgbe_82598.c   ix
 file   dev/pci/ixgbe_82599.c   ix
 file   dev/pci/ixgbe_x540.cix
+file   dev/pci/ixgbe_x550.cix
 file   dev/pci/ixgbe_phy.c ix
 
 # Neterion Xframe 10 Gigabit ethernet 
 device xge: ether, ifnet, ifmedia
 attach xge  at pci
diff --git sys/dev/pci/if_ix.c sys/dev/pci/if_ix.c
index d13baea..f6d23d6 100644
--- sys/dev/pci/if_ix.c
+++ sys/dev/pci/if_ix.c
@@ -69,14 +69,24 @@ const struct pci_matchid ixgbe_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_BPLANE_FCOE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_CX4 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_T3_LOM },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_EM },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_SF_QP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_SF2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_SFP_FCOE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599EN_SFP },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82599_QSFP_SF_QP },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X540T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X540T1 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550T1 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_KX4 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_KR },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_SFP },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_10G_T },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X550EM_X_1G_T },
 };
 
 /*
  *  Function prototypes
  */
@@ -96,11 +106,13 @@ intixgbe_allocate_pci_resources(struct ix_softc *);
 intixgbe_allocate_legacy(struct ix_softc *);
 intixgbe_allocate_queues(struct ix_softc *);
 void   ixgbe_free_pci_resources(struct ix_softc *);
 void   ixgbe_local_timer(void *);
 void   ixgbe_setup_interface(struct ix_softc *);
-void   ixgbe_config_link(struct ix_softc *sc);
+void   ixgbe_config_gpie(s

Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-17 Thread Mike Belopuhov
On 17 November 2016 at 11:02, Hrvoje Popovski  wrote:
> On 16.11.2016. 23:04, Mike Belopuhov wrote:
>> Hi,
>>
>> I've done a massive update of our ix(4) driver that brings
>> support for X550 family of controllers including those
>> integrated into new Xeon chips as well as QSFP support for
>> X520 (82599) but this needs thorough testing.  If you're
>> using Intel 10Gb controllers, please make sure that you
>> either (or both!) test the complete diff found at this URL:
>> http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
>> that will (hopefully) contain bits of this monster diff.
>>
>> To test the monster diff, make sure that you are running a
>> recent snapshot and your kernel source code is up-to-date,
>> then reset a few files to the specified revisions and
>> remove the support file for X550:
>
> Hi,
>
> I'm testing plain forwarding on x520-da2 (82599) and on x552 SFP+ and it
> seems that everything is working fine. Lots of ifconfig down/up, sh
> netstart ix0/ix1 removing DAC cables inserting them, and it survived :)
>
> performance:
>
> x520-da2 (82599)
> ix0 at pci6 dev 0 function 0 "Intel 82599" rev 0x01: msi, address
> a0:36:9f:2e:96
> :a0
> ix1 at pci6 dev 0 function 1 "Intel 82599" rev 0x01: msi, address
> a0:36:9f:2e:96
> :a1
>
> 12 x Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.35 MHz
>
> i'm getting 900Kpps
>
>
> 552 sfp+
> ix0 at pci4 dev 0 function 0 "Intel X552" rev 0x00: msi, address
> 00:25:90:5d:ca:38
> ix1 at pci4 dev 0 function 1 "Intel X552" rev 0x00: msi, address
> 00:25:90:5d:ca:39
>
> 4 x Intel(R) Xeon(R) CPU D-1518 @ 2.20GHz, 2200.33 MHz
>
> i'm getting 850Kpps
>
>
> will test more and report you back if something interesting shows up
>
> thank you for doing this ...
>
>

Nice.  Thanks a lot!



Re: Intel 10GbE (ix) driver update - Looking for tests

2016-11-17 Thread Hrvoje Popovski
On 16.11.2016. 23:04, Mike Belopuhov wrote:
> Hi,
> 
> I've done a massive update of our ix(4) driver that brings
> support for X550 family of controllers including those
> integrated into new Xeon chips as well as QSFP support for
> X520 (82599) but this needs thorough testing.  If you're
> using Intel 10Gb controllers, please make sure that you
> either (or both!) test the complete diff found at this URL:
> http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
> that will (hopefully) contain bits of this monster diff.
> 
> To test the monster diff, make sure that you are running a
> recent snapshot and your kernel source code is up-to-date,
> then reset a few files to the specified revisions and
> remove the support file for X550:

Hi,

I'm testing plain forwarding on x520-da2 (82599) and on x552 SFP+ and it
seems that everything is working fine. Lots of ifconfig down/up, sh
netstart ix0/ix1 removing DAC cables inserting them, and it survived :)

performance:

x520-da2 (82599)
ix0 at pci6 dev 0 function 0 "Intel 82599" rev 0x01: msi, address
a0:36:9f:2e:96
:a0
ix1 at pci6 dev 0 function 1 "Intel 82599" rev 0x01: msi, address
a0:36:9f:2e:96
:a1

12 x Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.35 MHz

i'm getting 900Kpps


552 sfp+
ix0 at pci4 dev 0 function 0 "Intel X552" rev 0x00: msi, address
00:25:90:5d:ca:38
ix1 at pci4 dev 0 function 1 "Intel X552" rev 0x00: msi, address
00:25:90:5d:ca:39

4 x Intel(R) Xeon(R) CPU D-1518 @ 2.20GHz, 2200.33 MHz

i'm getting 850Kpps


will test more and report you back if something interesting shows up

thank you for doing this ...




Intel 10GbE (ix) driver update - Looking for tests

2016-11-16 Thread Mike Belopuhov
Hi,

I've done a massive update of our ix(4) driver that brings
support for X550 family of controllers including those
integrated into new Xeon chips as well as QSFP support for
X520 (82599) but this needs thorough testing.  If you're
using Intel 10Gb controllers, please make sure that you
either (or both!) test the complete diff found at this URL:
http://gir.theapt.org/~mike/ixgbe.diff or next few snapshots
that will (hopefully) contain bits of this monster diff.

To test the monster diff, make sure that you are running a
recent snapshot and your kernel source code is up-to-date,
then reset a few files to the specified revisions and
remove the support file for X550:

% pwd
/usr/src
% cvs up -r1.326 sys/dev/pci/files.pci
% cvs up -r1.133 sys/dev/pci/if_ix.c
% cvs up -r1.14 sys/dev/pci/ixgbe.c
% cvs up -r1.23 sys/dev/pci/ixgbe.h
% cvs up -r1.11 sys/dev/pci/ixgbe_82598.c
% cvs up -r1.12 sys/dev/pci/ixgbe_82599.c
% cvs up -r1.13 sys/dev/pci/ixgbe_phy.c
% cvs up -r1.22 sys/dev/pci/ixgbe_type.h
% cvs up -r1.4 sys/dev/pci/ixgbe_x540.c
% rm -f sys/dev/pci/ixgbe_x550.c

To verify that files have been reset:

% pwd
/usr/src
% fgrep "//T1" sys/dev/pci/CVS/Entries
/files.pci/1.326/Mon Sep 12 09:45:53 2016//T1.326
/if_ix.c/1.133/Thu Oct 27 05:00:50 2016//T1.133
/ixgbe.c/1.14/Wed Nov 26 17:03:52 2014//T1.14
/ixgbe.h/1.23/Tue Oct  4 09:24:02 2016//T1.23
/ixgbe_82598.c/1.11/Mon Aug  5 19:58:06 2013//T1.11
/ixgbe_82599.c/1.12/Fri May  1 04:15:00 2015//T1.12
/ixgbe_phy.c/1.13/Fri May  1 04:15:00 2015//T1.13
/ixgbe_type.h/1.22/Wed Nov 16 21:53:57 2016//T1.22
/ixgbe_x540.c/1.4/Wed May 20 14:34:27 2015//T1.4

And then test and apply the diff:

% pwd
/usr/src
% patch -Csp0