-/* $OpenBSD: if_de.c,v 1.119 2015/04/01 13:35:32 mpi Exp $ */
+/* $OpenBSD: if_de.c,v 1.120 2015/05/15 11:36:30 mpi Exp $ */
/* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */
/*-
TULIP_PERFSTART(rxintr)
tulip_ringinfo_t * const ri = &sc->tulip_rxinfo;
struct ifnet * const ifp = &sc->tulip_if;
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
int fillok = 1;
#if defined(TULIP_DEBUG)
int cnt = 0;
eop = ri->ri_first;
TULIP_RXDESC_POSTSYNC(sc, eop, sizeof(*eop));
if (eop == ri->ri_nextout || ((((volatile tulip_desc_t *) eop)->d_status & TULIP_DSTS_OWNER))) {
-#if defined(TULIP_DEBUG)
- sc->tulip_dbg.dbg_rxintrs++;
- sc->tulip_dbg.dbg_rxpktsperintr[cnt]++;
-#endif
TULIP_PERFEND(rxget);
- TULIP_PERFEND(rxintr);
- return;
+ goto out;
}
total_len++;
}
#if defined(DIAGNOSTIC)
TULIP_SETCTX(me, NULL);
#endif
-
-#if NBPFILTER > 0
- if (sc->tulip_bpf != NULL) {
- if (me == ms) {
- bpf_tap(sc->tulip_if.if_bpf, mtod(ms, caddr_t),
- total_len, BPF_DIRECTION_IN);
- } else
- bpf_mtap(sc->tulip_if.if_bpf, ms, BPF_DIRECTION_IN);
- }
-#endif
sc->tulip_flags |= TULIP_RXACT;
accept = 1;
} else {
) {
#if !defined(TULIP_COPY_RXDATA)
ms->m_pkthdr.len = total_len;
- ms->m_pkthdr.rcvif = ifp;
- ether_input_mbuf(ifp, ms);
+ ml_enqueue(&ml, ms);
#else
m0->m_data += 2; /* align data after header */
m_copydata(ms, 0, total_len, mtod(m0, caddr_t));
m0->m_len = m0->m_pkthdr.len = total_len;
- m0->m_pkthdr.rcvif = ifp;
- ether_input_mbuf(ifp, m0);
+ ml_enqueue(&ml, m0);
m0 = ms;
#endif
}
sc->tulip_flags &= ~TULIP_RXBUFSLOW;
TULIP_PERFEND(rxget);
}
+out:
+ if_input(ifp, &ml);
#if defined(TULIP_DEBUG)
sc->tulip_dbg.dbg_rxintrs++;
-/* $OpenBSD: if_ste.c,v 1.57 2014/12/22 02:28:52 tedu Exp $ */
+/* $OpenBSD: if_ste.c,v 1.58 2015/05/15 11:36:31 mpi Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
ste_rxeof(struct ste_softc *sc)
{
struct mbuf *m;
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
struct ifnet *ifp;
struct ste_chain_onefrag *cur_rx;
int total_len = 0, count=0;
continue;
}
- m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = total_len;
+ ml_enqueue(&ml, m);
ifp->if_ipackets++;
-#if NBPFILTER > 0
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN);
-#endif
-
- /* pass it on. */
- ether_input_mbuf(ifp, m);
-
cur_rx->ste_ptr->ste_status = 0;
count++;
}
+
+ if_input(ifp, &ml);
}
void