From: Daniel Zahka <daniel.zahka@gmail.com>
To: Wei Wang <weibunny.kernel@gmail.com>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
David Wei <dw@davidwei.uk>, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weibunny@fb.com>
Subject: Re: [PATCH v3 net-next 2/5] psp: add new netlink cmd for dev-assoc and dev-disassoc
Date: Tue, 10 Mar 2026 11:08:52 -0400 [thread overview]
Message-ID: <9b7c4207-1bdd-4d56-a3fe-ea3e25e62559@gmail.com> (raw)
In-Reply-To: <20260309183454.2872967-3-weibunny.kernel@gmail.com>
On 3/9/26 2:34 PM, Wei Wang wrote:
> @@ -131,8 +263,7 @@ void psp_nl_notify_dev(struct psp_dev *psd, u32 cmd)
> struct genl_info info;
> struct sk_buff *ntf;
>
> - if (!genl_has_listeners(&psp_nl_family, dev_net(psd->main_netdev),
> - PSP_NLGRP_MGMT))
> + if (!psp_nl_has_listeners_any_ns(psd, PSP_NLGRP_MGMT))
> return;
>
> ntf = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_KERNEL);
> @@ -140,13 +271,13 @@ void psp_nl_notify_dev(struct psp_dev *psd, u32 cmd)
> return;
>
> genl_info_init_ntf(&info, &psp_nl_family, cmd);
> + genl_info_net_set(&info, dev_net(psd->main_netdev));
> if (psp_nl_dev_fill(psd, ntf, &info)) {
> nlmsg_free(ntf);
> return;
> }
>
> - genlmsg_multicast_netns(&psp_nl_family, dev_net(psd->main_netdev), ntf,
> - 0, PSP_NLGRP_MGMT, GFP_KERNEL);
> + psp_nl_multicast_all_ns(psd, ntf, PSP_NLGRP_MGMT);
> }
I don't think this will work correctly when there are listeners outside
of dev_net(psd->main_netdev). psp_nl_dev_fill() will prepare a
notification containing the unfiltered assoc list, but then that will be
broadcast out to all listeners regardless of netns, so those listeners
will see peer nsids relative to a different netns.
next prev parent reply other threads:[~2026-03-10 15:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 18:34 [PATCH v3 net-next 0/5] psp: Add support for dev-assoc/disassoc Wei Wang
2026-03-09 18:34 ` [PATCH v3 net-next 1/5] psp: add admin/non-admin version of psp_device_get_locked Wei Wang
2026-03-09 18:34 ` [PATCH v3 net-next 2/5] psp: add new netlink cmd for dev-assoc and dev-disassoc Wei Wang
2026-03-10 2:26 ` Bobby Eshleman
2026-03-10 16:38 ` Wei Wang
2026-03-10 14:25 ` Daniel Zahka
2026-03-10 17:03 ` Wei Wang
2026-03-10 15:08 ` Daniel Zahka [this message]
2026-03-10 19:42 ` Wei Wang
2026-03-09 18:34 ` [PATCH v3 net-next 3/5] psp: add a new netdev event for dev unregister Wei Wang
2026-03-10 0:37 ` Willem de Bruijn
2026-03-10 20:45 ` Wei Wang
2026-03-09 18:34 ` [PATCH v3 net-next 4/5] selftests/net: Add bpf skb forwarding program Wei Wang
2026-03-09 18:34 ` [PATCH v3 net-next 5/5] selftest/net: psp: Add test for dev-assoc/disassoc Wei Wang
2026-03-09 23:38 ` Jakub Kicinski
2026-03-10 20:46 ` Wei Wang
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=9b7c4207-1bdd-4d56-a3fe-ea3e25e62559@gmail.com \
--to=daniel.zahka@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=weibunny.kernel@gmail.com \
--cc=weibunny@fb.com \
--cc=willemdebruijn.kernel@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.