summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-02-26 17:33:43 +0000
committeryongari <yongari@FreeBSD.org>2010-02-26 17:33:43 +0000
commitc6210b95bd330b1ebc91576e8574146223992440 (patch)
treef8fda5f3f4e8c0b0ba93bf805cc5c11a5f29a9f6 /sys
parentf8c1973bea8859e53e08f81f388f51a157f2e872 (diff)
downloadFreeBSD-src-c6210b95bd330b1ebc91576e8574146223992440.zip
FreeBSD-src-c6210b95bd330b1ebc91576e8574146223992440.tar.gz
Add TSO support on VLANs. Controller requires VLAN hardware tagging
to make TSO work over VLANs.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/msk/if_msk.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index fc8208e..38c73f7 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -1006,11 +1006,6 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
if ((mask & IFCAP_RXCSUM) != 0 &&
(IFCAP_RXCSUM & ifp->if_capabilities) != 0)
ifp->if_capenable ^= IFCAP_RXCSUM;
- if ((mask & IFCAP_VLAN_HWTAGGING) != 0 &&
- (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) {
- ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
- msk_setvlan(sc_if, ifp);
- }
if ((mask & IFCAP_VLAN_HWCSUM) != 0 &&
(IFCAP_VLAN_HWCSUM & ifp->if_capabilities) != 0)
ifp->if_capenable ^= IFCAP_VLAN_HWCSUM;
@@ -1022,6 +1017,16 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
else
ifp->if_hwassist &= ~CSUM_TSO;
}
+ if ((mask & IFCAP_VLAN_HWTSO) != 0 &&
+ (IFCAP_VLAN_HWTSO & ifp->if_capabilities) != 0)
+ ifp->if_capenable ^= IFCAP_VLAN_HWTSO;
+ if ((mask & IFCAP_VLAN_HWTAGGING) != 0 &&
+ (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) {
+ ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
+ if ((IFCAP_VLAN_HWTAGGING & ifp->if_capenable) == 0)
+ ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
+ msk_setvlan(sc_if, ifp);
+ }
if (ifp->if_mtu > ETHERMTU &&
(sc_if->msk_flags & MSK_FLAG_JUMBO_NOCSUM) != 0) {
ifp->if_hwassist &= ~(MSK_CSUM_FEATURES | CSUM_TSO);
@@ -1559,7 +1564,7 @@ msk_attach(device_t dev)
* this workaround does not work so disable checksum offload
* for VLAN interface.
*/
- ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
+ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO;
/*
* Enable Rx checksum offloading for VLAN taggedd frames
* if controller support new descriptor format.
OpenPOWER on IntegriCloud