From nobody Fri Dec 01 00:56:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ShF403TTbz532pk; Fri, 1 Dec 2023 00:56:00 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ShF402zXJz4Pvq; Fri, 1 Dec 2023 00:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701392160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLuRoUaWWjJ8kUZ27IUd9UIHClElUs+z9HU8JN/FM6M=; b=nsPPURoTd1eg4pnKVGS8sAiEj3vllhlAVtBMmBIuynHSIZ1XePQoK9+JHKY6AiKJMorahV YUS9oxwkpggiDlddW/Uwpd/i+zx76cUd2rwmCDE5Lu5Y8r4/PfyByHcg84eQNsEfULNlvH yGO/n7w093iATOMXjbdKweWae2ouA/3bUc4/icE5ie+H8HzrqckME6q8c6WfM1XbHuz93K cNsx2X22zuHaiYYShyYUk092sU4dDDBR/J1xAt4YOps0IjZf5kIbD0KC3xwz5WYs9k9Pvu M1Kphs+/Z0rc8+1jTo7uf3iTM6MD4DRuf5/7Lg5ZFMi6wI6Ll3QN5vP9m8eThA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701392160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLuRoUaWWjJ8kUZ27IUd9UIHClElUs+z9HU8JN/FM6M=; b=krZVO74okdcJo021mpMd+mdYNPrIB81i72/6cN8U7gPQwfuzVloWf5raJOYIRpE0saT5KP 0s2pr6bPRSCPe3httCT3QzN8aqbafkRAszZ+52pa/f9q9iQJ2ZHb/2MDL25TEp41NLj/rC lngHDPrZn9XJ4uowk+mA28vacUJ+r+NEyckczZDWuMb4KhKecOwbeuAZsZTjsEKnHL/dPA eCFC9jLBngJ2tt0SDhqDLOPrg0ARzD3WhYS2Dv2YgD0OgoEWe/7sTFv25xiok1ztdlxxaz NuOzioYQ/pS+aMR6N6MRtZWFrX9auv9Wyq3oMqeUFgMkE/967ceXB9+kWhYBEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701392160; a=rsa-sha256; cv=none; b=NgTKBRz7HvJyHVZNi/gH6KmOUiupGZ4gMqg37uaS79ooYNQvA9sq8EWtSe3f2WiVmnTzZV QGEGuC3UHQ2skIYUysecCNBXNe9NBzhmh+V0kJkhrhT+zP2//Psmffyk/k9/4UmXct4MEc K3xRptKxNdR3rCfZ/iJG+JPOOhRDhKjhjxuWbCG2gI/iBlgrrGYRkkleRuS+qVT0C0J9AJ 71eMbqc2Dd2xsfP2oaFTbH4mcp8A6qpAZKlJnyX/4WvzO75RqLnkgrXwBYecMLwi9D8490 jnb7BCDhSUpGRp5mo2ZJWELc9fXhV9Q8vdxLMcufZNoxLdzRoqCb/rfl6vV99g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ShF4021tLz1C5x; Fri, 1 Dec 2023 00:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B10u0ZD090428; Fri, 1 Dec 2023 00:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B10u0pe090425; Fri, 1 Dec 2023 00:56:00 GMT (envelope-from git) Date: Fri, 1 Dec 2023 00:56:00 GMT Message-Id: <202312010056.3B10u0pe090425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: de607e3c230b - main - net80211: move net_epoch into net80211 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de607e3c230be88f6232b9c9fd6c37199648dc8c Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de607e3c230be88f6232b9c9fd6c37199648dc8c commit de607e3c230be88f6232b9c9fd6c37199648dc8c Author: Bjoern A. Zeeb AuthorDate: 2023-10-29 14:25:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-12-01 00:46:10 +0000 net80211: move net_epoch into net80211 Move the net_epoch into net80211 around the if_input calls and out of the driver (in this first case LinuxKPI). This reduces coverage but also allows us to alloc in calls like (*ampdu_rx_start) which do not actually pass data up the stack. The follow-up commits will revert b65f813c1ab99448278961c5ca80dc422b1eae29, 21c4082de9e2cf9a0fd81a9a981ab06022956847, 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4, af2441fbc7fa9e522e7f8697e5a181bdd4ff9e00, and 6c3e93cb5a4aa4b8a2d8d4d326f2a7c34d3a4458 for ath. Sponsored by: The FreeBSD Foundation MFC after: 3 days Tested by: few (rtwn, ath, iwlwifi, ...) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D42427 --- sys/compat/linuxkpi/common/src/linux_80211.c | 3 --- sys/net80211/ieee80211_hostap.c | 4 ++++ sys/net80211/ieee80211_input.c | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 458a5825639a..448f417d1224 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4154,7 +4154,6 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_sta *sta, struct napi_struct *napi __unused, struct list_head *list __unused) { - struct epoch_tracker et; struct lkpi_hw *lhw; struct ieee80211com *ic; struct mbuf *m; @@ -4371,7 +4370,6 @@ skip_device_ts: } #endif - NET_EPOCH_ENTER(et); if (ni != NULL) { ok = ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); @@ -4381,7 +4379,6 @@ skip_device_ts: ok = ieee80211_input_mimo_all(ic, m); /* mbuf got consumed. */ } - NET_EPOCH_EXIT(et); #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index f738c97076ca..c1196961ad54 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -419,6 +419,8 @@ hostap_deliver_data(struct ieee80211vap *vap, (void) ieee80211_vap_xmitpkt(vap, mcopy); } if (m != NULL) { + struct epoch_tracker et; + /* * Mark frame as coming from vap's interface. */ @@ -435,7 +437,9 @@ hostap_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } } diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 0cc6902ae28e..a4bfe49bd8c4 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -274,6 +274,7 @@ void ieee80211_deliver_data(struct ieee80211vap *vap, struct ieee80211_node *ni, struct mbuf *m) { + struct epoch_tracker et; struct ether_header *eh = mtod(m, struct ether_header *); struct ifnet *ifp = vap->iv_ifp; @@ -304,7 +305,9 @@ ieee80211_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } struct mbuf *