summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMenglong Dong <imagedong@tencent.com>2022-03-04 09:00:44 +0300
committerDavid S. Miller <davem@davemloft.net>2022-03-04 15:17:11 +0300
commit7e726ed81e1ddd5fdc431e02b94fcfe2a9876d42 (patch)
treeb69798c8c8bbaa44e80274bc0637446770dc7d3f /include
parent44f0bd40803c0e04f1c8cd59df3c7acce783ae9c (diff)
downloadlinux-7e726ed81e1ddd5fdc431e02b94fcfe2a9876d42.tar.xz
net: dev: use kfree_skb_reason() for do_xdp_generic()
Replace kfree_skb() used in do_xdp_generic() with kfree_skb_reason(). The drop reason SKB_DROP_REASON_XDP is introduced for this case. Signed-off-by: Menglong Dong <imagedong@tencent.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/trace/events/skb.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 44ecbfff2b69..7a38d0f90cef 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -405,6 +405,7 @@ enum skb_drop_reason {
* full (see netdev_max_backlog in
* net.rst) or RPS flow limit
*/
+ SKB_DROP_REASON_XDP, /* dropped by XDP in input path */
SKB_DROP_REASON_MAX,
};
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index 3bb90ca893ae..8c4c343c830f 100644
--- a/include/trace/events/skb.h
+++ b/include/trace/events/skb.h
@@ -48,6 +48,7 @@
EM(SKB_DROP_REASON_TC_EGRESS, TC_EGRESS) \
EM(SKB_DROP_REASON_QDISC_DROP, QDISC_DROP) \
EM(SKB_DROP_REASON_CPU_BACKLOG, CPU_BACKLOG) \
+ EM(SKB_DROP_REASON_XDP, XDP) \
EMe(SKB_DROP_REASON_MAX, MAX)
#undef EM