Author: gallatin
Date: Mon Mar 22 14:50:08 2010
New Revision: 205447
URL: http://svn.freebsd.org/changeset/base/205447

Log:
  MFC 204212: Update mxge to support IFCAP_VLAN_HWTSO.

Modified:
  stable/8/sys/dev/mxge/if_mxge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/mxge/if_mxge.c
==============================================================================
--- stable/8/sys/dev/mxge/if_mxge.c     Mon Mar 22 13:21:52 2010        
(r205446)
+++ stable/8/sys/dev/mxge/if_mxge.c     Mon Mar 22 14:50:08 2010        
(r205447)
@@ -4122,6 +4122,13 @@ mxge_ioctl(struct ifnet *ifp, u_long com
                }
                if (mask & IFCAP_VLAN_HWTAGGING)
                        ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
+               if (mask & IFCAP_VLAN_HWTSO)
+                       ifp->if_capenable ^= IFCAP_VLAN_HWTSO;
+
+               if (!(ifp->if_capabilities & IFCAP_VLAN_HWTSO) ||
+                   !(ifp->if_capenable & IFCAP_VLAN_HWTAGGING))
+                       ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
+
                mtx_unlock(&sc->driver_mtx);
                VLAN_CAPABILITIES(ifp);
 
@@ -4733,6 +4740,11 @@ mxge_attach(device_t dev)
 
 #ifdef MXGE_NEW_VLAN_API
        ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM;
+
+       /* Only FW 1.4.32 and newer can do TSO over vlans */
+       if (sc->fw_ver_major == 1 && sc->fw_ver_minor == 4 &&
+           sc->fw_ver_tiny >= 32)
+               ifp->if_capabilities |= IFCAP_VLAN_HWTSO;
 #endif
 
        sc->max_mtu = mxge_max_mtu(sc);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to