From: dlg Date: Wed, 7 Apr 2021 06:52:22 +0000 (+0000) Subject: back out r1.22, ie, don't blindly trim the FCS on rxed packets. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fd4ab25a5319afd45789b5ff6516cbeaf8874d62;p=openbsd 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@ --- 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 * Copyright (c) 2020 Jonathon Fletcher @@ -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"));