Re: [PATCH] [RFC PATCH] tcp event: add new tcp:tcp_cwnd_restart event
From: Manjusaka
Date: Mon Aug 07 2023 - 09:42:25 EST
Got you means! LGTM
I will make a patch later and make a try
On Mon, Aug 7, 2023, at 9:25 PM, Eric Dumazet wrote:
> On Mon, Aug 7, 2023 at 2:49 PM Manjusaka <me@xxxxxxxxxxxx> wrote:
> >
> > > Do not include code before variable declarations.
> > Sorry about that. I will update the code later.
> >
> > > I would rather add a trace in tcp_ca_event(), this would be more generic ?
> >
> > https://elixir.bootlin.com/linux/latest/source/net/ipv4/tcp_cong.c#L41
> >
> > I think maybe we already have the tcp_ca_event but named tcp_cong_state_set?
>
> I am speaking of tcp_ca_event()...
>
> For instance, tcp_cwnd_restart() calls tcp_ca_event(sk, CA_EVENT_CWND_RESTART);
>
> tcp_set_ca_state() can only set icsk_ca_state to one value from enum
> tcp_ca_state:
> TCP_CA_Open, TCP_CA_Disorder, TCP_CA_CWR, TCP_CA_Recovery, TCP_CA_Loss
>
> enum tcp_ca_event has instead:
> CA_EVENT_TX_START, CA_EVENT_CWND_RESTART, CA_EVENT_COMPLETE_CWR,
> CA_EVENT_LOSS, CA_EVENT_ECN_NO_CE, CA_EVENT_ECN_IS_CE
>