svn commit: r316716 - head/sys/net
Andrey V. Elsukov
ae at FreeBSD.org
Tue Apr 11 19:23:26 UTC 2017
Author: ae
Date: Tue Apr 11 19:23:25 2017
New Revision: 316716
URL: https://svnweb.freebsd.org/changeset/base/316716
Log:
Inherit IPv6 checksum offloading flags to vlan interfaces.
if_vlan(4) interfaces inherit IPv4 checksum offloading flags from the
parent when VLAN_HWCSUM and VLAN_HWTAGGING flags are present on the
parent interface. Do the same for IPv6 checksum offloading flags.
Reported by: Harry Schmalzbauer
Reviewed by: np, gnn
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10356
Modified:
head/sys/net/if_vlan.c
Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c Tue Apr 11 19:20:20 2017 (r316715)
+++ head/sys/net/if_vlan.c Tue Apr 11 19:23:25 2017 (r316716)
@@ -1555,13 +1555,16 @@ vlan_capabilities(struct ifvlan *ifv)
* offloading requires hardware VLAN tagging.
*/
if (p->if_capabilities & IFCAP_VLAN_HWCSUM)
- ifp->if_capabilities = p->if_capabilities & IFCAP_HWCSUM;
+ ifp->if_capabilities =
+ p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6);
if (p->if_capenable & IFCAP_VLAN_HWCSUM &&
p->if_capenable & IFCAP_VLAN_HWTAGGING) {
- ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
+ ifp->if_capenable =
+ p->if_capenable & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6);
ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
- CSUM_UDP | CSUM_SCTP);
+ CSUM_UDP | CSUM_SCTP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 |
+ CSUM_SCTP_IPV6);
} else {
ifp->if_capenable = 0;
ifp->if_hwassist = 0;
More information about the svn-src-head
mailing list