Also inherit the parent's TCP segmentation offload capability.

Note the vlan interface does not see updates to the parents capabilities
so if, for example, TSO is on in both, then turned off in the parent it
will remain on in the vlan interface.
This commit is contained in:
darran 2009-04-01 22:56:59 +00:00
parent 23d4af832f
commit 49d3640ae0
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vlan.c,v 1.62 2008/12/17 20:51:37 cegger Exp $ */
/* $NetBSD: if_vlan.c,v 1.63 2009/04/01 22:56:59 darran Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.62 2008/12/17 20:51:37 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.63 2009/04/01 22:56:59 darran Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -316,11 +316,13 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p)
/*
* If the parent interface can do hardware-assisted
* VLAN encapsulation, then propagate its hardware-
* assisted checksumming flags.
* assisted checksumming flags and tcp segmentation
* offload.
*/
if (ec->ec_capabilities & ETHERCAP_VLAN_HWTAGGING)
ifp->if_capabilities = p->if_capabilities &
(IFCAP_CSUM_IPv4_Tx|IFCAP_CSUM_IPv4_Rx|
(IFCAP_TSOv4 |
IFCAP_CSUM_IPv4_Tx|IFCAP_CSUM_IPv4_Rx|
IFCAP_CSUM_TCPv4_Tx|IFCAP_CSUM_TCPv4_Rx|
IFCAP_CSUM_UDPv4_Tx|IFCAP_CSUM_UDPv4_Rx|
IFCAP_CSUM_TCPv6_Tx|IFCAP_CSUM_TCPv6_Rx|