diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-02-25 14:24:59 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-02-25 14:24:59 +0000 |
commit | 500adea7525ece056b5f4e70fda5ea7891c3f9d7 (patch) | |
tree | a8b0fcaf5f915e5f7a81aa67ce36a5ad4cb6c2be /sys/dev/ic/bwfm.c | |
parent | cd295602bd85400b19bf940fbd024834fc21a6d6 (diff) |
Make bwfm(4) call if_input() only once per interrupt.
This reduces drops caused by the ifq pressure drop mechanism and hence
increases throughput.
ok tobhe@
Diffstat (limited to 'sys/dev/ic/bwfm.c')
-rw-r--r-- | sys/dev/ic/bwfm.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index aec8c113470..377305b9b1a 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.68 2020/01/09 14:35:19 mpi Exp $ */ +/* $OpenBSD: bwfm.c,v 1.69 2020/02/25 14:24:58 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -91,7 +91,8 @@ int bwfm_proto_bcdc_query_dcmd(struct bwfm_softc *, int, int, char *, size_t *); int bwfm_proto_bcdc_set_dcmd(struct bwfm_softc *, int, int, char *, size_t); -void bwfm_proto_bcdc_rx(struct bwfm_softc *, struct mbuf *); +void bwfm_proto_bcdc_rx(struct bwfm_softc *, struct mbuf *, + struct mbuf_list *); int bwfm_proto_bcdc_txctl(struct bwfm_softc *, int, char *, size_t *); void bwfm_proto_bcdc_rxctl(struct bwfm_softc *, char *, size_t); @@ -135,7 +136,6 @@ void bwfm_delete_key_cb(struct bwfm_softc *, void *); void bwfm_rx_event_cb(struct bwfm_softc *, struct mbuf *); struct mbuf *bwfm_newbuf(void); -void bwfm_rx(struct bwfm_softc *, struct mbuf *); #ifndef IEEE80211_STA_ONLY void bwfm_rx_auth_ind(struct bwfm_softc *, struct bwfm_event *, size_t); void bwfm_rx_assoc_ind(struct bwfm_softc *, struct bwfm_event *, size_t, int); @@ -1585,7 +1585,7 @@ bwfm_proto_bcdc_rxctl(struct bwfm_softc *sc, char *buf, size_t len) } void -bwfm_proto_bcdc_rx(struct bwfm_softc *sc, struct mbuf *m) +bwfm_proto_bcdc_rx(struct bwfm_softc *sc, struct mbuf *m, struct mbuf_list *ml) { struct bwfm_proto_bcdc_hdr *hdr; @@ -1600,7 +1600,7 @@ bwfm_proto_bcdc_rx(struct bwfm_softc *sc, struct mbuf *m) } m_adj(m, sizeof(*hdr) + (hdr->data_offset << 2)); - bwfm_rx(sc, m); + bwfm_rx(sc, m, ml); } /* FW Variable code */ @@ -2058,11 +2058,10 @@ bwfm_newbuf(void) } void -bwfm_rx(struct bwfm_softc *sc, struct mbuf *m) +bwfm_rx(struct bwfm_softc *sc, struct mbuf *m, struct mbuf_list *ml) { struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &ic->ic_if; - struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct ieee80211_node *ni; struct bwfm_event *e; @@ -2115,10 +2114,8 @@ bwfm_rx(struct bwfm_softc *sc, struct mbuf *m) #endif ni = ic->ic_bss; ieee80211_eapol_key_input(ic, m, ni); - } else { - ml_enqueue(&ml, m); - if_input(ifp, &ml); - } + } else + ml_enqueue(ml, m); } #ifndef IEEE80211_STA_ONLY |