[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <willemdebruijn.kernel.9ee65133b4b7@gmail.com>
Date: Tue, 02 Sep 2025 18:50:25 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Breno Leitao <leitao@...ian.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev,
kernel-team@...a.com,
efault@....de,
calvin@...nvd.org,
Breno Leitao <leitao@...ian.org>
Subject: Re: [PATCH 4/7] netpoll: Export zap_completion_queue
Breno Leitao wrote:
> 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@...ian.org>
Reviewed-by: Willem de Bruijn <willemb@...gle.com>
> ---
> 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);
consider EXPORT_SYMBOL_NS_GPL(zap_completion_queue, "NETDEV_INTERNAL");
Powered by blists - more mailing lists