From: Jakub Kicinski <kuba@kernel.org>
To: Minxi Hou <houminxi@gmail.com>
Cc: netdev@vger.kernel.org, donald.hunter@gmail.com,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
horms@kernel.org, aconole@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/2] tools: ynl: add unicast notification receive support
Date: Tue, 19 May 2026 15:44:22 -0700 [thread overview]
Message-ID: <20260519154422.525b32e6@kernel.org> (raw)
In-Reply-To: <20260519103153.968549-3-houminxi@gmail.com>
On Tue, 19 May 2026 18:31:53 +0800 Minxi Hou wrote:
> ynl.ntf_subscribe(mcast_name) -- join a multicast group
> + ynl.ntf_listen() -- bind socket for unicast notifications
> ynl.check_ntf() -- drain pending notifications
> ynl.poll_ntf(duration=None) -- yield notifications
>
> @@ -748,6 +749,10 @@ class YnlFamily(SpecFamily):
> self.sock.setsockopt(Netlink.SOL_NETLINK, Netlink.NETLINK_ADD_MEMBERSHIP,
> mcast_id)
>
> + def ntf_listen(self):
> + """Bind socket for receiving unicast notifications."""
> + self.sock.bind((0, 0))
_listen() seems like a pretty bad name, given that listen()
is also a system call name, and we're doing a bind().
If we want a method to do this (as opposed to the user calling
ynl.sock.bind() themselves) we should probably call the method
bind() and pass the address tuple as an arg (default to (0, 0)).
--
pw-bot: cr
next prev parent reply other threads:[~2026-05-19 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 10:31 [PATCH net-next v3 0/2] Add OVS packet family YNL spec and unicast notification support Minxi Hou
2026-05-19 10:31 ` [PATCH net-next v3 1/2] netlink: specs: add OVS packet family specification Minxi Hou
2026-05-19 10:31 ` [PATCH net-next v3 2/2] tools: ynl: add unicast notification receive support Minxi Hou
2026-05-19 22:44 ` Jakub Kicinski [this message]
2026-05-19 11:26 ` [PATCH net-next v3 0/2] Add OVS packet family YNL spec and unicast notification support 侯敏熙
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=20260519154422.525b32e6@kernel.org \
--to=kuba@kernel.org \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=houminxi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox