diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2017-06-29 14:27:39 +0200 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2017-06-29 14:27:39 +0200 |
| commit | 61830619675b97d3da34c59c71ae51646a205e2c (patch) | |
| tree | e6d39f81284bdb86ba4214c89994fb454074f583 /include/linux/if_vlan.h | |
| parent | 8137f78a7fedeef1ffc0ac36e0ad68960eaf5010 (diff) | |
| parent | c0bc126f97fb929b3ae02c1c62322645d70eb408 (diff) | |
| download | lwn-61830619675b97d3da34c59c71ae51646a205e2c.tar.gz lwn-61830619675b97d3da34c59c71ae51646a205e2c.zip | |
Merge tag 'v4.12-rc7' into devel
Linux 4.12-rc7
Diffstat (limited to 'include/linux/if_vlan.h')
| -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; } |
