On Wed, May 3, 2017 at 3:47 PM, Lars Erik Storbukås <storbukas....@gmail.com> wrote: > I also want to count the amount of ECN signals received. Do anyone > have any input on where to place an ECN signal count? > > Is any of these locations a logical place to increase the ECN counter > (which I've created in tcp_sock)? Both locations are in the > tcp_input.c. > > /* In tcp_fastretrans_alert() */ > if (flag & FLAG_ECE) { > tp->prior_ssthresh = 0; > tp->ecn_count += 1; // ECN counter > }
This approach sounds good to me. > or > > /* In tcp_enter_recovery() */ > if (!tcp_in_cwnd_reduction(sk)) { > if (!ece_ack) > tp->prior_ssthresh = tcp_current_ssthresh(sk); > else > tp->ecn_count += 1; // ECN counter > tcp_init_cwnd_reduction(sk); > } > tcp_set_ca_state(sk, TCP_CA_Recovery); This location would only count ECE marks we happened to get at the moment we enter loss recovery. neal