Re: [PATCH net v2 1/2] tcp: roccet: do not restart from idle on RTO retransmission

From: Eric Dumazet

Date: Wed Nov 18 2026 - 05:08:19 EST


Le mer. 18 nov. 2026 à 03:28, Zhiqi Zhang <zhiqizhangg@xxxxxxxxx> a écrit :
>
> roccet sets .cong_control, so tcp_slow_start_after_idle_check() returns
> early and roccet implements the idle restart in cwnd_event_tx_start().
>
> An RTO retransmission also raises CA_EVENT_TX_START: tcp_enter_loss()
> marks the outstanding packets lost, which drains the in-flight count
> while tp->packets_out stays non-zero. If delta >= icsk_rto,
> roccet_cwnd_event_tx_start() then takes the idle restart and overwrites
> tp->snd_ssthresh with tcp_snd_cwnd() == TCP_INIT_CWND.
>
> When a TLP probe was sent, the RTO timer is rearmed for a full icsk_rto
> at that point and the probe is the last transmit, so the first RTO is
> affected. Without TLP, the first RTO can escape: the timer is armed
> when the first packet of the flight is sent, and pacing spreads the
> following ones, so now - tp->lsndtime < icsk_rto. The second RTO is
> always affected, since it fires one backed-off icsk_rto after the first
> RTO retransmit.
>
> roccet_state(TCP_CA_Loss) calls roccet_reset(), which clears the private
> state; ca->state is already LAUNCH and last_max_cwnd is already 0 when
> roccet_cwnd_event_tx_start() runs, with or without this fix. The only
> field the idle restart breaks is tp->snd_ssthresh: it overwrites the
> value preserved by roccet_state() with TCP_INIT_CWND.
>
> Skip the idle restart while packets are outstanding. The packetdrill
> test in the next patch fails at the first RTO without this fix
> (snd_ssthresh == 10) and passes with it.
>
> Fixes: 819d59638796 ("tcp: Add TCP ROCCET congestion control module.")
> Link: https://lore.kernel.org/all/179179785248.434549.16829837649351382748@xxxxxxxxxx/
> Signed-off-by: Zhiqi Zhang <zhiqizhangg@xxxxxxxxx>
> ---

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>

Thanks.