Skip to content

net: add skb drop reasons for TCP, IP, dev and neigh

[email protected] bpf lkml llvm netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19net: tcp: introduce tcp_drop_reason()net/ipv4/tcp_input.c+11 -24 replies
2/19net: tcp: add skb drop reasons to tcp_v4_rcv()net/ipv4/tcp_ipv4.c+9 -20 replies
3/19net: tcp: use kfree_skb_reason() for tcp_v6_rcv()net/ipv6/tcp_ipv6.c+20 -50 replies
4/19net: tcp: add skb drop reasons to tcp_v{4,6}_inbound_md5_hash()include/linux/skbuff.h include/trace/events/skb.h net/ipv4/tcp_ipv4.c +1 more+28 -70 replies
5/19net: tcp: add skb drop reasons to tcp_add_backlog()include/linux/skbuff.h include/net/tcp.h include/trace/events/skb.h +2 more+13 -40 replies
6/19net: tcp: use kfree_skb_reason() for tcp_v{4,6}_do_rcv()net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c+7 -20 replies
7/19net: tcp: use tcp_drop_reason() for tcp_rcv_established()include/linux/skbuff.h include/trace/events/skb.h net/ipv4/tcp_input.c+9 -20 replies
8/19net: tcp: use tcp_drop_reason() for tcp_data_queue()include/linux/skbuff.h include/trace/events/skb.h net/ipv4/tcp_input.c+27 -20 replies
9/19net: tcp: use tcp_drop_reason() for tcp_data_queue_ofo()include/linux/skbuff.h include/trace/events/skb.h net/ipv4/tcp_input.c+10 -40 replies
10/19net: ip: add skb drop reasons during ip outputtinginclude/linux/skbuff.h include/trace/events/skb.h net/ipv4/ip_output.c +1 more+23 -60 replies
11/19net: neigh: use kfree_skb_reason() for __neigh_event_send()include/linux/skbuff.h include/trace/events/skb.h net/core/neighbour.c+13 -20 replies
12/19net: neigh: add skb drop reasons to arp_error_report()net/ipv4/arp.c+1 -10 replies
13/19net: dev: use kfree_skb_reason() for sch_handle_egress()include/linux/skbuff.h include/trace/events/skb.h net/core/dev.c+6 -10 replies
14/19net: skb: introduce the function kfree_skb_list_reason()include/linux/skbuff.h net/core/skbuff.c+11 -40 replies
15/19net: dev: add skb drop reasons to __dev_xmit_skb()include/linux/skbuff.h include/trace/events/skb.h net/core/dev.c+8 -20 replies
16/19net: dev: use kfree_skb_reason() for enqueue_to_backlog()include/linux/skbuff.h include/trace/events/skb.h net/core/dev.c+12 -10 replies
17/19net: dev: use kfree_skb_reason() for do_xdp_generic()include/linux/skbuff.h include/trace/events/skb.h net/core/dev.c+3 -10 replies
18/19net: dev: use kfree_skb_reason() for sch_handle_ingress()include/linux/skbuff.h include/trace/events/skb.h net/core/dev.c+6 -10 replies
19/19net: dev: use kfree_skb_reason() for __netif_receive_skb_core()include/linux/skbuff.h include/trace/events/skb.h net/core/dev.c+11 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 00/19] net: add skb drop reasons for TCP, IP, dev and neigh

From: Menglong Dong <[email protected]>

In this series patches, reasons for skb drops are added to TCP, IP, dev and neigh.

For TCP layer, the path of TCP data receive and enqueue are considered. However, it's more 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.

For IP layer, skb drop reasons are added to the packet outputting path. Seems the reasons are not complex, so I didn't split the commits by functions.

For neighbour part, SKB_DROP_REASON_NEIGH_FAILED and SKB_DROP_REASON_NEIGH_QUEUEFULL are added.

For link layer, reasons are added for both packet inputting and outputting path.

The amount of patches in this series seems a bit too many, maybe I should join some of them? For example, combine the patches of dev to one.

Menglong Dong (19):
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()
net: ip: add skb drop reasons during ip outputting
net: neigh: use kfree_skb_reason() for __neigh_event_send()
net: neigh: add skb drop reasons to arp_error_report()
net: dev: use kfree_skb_reason() for sch_handle_egress()
net: skb: introduce the function kfree_skb_list_reason()
net: dev: add skb drop reasons to __dev_xmit_skb()
net: dev: use kfree_skb_reason() for enqueue_to_backlog()
net: dev: use kfree_skb_reason() for do_xdp_generic()
net: dev: use kfree_skb_reason() for sch_handle_ingress()
net: dev: use kfree_skb_reason() for __netif_receive_skb_core()

 include/linux/skbuff.h     | 82 +++++++++++++++++++++++++++++++++++++-
 include/net/tcp.h          |  3 +-
 include/trace/events/skb.h | 21 ++++++++++
 net/core/dev.c             | 25 +++++++-----
 net/core/neighbour.c       |  4 +-
 net/core/skbuff.c          |  7 ++--
 net/ipv4/arp.c             |  2 +-
 net/ipv4/ip_output.c       |  6 +--
 net/ipv4/tcp_input.c       | 45 ++++++++++++++++-----
 net/ipv4/tcp_ipv4.c        | 36 ++++++++++++-----
 net/ipv6/ip6_output.c      |  6 +--
 net/ipv6/tcp_ipv6.c        | 42 ++++++++++++++-----
 12 files changed, 227 insertions(+), 52 deletions(-)
Signature · 1 line
2.34.1