diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-06-15 23:57:42 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-06-15 23:57:42 +0000 |
commit | 02300f227ffc4cadfc19d925b489f443132b1376 (patch) | |
tree | d5efbd7578982ffd4278b8857f7acb6969a2ffa2 /sys/net/if_sl.c | |
parent | efc9e973bf86814f88bf2b016d7b3d6d866fb32d (diff) | |
download | FreeBSD-src-02300f227ffc4cadfc19d925b489f443132b1376.zip FreeBSD-src-02300f227ffc4cadfc19d925b489f443132b1376.tar.gz |
Replace IF_HANDOFF with new IFQ_HANDOFF to enqueue with ALTQ once enabled on
the respective drivers.
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r-- | sys/net/if_sl.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index bc35341..5037742 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -549,8 +549,7 @@ sloutput(ifp, m, dst, rtp) { register struct sl_softc *sc = ifp->if_softc; register struct ip *ip; - register struct ifqueue *ifq; - int s; + int s, error; /* * `Cannot happen' (see slioctl). Someday we will extend @@ -571,15 +570,17 @@ sloutput(ifp, m, dst, rtp) m_freem(m); return (EHOSTUNREACH); } - ifq = (struct ifqueue *)&sc->sc_if.if_snd; ip = mtod(m, struct ip *); if (sc->sc_if.if_flags & SC_NOICMP && ip->ip_p == IPPROTO_ICMP) { m_freem(m); return (ENETRESET); /* XXX ? */ } - if (ip->ip_tos & IPTOS_LOWDELAY) - ifq = &sc->sc_fastq; - if (! IF_HANDOFF(ifq, m, NULL)) { + if (ip->ip_tos & IPTOS_LOWDELAY && + !ALTQ_IS_ENABLED(&sc->sc_if.if_snd)) + error = !(IF_HANDOFF(&sc->sc_fastq, m, NULL)); + else + IFQ_HANDOFF(&sc->sc_if, m, error); + if (error) { sc->sc_if.if_oerrors++; return (ENOBUFS); } |