net: veth: Set features for MPLS
authorDavid Ahern <dsa@cumulusnetworks.com>
Thu, 25 Aug 2016 03:10:45 +0000 (20:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Aug 2016 05:27:18 +0000 (22:27 -0700)
veth does not really transmit packets only moves the skb from one
netdev to another so gso and checksum is not really needed. Add
the features to mpls_features to get the same benefit and performance
with MPLS as without it.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/veth.c

index 4bda502254fb3fddcaa32be4b7d33a06c3115df7..fbc853e645318537e41eee115e17961607e394ff 100644 (file)
@@ -340,6 +340,7 @@ static void veth_setup(struct net_device *dev)
 
        dev->hw_features = VETH_FEATURES;
        dev->hw_enc_features = VETH_FEATURES;
+       dev->mpls_features = NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
 }
 
 /*