Date: Mon, 22 Feb 2010 16:57:03 +0000 (UTC) From: Andrew Gallatin <gallatin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r204212 - head/sys/dev/mxge Message-ID: <201002221657.o1MGv3sk003310@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gallatin Date: Mon Feb 22 16:57:03 2010 New Revision: 204212 URL: http://svn.freebsd.org/changeset/base/204212 Log: Update mxge to support IFCAP_VLAN_HWTSO. Note: If/when FreeBSD supports TSO over IPv6, the minimal mxge fw rev to enable IFCAP_VLAN_HWTSO will need to be increased to 1.4.37 Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Mon Feb 22 16:49:45 2010 (r204211) +++ head/sys/dev/mxge/if_mxge.c Mon Feb 22 16:57:03 2010 (r204212) @@ -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); @@ -4734,6 +4741,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002221657.o1MGv3sk003310>