]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: vlan: sync VLAN features with lower device
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 30 Oct 2025 07:35:39 +0000 (07:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 1 Nov 2025 00:42:35 +0000 (17:42 -0700)
After registering a VLAN device and setting its feature flags, we need to
synchronize the VLAN features with the lower device. For example, the VLAN
device does not have the NETIF_F_LRO flag, it should be synchronized with
the lower device based on the NETIF_F_UPPER_DISABLES definition.

As the dev->vlan_features has changed, we need to call
netdev_update_features(). The caller must run after netdev_upper_dev_link()
links the lower devices, so this patch adds the netdev_update_features()
call in register_vlan_dev().

Fixes: fd867d51f889 ("net/core: generic support for disabling netdev features down stack")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20251030073539.133779-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/8021q/vlan.c

index fda3a80e9340cf7b51e75d1cbb1d3f0d28943b3c..2b74ed56eb166d52c3351768d9dfedc7b2c8ec2d 100644 (file)
@@ -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_update_features(dev);
+
        return 0;
 
 out_unregister_netdev: