On 9/18/25 6:21 PM, chia-yu.chang@nokia-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