bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/19] net: add skb drop reasons for TCP, IP, dev and neigh
@ 2022-02-15 11:27 menglong8.dong
  2022-02-15 11:27 ` [PATCH net-next 01/19] net: tcp: introduce tcp_drop_reason() menglong8.dong
                   ` (19 more replies)
  0 siblings, 20 replies; 27+ messages in thread
From: menglong8.dong @ 2022-02-15 11:27 UTC (permalink / raw)
  To: dsahern, kuba
  Cc: edumazet, davem, rostedt, mingo, yoshfuji, ast, daniel, hawk,
	john.fastabend, imagedong, talalahmad, keescook,
	ilias.apalodimas, alobakin, memxor, atenart, bigeasy, pabeni,
	linyunsheng, arnd, yajun.deng, roopa, willemb, vvs, cong.wang,
	luiz.von.dentz, linux-kernel, netdev, bpf, flyingpeng

From: Menglong Dong <imagedong@tencent.com>

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(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-02-16  2:43 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 11:27 [PATCH net-next 00/19] net: add skb drop reasons for TCP, IP, dev and neigh menglong8.dong
2022-02-15 11:27 ` [PATCH net-next 01/19] net: tcp: introduce tcp_drop_reason() menglong8.dong
2022-02-15 17:34   ` Eric Dumazet
2022-02-15 18:47     ` David Ahern
2022-02-16  2:38       ` Menglong Dong
2022-02-16  2:31     ` Menglong Dong
2022-02-15 11:27 ` [PATCH net-next 02/19] net: tcp: add skb drop reasons to tcp_v4_rcv() menglong8.dong
2022-02-15 11:27 ` [PATCH net-next 03/19] net: tcp: use kfree_skb_reason() for tcp_v6_rcv() menglong8.dong
2022-02-15 11:27 ` [PATCH net-next 04/19] net: tcp: add skb drop reasons to tcp_v{4,6}_inbound_md5_hash() menglong8.dong
2022-02-15 11:27 ` [PATCH net-next 05/19] net: tcp: add skb drop reasons to tcp_add_backlog() menglong8.dong
2022-02-15 11:27 ` [PATCH net-next 06/19] net: tcp: use kfree_skb_reason() for tcp_v{4,6}_do_rcv() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 07/19] net: tcp: use tcp_drop_reason() for tcp_rcv_established() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 08/19] net: tcp: use tcp_drop_reason() for tcp_data_queue() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 09/19] net: tcp: use tcp_drop_reason() for tcp_data_queue_ofo() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 10/19] net: ip: add skb drop reasons during ip outputting menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 11/19] net: neigh: use kfree_skb_reason() for __neigh_event_send() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 12/19] net: neigh: add skb drop reasons to arp_error_report() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 13/19] net: dev: use kfree_skb_reason() for sch_handle_egress() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 14/19] net: skb: introduce the function kfree_skb_list_reason() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 15/19] net: dev: add skb drop reasons to __dev_xmit_skb() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 16/19] net: dev: use kfree_skb_reason() for enqueue_to_backlog() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 17/19] net: dev: use kfree_skb_reason() for do_xdp_generic() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 18/19] net: dev: use kfree_skb_reason() for sch_handle_ingress() menglong8.dong
2022-02-15 11:28 ` [PATCH net-next 19/19] net: dev: use kfree_skb_reason() for __netif_receive_skb_core() menglong8.dong
2022-02-15 16:04 ` [PATCH net-next 00/19] net: add skb drop reasons for TCP, IP, dev and neigh Jakub Kicinski
2022-02-15 16:09   ` David Ahern
2022-02-16  1:55     ` Menglong Dong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).