From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C7CD421A02; Fri, 10 Jul 2026 11:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783684481; cv=none; b=FSwtL7e/WtlfQEaPDovPrirQdKqE/S2JKdg4lVfzN7CWDOj2ZUJuXyqIavVw8s+tsv3OaUnczXjURC587O95IE+6ZDD4q0Uq/ZubSMzqlnfqojFHq0maxd6XDtOoKzXxv54kJE4wYv48OQ3UvH4fF5IDTfghEhUXO8uBJLpPDVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783684481; c=relaxed/simple; bh=nFPh5ac2FjWKCd6q3wB6UC+vMdK1zYkYSuMailRysDc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bzGwcQod/hSMooEQt4n57niiTzCfuY27ww695XhLA3Kbi12pzJZkS+daCQ9WRFB1zPsgdvn5KVt9CkjlLmquwUm/QmkrEprMYb/1VWGEEC6XUKLhHZkvAapSO1/N0Wyp75KOyTUAUHjqRlz64VBtCzrWXb66aHbDknxxu7+MUFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=bmcS8K4W; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="bmcS8K4W" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description; bh=3foEhfhb8cg0zgtGPamqg4RaUv3W2ktXLO1Kxs0TI5o=; b=bmcS8K4WGPhMj7bK/53yL57DWj pcB+yP4uBZ9uiOQGLUFH+I+zv9FQCOCBYpPuF0MHtjgVpYsjeEO9+e6BKJ5dC6UKukFCPzNFcrXgr hPzg45eyhyIYW4UgCv226nwXinbq6QXTAsp7hclpWemP2mj4v3o/VLs1OJ3HrfM4YmTxhGp7FuJ0u dGXKcFX2dSOM7cypzSE38CCsFYijmgyIumr8NFBv36k2ibTCjdX+PW33rRSOlR+SHrro4GYYXiLiD h6A/w1IfoCGwXtfD7ooPmr2BvBVXh/Qhn0hQQRAb4ryWJKYMcTvPKJITN9Ok5zDvmBN6Gog1jtFyp OWNUJ4rg==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wi9oO-004SYN-1l; Fri, 10 Jul 2026 11:54:32 +0000 From: Breno Leitao Date: Fri, 10 Jul 2026 04:38:56 -0700 Subject: [PATCH net-next v3 4/9] netconsole: move refill_skbs_work_handler() from netpoll Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260710-netconsole_move_more-v3-4-6f63f76b28bc@debian.org> References: <20260710-netconsole_move_more-v3-0-6f63f76b28bc@debian.org> In-Reply-To: <20260710-netconsole_move_more-v3-0-6f63f76b28bc@debian.org> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Andrew Lunn Cc: netdev@vger.kernel.org, asantostc@gmail.com, gustavold@gmail.com, linux-kernel@vger.kernel.org, Breno Leitao , kernel-team@meta.com X-Mailer: b4 0.16-dev-d5d98 X-Developer-Signature: v=1; a=openpgp-sha256; l=2471; i=leitao@debian.org; h=from:subject:message-id; bh=nFPh5ac2FjWKCd6q3wB6UC+vMdK1zYkYSuMailRysDc=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBqUN1jjepZA9fyIwSatuQFjaPZoy0Hw/iYn+Qn/ UR8thofJJ+JAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCalDdYwAKCRA1o5Of/Hh3 bfTMD/4ldvdlUhAKZ9QnfO6zrD0bG43ah588cLeBIKlAFL4dllbjcB3EvL66OFRmwJp60jt6LPl hYEhbQByr4AbLXEreuAPcNzdbrNp2KwklITa+ROAwqYYHqpaRRp7jgPNXezpfQV2ZECrOL1qSe/ bFNdcXH9XEME92cjkxLp6d9782pYhtxUDCKn1MZMqCN5eBcxUYgLNzZE0JEKCWMbsvbDcWNMtop iScP6hKaDDr3vY0OqSUnWBXL7JLo0RMVUOFjcd1xlu1XSK+7nwIhFvaND0g7oqC9gqEWmIKr8JK 91GSsslPYSd9uHXH6S8011b7z7F9chvRJw6WTXcFVvQFc4uVGT+D/59Qw10Z9NmgvO3wqbxvD/p d0fgdhCD6SUlzDj7IpH+YSMX7/OZTOOVO1Ve8WVDeSz6aQABHbMLOwaddJhkERm1BL3/aTHNvMK LLi0WKa78XyysJ4aTUi7b+LxgN8DRQ8eVL+yCmhpXz3E51Bpx5GCjrVEHIb4PYYmnxJUE00UDvH EFrsyRrJ/o9mMABZGit7vXhTjUKmeakf6sSKGLPe0M3jUNHFg8cs+YgFYi9HyJJyzgZlgLKaAn+ 42W/STvRGs6Oa+VP+ltet0vmIfJ89DyV2Dh5BA+8AwwKBFk3aYUcA1GcPbfG1TbbtO0UJ4u/hXm eSe6aiZdIfCsitA== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao The work handler is wired via INIT_WORK() in netconsole_skb_pool_init() and has no other callers since the previous patch took the skb pool lifecycle out of __netpoll_setup(). Move the function body into drivers/net/netconsole.c as a file-static helper, drop EXPORT_SYMBOL_GPL() and remove the prototype from . Pure code motion: the body is unchanged and still calls the exported refill_skbs() in net/core/netpoll.c. Signed-off-by: Breno Leitao --- drivers/net/netconsole.c | 8 ++++++++ include/linux/netpoll.h | 1 - net/core/netpoll.c | 9 --------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 1f75c4bbea8b6..96d9a47312cd7 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -292,6 +292,14 @@ static void netcons_release_dev(struct netconsole_target *nt) memset(&nt->np.dev_name, 0, IFNAMSIZ); } +static void refill_skbs_work_handler(struct work_struct *work) +{ + struct netpoll *np = + container_of(work, struct netpoll, refill_wq); + + refill_skbs(np); +} + /* Seed the per-target skb pool that find_skb() falls back to. The queue * head and refill work are set up once in alloc_and_init(); this only * (re)fills the pool. Pair with netconsole_skb_pool_flush(). diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index a7b96e1792207..51e5863d8e678 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -91,7 +91,6 @@ void do_netpoll_cleanup(struct netpoll *np); netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb); void netpoll_zap_completion_queue(void); void refill_skbs(struct netpoll *np); -void refill_skbs_work_handler(struct work_struct *work); void skb_pool_flush(struct netpoll *np); #ifdef CONFIG_NETPOLL diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 58f30a4d5eb0f..93a16faf808c8 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -362,15 +362,6 @@ void skb_pool_flush(struct netpoll *np) } EXPORT_SYMBOL_GPL(skb_pool_flush); -void refill_skbs_work_handler(struct work_struct *work) -{ - struct netpoll *np = - container_of(work, struct netpoll, refill_wq); - - refill_skbs(np); -} -EXPORT_SYMBOL_GPL(refill_skbs_work_handler); - int __netpoll_setup(struct netpoll *np, struct net_device *ndev) { struct netpoll_info *npinfo; -- 2.53.0-Meta