diff options
| author | David S. Miller <davem@davemloft.net> | 2017-05-24 23:27:22 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-05-24 23:27:22 +0300 |
| commit | e6a88e4ba88f3dd9d772f0ff7a88837939264883 (patch) | |
| tree | 2b342f50dd0d585ce34c08e68cd6d1fcd4ddae40 /include/linux | |
| parent | f2899788353c13891412b273fdff5f02d49aa40f (diff) | |
| parent | 2836b4f224d4fd7d1a2b23c3eecaf0f0ae199a74 (diff) | |
| download | linux-e6a88e4ba88f3dd9d772f0ff7a88837939264883.tar.xz | |
Merge branch 'q-in-q-checksums'
Daniel Borkmann says:
====================
BPF pruning follow-up
Follow-up to fix incorrect pruning when alignment tracking is
in use and to properly clear regs after call to not leave stale
data behind. For details, please see individual patches.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/if_vlan.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 8d5fcd6284ce..283dc2f5364d 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -614,14 +614,16 @@ static inline bool skb_vlan_tagged_multi(const struct sk_buff *skb) static inline netdev_features_t vlan_features_check(const struct sk_buff *skb, netdev_features_t features) { - if (skb_vlan_tagged_multi(skb)) - features = netdev_intersect_features(features, - NETIF_F_SG | - NETIF_F_HIGHDMA | - NETIF_F_FRAGLIST | - NETIF_F_HW_CSUM | - NETIF_F_HW_VLAN_CTAG_TX | - NETIF_F_HW_VLAN_STAG_TX); + if (skb_vlan_tagged_multi(skb)) { + /* In the case of multi-tagged packets, use a direct mask + * instead of using netdev_interesect_features(), to make + * sure that only devices supporting NETIF_F_HW_CSUM will + * have checksum offloading support. + */ + features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | + NETIF_F_FRAGLIST | NETIF_F_HW_VLAN_CTAG_TX | + NETIF_F_HW_VLAN_STAG_TX; + } return features; } |
