diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-09 03:09:58 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-09 03:09:58 +0000 |
commit | b0353336ff6ce726e4e5366de313c7cbf62de3c1 (patch) | |
tree | fd9f6697d602f010faef8ab7cea36876d97858f0 /sys/arch/macppc | |
parent | a25e352d6018713d381fa67714bda8e417e30715 (diff) |
tweak the new if_input function so it takes an mbuf_list instead
of a single mbuf. this forces us to batch work between the hardware
rx handlers and the stack.
this includes a converstion of bge from ether_input to if_input.
ok claudio@ pelikan@ mpi@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/dev/if_bm.c | 6 | ||||
-rw-r--r-- | sys/arch/macppc/dev/if_mc.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 903b05218cc..0e290d226ec 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.30 2015/02/08 07:00:48 mpi Exp $ */ +/* $OpenBSD: if_bm.c,v 1.31 2015/02/09 03:09:57 dlg Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -500,6 +500,7 @@ bmac_rint(void *v) { struct bmac_softc *sc = v; struct ifnet *ifp = &sc->arpcom.ac_if; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct mbuf *m; dbdma_command_t *cmd; int status, resid, count, datalen; @@ -547,7 +548,7 @@ bmac_rint(void *v) goto next; } - if_input(ifp, m); + ml_enqueue(&ml, m); ifp->if_ipackets++; next: @@ -560,6 +561,7 @@ next: } dbdma_continue(sc->sc_rxdma); + if_input(ifp, &ml); return (1); } diff --git a/sys/arch/macppc/dev/if_mc.c b/sys/arch/macppc/dev/if_mc.c index 41768f10319..7f7d46df12a 100644 --- a/sys/arch/macppc/dev/if_mc.c +++ b/sys/arch/macppc/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mc.c,v 1.19 2015/02/08 07:00:48 mpi Exp $ */ +/* $OpenBSD: if_mc.c,v 1.20 2015/02/09 03:09:57 dlg Exp $ */ /* $NetBSD: if_mc.c,v 1.9.16.1 2006/06/21 14:53:13 yamt Exp $ */ /*- @@ -875,6 +875,7 @@ void mace_read(struct mc_softc *sc, caddr_t pkt, int len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -893,7 +894,8 @@ mace_read(struct mc_softc *sc, caddr_t pkt, int len) return; } - if_input(ifp, m); + ml_enqueue(&ml, m); + if_input(ifp, &ml); ifp->if_ipackets++; } |