Module Name:    src
Committed By:   christos
Date:           Mon May  9 15:11:35 UTC 2016

Modified Files:
        src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
Account for the CRC len (Jean-Jacques.Puig)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/xen/xen/xennetback_xenbus.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/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.55 src/sys/arch/xen/xen/xennetback_xenbus.c:1.56
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.55	Tue Feb  9 03:32:10 2016
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Mon May  9 11:11:35 2016
@@ -1,4 +1,4 @@
-/*      $NetBSD: xennetback_xenbus.c,v 1.55 2016/02/09 08:32:10 ozaki-r Exp $      */
+/*      $NetBSD: xennetback_xenbus.c,v 1.56 2016/05/09 15:11:35 christos Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.55 2016/02/09 08:32:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.56 2016/05/09 15:11:35 christos Exp $");
 
 #include "opt_xen.h"
 
@@ -720,8 +720,9 @@ xennetback_tx_check_packet(const netif_t
 	if (__predict_false(txreq->offset + txreq->size > PAGE_SIZE))
 		return "crossing a page boundary";
 
-	const int maxlen =
-	    vlan ? (ETHER_VLAN_ENCAP_LEN + ETHER_MAX_LEN) : ETHER_MAX_LEN;
+	int maxlen = ETHER_MAX_LEN - ETHER_CRC_LEN;
+	if (vlan)
+		maxlen += ETHER_VLAN_ENCAP_LEN;
 	if (__predict_false(txreq->size > maxlen))
 		return "too big";
 

Reply via email to