aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/cc
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2019-11-14 16:28:02 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2019-11-14 16:28:02 +0000
commit730cbbc10d4a50200d530191fbb3192ab4287101 (patch)
tree03422944d179c17b9a25c9675df0ef71e637715d /sys/netinet/cc
parent4916bb44b09bdf9d465c931c302059ef2acc7a08 (diff)
downloadsrc-730cbbc10d4a50200d530191fbb3192ab4287101.tar.gz
src-730cbbc10d4a50200d530191fbb3192ab4287101.zip
For idle TCP sessions using the CUBIC congestio control, reset ssthresh
to the higher of the previous ssthresh or 3/4 of the prior cwnd. Submitted by: Richard Scheffenegger Reviewed by: Cheng Cui Differential Revision: https://reviews.freebsd.org/D18982
Notes
Notes: svn path=/head/; revision=354708
Diffstat (limited to 'sys/netinet/cc')
-rw-r--r--sys/netinet/cc/cc_cubic.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c
index 033fac9b80dc..831c5b369278 100644
--- a/sys/netinet/cc/cc_cubic.c
+++ b/sys/netinet/cc/cc_cubic.c
@@ -78,6 +78,7 @@ static int cubic_mod_init(void);
static void cubic_post_recovery(struct cc_var *ccv);
static void cubic_record_rtt(struct cc_var *ccv);
static void cubic_ssthresh_update(struct cc_var *ccv);
+static void cubic_after_idle(struct cc_var *ccv);
struct cubic {
/* Cubic K in fixed point form with CUBIC_SHIFT worth of precision. */
@@ -112,6 +113,7 @@ struct cc_algo cubic_cc_algo = {
.conn_init = cubic_conn_init,
.mod_init = cubic_mod_init,
.post_recovery = cubic_post_recovery,
+ .after_idle = cubic_after_idle,
};
static void
@@ -192,6 +194,23 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type)
}
}
+/*
+ * This is a Cubic specific implementation of after_idle.
+ * - Reset cwnd by calling New Reno implementation of after_idle.
+ * - Reset t_last_cong.
+ */
+static void
+cubic_after_idle(struct cc_var *ccv)
+{
+ struct cubic *cubic_data;
+
+ cubic_data = ccv->cc_data;
+
+ newreno_cc_algo.after_idle(ccv);
+ cubic_data->t_last_cong = ticks;
+}
+
+
static void
cubic_cb_destroy(struct cc_var *ccv)
{
@@ -287,9 +306,6 @@ cubic_conn_init(struct cc_var *ccv)
static int
cubic_mod_init(void)
{
-
- cubic_cc_algo.after_idle = newreno_cc_algo.after_idle;
-
return (0);
}