diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 880d56565828..2861565a27d9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2248,9 +2248,17 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) | |||
2248 | 2248 | ||
2249 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 2249 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
2250 | { | 2250 | { |
2251 | return skb_is_gso(skb) && | 2251 | if (skb_is_gso(skb)) { |
2252 | (!skb_gso_ok(skb, dev->features) || | 2252 | int features = dev->features; |
2253 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | 2253 | |
2254 | if (skb->protocol == htons(ETH_P_8021Q) || skb->vlan_tci) | ||
2255 | features &= dev->vlan_features; | ||
2256 | |||
2257 | return (!skb_gso_ok(skb, features) || | ||
2258 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | ||
2259 | } | ||
2260 | |||
2261 | return 0; | ||
2254 | } | 2262 | } |
2255 | 2263 | ||
2256 | static inline void netif_set_gso_max_size(struct net_device *dev, | 2264 | static inline void netif_set_gso_max_size(struct net_device *dev, |