summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2021-04-07 06:52:23 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2021-04-07 06:52:23 +0000
commitdc0e269e3738559e85eaf0be627bed3c39346dac (patch)
tree8e5c98531fc92c087debdb51503f397957029769 /sys/dev/usb
parent35b7174328b95c90c36226df9e81e6976f25a1aa (diff)
back out r1.22, ie, don't blindly trim the FCS on rxed packets.
there's been multiple reports of severely reduced throughput using ure(4) since 1.22 was committed, but all the gear we have to play with is fine with it. i'm backing the diff out until we can get a better handle on the problem discussed with and ok kevlo@ jmatthew@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_ure.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c
index 7cf5d436dc6..9ade5cec0fc 100644
--- a/sys/dev/usb/if_ure.c
+++ b/sys/dev/usb/if_ure.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ure.c,v 1.22 2021/03/27 01:12:01 dlg Exp $ */
+/* $OpenBSD: if_ure.c,v 1.23 2021/04/07 06:52:22 dlg Exp $ */
/*-
* Copyright (c) 2015, 2016, 2019 Kevin Lo <kevlo@openbsd.org>
* Copyright (c) 2020 Jonathon Fletcher <jonathon.fletcher@gmail.com>
@@ -1896,17 +1896,10 @@ ure_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
ifp->if_ierrors++;
goto done;
}
- if (pktlen < ETHER_MIN_LEN) {
- DPRINTF(("Ethernet frame is too short\n"));
- ifp->if_ierrors++;
- goto done;
- }
total_len -= roundup(pktlen, URE_RX_BUF_ALIGN);
buf += sizeof(rxhdr);
- /* trim fcs */
- pktlen -= ETHER_CRC_LEN;
m = m_devget(buf, pktlen, ETHER_ALIGN);
if (m == NULL) {
DPRINTF(("unable to allocate mbuf for next packet\n"));