]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Aug 2014 05:10:01 +0000 (22:10 -0700)
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>
drivers/net/macvlan.c

index 958df383068a534d01bf9632463a22689184ea50..ef8a5c20236a007b976f98e4c787b5520f9affd8 100644 (file)
@@ -646,6 +646,7 @@ static int macvlan_init(struct net_device *dev)
                                  (lowerdev->state & MACVLAN_STATE_MASK);
        dev->features           = lowerdev->features & MACVLAN_FEATURES;
        dev->features           |= ALWAYS_ON_FEATURES;
+       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;