[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALOAHbC2emaruOaJFa3whyGDUf+bgY5W3bYKvfET-DJCizSkMg@mail.gmail.com>
Date: Thu, 31 Oct 2024 23:21:36 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Daniel Xu <dxu@...uu.xyz>, Eric Dumazet <edumazet@...gle.com>,
David Miller <davem@...emloft.net>, dsahern@...nel.org, Jakub Kicinski <kuba@...nel.org>,
netdev@...r.kernel.org, Menglong Dong <menglong8.dong@...il.com>
Subject: Re: [PATCH 2/2] net: tcp: Add noinline_for_tracing annotation for tcp_drop_reason()
On Thu, Oct 31, 2024 at 10:24 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> Hi,
>
> On 10/25/24 07:58, Yafang Shao wrote:
> > On Fri, Oct 25, 2024 at 4:57 AM Daniel Xu <dxu@...uu.xyz> wrote:
> >> On Thu, Oct 24, 2024, at 2:37 AM, Yafang Shao wrote:
> >>> We previously hooked the tcp_drop_reason() function using BPF to monitor
> >>> TCP drop reasons. However, after upgrading our compiler from GCC 9 to GCC
> >>> 11, tcp_drop_reason() is now inlined, preventing us from hooking into it.
> >>> To address this, it would be beneficial to make noinline explicitly for
> >>> tracing.
> >>
> >> It looks like kfree_skb() tracepoint has rx_sk field now. Added in
> >> c53795d48ee8 ("net: add rx_sk to trace_kfree_skb").
> >
> > This commit is helpful. Thank you for providing the information. I
> > plan to backport it to our local kernel.
> >
> >>
> >> Between sk and skb, is there enough information to monitor TCP drops?
> >> Or do you need something particular about tcp_drop_reason()?
> >
> > There's nothing else specific to mention. The @rx_sk introduced in the
> > commit you referred to will be beneficial to us.
>
> The implications of the above statement are not clear to me. Do you mean
> this patchset is not needed anymore?
The introduction of a dedicated tcp_drop_reason() function is intended
to enhance the traceability of TCP drops for the user, providing more
convenient and detailed insights. Additionally, since
tcp_drop_reason() does not impact the critical path, marking it as
noinline is acceptable. For these reasons, I believe this patchset
remains necessary.
--
Regards
Yafang
Powered by blists - more mailing lists