diff options
author | Eric Dumazet <edumazet@google.com> | 2018-06-20 16:07:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-22 00:59:22 -0400 |
commit | cadefe5f584abaac40dce72009e4de738cbff467 (patch) | |
tree | 1b40f040d84e576d231826bd19593918eb597d86 /include/net/tcp.h | |
parent | 3f484a6e766740c9cb89cf576fdceeec49e221fd (diff) |
tcp_bbr: fix bbr pacing rate for internal pacing
This commit makes BBR use only the MSS (without any headers) to
calculate pacing rates when internal TCP-layer pacing is used.
This is necessary to achieve the correct pacing behavior in this case,
since tcp_internal_pacing() uses only the payload length to calculate
pacing delays.
Signed-off-by: Kevin Yang <yyd@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0448e7c5d2b4..822ee49ed0f9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1184,6 +1184,17 @@ static inline bool tcp_is_cwnd_limited(const struct sock *sk) | |||
1184 | return tp->is_cwnd_limited; | 1184 | return tp->is_cwnd_limited; |
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | /* BBR congestion control needs pacing. | ||
1188 | * Same remark for SO_MAX_PACING_RATE. | ||
1189 | * sch_fq packet scheduler is efficiently handling pacing, | ||
1190 | * but is not always installed/used. | ||
1191 | * Return true if TCP stack should pace packets itself. | ||
1192 | */ | ||
1193 | static inline bool tcp_needs_internal_pacing(const struct sock *sk) | ||
1194 | { | ||
1195 | return smp_load_acquire(&sk->sk_pacing_status) == SK_PACING_NEEDED; | ||
1196 | } | ||
1197 | |||
1187 | /* Something is really bad, we could not queue an additional packet, | 1198 | /* Something is really bad, we could not queue an additional packet, |
1188 | * because qdisc is full or receiver sent a 0 window. | 1199 | * because qdisc is full or receiver sent a 0 window. |
1189 | * We do not want to add fuel to the fire, or abort too early, | 1200 | * We do not want to add fuel to the fire, or abort too early, |