Commit 081e83a7 authored by Vlad Yasevich's avatar Vlad Yasevich Committed by David S. Miller

macvlan: Initialize vlan_features to turn on offload support.

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: default avatarVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 47fab41a
...@@ -646,6 +646,7 @@ static int macvlan_init(struct net_device *dev) ...@@ -646,6 +646,7 @@ static int macvlan_init(struct net_device *dev)
(lowerdev->state & MACVLAN_STATE_MASK); (lowerdev->state & MACVLAN_STATE_MASK);
dev->features = lowerdev->features & MACVLAN_FEATURES; dev->features = lowerdev->features & MACVLAN_FEATURES;
dev->features |= ALWAYS_ON_FEATURES; dev->features |= ALWAYS_ON_FEATURES;
dev->vlan_features = lowerdev->vlan_features & MACVLAN_FEATURES;
dev->gso_max_size = lowerdev->gso_max_size; dev->gso_max_size = lowerdev->gso_max_size;
dev->iflink = lowerdev->ifindex; dev->iflink = lowerdev->ifindex;
dev->hard_header_len = lowerdev->hard_header_len; dev->hard_header_len = lowerdev->hard_header_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment