提交 6ee400aa 编写于 作者: J Jesse Gross 提交者: David S. Miller

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: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NJesse Gross <jesse@nicira.com>
Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f742aa8a
...@@ -2023,13 +2023,13 @@ int netif_skb_features(struct sk_buff *skb) ...@@ -2023,13 +2023,13 @@ int netif_skb_features(struct sk_buff *skb)
return harmonize_features(skb, protocol, features); return harmonize_features(skb, protocol, features);
} }
features &= skb->dev->vlan_features; features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX);
if (protocol != htons(ETH_P_8021Q)) { if (protocol != htons(ETH_P_8021Q)) {
return harmonize_features(skb, protocol, features); return harmonize_features(skb, protocol, features);
} else { } else {
features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST |
NETIF_F_GEN_CSUM; NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_TX;
return harmonize_features(skb, protocol, features); return harmonize_features(skb, protocol, features);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册