diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2020-08-22 00:23:29 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-25 01:12:26 +0200 |
commit | be769db2f95861cc8c7c8fedcc71a8c39b803b10 (patch) | |
tree | da78f5524a3903c7a3464a8fe7bb37e54cb2552f /include | |
parent | drivers/net/wan/lapbether: Added needed_tailroom (diff) | |
download | linux-be769db2f95861cc8c7c8fedcc71a8c39b803b10.tar.xz linux-be769db2f95861cc8c7c8fedcc71a8c39b803b10.zip |
net: Get rid of consume_skb when tracing is off
The function consume_skb is only meaningful when tracing is enabled.
This patch makes it conditional on CONFIG_TRACEPOINTS.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 46881d902124..e8bca74857a3 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1056,7 +1056,16 @@ void kfree_skb(struct sk_buff *skb); void kfree_skb_list(struct sk_buff *segs); void skb_dump(const char *level, const struct sk_buff *skb, bool full_pkt); void skb_tx_error(struct sk_buff *skb); + +#ifdef CONFIG_TRACEPOINTS void consume_skb(struct sk_buff *skb); +#else +static inline void consume_skb(struct sk_buff *skb) +{ + return kfree_skb(skb); +} +#endif + void __consume_stateless_skb(struct sk_buff *skb); void __kfree_skb(struct sk_buff *skb); extern struct kmem_cache *skbuff_head_cache; |