Subject: Re: [RFC PATCH net-next] tcp: add a tracepoint for tcp_listen_queue_drop

From: Jakub Kicinski <[email-masked]>
Date: Wed, 12 Jul 2023 10:42:10 -0700

On Wed, 12 Jul 2023 11:42:26 -0500 Yan Zhai wrote:
>   The issue with kfree_skb is not that it fires too frequently (not in
> the 6.x kernel now). Rather, it is unable to locate the socket info
> when a SYN is dropped due to the accept queue being full. The sk is
> stolen upon inet lookup, e.g. in tcp_v4_rcv. This makes it unable to
> tell in kfree_skb which socket a SYN skb is targeting (when TPROXY or
> socket lookup are used). A tracepoint with sk information will be more
> useful to monitor accurately which service/socket is involved.

No doubt that kfree_skb isn't going to solve all our needs, but I'd
really like you to clean up the unnecessary callers on your systems
first, before adding further tracepoints. That way we'll have a clear
picture of which points can be solved by kfree_skb and where we need
further work.