[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202506301721223475hGdoPaiDtgihIpp82pZF@zte.com.cn>
Date: Mon, 30 Jun 2025 17:21:22 +0800 (CST)
From: <xu.xin16@....com.cn>
To: <edumazet@...gle.com>
Cc: <kuba@...nel.org>, <kuniyu@...zon.com>, <ncardwell@...gle.com>,
<davem@...emloft.net>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-trace-kernel@...r.kernel.org>,
<yang.yang29@....com.cn>, <fan.yu9@....com.cn>,
<tu.qiang35@....com.cn>, <jiang.kun2@....com.cn>
Subject: Re: [PATCH net-next] tcp: add retransmission quit reasons to tracepoint
> >
> > From: Fan Yu <fan.yu9@....com.cn>
> >
> > Problem
> > =======
> > When TCP retransmits a packet due to missing ACKs, the retransmission
> > may fail for various reasons (e.g., packets stuck in driver queues,
> > sequence errors, or routing issues). Currently, these failure reasons
> > are internally handled in __tcp_retransmit_skb() but lack visibility to
> > userspace, which makes it difficult to diagnose retransmission failures in
> > production environments.
> >
> > Solution
> > =======
> > This patch adds a reason field to the tcp_retransmit_skb tracepoint,
> > enumerating with explicit failure cases:
> > TCP_RETRANS_IN_HOST_QUEUE (packet still queued in driver)
> > TCP_RETRANS_END_SEQ_ERROR (invalid end sequence)
> > TCP_RETRANS_TRIM_HEAD_NOMEM (trim head no memory)
> > TCP_RETRANS_UNCLONE_NOMEM (skb unclone keeptruesize no memory)
> > TCP_RETRANS_FRAG_NOMEM (fragment no memory)
> > TCP_RETRANS_ROUTE_FAIL (routing failure)
> > TCP_RETRANS_RCV_ZERO_WINDOW (closed recevier window)
> > TCP_RETRANS_PSKB_COPY_NOBUFS (no buffer for skb copy)
> > TCP_RETRANS_QUIT_UNDEFINED (quit reason undefined)
>
> 'undefined' ?
>
Oh, it's redundant indeed. Will remove it in v2.
> >
> > Impact
> > ======
> > 1. Enables BPF programs to filter retransmission failures by reason.
> > 2. Allows precise failure rate monitoring via ftrace.
> >
> > Co-developed-by: xu xin <xu.xin16@....com.cn>
> > Signed-off-by: xu xin <xu.xin16@....com.cn>
> > Signed-off-by: Fan Yu <fan.yu9@....com.cn>
>
> Problem is that this patch breaks the original trace point, without
> any mention of the potential consequences in the changelog ?
>
Huhh, indeed. Will add a part description of the potential consequences in v2.
Thanks for reviews.
> commit e086101b150ae8e99e54ab26101ef3835fa9f48d
> Author: Cong Wang <xiyou.wangcong@...il.com>
> Date: Fri Oct 13 13:03:16 2017 -0700
>
> tcp: add a tracepoint for tcp retransmission
Powered by blists - more mailing lists