linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* TCP get SND_CWND change on loss event
@ 2017-05-27 12:08 Lars Erik Storbukås
  2017-05-27 12:10 ` Willy Tarreau
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Erik Storbukås @ 2017-05-27 12:08 UTC (permalink / raw)
  To: LKML

I want to store the value of snd_cwnd when a congestion event occurs
(value before snd_cwnd is reduced), and the new value of snd_cwnd (the
value it has been reduced to). In other words: the congestion window
before and after a congestion event occurs.

I'm uncertain where (and how) it would be logical to implement this. I
have found two possible locations in the tcp_input.c where (I think)
it could be implemented:

static void tcp_cong_control(...) {
 ...
  if (tcp_in_cwnd_reduction(sk)) {
    struct tcp_sock *tp = tcp_sk(sk);
    prior_congestion_window = tp->snd_cwnd;

    /* Reduce cwnd if state mandates */
    tcp_cwnd_reduction(sk, acked_sacked, flag);

    reduced_congestion_window = tp->snd_cwnd;
  }
 ...
}

or

static void tcp_fastretrans_alert(...) {
  ...
  default:
    ...
    struct tcp_sock *tp = tcp_sk(sk);
    prior_congestion_window = tp->snd_cwnd;

    /* Otherwise enter Recovery state */
    tcp_enter_recovery(sk, (flag & FLAG_ECE));
    fast_rexmit = 1;

    reduced_congestion_window = tp->snd_cwnd;
  ...
}

Does anyone have advice on where (and how) to implement this? Does any
of the proposed solutions above seem logical?

/ Lars Erik Storbukås

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: TCP get SND_CWND change on loss event
  2017-05-27 12:08 TCP get SND_CWND change on loss event Lars Erik Storbukås
@ 2017-05-27 12:10 ` Willy Tarreau
  0 siblings, 0 replies; 2+ messages in thread
From: Willy Tarreau @ 2017-05-27 12:10 UTC (permalink / raw)
  To: Lars Erik Storbukås; +Cc: LKML

On Sat, May 27, 2017 at 02:08:01PM +0200, Lars Erik Storbukås wrote:
> I want to store the value of snd_cwnd when a congestion event occurs
> (value before snd_cwnd is reduced), and the new value of snd_cwnd (the
> value it has been reduced to). In other words: the congestion window
> before and after a congestion event occurs.
(...)

At the very least you should post this to netdev to get a useful response.

Willy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-27 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27 12:08 TCP get SND_CWND change on loss event Lars Erik Storbukås
2017-05-27 12:10 ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).