diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-07-08 16:34:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-08 16:34:32 -0400 |
commit | 89114afd435a486deb8583e89f490fc274444d18 (patch) | |
tree | 800e784ba59755f9f3c9926a6992e1d0f5b8eec7 /include/linux | |
parent | 9c6c6795eda34e4dc38ecac912a16b6314082beb (diff) |
[NET] gso: Add skb_is_gso
This patch adds the wrapper function skb_is_gso which can be used instead
of directly testing skb_shinfo(skb)->gso_size. This makes things a little
nicer and allows us to change the primary key for indicating whether an skb
is GSO (if we ever want to do that).
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | include/linux/skbuff.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 85f99f60deea..0359a6430018 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1001,7 +1001,7 @@ static inline int net_gso_ok(int features, int gso_type) | |||
1001 | 1001 | ||
1002 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 1002 | static inline int skb_gso_ok(struct sk_buff *skb, int features) |
1003 | { | 1003 | { |
1004 | return net_gso_ok(features, skb_shinfo(skb)->gso_size ? | 1004 | return net_gso_ok(features, skb_is_gso(skb) ? |
1005 | skb_shinfo(skb)->gso_type : 0); | 1005 | skb_shinfo(skb)->gso_type : 0); |
1006 | } | 1006 | } |
1007 | 1007 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3597b4f14389..0bf31b83578c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1455,5 +1455,10 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1455 | { } | 1455 | { } |
1456 | #endif | 1456 | #endif |
1457 | 1457 | ||
1458 | static inline int skb_is_gso(const struct sk_buff *skb) | ||
1459 | { | ||
1460 | return skb_shinfo(skb)->gso_size; | ||
1461 | } | ||
1462 | |||
1458 | #endif /* __KERNEL__ */ | 1463 | #endif /* __KERNEL__ */ |
1459 | #endif /* _LINUX_SKBUFF_H */ | 1464 | #endif /* _LINUX_SKBUFF_H */ |