Skip to contentSkip to conversation

macvlan: Initialize vlan_features to turn on offload support.

PATCH Applied Vlad Yasevich 2 participants 2 messages Jul 31, 2014 – Aug 1, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/macvlan.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/macvlan.c +1 -0
index 958df38..ef8a5c2 100644
@@ -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;
Signature · 1 line
1.9.3
maintainer Applied
#1 lore raw

From: Vlad Yasevich <[email protected]>
Date: Thu, 31 Jul 2014 10:30:25 -0400

Quoted 6 lines

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.

Applied, thanks.