Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen Account for the CRC len (Jean-Jacques.Puig)
details: https://anonhg.NetBSD.org/src/rev/3b4edf0839e6
branches: trunk
changeset: 345133:3b4edf0839e6
user: christos <christos%NetBSD.org@localhost>
date: Mon May 09 15:11:35 2016 +0000
description:
Account for the CRC len (Jean-Jacques.Puig)
diffstat:
sys/arch/xen/xen/xennetback_xenbus.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 965e3b72b4d4 -r 3b4edf0839e6 sys/arch/xen/xen/xennetback_xenbus.c
--- a/sys/arch/xen/xen/xennetback_xenbus.c Mon May 09 15:05:15 2016 +0000
+++ b/sys/arch/xen/xen/xennetback_xenbus.c Mon May 09 15:11:35 2016 +0000
@@ -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 @@
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";
Home |
Main Index |
Thread Index |
Old Index