From: Yajun Deng <yajun.deng@linux.dev>
To: davem@davemloft.net, kuba@kernel.org
Cc: herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Yajun Deng <yajun.deng@linux.dev>
Subject: [PATCH] Revert "net: Get rid of consume_skb when tracing is off"
Date: Wed, 28 Jul 2021 11:56:05 +0800 [thread overview]
Message-ID: <20210728035605.24510-1-yajun.deng@linux.dev> (raw)
This reverts commit be769db2f95861cc8c7c8fedcc71a8c39b803b10.
There is trace_kfree_skb() in kfree_skb(), the trace_kfree_skb() is
also a trace function.
Fixes: be769db2f958 (net: Get rid of consume_skb when tracing is off)
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
include/linux/skbuff.h | 9 ---------
net/core/skbuff.c | 2 --
2 files changed, 11 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f19190820e63..da897d455d58 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1072,16 +1072,7 @@ 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;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index fc7942c0dddc..f4c6529ce6b9 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -893,7 +893,6 @@ void skb_tx_error(struct sk_buff *skb)
}
EXPORT_SYMBOL(skb_tx_error);
-#ifdef CONFIG_TRACEPOINTS
/**
* consume_skb - free an skbuff
* @skb: buffer to free
@@ -911,7 +910,6 @@ void consume_skb(struct sk_buff *skb)
__kfree_skb(skb);
}
EXPORT_SYMBOL(consume_skb);
-#endif
/**
* __consume_stateless_skb - free an skbuff, assuming it is stateless
--
2.32.0
next reply other threads:[~2021-07-28 3:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 3:56 Yajun Deng [this message]
2021-07-28 12:52 ` [PATCH] Revert "net: Get rid of consume_skb when tracing is off" Herbert Xu
2021-07-29 4:01 ` yajun.deng
2021-07-29 4:03 ` Herbert Xu
2021-07-29 4:10 ` yajun.deng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210728035605.24510-1-yajun.deng@linux.dev \
--to=yajun.deng@linux.dev \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).