From: Sabrina Dubroca <sd@queasysnail.net>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net-next] net: introduce per netns packet chains
Date: Tue, 18 Mar 2025 17:17:17 +0100 [thread overview]
Message-ID: <Z9mcjX08ZmcKhqXu@krikkit> (raw)
In-Reply-To: <b931a4c9b78e282c143ab9455d4c65faa5f6de1c.1742228617.git.pabeni@redhat.com>
The patch mostly looks ok to me, except:
2025-03-17, 17:37:42 +0100, Paolo Abeni wrote:
> /**
> - * dev_nit_active - return true if any network interface taps are in use
> + * dev_nit_active_rcu - return true if any network interface taps are in use
> + *
> + * The caller must held the RCU lock
typo: s/held/hold/
> *
> * @dev: network device to check for the presence of taps
> */
> -bool dev_nit_active(struct net_device *dev)
> +bool dev_nit_active_rcu(struct net_device *dev)
> {
> - return !list_empty(&net_hotdata.ptype_all) ||
> + return !list_empty(&dev_net_rcu(dev)->ptype_all) ||
> !list_empty(&dev->ptype_all);
> }
> -EXPORT_SYMBOL_GPL(dev_nit_active);
> +EXPORT_SYMBOL_GPL(dev_nit_active_rcu);
>
> /*
> * Support routine. Sends outgoing frames to any network
> @@ -2481,11 +2497,10 @@ EXPORT_SYMBOL_GPL(dev_nit_active);
>
> void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
> {
> - struct list_head *ptype_list = &net_hotdata.ptype_all;
> + struct list_head *ptype_list = &dev_net_rcu(dev)->ptype_all;
> struct packet_type *ptype, *pt_prev = NULL;
> struct sk_buff *skb2 = NULL;
>
> - rcu_read_lock();
I can't convince myself that all callers of dev_queue_xmit_nit are
under RCU, specifically coming from drivers/net/wan/hdlc_x25.c
(x25_data_transmit). Maybe keep this rcu_read_lock here?
--
Sabrina
prev parent reply other threads:[~2025-03-18 16:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 16:37 [PATCH net-next] net: introduce per netns packet chains Paolo Abeni
2025-03-18 16:17 ` Sabrina Dubroca [this message]
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=Z9mcjX08ZmcKhqXu@krikkit \
--to=sd@queasysnail.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.