Skip to content

Commit 8b6912a

Browse files
Awik84davem330
authored andcommitted
net: vlan: Inherit MPLS features from parent device
During the creation of the VLAN interface net device, the various device features and offloads are being set based on the parent device's features. The code initiates the basic, vlan and encapsulation features but doesn't address the MPLS features set and they remain blank. As a result, all device offloads that have significant performance effect are disabled for MPLS traffic going via this VLAN device such as checksumming and TSO. This patch makes sure that MPLS features are also set for the VLAN device based on the parent which will allow HW offloads of checksumming and TSO to be performed on MPLS tagged packets. Signed-off-by: Ariel Levkovich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2e770b5 commit 8b6912a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/8021q/vlan_dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ static int vlan_dev_init(struct net_device *dev)
585585

586586
dev->vlan_features = real_dev->vlan_features & ~NETIF_F_ALL_FCOE;
587587
dev->hw_enc_features = vlan_tnl_features(real_dev);
588+
dev->mpls_features = real_dev->mpls_features;
588589

589590
/* ipv6 shared card related stuff */
590591
dev->dev_id = real_dev->dev_id;

0 commit comments

Comments
 (0)