diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index aa2d3c12c4d8..6db03ab7cec8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -313,6 +313,7 @@ struct net_device | |||
313 | 313 | ||
314 | /* Segmentation offload features */ | 314 | /* Segmentation offload features */ |
315 | #define NETIF_F_GSO_SHIFT 16 | 315 | #define NETIF_F_GSO_SHIFT 16 |
316 | #define NETIF_F_GSO_MASK 0xffff0000 | ||
316 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) | 317 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) |
317 | #define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) | 318 | #define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) |
318 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) | 319 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) |
@@ -991,13 +992,18 @@ extern void dev_seq_stop(struct seq_file *seq, void *v); | |||
991 | 992 | ||
992 | extern void linkwatch_run_queue(void); | 993 | extern void linkwatch_run_queue(void); |
993 | 994 | ||
994 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 995 | static inline int net_gso_ok(int features, int gso_type) |
995 | { | 996 | { |
996 | int feature = skb_shinfo(skb)->gso_size ? | 997 | int feature = gso_type << NETIF_F_GSO_SHIFT; |
997 | skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0; | ||
998 | return (features & feature) == feature; | 998 | return (features & feature) == feature; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | ||
1002 | { | ||
1003 | return net_gso_ok(features, skb_shinfo(skb)->gso_size ? | ||
1004 | skb_shinfo(skb)->gso_type : 0); | ||
1005 | } | ||
1006 | |||
1001 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 1007 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
1002 | { | 1008 | { |
1003 | return !skb_gso_ok(skb, dev->features); | 1009 | return !skb_gso_ok(skb, dev->features); |