* [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit
@ 2018-03-16 17:51 Yousuk Seung
2018-03-16 19:08 ` David Miller
2018-03-16 20:02 ` Eric Dumazet
0 siblings, 2 replies; 3+ messages in thread
From: Yousuk Seung @ 2018-03-16 17:51 UTC (permalink / raw)
To: David Miller
Cc: netdev, Yousuk Seung, Neal Cardwell, Priyaranjan Jha,
Soheil Hassas Yeganeh, Yuchung Cheng
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: Yousuk Seung <ysseung@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
---
net/ipv4/tcp_bbr.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
index c92014cb1e16..158d105e76da 100644
--- a/net/ipv4/tcp_bbr.c
+++ b/net/ipv4/tcp_bbr.c
@@ -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->pacing_gain = bbr_drain_gain; /* pace slow to drain */
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: */
if (bbr->mode == BBR_DRAIN &&
tcp_packets_in_flight(tcp_sk(sk)) <=
@@ -834,6 +836,7 @@ static void bbr_init(struct sock *sk)
struct bbr *bbr = inet_csk_ca(sk);
bbr->prior_cwnd = 0;
+ tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
bbr->rtt_cnt = 0;
bbr->next_rtt_delivered = 0;
bbr->prev_ca_state = TCP_CA_Open;
@@ -886,7 +889,7 @@ static u32 bbr_undo_cwnd(struct sock *sk)
static u32 bbr_ssthresh(struct sock *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,
--
2.16.2.804.g6dcf76e118-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit
2018-03-16 17:51 [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit Yousuk Seung
@ 2018-03-16 19:08 ` David Miller
2018-03-16 20:02 ` Eric Dumazet
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-03-16 19:08 UTC (permalink / raw)
To: ysseung; +Cc: netdev, ncardwell, priyarjha, soheil, ycheng
From: Yousuk Seung <ysseung@google.com>
Date: Fri, 16 Mar 2018 10:51:49 -0700
> 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: Yousuk Seung <ysseung@google.com>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Signed-off-by: Priyaranjan Jha <priyarjha@google.com>
> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
Applied.
Please submit future patch series with a proper cover letter.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit
2018-03-16 17:51 [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit Yousuk Seung
2018-03-16 19:08 ` David Miller
@ 2018-03-16 20:02 ` Eric Dumazet
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2018-03-16 20:02 UTC (permalink / raw)
To: Yousuk Seung, David Miller
Cc: netdev, Neal Cardwell, Priyaranjan Jha, Soheil Hassas Yeganeh,
Yuchung Cheng
On 03/16/2018 10:51 AM, Yousuk Seung wrote:
> 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.
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-16 20:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-16 17:51 [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit Yousuk Seung
2018-03-16 19:08 ` David Miller
2018-03-16 20:02 ` Eric Dumazet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.