diff options
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 85f99f60deea..75f02d8c6ed3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -549,6 +549,7 @@ struct packet_type { | |||
| 549 | struct net_device *); | 549 | struct net_device *); |
| 550 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 550 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
| 551 | int features); | 551 | int features); |
| 552 | int (*gso_send_check)(struct sk_buff *skb); | ||
| 552 | void *af_packet_priv; | 553 | void *af_packet_priv; |
| 553 | struct list_head list; | 554 | struct list_head list; |
| 554 | }; | 555 | }; |
| @@ -923,10 +924,10 @@ static inline void netif_tx_lock_bh(struct net_device *dev) | |||
| 923 | 924 | ||
| 924 | static inline int netif_tx_trylock(struct net_device *dev) | 925 | static inline int netif_tx_trylock(struct net_device *dev) |
| 925 | { | 926 | { |
| 926 | int err = spin_trylock(&dev->_xmit_lock); | 927 | int ok = spin_trylock(&dev->_xmit_lock); |
| 927 | if (!err) | 928 | if (likely(ok)) |
| 928 | dev->xmit_lock_owner = smp_processor_id(); | 929 | dev->xmit_lock_owner = smp_processor_id(); |
| 929 | return err; | 930 | return ok; |
| 930 | } | 931 | } |
| 931 | 932 | ||
| 932 | static inline void netif_tx_unlock(struct net_device *dev) | 933 | static inline void netif_tx_unlock(struct net_device *dev) |
| @@ -1001,13 +1002,14 @@ static inline int net_gso_ok(int features, int gso_type) | |||
| 1001 | 1002 | ||
| 1002 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 1003 | static inline int skb_gso_ok(struct sk_buff *skb, int features) |
| 1003 | { | 1004 | { |
| 1004 | return net_gso_ok(features, skb_shinfo(skb)->gso_size ? | 1005 | return net_gso_ok(features, skb_shinfo(skb)->gso_type); |
| 1005 | skb_shinfo(skb)->gso_type : 0); | ||
| 1006 | } | 1006 | } |
| 1007 | 1007 | ||
| 1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
| 1009 | { | 1009 | { |
| 1010 | return !skb_gso_ok(skb, dev->features); | 1010 | return skb_is_gso(skb) && |
| 1011 | (!skb_gso_ok(skb, dev->features) || | ||
| 1012 | unlikely(skb->ip_summed != CHECKSUM_HW)); | ||
| 1011 | } | 1013 | } |
| 1012 | 1014 | ||
| 1013 | #endif /* __KERNEL__ */ | 1015 | #endif /* __KERNEL__ */ |
