All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Stanislav Fomichev <stfomichev@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	syzkaller <syzkaller@googlegroups.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>,
	sdf@fomichev.me, jdamato@fastly.com, almasrymina@google.com
Subject: Re: [PATCH net-next v2] netdev: fix the locking for netdev notifications
Date: Tue, 15 Apr 2025 07:53:00 -0700	[thread overview]
Message-ID: <20250415075300.5c5fcb76@kernel.org> (raw)
In-Reply-To: <Z_2yMjGtbQ0ehtDN@mini-arch>

On Mon, 14 Apr 2025 18:11:14 -0700 Stanislav Fomichev wrote:
> > +static inline void netdev_lock_ops_to_full(struct net_device *dev)
> > +{
> > +	if (!netdev_need_ops_lock(dev))
> > +		netdev_lock(dev);  
> 
> Optional nit: I'm getting lost in all the helpers, I'd add the following here:
> 
> else
> 	netdev_ops_assert_locked(dev);
> 
> Or maybe even:
> 
> if (netdev_need_ops_lock)
> 	netdev_ops_assert_locked
> else
> 	netdev_lock
> 
> To express the constraints better.

Hm, yes, I like.

      reply	other threads:[~2025-04-15 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14 19:59 [PATCH net-next v2] netdev: fix the locking for netdev notifications Jakub Kicinski
2025-04-15  1:11 ` Stanislav Fomichev
2025-04-15 14:53   ` Jakub Kicinski [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=20250415075300.5c5fcb76@kernel.org \
    --to=kuba@kernel.org \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=kuniyu@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=stfomichev@gmail.com \
    --cc=syzkaller@googlegroups.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.