diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-01-09 09:36:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-29 18:25:15 +0300 |
commit | 1629144da3838569a4023d16fd1764039e98705b (patch) | |
tree | e485d17a9ca84739bd16729433771c016812464b /include/trace/events | |
parent | 5158e18225c06f39cde0176a431db6e60f52ebc2 (diff) | |
download | linux-1629144da3838569a4023d16fd1764039e98705b.tar.xz |
net: skb: use kfree_skb_reason() in tcp_v4_rcv()
[ Upstream commit 85125597419aec3aa7b8f3b8713e415f997796f2 ]
Replace kfree_skb() with kfree_skb_reason() in tcp_v4_rcv(). Following
drop reasons are added:
SKB_DROP_REASON_NO_SOCKET
SKB_DROP_REASON_PKT_TOO_SMALL
SKB_DROP_REASON_TCP_CSUM
SKB_DROP_REASON_TCP_FILTER
After this patch, 'kfree_skb' event will print message like this:
$ TASK-PID CPU# ||||| TIMESTAMP FUNCTION
$ | | | ||||| | |
<idle>-0 [000] ..s1. 36.113438: kfree_skb: skbaddr=(____ptrval____) protocol=2048 location=(____ptrval____) reason: NO_SOCKET
The reason of skb drop is printed too.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/skb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index 294c61bbe44b..faa7d068a7bc 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h @@ -11,6 +11,10 @@ #define TRACE_SKB_DROP_REASON \ EM(SKB_DROP_REASON_NOT_SPECIFIED, NOT_SPECIFIED) \ + EM(SKB_DROP_REASON_NO_SOCKET, NO_SOCKET) \ + EM(SKB_DROP_REASON_PKT_TOO_SMALL, PKT_TOO_SMALL) \ + EM(SKB_DROP_REASON_TCP_CSUM, TCP_CSUM) \ + EM(SKB_DROP_REASON_TCP_FILTER, TCP_FILTER) \ EMe(SKB_DROP_REASON_MAX, MAX) #undef EM |