macvlan: Initialize vlan_features to turn on offload support.
authorVlad Yasevich <vyasevic@redhat.com>
Thu, 31 Jul 2014 14:30:25 +0000 (10:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Aug 2014 01:24:15 +0000 (09:24 +0800)
[ Upstream commit 081e83a78db9b0ae1f5eabc2dedecc865f509b98 ]

Macvlan devices do not initialize vlan_features.  As a result,
any vlan devices configured on top of macvlans perform very poorly.
Initialize vlan_features based on the vlan features of the lower-level
device.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/macvlan.c

index 155ef4bbde91c71cf38a97ee50b893960a61958c..9be91cb4f4a305c64996ab6e4aeb31d94af547b6 100644 (file)
@@ -500,6 +500,7 @@ static int macvlan_init(struct net_device *dev)
                                  (lowerdev->state & MACVLAN_STATE_MASK);
        dev->features           = lowerdev->features & MACVLAN_FEATURES;
        dev->features           |= NETIF_F_LLTX;
+       dev->vlan_features      = lowerdev->vlan_features & MACVLAN_FEATURES;
        dev->gso_max_size       = lowerdev->gso_max_size;
        dev->iflink             = lowerdev->ifindex;
        dev->hard_header_len    = lowerdev->hard_header_len;