Page MenuHomeFreeBSD

MFC ixgbe(4) 3.1.13-k
ClosedPublic

Authored by sbruno on Jan 29 2016, 2:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 6:25 AM
Unknown Object (File)
Feb 9 2024, 4:09 AM
Unknown Object (File)
Feb 7 2024, 10:13 PM
Unknown Object (File)
Feb 5 2024, 11:15 PM
Unknown Object (File)
Dec 31 2023, 8:55 AM
Unknown Object (File)
Dec 23 2023, 11:27 AM
Unknown Object (File)
Dec 17 2023, 5:45 PM
Unknown Object (File)
Dec 15 2023, 8:30 AM

Details

Summary

MFC ixgbe(4) 3.1.13-k

  • r292674

Add support for X552 and X550T

  • 292751 and 292697 added here to fix the build

Fix SFP module insertion post boot

  • 293334

Fix VF handling of VLANS for Amazon Cloud

  • 293338
Test Plan

-Basic Traffic tests (ftp, NFS, TCP, UDP)
-Cable plug/unplug and module detect
-Stress Traffic w/ Netperf (TCP/UDP IPv4/6)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sbruno retitled this revision from to MFC ixgbe(4) 3.1.13-k - r292674 Add support for X552 and X550T - 292751 and 292697 added here to fix the build Fix SFP module insertion post boot - 293334 Fix VF handling of VLANS for Amazon Cloud - 293338.
sbruno updated this object.
sbruno edited the test plan for this revision. (Show Details)
sbruno retitled this revision from MFC ixgbe(4) 3.1.13-k - r292674 Add support for X552 and X550T - 292751 and 292697 added here to fix the build Fix SFP module insertion post boot - 293334 Fix VF handling of VLANS for Amazon Cloud - 293338 to MFC ixgbe(4) 3.1.13-k .Jan 29 2016, 2:53 PM
sbruno updated this object.
sbruno edited edge metadata.
sbruno added a subscriber: smh.

We have a version of just this but back ported to 10.2 running in production.

Comparing our diffs highlights the following:

  1. Looks like your missing MFC of r285592, was that intentional?
  2. We have one additional block, looking at head this looks like it should be present in your changes too wanted to double check it wasn't a miss-merge on either your or our side?
sys/dev/ixgbe/if_ixv.c
@@ -1703,17 +1694,11 @@ ixv_initialize_receive_units(struct adap
        reg |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF;
        IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(i), reg);
 
-       /* Setup the HW Rx Head and Tail Descriptor Pointers */
-       IXGBE_WRITE_REG(hw, IXGBE_VFRDH(rxr->me), 0);
-       IXGBE_WRITE_REG(hw, IXGBE_VFRDT(rxr->me),
-           adapter->num_rx_desc - 1);
-
-       /* Set Rx Tail register */
In D5117#108830, @smh wrote:

We have a version of just this but back ported to 10.2 running in production.

Comparing our diffs highlights the following:

  1. Looks like your missing MFC of r285592, was that intentional?
  2. We have one additional block, looking at head this looks like it should be present in your changes too wanted to double check it wasn't a miss-merge on either your or our side?
sys/dev/ixgbe/if_ixv.c
@@ -1703,17 +1694,11 @@ ixv_initialize_receive_units(struct adap
        reg |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF;
        IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(i), reg);
 
-       /* Setup the HW Rx Head and Tail Descriptor Pointers */
-       IXGBE_WRITE_REG(hw, IXGBE_VFRDH(rxr->me), 0);
-       IXGBE_WRITE_REG(hw, IXGBE_VFRDT(rxr->me),
-           adapter->num_rx_desc - 1);
-
-       /* Set Rx Tail register */

I should have captured r285592 in the MFC of driver version 3.1.0 to stable 10. https://svnweb.freebsd.org/base?view=revision&revision=294061

The second point, looks like an svn mismerge. I'll fix that directly.

sbruno retitled this revision from MFC ixgbe(4) 3.1.13-k to MFC ixgbe(4) 3.1.13-k.

Fix mismerge is ixv_initialize_receive_units as pointed out by smh.

I should have captured r285592 in the MFC of driver version 3.1.0 to stable 10. https://svnweb.freebsd.org/base?view=revision&revision=294061

In that case you may be missing a few netmap bits according to our patch:

sys/dev/ixgbe/if_ix.c
@@ -446,9 +463,14 @@ ixgbe_attach(device_t dev)
 
    /* Allocate, clear, and link in our adapter structure */
    adapter = device_get_softc(dev);
-   adapter->dev = adapter->osdep.dev = dev;
+   adapter->dev = dev;
    hw = &adapter->hw;
 
+#ifdef DEV_NETMAP
+   adapter->init_locked = ixgbe_init_locked;
+   adapter->stop_locked = ixgbe_stop;
+#endif
+
    /* Core Lock Init*/
    IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));


sys/dev/ixgbe/ixgbe.h
@@ -555,6 +562,10 @@ struct adapter {
 #ifdef PCI_IOV
    struct ixgbe_vf     *vfs;
 #endif
+#ifdef DEV_NETMAP
+   void            (*init_locked)(struct adapter *);
+   void            (*stop_locked)(void *);
+#endif
 
    /* Misc stats maintained by the driver */
    unsigned long       dropped_pkts;


sys/dev/ixgbe/if_ixv.c
@@ -292,9 +292,14 @@ ixv_attach(device_t dev)
 
    /* Allocate, clear, and link in our adapter structure */
    adapter = device_get_softc(dev);
-   adapter->dev = adapter->osdep.dev = dev;
+   adapter->dev = dev;
    hw = &adapter->hw;
 
+#ifdef DEV_NETMAP
+   adapter->init_locked = ixv_init_locked;
+   adapter->stop_locked = ixv_stop;
+#endif
+
    /* Core Lock Init*/
    IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));
In D5117#108861, @smh wrote:

I should have captured r285592 in the MFC of driver version 3.1.0 to stable 10. https://svnweb.freebsd.org/base?view=revision&revision=294061

In that case you may be missing a few netmap bits according to our patch:

sys/dev/ixgbe/if_ix.c
@@ -446,9 +463,14 @@ ixgbe_attach(device_t dev)
 
    /* Allocate, clear, and link in our adapter structure */
    adapter = device_get_softc(dev);
-   adapter->dev = adapter->osdep.dev = dev;
+   adapter->dev = dev;
    hw = &adapter->hw;
 
+#ifdef DEV_NETMAP
+   adapter->init_locked = ixgbe_init_locked;
+   adapter->stop_locked = ixgbe_stop;
+#endif
+
    /* Core Lock Init*/
    IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));


sys/dev/ixgbe/ixgbe.h
@@ -555,6 +562,10 @@ struct adapter {
 #ifdef PCI_IOV
    struct ixgbe_vf     *vfs;
 #endif
+#ifdef DEV_NETMAP
+   void            (*init_locked)(struct adapter *);
+   void            (*stop_locked)(void *);
+#endif
 
    /* Misc stats maintained by the driver */
    unsigned long       dropped_pkts;


sys/dev/ixgbe/if_ixv.c
@@ -292,9 +292,14 @@ ixv_attach(device_t dev)
 
    /* Allocate, clear, and link in our adapter structure */
    adapter = device_get_softc(dev);
-   adapter->dev = adapter->osdep.dev = dev;
+   adapter->dev = dev;
    hw = &adapter->hw;
 
+#ifdef DEV_NETMAP
+   adapter->init_locked = ixv_init_locked;
+   adapter->stop_locked = ixv_stop;
+#endif
+
    /* Core Lock Init*/
    IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));

the changes for osdep.dev seem to be deprecated completely by this driver update and the dev element of struct ixgbe_osdep has been removed. The NETMAP changes may be relevant, I'll poke at them.

Address missing #ifdef DEV_NETMAP code pointed out by smh.

Compile tested amd64/i386 +netmap.

Almost there. recomparing with our diff the only remaining missing block is the following which comes from between r283882 and r283883:

sys/dev/ixgbe/if_ix.c
@@ -3146,11 +3285,11 @@ ixgbe_initialize_receive_units(struct ad
 			srrctl &= ~IXGBE_SRRCTL_DROP_EN;
 		}
 
-		IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl);
+		IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(j), srrctl);
 
 		/* Setup the HW Rx Head and Tail Descriptor Pointers */
-		IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0);
-		IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0);
+		IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0);
+		IXGBE_WRITE_REG(hw, IXGBE_RDT(j), 0);
 
 		/* Set the driver rx tail address */
 		rxr->tail =  IXGBE_RDT(rxr->me);

Fix mismerge of r283883 noted by smh to repair queue descriptor setup.

smh added a reviewer: smh.
This revision is now accepted and ready to land.Feb 3 2016, 4:14 PM

I have this running on top of 10-STABLE (10.3-PRERELEASE) on X520, X540, X550, X552, and X552/X557. Everything seems to behaving as expected and doing "stuff". Will continue to run tests.

ngie added a reviewer: ngie.

Other than the slight nitpicky spot with sys/conf/files that might make future merges a bit weird, LGTM!

sys/conf/files
1731–1732 ↗(On Diff #12959)

This is in a different spot on head:

284767        erj dev/ixgbe/ix_txrx.c           optional ix inet | ixv inet \
215911        jfv       compile-with "${NORMAL_C} -I$S/dev/ixgbe"
292674     sbruno dev/ixgbe/ixgbe_osdep.c               optional ix inet | ixv inet \
292674     sbruno       compile-with "${NORMAL_C} -I$S/dev/ixgbe"
284767        erj dev/ixgbe/ixgbe_phy.c         optional ix inet | ixv inet \
171383        jfv       compile-with "${NORMAL_C} -I$S/dev/ixgbe"
This revision was automatically updated to reflect the committed changes.