Subject: Re: [PATCH net-next 1/3] net: Do not unconditionally turn on carrier when clearing protodown

From: Jakub Kicinski <[email-masked]>
Date: Mon, 4 May 2026 17:55:45 -0700

On Sun, 3 May 2026 21:08:03 +0300 Ido Schimmel wrote:
> There are drivers that only implement ndo_get_iflink(), but don't
> implement get_link_net(), so it's unclear in which netns we need to look
> up the device using the ifindex we got from ndo_get_iflink(). Netdevsim
> is one example. There are also some drivers that only implement
> get_link_net() such as vxlan.
> 
> The popular drivers such as vlan, macvlan and veth obviously implement
> both.

It's probably unintentional omission for the less popular devices.
Easy to forget to add an NDO (which is also the basis for my initial
comments).

> I added a helper [1] that resolves the linked device if these operations
> are present and otherwise returns the device itself. Similar to
> dev_get_iflink() which only gives us the ifindex.

The linked diff LGTM, thanks!

> Another option is to add a new NDO that gives us a pointer to the linked
> device.