diff options
author | Andrew Rybchenko <arybchik@FreeBSD.org> | 2015-05-15 06:49:43 +0000 |
---|---|---|
committer | Andrew Rybchenko <arybchik@FreeBSD.org> | 2015-05-15 06:49:43 +0000 |
commit | 22bc53cb4871ef8b65e2bacc85024c163e144ba5 (patch) | |
tree | fdc5d6f013728e18c39f747270afd3bc6148b585 /sys | |
parent | 3b3390c1159457f206cda40e66b847c746b71f61 (diff) | |
download | src-22bc53cb4871ef8b65e2bacc85024c163e144ba5.tar.gz src-22bc53cb4871ef8b65e2bacc85024c163e144ba5.zip |
Notes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sfxge/sfxge.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/sfxge/sfxge.c b/sys/dev/sfxge/sfxge.c index 460d625699f8..fad76976d92c 100644 --- a/sys/dev/sfxge/sfxge.c +++ b/sys/dev/sfxge/sfxge.c @@ -282,10 +282,14 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - if (ifp->if_capenable & IFCAP_TSO) - ifp->if_hwassist |= CSUM_TSO; - else - ifp->if_hwassist &= ~CSUM_TSO; + + /* + * The kernel takes both IFCAP_TSOx and CSUM_TSO into + * account before using TSO. So, we do not touch + * checksum flags when IFCAP_TSOx is modified. + * Note that CSUM_TSO is (CSUM_IP_TSO|CSUM_IP6_TSO), + * but both bits are set in IPv4 and IPv6 mbufs. + */ SFXGE_ADAPTER_UNLOCK(sc); break; |