Skip to content

Commit c211f5d

Browse files
liuhangbinkuba-moo
authored andcommitted
net: vlan: sync VLAN features with lower device
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: fd867d5 ("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>
1 parent d01f813 commit c211f5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/8021q/vlan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ int register_vlan_dev(struct net_device *dev, struct netlink_ext_ack *extack)
193193
vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, dev);
194194
grp->nr_vlan_devs++;
195195

196+
netdev_update_features(dev);
197+
196198
return 0;
197199

198200
out_unregister_netdev:

0 commit comments

Comments
 (0)