Module Name:    src
Committed By:   darran
Date:           Wed Apr  1 22:56:59 UTC 2009

Modified Files:
        src/sys/net: if_vlan.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/net/if_vlan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.62 src/sys/net/if_vlan.c:1.63
--- src/sys/net/if_vlan.c:1.62	Wed Dec 17 20:51:37 2008
+++ src/sys/net/if_vlan.c	Wed Apr  1 22:56:59 2009
@@ -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 @@
 		/*
 		 * 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|

Reply via email to