MFC: r282941

sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed

It is simply not required since the kernel checks corresponding
IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads.
Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits
are set in IPv4 and IPv6 mbufs.

Sponsored by:   Solarflare Communications, Inc.
This commit is contained in:
Andrew Rybchenko 2015-05-21 09:06:41 +00:00
parent 153c1a6a3b
commit d17a4e7033
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=283207

View File

@ -281,10 +281,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;