From: Jakub Kicinski <kuba@kernel.org>
To: Cosmin Ratiu <cratiu@nvidia.com>, stfomichev@gmail.com
Cc: "jhs@mojatatu.com" <jhs@mojatatu.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"saeed@kernel.org" <saeed@kernel.org>,
Dragos Tatulea <dtatulea@nvidia.com>,
"sdf@fomichev.me" <sdf@fomichev.me>,
"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>
Subject: Re: [PATCH net-next v10 04/14] net: hold netdev instance lock during qdisc ndo_setup_tc
Date: Mon, 5 May 2025 11:35:14 -0700 [thread overview]
Message-ID: <20250505113514.6f369217@kernel.org> (raw)
In-Reply-To: <a834c663507a78acaf1f0b3145cf38c74fe3de09.camel@nvidia.com>
On Mon, 5 May 2025 15:12:39 +0000 Cosmin Ratiu wrote:
> On Mon, 2025-05-05 at 08:07 -0700, Stanislav Fomichev wrote:
> > On 05/05, Cosmin Ratiu wrote:
> > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > index d1a8cad0c99c..134ceddf7fa5 100644
> > > --- a/net/core/dev.c
> > > +++ b/net/core/dev.c
> > > @@ -12020,9 +12020,9 @@ void
> > > unregister_netdevice_many_notify(struct
> > > list_head *head,
> > > struct sk_buff *skb = NULL;
> > >
> > > /* Shutdown queueing discipline. */
> > > + netdev_lock_ops(dev);
> > > dev_shutdown(dev);
> > > dev_tcx_uninstall(dev);
> >
> > There is a synchronize_net hidden inside of dev_tcx_uninstall, so
> > let's ops-lock only dev_shutdown here? Other than that, don't see
> > anything wrong. Can you send this separately and target net tree?
Avoiding synchronize_net() under the instance lock as an optimization?
We're under rtnl_lock here, probably a premature optimization?
But no strong preference..
BTW isn't the naming scheme now that dev_* takes the lock? So we should
probably add netif_ versions or rename these existing calls?
next prev parent reply other threads:[~2025-05-05 18:35 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 16:37 [PATCH net-next v10 00/14] net: Hold netdev instance lock during ndo operations Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 01/14] net: hold netdev instance lock during ndo_open/ndo_stop Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 02/14] net: hold netdev instance lock during nft ndo_setup_tc Stanislav Fomichev
2025-03-07 19:39 ` Eric Dumazet
2025-03-07 19:57 ` Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 03/14] net: sched: wrap doit/dumpit methods Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 04/14] net: hold netdev instance lock during qdisc ndo_setup_tc Stanislav Fomichev
2025-03-13 8:51 ` Eric Dumazet
2025-03-13 9:11 ` Stanislav Fomichev
2025-05-05 13:41 ` Cosmin Ratiu
2025-05-05 15:07 ` Stanislav Fomichev
2025-05-05 15:12 ` Cosmin Ratiu
2025-05-05 18:35 ` Jakub Kicinski [this message]
2025-05-05 18:54 ` Stanislav Fomichev
2025-05-05 19:03 ` Jakub Kicinski
2025-03-05 16:37 ` [PATCH net-next v10 05/14] net: hold netdev instance lock during queue operations Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 06/14] net: hold netdev instance lock during rtnetlink operations Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 07/14] net: hold netdev instance lock during ioctl operations Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 08/14] net: hold netdev instance lock during sysfs operations Stanislav Fomichev
2025-03-24 15:34 ` Cosmin Ratiu
2025-03-24 15:56 ` Cosmin Ratiu
2025-03-24 16:06 ` Stanislav Fomichev
2025-03-24 17:06 ` Cosmin Ratiu
2025-03-24 18:18 ` Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 09/14] net: hold netdev instance lock during ndo_bpf Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 10/14] net: ethtool: try to protect all callback with netdev instance lock Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 11/14] net: replace dev_addr_sem " Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 12/14] net: add option to request " Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 13/14] docs: net: document new locking reality Stanislav Fomichev
2025-03-05 16:37 ` [PATCH net-next v10 14/14] eth: bnxt: remove most dependencies on RTNL Stanislav Fomichev
2025-03-06 21:50 ` [PATCH net-next v10 00/14] net: Hold netdev instance lock during ndo operations patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2025-03-02 0:08 Stanislav Fomichev
2025-03-02 0:08 ` [PATCH net-next v10 04/14] net: hold netdev instance lock during qdisc ndo_setup_tc Stanislav Fomichev
2025-03-02 20:56 ` Jamal Hadi Salim
2025-03-03 15:35 ` Stanislav Fomichev
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=20250505113514.6f369217@kernel.org \
--to=kuba@kernel.org \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeed@kernel.org \
--cc=sdf@fomichev.me \
--cc=stfomichev@gmail.com \
--cc=xiyou.wangcong@gmail.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.