diff options
author | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2015-10-05 19:05:10 +0000 |
---|---|---|
committer | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2015-10-05 19:05:10 +0000 |
commit | 06158c5263773e7616cc1f4acad4eb541edac78b (patch) | |
tree | d6b055d0ad05af5616a56d23e26d27134e4e3919 /sys/net/if_ppp.c | |
parent | 9679852c2bf6b6b06d5621959028e4cf4c89f128 (diff) |
Revert if_oqdrops accounting changes done in kernel, per request from mpi@.
(Especially adding IF_DROP() after IFQ_ENQUEUE() was completely wrong because
IFQ_ENQUEUE() already does it. Oops.)
After this revert, the situation becomes:
- if_snd.ifq_drops is incremented in either IFQ_ENQUEUE() or IF_DROP(), but
it is not shown to userland, and
- if_data.ifi_oqdrops is shown to userland, but it is not incremented by
anyone.
Diffstat (limited to 'sys/net/if_ppp.c')
-rw-r--r-- | sys/net/if_ppp.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 68570b3dcc6..6f11546a29d 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.88 2015/10/05 15:57:27 uebayasi Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.89 2015/10/05 19:05:09 uebayasi Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -803,13 +803,11 @@ pppoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, IF_ENQUEUE(ifq, m0); error = 0; } - } else { + } else IFQ_ENQUEUE(&sc->sc_if.if_snd, m0, NULL, error); - if (error) - IF_DROP(&sc->sc_if.if_snd); - } if (error) { splx(s); + sc->sc_if.if_oerrors++; sc->sc_stats.ppp_oerrors++; return (error); } @@ -868,12 +866,10 @@ ppp_requeue(struct ppp_softc *sc) IF_ENQUEUE(ifq, m); error = 0; } - } else { + } else IFQ_ENQUEUE(&sc->sc_if.if_snd, m, NULL, error); - if (error) - IF_DROP(&sc->sc_if.if_snd); - } if (error) { + sc->sc_if.if_oerrors++; sc->sc_stats.ppp_oerrors++; } break; |