Commit 53794570 authored by Yousuk Seung's avatar Yousuk Seung Committed by David S. Miller

net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit

Set tp->snd_ssthresh to BDP upon STARTUP exit. This allows us
to check if a BBR flow exited STARTUP and the BDP at the
time of STARTUP exit with SCM_TIMESTAMPING_OPT_STATS. Since BBR does not
use snd_ssthresh this fix has no impact on BBR's behavior.
Signed-off-by: default avatarYousuk Seung <ysseung@google.com>
Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarPriyaranjan Jha <priyarjha@google.com>
Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7156d194
...@@ -731,6 +731,8 @@ static void bbr_check_drain(struct sock *sk, const struct rate_sample *rs) ...@@ -731,6 +731,8 @@ static void bbr_check_drain(struct sock *sk, const struct rate_sample *rs)
bbr->mode = BBR_DRAIN; /* drain queue we created */ bbr->mode = BBR_DRAIN; /* drain queue we created */
bbr->pacing_gain = bbr_drain_gain; /* pace slow to drain */ bbr->pacing_gain = bbr_drain_gain; /* pace slow to drain */
bbr->cwnd_gain = bbr_high_gain; /* maintain cwnd */ bbr->cwnd_gain = bbr_high_gain; /* maintain cwnd */
tcp_sk(sk)->snd_ssthresh =
bbr_target_cwnd(sk, bbr_max_bw(sk), BBR_UNIT);
} /* fall through to check if in-flight is already small: */ } /* fall through to check if in-flight is already small: */
if (bbr->mode == BBR_DRAIN && if (bbr->mode == BBR_DRAIN &&
tcp_packets_in_flight(tcp_sk(sk)) <= tcp_packets_in_flight(tcp_sk(sk)) <=
...@@ -834,6 +836,7 @@ static void bbr_init(struct sock *sk) ...@@ -834,6 +836,7 @@ static void bbr_init(struct sock *sk)
struct bbr *bbr = inet_csk_ca(sk); struct bbr *bbr = inet_csk_ca(sk);
bbr->prior_cwnd = 0; bbr->prior_cwnd = 0;
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
bbr->rtt_cnt = 0; bbr->rtt_cnt = 0;
bbr->next_rtt_delivered = 0; bbr->next_rtt_delivered = 0;
bbr->prev_ca_state = TCP_CA_Open; bbr->prev_ca_state = TCP_CA_Open;
...@@ -886,7 +889,7 @@ static u32 bbr_undo_cwnd(struct sock *sk) ...@@ -886,7 +889,7 @@ static u32 bbr_undo_cwnd(struct sock *sk)
static u32 bbr_ssthresh(struct sock *sk) static u32 bbr_ssthresh(struct sock *sk)
{ {
bbr_save_cwnd(sk); bbr_save_cwnd(sk);
return TCP_INFINITE_SSTHRESH; /* BBR does not use ssthresh */ return tcp_sk(sk)->snd_ssthresh;
} }
static size_t bbr_get_info(struct sock *sk, u32 ext, int *attr, static size_t bbr_get_info(struct sock *sk, u32 ext, int *attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment