All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Nault <gnault@redhat.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, 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: [PATCHv5 net-next 4/4] rtnetlink: Honour NLM_F_ECHO flag in rtnl_delete_link
Date: Fri, 30 Sep 2022 18:57:13 +0200	[thread overview]
Message-ID: <20220930165713.GH10057@localhost.localdomain> (raw)
In-Reply-To: <20220930094506.712538-5-liuhangbin@gmail.com>

On Fri, Sep 30, 2022 at 05:45:06PM +0800, Hangbin Liu wrote:
> This patch use the new helper unregister_netdevice_many_notify() for
> rtnl_delete_link(), so that the kernel could reply unicast when userspace
>  set NLM_F_ECHO flag to request the new created interface info.
> 
> At the same time, the parameters of rtnl_delete_link() need to be updated
> since we need nlmsghdr and pid info.
> 
> Suggested-by: Guillaume Nault <gnault@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
>  include/net/rtnetlink.h        | 2 +-
>  net/core/rtnetlink.c           | 7 ++++---
>  net/openvswitch/vport-geneve.c | 2 +-
>  net/openvswitch/vport-gre.c    | 2 +-
>  net/openvswitch/vport-netdev.c | 2 +-
>  net/openvswitch/vport-vxlan.c  | 2 +-
>  6 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
> index bf8bb3357825..1a152993caef 100644
> --- a/include/net/rtnetlink.h
> +++ b/include/net/rtnetlink.h
> @@ -186,7 +186,7 @@ struct net_device *rtnl_create_link(struct net *net, const char *ifname,
>  				    const struct rtnl_link_ops *ops,
>  				    struct nlattr *tb[],
>  				    struct netlink_ext_ack *extack);
> -int rtnl_delete_link(struct net_device *dev);
> +int rtnl_delete_link(struct net_device *dev, struct nlmsghdr *nlh, u32 pid);
>  int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm);

You didn't add a wrapper for rtnl_delete_link() here and modified the
callers instead, which makes me think you could just also have modified
rtnl_configure_link() directly and avoided the creation of
rtnl_configure_link_notify() in patch 1.


      reply	other threads:[~2022-09-30 16:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30  9:45 [PATCHv5 net-next 0/4] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new, del}link Hangbin Liu
2022-09-30  9:45 ` [PATCHv5 net-next 1/4] rtnetlink: add new helper rtnl_configure_link_notify() Hangbin Liu
2022-09-30 14:22   ` Nicolas Dichtel
2022-09-30 16:01     ` Guillaume Nault
2022-09-30 21:40       ` Nicolas Dichtel
2022-10-04  8:22         ` Hangbin Liu
2022-09-30 16:28   ` Guillaume Nault
2022-09-30  9:45 ` [PATCHv5 net-next 2/4] net: add new helper unregister_netdevice_many_notify Hangbin Liu
2022-09-30 14:23   ` Nicolas Dichtel
2022-09-30 14:29     ` Guillaume Nault
2022-09-30 15:18       ` Jakub Kicinski
2022-09-30 16:31   ` Guillaume Nault
2022-09-30 16:45     ` Guillaume Nault
2022-09-30  9:45 ` [PATCHv5 net-next 3/4] rtnetlink: Honour NLM_F_ECHO flag in rtnl_newlink_create Hangbin Liu
2022-09-30 16:42   ` Guillaume Nault
2022-09-30  9:45 ` [PATCHv5 net-next 4/4] rtnetlink: Honour NLM_F_ECHO flag in rtnl_delete_link Hangbin Liu
2022-09-30 16:57   ` Guillaume Nault [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=20220930165713.GH10057@localhost.localdomain \
    --to=gnault@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=florent.fourcot@wifirst.fr \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --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 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.