Netdev List
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Petr Machata <petrm@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, <netdev@vger.kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	<bridge@lists.linux.dev>, Ido Schimmel <idosch@nvidia.com>,
	Andy Roulin <aroulin@nvidia.com>, <mlxsw@nvidia.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>
Subject: Re: [PATCH net-next v2 00/13] net: Report requester's port ID in FDB notifications
Date: Mon, 30 Nov 2026 14:24:21 +0100	[thread overview]
Message-ID: <879a7c6b-6000-4c64-9efd-78642bbb4917@intel.com> (raw)
In-Reply-To: <cover.1796041491.git.petrm@nvidia.com>

On 11/30/26 2:03 PM, Petr Machata wrote:
> Every netlink message carries a port ID in the nlmsg_pid header field. The
> port ID identifies a netlink socket. In a request it is the port ID of the
> socket that sent it. When a change that results from a request is
> announced to the multicast listeners, the kernel puts the port ID of the
> requester in nlmsg_pid of the notification. For changes that the kernel
> initiates by itself, such as aging, nlmsg_pid is zero.
> 
> This is used by applications that both configure the kernel and listen to
> notifications from it. By comparing nlmsg_pid to the port ID of their own
> socket, they can tell their own changes apart from those made by someone
> else, and ignore the former. Commit 7b8f7a402d4c ("neighbour: fix nlmsg_pid
> in notifications") fixed this for IP neighbours, citing quagga as one such
> application. Routes and nexthops report the port ID as well.
> 
> For FDB entries, the notifications (RTM_NEWNEIGH and RTM_DELNEIGH with the
> AF_BRIDGE family) always carry zero, whoever caused them, so applications
> that manage FDB cannot do this sort of filtering. Hence this patchset.
> 
> The patchset goes through the following steps:
> 
> - FDB notifications are generated in two places. The bridge and VXLAN
>    drivers send their own from ndo_fdb_add, _del and _del_bulk, but these
>    NDOs are not given the port ID of the requester. For other drivers that
>    implement ndo_fdb_add / _del, the rtnetlink core sends a default
>    notification on their behalf. It has the port ID at hand, but does not
>    pass it on.
> 
>    The obvious way to get the port ID to the bridge and VXLAN is to add it
>    to the NDO prototypes. But ndo_fdb_add and _del already carry many
>    arguments, and one more would further complicate the already unwieldy
>    prototypes, as well as require adjustments in every driver. Instead, in
>    patch #1, convert the prototypes of ndo_fdb_add, _del and _get to take a
>    new struct ndo_fdb_parms. ndo_fdb_get already has the port ID, but it
>    shares most of its arguments with the other two, so it makes sense to
>    treat them alike.

[..]

>   drivers/net/ethernet/intel/i40e/i40e_main.c   |  29 +-
>   drivers/net/ethernet/intel/ice/ice_main.c     |  43 ++-
>   drivers/net/ethernet/intel/igb/igb_main.c     |  14 +-
>   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  14 +-

Acked-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

      parent reply	other threads:[~2026-11-30 13:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 13:03 [PATCH net-next v2 00/13] net: Report requester's port ID in FDB notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 01/13] net: Introduce struct ndo_fdb_parms Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 02/13] net: Pass struct ndo_fdb_parms to ndo_dflt_fdb_{add, del}() Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 03/13] net: Pass portid to ndo_fdb_get through the structure Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 04/13] net: bridge: Pass struct ndo_fdb_parms a bit further Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 05/13] net: bridge: Pass portid through FDB notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 06/13] net: vxlan: " Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 07/13] net: rtnetlink: Report port ID in bridge and VXLAN " Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 08/13] net: rtnetlink: Report port ID in bulk FDB delete notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 09/13] net: rtnetlink: Report port ID in fallback FDB notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 11/13] tools: ynl: Add NLM_F_BULK Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 12/13] selftests: net: lib: py: Add RtnlNeighFamily Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 13/13] selftests: net: Add a test for port ID in FDB notifications Petr Machata
2026-11-30 13:24 ` Przemek Kitszel [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=879a7c6b-6000-4c64-9efd-78642bbb4917@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=aroulin@nvidia.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.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