]> xenbits.xensource.com Git - arm/linux.git/commitdiff
net: vlan: Inherit MPLS features from parent device
authorAriel Levkovich <lariel@mellanox.com>
Mon, 3 Jun 2019 22:36:47 +0000 (22:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jun 2019 21:49:38 +0000 (14:49 -0700)
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 <lariel@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan_dev.c

index c546c42280751c0283c17245329fda57f78050e0..4042047d5558f43c8dbe477e02163866d1d53af9 100644 (file)
@@ -585,6 +585,7 @@ static int vlan_dev_init(struct net_device *dev)
 
        dev->vlan_features = real_dev->vlan_features & ~NETIF_F_ALL_FCOE;
        dev->hw_enc_features = vlan_tnl_features(real_dev);
+       dev->mpls_features = real_dev->mpls_features;
 
        /* ipv6 shared card related stuff */
        dev->dev_id = real_dev->dev_id;