From: Jakub Kicinski <kuba@kernel.org>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Guillaume Nault <gnault@redhat.com>,
Hangbin Liu <liuhangbin@gmail.com>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Ido Schimmel <idosch@nvidia.com>,
Petr Machata <petrm@nvidia.com>,
Florent Fourcot <florent.fourcot@wifirst.fr>,
Nikolay Aleksandrov <razor@blackwall.org>
Subject: Re: [PATCH net-next] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, set}link
Date: Fri, 23 Sep 2022 06:48:45 -0700 [thread overview]
Message-ID: <20220923064845.64c9a801@kernel.org> (raw)
In-Reply-To: <5a1f51a2-3a68-54ae-69ec-51881d60b43f@6wind.com>
Let me clarify one more time in case Hangbin is waiting for
the discussion to resolve...
On Fri, 23 Sep 2022 10:43:53 +0200 Nicolas Dichtel wrote:
> Le 22/09/2022 à 16:51, Guillaume Nault a écrit :
> > I just don't see any way to pass a handle back to user space at the
> > moment. The echo mechanism did that and was generic to all netlink
> > families (as long as nlmsg_notify() was called with the right
> > parameters).
In NEWLINK, right? In NEWLINK there is no way to pass it back
at the moment. A newly added command can just respond with the handle
always. The problem with NEWLINK is that it _used to_ not respond so
we can't make it start responding because it will confuse existing user
space.
At the protocol level NEW is no different than GET, whether it sends
a response back is decided by whoever implements the command.
So yes, for NEWLINK we need a way to inform the kernel that user space
wants a reply. It can be via ECHO, it could be via a new attr.
What I'm trying to argue about is *not* whether NEWLINK should support
ECHO but whether requiring ECHO to get a response for newly added
CREATE / NEW commands is a good idea. I think it is not, and new
commands should just always respond with the handle.
My main concern with using ECHO is that it breaks the one-to-one
relationship between a request and a response. There may be multiple
notifications generated due to a command, and if we want to retain
the "ECHO will loop back to you all resulting notifications" semantics,
which I think we should, then there can be multiple "responses".
This also has implications for the command IDs used in notifications.
A lot of modern genl families use different IDs for notifications to
make it easily distinguishable from responses.
I guess tl;dr is Hangbin should go forward with the v2, and I should
document the expectations clearly..
next prev parent reply other threads:[~2022-09-23 13:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 3:07 [PATCH net-next] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, set}link Hangbin Liu
2022-09-21 9:11 ` Nicolas Dichtel
2022-09-21 10:31 ` Hangbin Liu
2022-09-21 13:01 ` Jakub Kicinski
2022-09-21 13:13 ` Nikolay Aleksandrov
2022-09-21 16:14 ` Guillaume Nault
2022-09-21 22:56 ` Jakub Kicinski
2022-09-22 10:13 ` Hangbin Liu
2022-09-22 12:58 ` Jakub Kicinski
2022-09-22 10:52 ` Florent Fourcot
2022-09-22 11:09 ` Guillaume Nault
2022-09-22 13:03 ` Jakub Kicinski
2022-09-22 14:51 ` Guillaume Nault
2022-09-23 8:43 ` Nicolas Dichtel
2022-09-23 13:48 ` Jakub Kicinski [this message]
2022-09-23 15:42 ` Nicolas Dichtel
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=20220923064845.64c9a801@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florent.fourcot@wifirst.fr \
--cc=gnault@redhat.com \
--cc=idosch@nvidia.com \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--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;
as well as URLs for NNTP newsgroup(s).