diff options
author | gallatin <gallatin@FreeBSD.org> | 2010-02-22 16:57:03 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2010-02-22 16:57:03 +0000 |
commit | 4c0d544d24607e960f2be5774940aa899d371848 (patch) | |
tree | c2025d058e99db9b4423feffbb1b8b77022ce33c /sys/dev/mxge | |
parent | 911ef3e63a10a36b09b7bd36839f79e0e8dd5758 (diff) | |
download | FreeBSD-src-4c0d544d24607e960f2be5774940aa899d371848.zip FreeBSD-src-4c0d544d24607e960f2be5774940aa899d371848.tar.gz |
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
Diffstat (limited to 'sys/dev/mxge')
-rw-r--r-- | sys/dev/mxge/if_mxge.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index 6dcba39..5b8bb99 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -4122,6 +4122,13 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } 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); |