Date: Fri, 24 Jan 2020 21:04:33 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357093 - in head/sys/dev: otus rtwn/usb usb/wlan Message-ID: <202001242104.00OL4XQ3098131@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Jan 24 21:04:33 2020 New Revision: 357093 URL: https://svnweb.freebsd.org/changeset/base/357093 Log: Enter the network epoch in USB WiFi drivers when processing input mbuf queues. Submitted by: Idwer Vollering <vidwer gmail.com> Modified: head/sys/dev/otus/if_otus.c head/sys/dev/rtwn/usb/rtwn_usb_rx.c head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Fri Jan 24 20:35:41 2020 (r357092) +++ head/sys/dev/otus/if_otus.c Fri Jan 24 21:04:33 2020 (r357093) @@ -1770,6 +1770,7 @@ otus_rxeof(struct usb_xfer *xfer, struct otus_data *da static void otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { + struct epoch_tracker et; struct otus_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1820,6 +1821,7 @@ tr_setup: * callback and safe to unlock. */ OTUS_UNLOCK(sc); + NET_EPOCH_ENTER(et); while ((m = mbufq_dequeue(&scrx)) != NULL) { wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, @@ -1832,6 +1834,7 @@ tr_setup: } else (void)ieee80211_input_mimo_all(ic, m); } + NET_EPOCH_EXIT(et); #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); #endif Modified: head/sys/dev/rtwn/usb/rtwn_usb_rx.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_rx.c Fri Jan 24 20:35:41 2020 (r357092) +++ head/sys/dev/rtwn/usb/rtwn_usb_rx.c Fri Jan 24 21:04:33 2020 (r357093) @@ -363,6 +363,7 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) void rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { + struct epoch_tracker et; struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer); struct rtwn_softc *sc = &uc->uc_sc; struct ieee80211com *ic = &sc->sc_ic; @@ -399,6 +400,7 @@ tr_setup: * ieee80211_input() because here is at the end of a USB * callback and safe to unlock. */ + NET_EPOCH_ENTER(et); while (m != NULL) { next = m->m_nextpkt; m->m_nextpkt = NULL; @@ -416,6 +418,7 @@ tr_setup: RTWN_LOCK(sc); m = next; } + NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Fri Jan 24 20:35:41 2020 (r357092) +++ head/sys/dev/usb/wlan/if_rsu.c Fri Jan 24 21:04:33 2020 (r357093) @@ -2552,6 +2552,7 @@ rsu_rxeof(struct usb_xfer *xfer, struct rsu_data *data static void rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { + struct epoch_tracker et; struct rsu_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; @@ -2586,6 +2587,7 @@ tr_setup: * ieee80211_input() because here is at the end of a USB * callback and safe to unlock. */ + NET_EPOCH_ENTER(et); while (m != NULL) { next = m->m_next; m->m_next = NULL; @@ -2604,6 +2606,7 @@ tr_setup: RSU_LOCK(sc); m = next; } + NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001242104.00OL4XQ3098131>