public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	<netdev@vger.kernel.org>, Ido Schimmel <idosch@nvidia.com>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Breno Leitao <leitao@debian.org>,
	Andy Roulin <aroulin@nvidia.com>,
	"Francesco Ruggeri" <fruggeri@arista.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	<mlxsw@nvidia.com>
Subject: Re: [PATCH net-next v2 6/8] net: core: neighbour: Reorder netlink & internal notification
Date: Sun, 25 Jan 2026 14:59:22 -0800	[thread overview]
Message-ID: <20260125145922.36ba88ad@kernel.org> (raw)
In-Reply-To: <f3ef74d5460f14c4d102b8a5857d4a6624da9a5a.1769012464.git.petrm@nvidia.com>

On Wed, 21 Jan 2026 17:43:40 +0100 Petr Machata wrote:
> The netlink message needs to be send inside the critical section where the
> neighbor is changed, so that it reflects the notified-upon neighbor state.
> On the other hand, there is no such need in case of notifier chain: the
> listeners do not assume lock, and often in fact just schedule a delayed
> work to act on the neighbor later. At least one in fact also takes the
> neighbor lock.
> 
> This requires that the netlink notification be done before the internal
> notifier chain message is sent. That is safe to do, because the current
> listeners, as well as __neigh_notify(), only read the updated neighbor
> fields, and never modify them. (Apart from locking.)

Hopefully we're not setting a trap here that some driver will later
fall into.

  reply	other threads:[~2026-01-25 22:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 16:43 [PATCH net-next v2 0/8] net: neighbour: Notify changes atomically Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 1/8] net: core: neighbour: Add a neigh_fill_info() helper for when lock not held Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 2/8] net: core: neighbour: Call __neigh_notify() under a lock Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 3/8] net: core: neighbour: Extract ARP queue processing to a helper function Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 4/8] net: core: neighbour: Process ARP queue later Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 5/8] net: core: neighbour: Inline neigh_update_notify() calls Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 6/8] net: core: neighbour: Reorder netlink & internal notification Petr Machata
2026-01-25 22:59   ` Jakub Kicinski [this message]
2026-01-21 16:43 ` [PATCH net-next v2 7/8] net: core: neighbour: Make one netlink notification atomically Petr Machata
2026-01-21 16:43 ` [PATCH net-next v2 8/8] net: core: neighbour: Make another " Petr Machata
2026-01-23 15:28 ` [PATCH net-next v2 0/8] net: neighbour: Notify changes atomically Simon Horman
2026-01-25 23:00 ` patchwork-bot+netdevbpf

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=20260125145922.36ba88ad@kernel.org \
    --to=kuba@kernel.org \
    --cc=aroulin@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fruggeri@arista.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuniyu@google.com \
    --cc=leitao@debian.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=stephen@networkplumber.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