summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ipw.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-09-12 12:55:08 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-09-12 12:55:08 +0000
commitbf1d600d09a5e6bd03f65236695ceb27eee54583 (patch)
tree61b19e1ac5df4f2d3e59772380c88bda5b54db33 /sys/dev/pci/if_ipw.c
parentcdd78b5d4dc581ea298f7e14e7b2403c27de216f (diff)
Make wireless drivers call if_input() only once per interrupt.
This reduces drops caused by the ifq pressure drop mechanism and hence increases throughput. Such drops are visible with e.g. 'netstat -dnI iwm0'. Not all affected drivers have been tested yet but these changes are largely mechanical and should be safe. As usual, please report any regressions. With help from dlg@ and mpi@ Problem found by robert@ Tested by robert, jmc, Tracey Emer, Matthias Schmidt, florian, Björn Ketelaars ok mpi@
Diffstat (limited to 'sys/dev/pci/if_ipw.c')
-rw-r--r--sys/dev/pci/if_ipw.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index cd0d354d12f..579db1f9780 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.123 2019/07/25 01:46:14 cheloha Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.124 2019/09/12 12:55:07 stsp Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -71,7 +71,8 @@ uint16_t ipw_read_prom_word(struct ipw_softc *, uint8_t);
void ipw_command_intr(struct ipw_softc *, struct ipw_soft_buf *);
void ipw_newstate_intr(struct ipw_softc *, struct ipw_soft_buf *);
void ipw_data_intr(struct ipw_softc *, struct ipw_status *,
- struct ipw_soft_bd *, struct ipw_soft_buf *);
+ struct ipw_soft_bd *, struct ipw_soft_buf *,
+ struct mbuf_list *);
void ipw_notification_intr(struct ipw_softc *,
struct ipw_soft_buf *);
void ipw_rx_intr(struct ipw_softc *);
@@ -816,7 +817,7 @@ ipw_newstate_intr(struct ipw_softc *sc, struct ipw_soft_buf *sbuf)
void
ipw_data_intr(struct ipw_softc *sc, struct ipw_status *status,
- struct ipw_soft_bd *sbd, struct ipw_soft_buf *sbuf)
+ struct ipw_soft_bd *sbd, struct ipw_soft_buf *sbuf, struct mbuf_list *ml)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ifnet *ifp = &ic->ic_if;
@@ -903,7 +904,7 @@ ipw_data_intr(struct ipw_softc *sc, struct ipw_status *status,
rxi.rxi_flags = 0;
rxi.rxi_rssi = status->rssi;
rxi.rxi_tstamp = 0; /* unused */
- ieee80211_input(ifp, m, ni, &rxi);
+ ieee80211_inputm(ifp, m, ni, &rxi, ml);
ieee80211_release_node(ic, ni);
}
@@ -917,6 +918,7 @@ ipw_notification_intr(struct ipw_softc *sc, struct ipw_soft_buf *sbuf)
void
ipw_rx_intr(struct ipw_softc *sc)
{
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
struct ipw_status *status;
struct ipw_soft_bd *sbd;
struct ipw_soft_buf *sbuf;
@@ -949,7 +951,7 @@ ipw_rx_intr(struct ipw_softc *sc)
case IPW_STATUS_CODE_DATA_802_3:
case IPW_STATUS_CODE_DATA_802_11:
- ipw_data_intr(sc, status, sbd, sbuf);
+ ipw_data_intr(sc, status, sbd, sbuf, &ml);
break;
case IPW_STATUS_CODE_NOTIFICATION:
@@ -966,6 +968,7 @@ ipw_rx_intr(struct ipw_softc *sc)
i * sizeof (struct ipw_bd), sizeof (struct ipw_bd),
BUS_DMASYNC_PREWRITE);
}
+ if_input(&sc->sc_ic.ic_if, &ml);
/* tell the firmware what we have processed */
sc->rxcur = (r == 0) ? IPW_NRBD - 1 : r - 1;