Module Name:    src
Committed By:   rin
Date:           Wed Feb  6 08:01:24 UTC 2019

Modified Files:
        src/sys/dev/usb: if_axen.c

Log Message:
Oops, fix previous again. Really support TSOv4.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/if_axen.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/dev/usb/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.30 src/sys/dev/usb/if_axen.c:1.31
--- src/sys/dev/usb/if_axen.c:1.30	Wed Feb  6 07:59:24 2019
+++ src/sys/dev/usb/if_axen.c	Wed Feb  6 08:01:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_axen.c,v 1.30 2019/02/06 07:59:24 rin Exp $	*/
+/*	$NetBSD: if_axen.c,v 1.31 2019/02/06 08:01:24 rin Exp $	*/
 /*	$OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.30 2019/02/06 07:59:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.31 2019/02/06 08:01:24 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1305,7 +1305,8 @@ axen_encap(struct axen_softc *sc, struct
 
 	hdr.plen = htole32(m->m_pkthdr.len);
 
-	hdr.gso = 0; /* disable segmentation offloading */
+	hdr.gso = (m->m_pkthdr.csum_flags & M_CSUM_TSOv4) ?
+	    m->m_pkthdr.segsz : 0;
 	if ((length % boundary) == 0) {
 		DPRINTF(("%s: boundary hit\n", device_xname(sc->axen_dev)));
 		hdr.gso |= 0x80008000;	/* XXX enable padding */

Reply via email to