netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Sabrina Dubroca <sd@queasysnail.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net 01/12] ipvlan: add get_link_net
Date: Thu, 1 Oct 2020 10:19:19 +0200	[thread overview]
Message-ID: <b3a6433e-35c4-603b-5939-eaebc27a21c9@gmail.com> (raw)
In-Reply-To: <b920e279472824d78949401e3bc837713d1f54ea.1600770261.git.sd@queasysnail.net>



On 10/1/20 9:59 AM, Sabrina Dubroca wrote:
> Currently, ipvlan devices don't advertise a link-netnsid. We can get
> it from the lower device, like macvlan does.
> 
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> ---
>  drivers/net/ipvlan/ipvlan_main.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
> index 5bca94c99006..a81bb68a5713 100644
> --- a/drivers/net/ipvlan/ipvlan_main.c
> +++ b/drivers/net/ipvlan/ipvlan_main.c
> @@ -678,6 +678,14 @@ void ipvlan_link_setup(struct net_device *dev)
>  }
>  EXPORT_SYMBOL_GPL(ipvlan_link_setup);
>  
> +static struct net *ipvlan_get_link_net(const struct net_device *dev)
> +{
> +	struct ipvl_dev *ipvlan = netdev_priv(dev);
> +	struct net_device *phy_dev = ipvlan->phy_dev;
> +
> +	return dev_net(phy_dev);
> +}
> +
>  static const struct nla_policy ipvlan_nl_policy[IFLA_IPVLAN_MAX + 1] =
>  {
>  	[IFLA_IPVLAN_MODE] = { .type = NLA_U16 },
> @@ -691,6 +699,7 @@ static struct rtnl_link_ops ipvlan_link_ops = {
>  	.setup		= ipvlan_link_setup,
>  	.newlink	= ipvlan_link_new,
>  	.dellink	= ipvlan_link_delete,
> +	.get_link_net	= ipvlan_get_link_net,
>  };
>  
>  int ipvlan_link_register(struct rtnl_link_ops *ops)
> 

This conflicts with a patch in net-next...

commit 0bad834ca7bf9999ed9841f2bf9f5f07fbe02136
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Fri Aug 21 17:47:32 2020 +0000

    ipvlan: advertise link netns via netlink

I think you should take it as is.

  reply	other threads:[~2020-10-01  8:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  7:59 [PATCH net 00/12] net: iflink and link-netnsid fixes Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 01/12] ipvlan: add get_link_net Sabrina Dubroca
2020-10-01  8:19   ` Eric Dumazet [this message]
2020-10-01  7:59 ` [PATCH net 02/12] geneve: " Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 03/12] Revert "rtnetlink: always put IFLA_LINK for links with a link-netnsid" Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 04/12] rtnetlink: always put IFLA_LINK for links with ndo_get_iflink Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 05/12] bridge: always put IFLA_LINK for ports " Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 06/12] bridge: advertise IFLA_LINK_NETNSID when dumping bridge ports Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 07/12] ipv6: always put IFLA_LINK for devices with ndo_get_iflink Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 08/12] ipv6: advertise IFLA_LINK_NETNSID when dumping ipv6 addresses Sabrina Dubroca
2020-10-01 15:58   ` Nicolas Dichtel
2020-10-02  9:03     ` Sabrina Dubroca
2020-10-05 15:16       ` Nicolas Dichtel
2020-10-01  7:59 ` [PATCH net 09/12] net: link_watch: fix operstate when the link has the same index as the device Sabrina Dubroca
2020-10-01 11:00   ` Taehee Yoo
2020-10-01  7:59 ` [PATCH net 10/12] net: link_watch: fix detection of urgent events Sabrina Dubroca
2020-10-01  7:59 ` [PATCH net 11/12] batman-adv: fix iflink detection in batadv_is_on_batman_iface Sabrina Dubroca
2022-05-14 10:21   ` Sven Eckelmann
2020-10-01  7:59 ` [PATCH net 12/12] batman-adv: fix detection of lower link in batadv_get_real_netdevice Sabrina Dubroca
2020-10-01 21:25 ` [PATCH net 00/12] net: iflink and link-netnsid fixes Stephen Hemminger
2020-10-02  9:07   ` Sabrina Dubroca

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=b3a6433e-35c4-603b-5939-eaebc27a21c9@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    /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).