[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <38811a75-ae98-48e7-96c0-bb1a39a0d722@kernel.org>
Date: Sun, 20 Oct 2024 10:18:32 -0600
From: David Ahern <dsahern@...nel.org>
To: Jason Xing <kerneljasonxing@...il.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, ncardwell@...gle.com
Cc: netdev@...r.kernel.org, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next 1/2] tcp: add a common helper to debug the
underlying issue
On 10/20/24 8:50 AM, Jason Xing wrote:
> From: Jason Xing <kernelxing@...cent.com>
>
> Following the commit c8770db2d544 ("tcp: check skb is non-NULL
> in tcp_rto_delta_us()"), we decided to add a helper so that it's
> easier to get verbose warning on either cases.
>
> Link: https://lore.kernel.org/all/5632e043-bdba-4d75-bc7e-bf58014492fd@redhat.com/
> Suggested-by: Paolo Abeni <pabeni@...hat.com>
> Signed-off-by: Jason Xing <kernelxing@...cent.com>
> Cc: Neal Cardwell <ncardwell@...gle.com>
> ---
> include/net/tcp.h | 28 +++++++++++++++++-----------
> 1 file changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 739a9fb83d0c..cac7bbff61ce 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -2430,6 +2430,22 @@ void tcp_plb_update_state(const struct sock *sk, struct tcp_plb_state *plb,
> void tcp_plb_check_rehash(struct sock *sk, struct tcp_plb_state *plb);
> void tcp_plb_update_state_upon_rto(struct sock *sk, struct tcp_plb_state *plb);
>
> +static inline void tcp_warn_once(const struct sock *sk, bool cond, const char *str)
> +{
> + WARN_ONCE(cond,
> + "%s"
> + "out:%u sacked:%u lost:%u retrans:%u "
> + "tlp_high_seq:%u sk_state:%u ca_state:%u "
> + "advmss:%u mss_cache:%u pmtu:%u\n",
format lines should not be split across lines. Yes, I realize the
existing code is, but since you are moving it and making changes to it
this can be fixed as well.
Powered by blists - more mailing lists