From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: "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>,
Guillaume Nault <gnault@redhat.com>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCHv3 net-next] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, set, del}link
Date: Wed, 28 Sep 2022 07:16:09 -0700 [thread overview]
Message-ID: <20220928071609.5af4bb4f@kernel.org> (raw)
In-Reply-To: <YzO943B4Id2jLZkI@Laptop-X1>
On Wed, 28 Sep 2022 11:22:11 +0800 Hangbin Liu wrote:
> Hi Jakub,
> On Tue, Sep 27, 2022 at 12:13:03PM +0800, Hangbin Liu wrote:
> > @@ -3009,6 +3012,11 @@ static int do_setlink(const struct sk_buff *skb,
> > }
> > }
> >
> > + nskb = rtmsg_ifinfo_build_skb(RTM_NEWLINK, dev, 0, 0, GFP_KERNEL, NULL,
> > + 0, pid, nlh->nlmsg_seq);
> > + if (nskb)
> > + rtnl_notify(nskb, dev_net(dev), pid, RTNLGRP_LINK, nlh, GFP_KERNEL);
>
> BTW, in do_setlink() I planed to use RTM_SETLINK. But I found iproute2 use
> RTM_NEWLINK to set links. And I saw an old doc[1] said
>
> """
> - RTM_SETLINK does not follow the usual rtnetlink conventions and ignores
> all netlink flags
>
> The RTM_NEWLINK message type is a superset of RTM_SETLINK, it allows
> to change both driver specific and generic attributes of the device.
> """
Interesting, so we actually do use this "NEW as SET" thing.
> So I just use RTM_NEWLINK for the notification. Do you think if we should
> use RTM_SETLINK?
FWIW I think it's typical for rtnl / classic netlink to generate
"new object" notification whenever object is changed, rather than
a notification about just the change.
prev parent reply other threads:[~2022-09-28 14:16 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
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 [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=20220928071609.5af4bb4f@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).