Skip to content

Commit

Permalink
tcp_westwood: use tcp_jiffies32 instead of tcp_time_stamp
Browse files Browse the repository at this point in the history
This CC does not need 1 ms tcp_time_stamp and can use
the jiffy based 'timestamp'.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 17, 2017
1 parent 594208a commit ad5ad69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv4/tcp_westwood.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static void tcp_westwood_init(struct sock *sk)
w->cumul_ack = 0;
w->reset_rtt_min = 1;
w->rtt_min = w->rtt = TCP_WESTWOOD_INIT_RTT;
w->rtt_win_sx = tcp_time_stamp;
w->rtt_win_sx = tcp_jiffies32;
w->snd_una = tcp_sk(sk)->snd_una;
w->first_ack = 1;
}
Expand Down Expand Up @@ -116,7 +116,7 @@ static void tcp_westwood_pkts_acked(struct sock *sk,
static void westwood_update_window(struct sock *sk)
{
struct westwood *w = inet_csk_ca(sk);
s32 delta = tcp_time_stamp - w->rtt_win_sx;
s32 delta = tcp_jiffies32 - w->rtt_win_sx;

/* Initialize w->snd_una with the first acked sequence number in order
* to fix mismatch between tp->snd_una and w->snd_una for the first
Expand All @@ -140,7 +140,7 @@ static void westwood_update_window(struct sock *sk)
westwood_filter(w, delta);

w->bk = 0;
w->rtt_win_sx = tcp_time_stamp;
w->rtt_win_sx = tcp_jiffies32;
}
}

Expand Down

0 comments on commit ad5ad69

Please sign in to comment.