From: Breno Leitao <leitao@debian.org>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev, Breno Leitao <leitao@debian.org>,
kernel-team@meta.com
Subject: [PATCH net-next v2 8/9] netpoll: rename and export netpoll_zap_completion_queue()
Date: Tue, 12 May 2026 03:46:41 -0700 [thread overview]
Message-ID: <20260512-netconsole_split-v2-8-1191d14ad66d@debian.org> (raw)
In-Reply-To: <20260512-netconsole_split-v2-0-1191d14ad66d@debian.org>
zap_completion_queue() drains the per-CPU softnet completion queue.
Rename it with the netpoll_ prefix shared by the rest of the
subsystem's public API, and promote it from file-static to
EXPORT_SYMBOL_NS_GPL in the NETDEV_INTERNAL namespace so the upcoming
netconsole-side find_skb() can call it once the function moves out.
A forward declaration is added to include/linux/netpoll.h, and the
old file-static forward declaration is dropped.
No functional change.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
---
include/linux/netpoll.h | 1 +
net/core/netpoll.c | 9 ++++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 1877d42ccbccf..f986f7486cb8c 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -74,6 +74,7 @@ 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);
struct sk_buff *find_skb(struct netpoll *np, int len, int reserve);
+void netpoll_zap_completion_queue(void);
#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 c148b3b68cec9..e4cda0aa4d488 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -51,8 +51,6 @@
sizeof(struct udphdr) + \
MAX_UDP_CHUNK)
-static void zap_completion_queue(void);
-
static unsigned int carrier_timeout = 4;
module_param(carrier_timeout, uint, 0644);
@@ -199,7 +197,7 @@ void netpoll_poll_dev(struct net_device *dev)
up(&ni->dev_lock);
- zap_completion_queue();
+ netpoll_zap_completion_queue();
}
EXPORT_SYMBOL(netpoll_poll_dev);
@@ -238,7 +236,7 @@ static void refill_skbs(struct netpoll *np)
}
}
-static void zap_completion_queue(void)
+void netpoll_zap_completion_queue(void)
{
unsigned long flags;
struct softnet_data *sd = &get_cpu_var(softnet_data);
@@ -265,13 +263,14 @@ static void zap_completion_queue(void)
put_cpu_var(softnet_data);
}
+EXPORT_SYMBOL_NS_GPL(netpoll_zap_completion_queue, "NETDEV_INTERNAL");
struct sk_buff *find_skb(struct netpoll *np, int len, int reserve)
{
int count = 0;
struct sk_buff *skb;
- zap_completion_queue();
+ netpoll_zap_completion_queue();
repeat:
skb = alloc_skb(len, GFP_ATOMIC);
--
2.53.0-Meta
next prev parent reply other threads:[~2026-05-12 10:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 10:46 [PATCH net-next v2 0/9] netpoll: move out netconsole-specific functions Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 1/9] netpoll: expose UDP packet builder helpers for netconsole Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 2/9] netconsole: move netpoll_send_udp() from netpoll Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 3/9] netconsole: move push_ipv6() " Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 4/9] netconsole: move push_ipv4() " Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 5/9] netconsole: move push_eth() " Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 6/9] netconsole: move push_udp() " Breno Leitao
2026-05-12 10:46 ` [PATCH net-next v2 7/9] netconsole: move netpoll_udp_checksum() " Breno Leitao
2026-05-12 10:46 ` Breno Leitao [this message]
2026-05-12 10:46 ` [PATCH net-next v2 9/9] netconsole: move find_skb() " Breno Leitao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512-netconsole_split-v2-8-1191d14ad66d@debian.org \
--to=leitao@debian.org \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox