From nobody Sun Feb 18 21:11:08 2024 X-Original-To: dev-commits-src-branches@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 4TdJHc3xHkz5Bm86; Sun, 18 Feb 2024 21:11:08 +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 4TdJHc1ml4z41y4; Sun, 18 Feb 2024 21:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708290668; 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=7Qy1yMDlVnlrYz2wepEux4/XNYvnQep3gM6HERtupCE=; b=jO7UBjkdGXEuutC3w7Mt6q1SxW4tvwlsFVJuayrZvIbZvGtSJZn0omcRnVdrdEr2a2JlIS WuIQf5XXmVmi9lpVv1tXkCysgNxvI0hAlAp1Zo1jdPu63S/zM2YsiKQeUy+B8akgXQ3sjl JGq+JYtBwdPYkYF/SUwYFoIWPg84h45agJ4SIojUcnO52tHFW60WhqvQlCATLVrOE8Arw6 nyVpPJL70DJ+8AOnisuCyDt56pUl3kFdyiOb19QrOaHS0cMrtC/5bwDZuDYJ33/2088/dZ ohfncc4OWn9xKAkaGsHGAUW5etxa1zbV6E7NICc+i7NdFVBFQWa2s2drtkLtvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708290668; 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=7Qy1yMDlVnlrYz2wepEux4/XNYvnQep3gM6HERtupCE=; b=yEau5DvhsFEhPFLku+F0DPXjKAvyaC2rX727/npn1a8PtpiysmzeegKleL2EMtH6M7Hn0g aj9mqxTxl56RA+7WKzdETHBZO1iXx3PCqAXHxgUDGSSaV5HoYIaPcgjXYgUqy14Hu58mHp MUNz9aOjQi0litOvz51I4BXP+8022vtCHajbFTu1U0XoeioPaHbrlEKA+kv+wfvSC2vtTe YKCF0IVKxhtFkcikfws6LhB2Jt0+jExGksbqD/CZk0TjF8Tt+d2BQeBe2zHRUY+xYB0Cp3 /gbYzc9YyUD9SdDn8KmKKzjvqeaQLJtaZgSKscrgjcQb8G0TNoE/ZXBBd8hu5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708290668; a=rsa-sha256; cv=none; b=MqCkuRMJqyJF+SEePrrgEWixXbcEFrLEt/1G79kUV+kPPaI/LqTJGmwqoESP2w3PrnjtFJ vH79gro6gZhO+bcyw8KYxPClgyDKNTm29PfXyiDz9/EuwXzDf79d0wXfmdTAN1V3kGIO3s e60/NZqqYHI0WbhAu/2Vzy2Z/CKHaclfOrkwPLF8gWA9AFnMrQ8xwrjFk71qo4Tpk2OKvL 4Q/h4JRXRU823jUHBxD5zrUqghMr1lqr0V0hHh5lzDA6lmqhDE+vJlPVSyzN4QvyqPMwb5 pEOFh9YJM/u9ILE/gyUbF8A/Xy24u4ThhZPaUeMNvmPPSAjEx4VyGCu9MmEC7A== 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 4TdJHc0sbwz16Dh; Sun, 18 Feb 2024 21:11:08 +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 41ILB89E013068; Sun, 18 Feb 2024 21:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41ILB8nj013064; Sun, 18 Feb 2024 21:11:08 GMT (envelope-from git) Date: Sun, 18 Feb 2024 21:11:08 GMT Message-Id: <202402182111.41ILB8nj013064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8e599ff98d48 - stable/14 - net80211: move net_epoch into net80211 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e599ff98d48830d2aed88e1a21338b81f5bdb7b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e599ff98d48830d2aed88e1a21338b81f5bdb7b commit 8e599ff98d48830d2aed88e1a21338b81f5bdb7b Author: Bjoern A. Zeeb AuthorDate: 2023-10-29 14:25:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-02-18 16:42:21 +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 Tested by: few (rtwn, ath, iwlwifi, ...) Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D42427 (cherry picked from commit de607e3c230be88f6232b9c9fd6c37199648dc8c) --- 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 ffc28e2685de..dba95ce6fb50 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4155,7 +4155,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; @@ -4372,7 +4371,6 @@ skip_device_ts: } #endif - NET_EPOCH_ENTER(et); if (ni != NULL) { ok = ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); @@ -4382,7 +4380,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 b7db78f32282..22e4cfd54536 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -423,6 +423,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. */ @@ -439,7 +441,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 *