diff options
author | 2015-11-07 12:37:18 +0000 | |
---|---|---|
committer | 2015-11-07 12:37:18 +0000 | |
commit | a92ab5136a19e8016ac288edd4a428801bb51f90 (patch) | |
tree | 6b9237417b0713c765e3f46242badbee2c4f6df5 | |
parent | get rid of IF_PREPEND by switching to IFQ_POLL/IFQ_DEQUEUE. (diff) | |
download | wireguard-openbsd-a92ab5136a19e8016ac288edd4a428801bb51f90.tar.xz wireguard-openbsd-a92ab5136a19e8016ac288edd4a428801bb51f90.zip |
Don't try to be clever testing if a queue is full before calling
if_enqueue(). As pointed by dlg@, IF_QFULL on works in the priq
case.
Prompted by a diff from uebayasi@ to export ifi_oqdrops, ok dlg@
-rw-r--r-- | sys/net/bridgestp.c | 7 | ||||
-rw-r--r-- | sys/net/if_bridge.c | 18 |
2 files changed, 2 insertions, 23 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index ba7360f3323..02e279cbb64 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bridgestp.c,v 1.61 2015/11/02 14:35:12 reyk Exp $ */ +/* $OpenBSD: bridgestp.c,v 1.62 2015/11/07 12:37:18 mpi Exp $ */ /* * Copyright (c) 2000 Jason L. Wright (jason@thought.net) @@ -466,11 +466,6 @@ bstp_send_bpdu(struct bstp_state *bs, struct bstp_port *bp, if (ifp == NULL || (ifp->if_flags & IFF_RUNNING) == 0) goto done; - if (IF_QFULL(&ifp->if_snd)) { - IF_DROP(&ifp->if_snd); - goto done; - } - MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) goto done; diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index f9cb3d66cc0..253dcdda50a 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.268 2015/10/12 10:03:25 reyk Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.269 2015/11/07 12:37:18 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1028,11 +1028,6 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa, (m->m_flags & (M_BCAST | M_MCAST)) == 0) continue; - if (IF_QFULL(&dst_if->if_snd)) { - IF_DROP(&dst_if->if_snd); - sc->sc_if.if_oerrors++; - continue; - } if (TAILQ_NEXT(p, next) == NULL) { used = 1; mc = m; @@ -1458,11 +1453,6 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *ifp, dst_if->if_type == IFT_MPLSTUNNEL) continue; #endif /* NMPW */ - if (IF_QFULL(&dst_if->if_snd)) { - IF_DROP(&dst_if->if_snd); - sc->sc_if.if_oerrors++; - continue; - } /* If last one, reuse the passed-in mbuf */ if (TAILQ_NEXT(p, next) == NULL) { @@ -1542,12 +1532,6 @@ bridge_span(struct bridge_softc *sc, struct mbuf *m) if ((ifp->if_flags & IFF_RUNNING) == 0) continue; - if (IF_QFULL(&ifp->if_snd)) { - IF_DROP(&ifp->if_snd); - sc->sc_if.if_oerrors++; - continue; - } - mc = m_copym(m, 0, M_COPYALL, M_DONTWAIT); if (mc == NULL) { sc->sc_if.if_oerrors++; |