From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: Guillaume Nault <gnault@redhat.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>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
David Ahern <dsahern@kernel.org>
Subject: Re: [PATCHv3 net-next] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, set, del}link
Date: Thu, 29 Sep 2022 06:40:48 -0700 [thread overview]
Message-ID: <20220929064048.35e72a8f@kernel.org> (raw)
In-Reply-To: <YzUMrAgm5eieW1hS@Laptop-X1>
On Thu, 29 Sep 2022 11:10:36 +0800 Hangbin Liu wrote:
> > Now for device modification, I'm not sure there's a use case for
> > unicast notifications. The caller already knows which values it asked
> > to modify, so ECHO doesn't bring much value compared to a simple ACK.
>
> And the __dev_notify_flags() is only used when the dev flag changed.
>
> It looks no much change if we call it when create new link:
> rtnl_newlink_create() -> rtnl_configure_link() -> __dev_notify_flags()
>
> But when set link, it is only called when flag changed
> do_setlink() -> dev_change_flags() -> __dev_notify_flags().
>
> Unless you want to omit the ECHO message when setting link.
>
> At latest, when call rtnl_delete_link(), there is no way to call
> __dev_notify_flags(). So we still need to use the current way.
>
> As a summarize, we need to change a lot of code if we use __dev_notify_flags()
> to notify user, while we can only use it in one place. This looks not worth.
>
> WDYT?
There needs to be a clear use case if you want to add notifications.
Plumbing ECHO to existing notifications is just good hygiene, if you
want to add new notifications you'd need to provide a real use case.
I don't buy the "a lot code changed" BTW, you can make
dev_change_flags() a wrapper and add dev_change_flags_nlh() or whatnot
which will take the extra argument.
next prev parent reply other threads:[~2022-09-29 13:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 4:13 [PATCHv3 net-next] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, set, del}link Hangbin Liu
2022-09-27 14:21 ` Jakub Kicinski
2022-09-28 2:39 ` Hangbin Liu
2022-09-28 9:47 ` Guillaume Nault
2022-09-29 3:10 ` Hangbin Liu
2022-09-29 13:40 ` Jakub Kicinski [this message]
2022-09-29 14:32 ` Guillaume Nault
2022-09-28 3:22 ` Hangbin Liu
2022-09-28 9:55 ` Guillaume Nault
2022-09-28 14:16 ` Jakub Kicinski
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=20220929064048.35e72a8f@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--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).