summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-14 14:29:52 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-09-15 11:40:59 -0400
commitba08f8a4ed2628bde685612f2dd4aa7c85bdac57 (patch)
treee7eb9a68c5ed92acdb9902d8d28406a07e2c05ba /src/or
parent3d2d8d6841a7ad7247278e837165e14d2ced43db (diff)
downloadtor-ba08f8a4ed2628bde685612f2dd4aa7c85bdac57.tar.gz
tor-ba08f8a4ed2628bde685612f2dd4aa7c85bdac57.zip
sched: Make check-spaces happy
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or')
-rw-r--r--src/or/scheduler_kist.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c
index 2733e78f0d..85d0b2a1fc 100644
--- a/src/or/scheduler_kist.c
+++ b/src/or/scheduler_kist.c
@@ -245,13 +245,14 @@ update_socket_info_impl, (socket_table_ent_t *ent))
if (tcp_space < 0) {
tcp_space = 0;
}
- /* Imagine we have filled up tcp_space already for a socket and the scheduler
- * isn't going to run again for a while. We should write a little extra to the
- * kernel so it has some data to send between scheduling runs if it gets ACKs
- * back so it doesn't sit idle. With the suggested sock_buf_size_factor of
- * 1.0, a socket can have at most 2*cwnd data in the kernel: 1 cwnd on the
- * wire waiting for ACKs and 1 cwnd ready and waiting to be sent when those
- * ACKs come. */
+
+ /* Imagine we have filled up tcp_space already for a socket and the
+ * scheduler isn't going to run again for a while. We should write a little
+ * extra to the kernel so it has some data to send between scheduling runs
+ * if it gets ACKs back so it doesn't sit idle. With the suggested
+ * sock_buf_size_factor of 1.0, a socket can have at most 2*cwnd data in the
+ * kernel: 1 cwnd on the wire waiting for ACKs and 1 cwnd ready and waiting
+ * to be sent when those ACKs come. */
extra_space =
clamp_double_to_int64((ent->cwnd * ent->mss) * sock_buf_size_factor) -
ent->notsent;