linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
	 "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>,
	 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, kernel-team@meta.com,
	efault@gmx.de,  calvin@wbinvd.org,
	Breno Leitao <leitao@debian.org>
Subject: [PATCH 4/7] netpoll: Export zap_completion_queue
Date: Tue, 02 Sep 2025 07:36:26 -0700	[thread overview]
Message-ID: <20250902-netpoll_untangle_v3-v1-4-51a03d6411be@debian.org> (raw)
In-Reply-To: <20250902-netpoll_untangle_v3-v1-0-51a03d6411be@debian.org>

Make zap_completion_queue() a globally visible symbol by changing its
linkage to non-static and adding EXPORT_SYMBOL_GPL.

This is a true netpoll function that will be needed by non-netpoll
functions that will be moved away from netpoll.

This will allow moving the skb pool management to netconsole, mainly
find_skb(), which invokes zap_completion_queue(), and will be moved to
netconsole.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 include/linux/netpoll.h | 1 +
 net/core/netpoll.c      | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 65bfade025f09..7f8b4d758a1e7 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -75,6 +75,7 @@ void __netpoll_free(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 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 9e12a667a5f0a..04a55ec392fd2 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -50,8 +50,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);
 
@@ -240,7 +238,7 @@ static void refill_skbs(struct netpoll *np)
 	spin_unlock_irqrestore(&skb_pool->lock, flags);
 }
 
-static void zap_completion_queue(void)
+void zap_completion_queue(void)
 {
 	unsigned long flags;
 	struct softnet_data *sd = &get_cpu_var(softnet_data);
@@ -267,6 +265,7 @@ static void zap_completion_queue(void)
 
 	put_cpu_var(softnet_data);
 }
+EXPORT_SYMBOL_GPL(zap_completion_queue);
 
 struct sk_buff *find_skb(struct netpoll *np, int len, int reserve)
 {

-- 
2.47.3


  parent reply	other threads:[~2025-09-02 14:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 14:36 [PATCH 0/7] netpoll: Untangle netpoll and netconsole Breno Leitao
2025-09-02 14:36 ` [PATCH 1/7] netconsole: Split UDP message building and sending operations Breno Leitao
2025-09-02 22:41   ` Willem de Bruijn
2025-09-02 14:36 ` [PATCH 2/7] netpoll: move prepare skb functions to netconsole Breno Leitao
2025-09-02 22:44   ` Willem de Bruijn
2025-09-02 14:36 ` [PATCH 3/7] netpoll: Move netpoll_cleanup implementation " Breno Leitao
2025-09-02 22:49   ` Willem de Bruijn
2025-09-03 16:44     ` Breno Leitao
2025-09-03 17:13       ` Willem de Bruijn
2025-09-02 14:36 ` Breno Leitao [this message]
2025-09-02 22:50   ` [PATCH 4/7] netpoll: Export zap_completion_queue Willem de Bruijn
2025-09-03 16:51     ` Breno Leitao
2025-09-03 17:16       ` Willem de Bruijn
2025-09-02 14:36 ` [PATCH 5/7] netpoll: Move SKBs pool to netconsole side Breno Leitao
2025-09-02 22:56   ` Willem de Bruijn
2025-09-02 14:36 ` [PATCH 6/7] netpoll: Move find_skb() to netconsole and make it static Breno Leitao
2025-09-02 23:07   ` Willem de Bruijn
2025-09-02 14:36 ` [PATCH 7/7] netpoll: Flush skb_pool as part of netconsole cleanup Breno Leitao
2025-09-02 23:09   ` Willem de Bruijn
2025-09-03  0:09   ` Jakub Kicinski
2025-09-03 16:55     ` Breno Leitao
2025-09-02 15:23 ` [PATCH 0/7] netpoll: Untangle netpoll and netconsole 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=20250902-netpoll_untangle_v3-v1-4-51a03d6411be@debian.org \
    --to=leitao@debian.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=calvin@wbinvd.org \
    --cc=clrkwllms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=efault@gmx.de \
    --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;
as well as URLs for NNTP newsgroup(s).