From: Menglong Dong <imagedong@xxxxxxxxxxx> In this series patches, reasons for skb drops are added to TCP layer, and both TCPv4 and TCPv6 are considered. in this series patches, the process of packet ingress in TCP layer is considered, as skb drops hardly happens in the egress path. However, it's a little complex for TCP state processing, as I find that it's hard to report skb drop reasons to where it is freed. For example, when skb is dropped in tcp_rcv_state_process(), the reason can be caused by the call of tcp_v4_conn_request(), and it's hard to return a drop reason from tcp_v4_conn_request(). So I just skip such case for this moment. Menglong Dong (9): net: tcp: introduce tcp_drop_reason() net: tcp: add skb drop reasons to tcp_v4_rcv() net: tcp: use kfree_skb_reason() for tcp_v6_rcv() net: tcp: add skb drop reasons to tcp_v{4,6}_inbound_md5_hash() net: tcp: add skb drop reasons to tcp_add_backlog() net: tcp: use kfree_skb_reason() for tcp_v{4,6}_do_rcv() net: tcp: use tcp_drop_reason() for tcp_rcv_established() net: tcp: use tcp_drop_reason() for tcp_data_queue() net: tcp: use tcp_drop_reason() for tcp_data_queue_ofo() include/linux/skbuff.h | 28 +++++++++++++++++++++++++ include/net/tcp.h | 3 ++- include/trace/events/skb.h | 10 +++++++++ net/ipv4/tcp_input.c | 42 +++++++++++++++++++++++++++++--------- net/ipv4/tcp_ipv4.c | 36 ++++++++++++++++++++++++-------- net/ipv6/tcp_ipv6.c | 42 +++++++++++++++++++++++++++++--------- 6 files changed, 131 insertions(+), 30 deletions(-) -- 2.34.1