From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA35939769E for ; Sun, 24 May 2026 16:12:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779639146; cv=none; b=WNTKbb/fU2dZXdr8s7/Afyt2zNVjwaGH4OwRgAtVXIVpC5aZn0C7jVUmnLCJiy3SgUkc5jZbv84yl9gOEx9EwOhSpn9X7jb7oDbocX68Aqk514yfAPJAjjLckHtXcdqNGZ1PPXBqVSK+/LfUKL3GCn6awSqxM12ewhikMJpUpjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779639146; c=relaxed/simple; bh=T9qIxgaheOEm+rMyCgkNcm0rzEL5ECu5Zl3Ffl94m/w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rzaeJyRPWhr0DMJB23TNDY2G5BxG7DPlNaenGqwUsascveLF6Kp2QnUni2qS8+i08XDKveBAUKZJ9R1Mj717V2d/qFO2f5ORqPreGSuKRJr2yTKJTZ89B6yM3A+pCkbkE+aVTBwWmOLI5KmtJlhODzsAS2/RhpYe+MHRjY5YFxA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-7df05fc49e5so9187809a34.3 for ; Sun, 24 May 2026 09:12:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779639144; x=1780243944; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=movPS/nWqhcug4Zf5cEU9tpTwZ6Ry4Oer6dKVmnqmVw=; b=D6czZg9ho8krDZnDxvEIV9Ac6UYZ11OMACU214/963VqS1KSUOkvEm6E85Jwc4lXI9 ei9qXZ3GRckHRIejSZtxUifFsNfp6VkYDJPj3yLJx+jfvbxI5pbMJM/C/L3qhXXR3Tjb LG+cA4C9d6ZirWLBjikpm52QhhqGrbKEdCyIZ0A3zEEORCILm9UM/CZTwX7f5QGXEJ9F Hm8Tgtv2qqYqJnV8MtoO0cGxFKDXKlIPEG55faNgT47sdoN4BqON/zG34lAPLRo1QYV5 b8X2Ki1Xzq389bqoM67rQoh5bYdZxlVC9bALaCba5rv11ZedDPxa+fVLpV6hT7QkgnN4 llgQ== X-Forwarded-Encrypted: i=1; AFNElJ9k1d1tBo5o1D8c9fLOZZUnCqSlTM5ZDA3YkLzzC0XIOZUQGirdzeeSoOCDxMypO4RVRx/m+Oa7PG/iHEQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwiawBSc6VtpstdZ0kf0F7BCXMpwe7NBqb32erKhSoNBqtvFXBH 0zscd2zKkfpOCf3BKLuooYZ3KNMieLJEqxlnZlV+uajOPNq9GwOJPFDx X-Gm-Gg: Acq92OEznznsBro6Jvm71i0RVFAR3sgYvJovQ72leB1aIClaW6Dd1DzW5xb9AA9PSWW k/KvI6aoXKSY+69oyHCl56uvELjFMl7bxkBv1LooudSl924CipBVHYeJvb2gp/JuDXJVikligs1 ZjD/Z2VfK2ObHsJIrO9eNDThXakj3MyjRgDRvdlgpd2tm+Rx+NPAplzBH0ssJ9x6bqUcnKAVBaW RDlVBMbIPQET4NReTTnZ1xXbW21fLjnrgONQunJGxoLcohHIFMSEqup9B4o//Ke6Ep2vGZmOGeZ pp0AXpi44r08vTvqyLbY2TAafKfHq6Eo8jvUlb7GTTnjxfVTAsqej5QwIL0Au2tHDqA7+sKGIll EgK7jRF/kj/Ei0xVYkvHkr6uxTF5Aen+Q6/fmn+30OslGqXTHTw8UhmwvvcKqMRM9/bNJIGvP2J /oi19IVPIImvRr X-Received: by 2002:a05:6830:3789:b0:7d7:d524:bc88 with SMTP id 46e09a7af769-7e5fed4ba10mr8019625a34.10.1779639143752; Sun, 24 May 2026 09:12:23 -0700 (PDT) Received: from localhost ([2a03:2880:10ff:1::]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e60666ae5fsm5566542a34.24.2026.05.24.09.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2026 09:12:23 -0700 (PDT) From: Breno Leitao Date: Sun, 24 May 2026 09:12:17 -0700 Subject: [PATCH 1/9] netpoll: export refill_skbs(), refill_skbs_work_handler(), skb_pool_flush() Precedence: bulk X-Mailing-List: linux-kernel@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: <20260524-netconsole_move_more-v1-1-909d1ab398b4@debian.org> References: <20260524-netconsole_move_more-v1-0-909d1ab398b4@debian.org> In-Reply-To: <20260524-netconsole_move_more-v1-0-909d1ab398b4@debian.org> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, gustavold@gmail.com, asantostc@gmail.com, Breno Leitao , kernel-team@meta.com X-Mailer: b4 0.16-dev-d5d98 X-Developer-Signature: v=1; a=openpgp-sha256; l=2949; i=leitao@debian.org; h=from:subject:message-id; bh=T9qIxgaheOEm+rMyCgkNcm0rzEL5ECu5Zl3Ffl94m/w=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBqEyNlhqHigKt/B4HA1tPvLMeXNVsZ5gVhxBN+9 Ybr7Zmaw3CJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCahMjZQAKCRA1o5Of/Hh3 bVWZEACRAQ1Mga9O7ihpelGl2ZqjGLT6b9tCB2RtvtZ+1WcwPMMAF2i+z93SQr7aCJu4JukJC8X ha8cJAm/zQ1sM4m5wGsQR0686akwAynFbEbQLXkNzs3QDHMoZxiTTuA3ZYBemOPFpjG/040tkQ0 fXmJ+sDvcQPYEry5vp15bGwBJqG5ezkyx7PauFnm02FScy/9ytU3HnfGtmA6VGuGECH09V/y3Nb rYXjhtWz0CLMTjiWJzPWweQGkQLzg3Ft10GHUkhFKp7QfMYZEstAnipATnpC9zBHEDtL0HwEfh1 r3nDkkrJi6ueaU1l6ZOaNqxFoFISyit8xyl7alVh2CXhPuBahM/5NUznNOXdSg75pbfaCkrj+8+ fKaKglGBOrbm9XnWbvFzaI8EIP+Ox0pb4IUkacM/Luy69qYwNega80FciWabzDkgpNoTBrQkb2O VldQstss2VmkVmTkVcUADdXijeYk5rUaFP2jIyTNxmMaODKNduIrHYRfbYmFxuaW3hXI6dfPXfL E2OhcC43FLo9zdRfhOwaO9p8HBGdxO8xbu9YHP1qQ8vGIhCGwe8NZiPGU0DjLnXstrfMmhsVaxP Z6G6+tP8nUB2ZEsOb43VDKWt7nEEsDFSsWYQxa8jm6lDMy3rLCU6wqOJvnTcsWbQgng0xDTkA4l mGq4dPvo17+8u/w== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D These three helpers manage the per-netpoll fallback skb pool. They are file-static today because all of their callers live in net/core/netpoll.c. Subsequent patches relocate the pool's owner from struct netpoll to the only consumer that actually uses it (netconsole), and that work needs netconsole to drive the helpers directly while the function bodies still live here. Drop static, add prototypes in , and EXPORT_SYMBOL_GPL() each. No behaviour change. The exports are transitional. Each helper is moved into drivers/net/netconsole.c later in this series, and at that point its EXPORT_SYMBOL_GPL() and prototype are dropped. By the end of the series no symbol introduced here remains exported. Signed-off-by: Breno Leitao --- include/linux/netpoll.h | 3 +++ net/core/netpoll.c | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index e4b8f1f91e54..9fa4deed0bff 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -74,6 +74,9 @@ void netpoll_cleanup(struct netpoll *np); 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 static inline void *netpoll_poll_lock(struct napi_struct *napi) diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 33ab3d827a42..84cbfa85028a 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -220,7 +220,7 @@ void netpoll_poll_enable(struct net_device *dev) up(&ni->dev_lock); } -static void refill_skbs(struct netpoll *np) +void refill_skbs(struct netpoll *np) { struct sk_buff_head *skb_pool; struct sk_buff *skb; @@ -235,6 +235,7 @@ static void refill_skbs(struct netpoll *np) skb_queue_tail(skb_pool, skb); } } +EXPORT_SYMBOL_GPL(refill_skbs); void netpoll_zap_completion_queue(void) { @@ -356,7 +357,7 @@ netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) } EXPORT_SYMBOL(netpoll_send_skb); -static void skb_pool_flush(struct netpoll *np) +void skb_pool_flush(struct netpoll *np) { struct sk_buff_head *skb_pool; @@ -364,14 +365,16 @@ static void skb_pool_flush(struct netpoll *np) skb_pool = &np->skb_pool; skb_queue_purge_reason(skb_pool, SKB_CONSUMED); } +EXPORT_SYMBOL_GPL(skb_pool_flush); -static void refill_skbs_work_handler(struct work_struct *work) +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) { -- 2.54.0