From owner-svn-src-head@freebsd.org Fri Jan 24 21:04:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B3651FBC05; Fri, 24 Jan 2020 21:04:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484BTt3PM2z4Y8c; Fri, 24 Jan 2020 21:04:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FEF22D394; Fri, 24 Jan 2020 21:04:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00OL4YR3098134; Fri, 24 Jan 2020 21:04:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00OL4XQ3098131; Fri, 24 Jan 2020 21:04:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202001242104.00OL4XQ3098131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 24 Jan 2020 21:04:33 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys/dev: otus rtwn/usb usb/wlan X-SVN-Commit-Revision: 357093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 21:04:34 -0000 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 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. */