From: Menglong Dong <imagedong@xxxxxxxxxxx> In this series patches, kfree_skb() is replaced with kfree_skb_reason() during ipv4 and udp4 packet receiving path, and following drop reasons are introduced: SKB_DROP_REASON_SOCKET_FILTER SKB_DROP_REASON_NETFILTER_DROP SKB_DROP_REASON_OTHERHOST SKB_DROP_REASON_IP_CSUM SKB_DROP_REASON_IP_INHDR SKB_DROP_REASON_IP_RPFILTER SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST SKB_DROP_REASON_XFRM_POLICY SKB_DROP_REASON_IP_NOPROTO SKB_DROP_REASON_SOCKET_RCVBUFF SKB_DROP_REASON_PROTO_MEM TCP is more complex, so I left it in the next series. I just figure out how __print_symbolic() works. It doesn't base on the array index, but searching for symbols by loop. So I'm a little afraid it's performance. Changes since v1: - add document for all drop reasons, as David advised - remove unreleated cleanup - remove EARLY_DEMUX and IP_ROUTE_INPUT drop reason - replace {UDP, TCP}_FILTER with SOCKET_FILTER Menglong Dong (8): net: socket: intrudoce SKB_DROP_REASON_SOCKET_FILTER net: skb_drop_reason: add document for drop reasons net: netfilter: use kfree_drop_reason() for NF_DROP net: ipv4: use kfree_skb_reason() in ip_rcv_core() net: ipv4: use kfree_skb_reason() in ip_rcv_finish_core() net: ipv4: use kfree_skb_reason() in ip_protocol_deliver_rcu() net: udp: use kfree_skb_reason() in udp_queue_rcv_one_skb() net: udp: use kfree_skb_reason() in __udp_queue_rcv_skb() include/linux/skbuff.h | 38 ++++++++++++++++++++++++++++++++------ include/trace/events/skb.h | 13 ++++++++++++- net/ipv4/ip_input.c | 30 ++++++++++++++++++++++-------- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/udp.c | 22 ++++++++++++++++------ net/netfilter/core.c | 3 ++- 6 files changed, 85 insertions(+), 23 deletions(-) -- 2.27.0