summaryrefslogtreecommitdiff
path: root/sys/net/ifq.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2020-05-21 00:06:17 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2020-05-21 00:06:17 +0000
commit930b06256ab0e1172c4bdeb245a591ea6e7a6b30 (patch)
treec1e8ca7983f00bda5c11e1ef08c24898edac32f6 /sys/net/ifq.c
parent0d9b833993850ac45e91004eca447798dc7f4a93 (diff)
back out 1.38. some bits of the stack aren't ready for it yet.
mark patruck found significant packet drops with trunk(4), and there's some reports that pppx or pipex relies on some implicit locking that it shouldn't. i can fix those without this diff being in the tree.
Diffstat (limited to 'sys/net/ifq.c')
-rw-r--r--sys/net/ifq.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/net/ifq.c b/sys/net/ifq.c
index 64973cbe73c..fc6518d782d 100644
--- a/sys/net/ifq.c
+++ b/sys/net/ifq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifq.c,v 1.38 2020/05/20 01:28:59 dlg Exp $ */
+/* $OpenBSD: ifq.c,v 1.39 2020/05/21 00:06:16 dlg Exp $ */
/*
* Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
@@ -122,10 +122,7 @@ ifq_is_serialized(struct ifqueue *ifq)
void
ifq_start(struct ifqueue *ifq)
{
- struct ifnet *ifp = ifq->ifq_if;
-
- if (ISSET(ifp->if_xflags, IFXF_MPSAFE) &&
- ifq_len(ifq) >= min(ifp->if_txmit, ifq->ifq_maxlen)) {
+ if (ifq_len(ifq) >= min(ifq->ifq_if->if_txmit, ifq->ifq_maxlen)) {
task_del(ifq->ifq_softnet, &ifq->ifq_bundle);
ifq_run_start(ifq);
} else
@@ -195,8 +192,7 @@ void
ifq_init(struct ifqueue *ifq, struct ifnet *ifp, unsigned int idx)
{
ifq->ifq_if = ifp;
- ifq->ifq_softnet = ISSET(ifp->if_xflags, IFXF_MPSAFE) ?
- net_tq(ifp->if_index /* + idx */) : systq;
+ ifq->ifq_softnet = net_tq(ifp->if_index); /* + idx */
ifq->ifq_softc = NULL;
mtx_init(&ifq->ifq_mtx, IPL_NET);