Skip to content

Commit 6ee400a

Browse files
jessegrossdavem330
authored andcommitted
net offloading: Do not mask out NETIF_F_HW_VLAN_TX for vlan.
In netif_skb_features() we return only the features that are valid for vlans if we have a vlan packet. However, we should not mask out NETIF_F_HW_VLAN_TX since it enables transmission of vlan tags and is obviously valid. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f742aa8 commit 6ee400a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/core/dev.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,13 +2023,13 @@ int netif_skb_features(struct sk_buff *skb)
20232023
return harmonize_features(skb, protocol, features);
20242024
}
20252025

2026-
features &= skb->dev->vlan_features;
2026+
features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX);
20272027

20282028
if (protocol != htons(ETH_P_8021Q)) {
20292029
return harmonize_features(skb, protocol, features);
20302030
} else {
20312031
features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST |
2032-
NETIF_F_GEN_CSUM;
2032+
NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_TX;
20332033
return harmonize_features(skb, protocol, features);
20342034
}
20352035
}

0 commit comments

Comments
 (0)