All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	netdev@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: advertise 'netns local' property via netlink
Date: Fri, 7 Feb 2025 11:35:34 -0800	[thread overview]
Message-ID: <20250207113534.15136b7a@kernel.org> (raw)
In-Reply-To: <f052190e-f81e-491b-aaed-60eaa01fd968@6wind.com>

On Fri, 7 Feb 2025 10:10:49 +0100 Nicolas Dichtel wrote:
> Le 07/02/2025 à 00:39, Jakub Kicinski a écrit :
> > On Thu,  6 Feb 2025 17:50:26 +0100 Nicolas Dichtel wrote:  
> >> Since the below commit, there is no way to see if the netns_local property
> >> is set on a device. Let's add a netlink attribute to advertise it.  
> > 
> > I think the motivation for the change may be worth elaborating on.
> > It's a bit unclear to me what user space would care about this
> > information, a bit of a "story" on how you hit the issue could
> > be useful perhaps? The uAPI is new but the stable tag indicates
> > regression..  
> To make it short: we were trying a new NIC with a custom distro provided by a
> vendor (with out of tree drivers). We were unable to move the interface in
> another netns. Thanks to ethtool we were able to confirm that the 'netns-local'
> flag was set. Having this information helps debugging.

Thanks, makes sense. Still a bit unsure if this is a stable candidate,
if you don't mind net-next that'd be my preference. If you do mind,
I'll live with it :)

> >> @@ -2041,6 +2042,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb,
> >>  		       netif_running(dev) ? READ_ONCE(dev->operstate) :
> >>  					    IF_OPER_DOWN) ||
> >>  	    nla_put_u8(skb, IFLA_LINKMODE, READ_ONCE(dev->link_mode)) ||
> >> +	    nla_put_u8(skb, IFLA_NETNS_LOCAL, dev->netns_local) ||  
> > 
> > Maybe nla_put_flag() ? Or do you really care about false being there?  
> It depends if the commit is backported or not. If it won't be backported, having
> the false value helps to know that the kernel support this attribute (and so
> that the property is not set).

Wish we had a good solution for this, it's always the argument against
flags :(

  reply	other threads:[~2025-02-07 19:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06 16:50 [PATCH net 0/2] net: notify users when an iface cannot change its netns Nicolas Dichtel
2025-02-06 16:50 ` [PATCH net 1/2] net: advertise 'netns local' property via netlink Nicolas Dichtel
2025-02-06 16:59   ` Eric Dumazet
2025-02-06 17:11     ` Ido Schimmel
2025-02-06 23:39   ` Jakub Kicinski
2025-02-07  9:10     ` Nicolas Dichtel
2025-02-07 19:35       ` Jakub Kicinski [this message]
2025-02-06 16:50 ` [PATCH net 2/2] net: enhance error message for 'netns local' iface Nicolas Dichtel
2025-02-06 23:02   ` Andrew Lunn
2025-02-07  9:08     ` 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=20250207113534.15136b7a@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.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.