[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <edfffc1e-a737-4074-98b1-6a2d60f50051@redhat.com>
Date: Tue, 23 Sep 2025 11:32:47 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: chia-yu.chang@...ia-bell-labs.com, edumazet@...gle.com,
linux-doc@...r.kernel.org, corbet@....net, horms@...nel.org,
dsahern@...nel.org, kuniyu@...zon.com, bpf@...r.kernel.org,
netdev@...r.kernel.org, dave.taht@...il.com, jhs@...atatu.com,
kuba@...nel.org, stephen@...workplumber.org, xiyou.wangcong@...il.com,
jiri@...nulli.us, davem@...emloft.net, andrew+netdev@...n.ch,
donald.hunter@...il.com, ast@...erby.net, liuhangbin@...il.com,
shuah@...nel.org, linux-kselftest@...r.kernel.org, ij@...nel.org,
ncardwell@...gle.com, koen.de_schepper@...ia-bell-labs.com,
g.white@...lelabs.com, ingemar.s.johansson@...csson.com,
mirja.kuehlewind@...csson.com, cheshire@...le.com, rs.ietf@....at,
Jason_Livingood@...cast.com, vidhi_goel@...le.com
Subject: Re: [PATCH v2 net-next 01/14] tcp: try to avoid safer when ACKs are
thinned
On 9/18/25 6:21 PM, chia-yu.chang@...ia-bell-labs.com wrote:
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 9fdc6ce25eb1..0b25bf03ae6a 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -488,6 +488,10 @@ static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
> tcp_count_delivered_ce(tp, delivered);
> }
>
> +#define PKTS_ACKED_WEIGHT 6
> +#define PKTS_ACKED_PREC 6
> +#define ACK_COMP_THRESH 4
> +
> /* Returns the ECN CE delta */
> static u32 __tcp_accecn_process(struct sock *sk, const struct sk_buff *skb,
> u32 delivered_pkts, u32 delivered_bytes,
> @@ -507,6 +511,19 @@ static u32 __tcp_accecn_process(struct sock *sk, const struct sk_buff *skb,
> opt_deltas_valid = tcp_accecn_process_option(tp, skb,
> delivered_bytes, flag);
>
> + if (delivered_pkts) {
> + if (!tp->pkts_acked_ewma) {
> + tp->pkts_acked_ewma = delivered_pkts << PKTS_ACKED_PREC;
Can the above statement overflow pkts_acked_ewma in exceptional cases?
Do that need and additional min_t(u32, <init val>, 0xFFFFU)?
/P
Powered by blists - more mailing lists