Subject: Re: [PATCH net] net: vlan: sync VLAN features with lower device

From: Hangbin Liu <[email-masked]>
Date: Thu, 23 Oct 2025 14:57:51 +0000

On Thu, Oct 23, 2025 at 06:55:17AM -0700, Jakub Kicinski wrote:
> On Thu, 23 Oct 2025 15:39:07 +0200 Paolo Abeni wrote:
> > > @@ -193,6 +193,8 @@ int register_vlan_dev(struct net_device *dev, struct netlink_ext_ack *extack)
> > >  	vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, dev);
> > >  	grp->nr_vlan_devs++;
> > >  
> > > +	netdev_change_features(dev);  
> > 
> > Is this just for NETIF_F_LRO? it feels a bit overkill for single flag.
> > Also, why netdev_change_features() (vs netdev_update_features())?
> 
> Another thought -- isn't this a problem for more uppers?
> Isn't this what all callers of netdev_upper_dev_link() effectively
> need, and therefore perhaps we should stick it somewhere in the core
> (netdev_upper_dev_link() itself or when device is registered) ?

I saw bond/team/bridge/hsr disabled lro via dev_disable_lro() when add new
ports. But net_failover/ipvlan/macvlan and some others did not.

Maybe as you said, we can do it in netdev_upper_dev_link(), as some
devices may register first but not set upper dev link yet.

Thanks
Hangbin