]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.10.53/macvlan-initialize-vlan_features-to-turn-on-offload-support.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.53 / macvlan-initialize-vlan_features-to-turn-on-offload-support.patch
1 From foo@baz Fri Aug 8 08:48:58 PDT 2014
2 From: Vlad Yasevich <vyasevic@redhat.com>
3 Date: Thu, 31 Jul 2014 10:30:25 -0400
4 Subject: macvlan: Initialize vlan_features to turn on offload support.
5
6 From: Vlad Yasevich <vyasevic@redhat.com>
7
8 [ Upstream commit 081e83a78db9b0ae1f5eabc2dedecc865f509b98 ]
9
10 Macvlan devices do not initialize vlan_features. As a result,
11 any vlan devices configured on top of macvlans perform very poorly.
12 Initialize vlan_features based on the vlan features of the lower-level
13 device.
14
15 Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
16 Signed-off-by: David S. Miller <davem@davemloft.net>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 ---
19 drivers/net/macvlan.c | 1 +
20 1 file changed, 1 insertion(+)
21
22 --- a/drivers/net/macvlan.c
23 +++ b/drivers/net/macvlan.c
24 @@ -500,6 +500,7 @@ static int macvlan_init(struct net_devic
25 (lowerdev->state & MACVLAN_STATE_MASK);
26 dev->features = lowerdev->features & MACVLAN_FEATURES;
27 dev->features |= NETIF_F_LLTX;
28 + dev->vlan_features = lowerdev->vlan_features & MACVLAN_FEATURES;
29 dev->gso_max_size = lowerdev->gso_max_size;
30 dev->iflink = lowerdev->ifindex;
31 dev->hard_header_len = lowerdev->hard_header_len;