svn commit: r362854 - stable/12/sys/netinet/cc
Michael Tuexen
tuexen at FreeBSD.org
Wed Jul 1 19:23:16 UTC 2020
Author: tuexen
Date: Wed Jul 1 19:23:15 2020
New Revision: 362854
URL: https://svnweb.freebsd.org/changeset/base/362854
Log:
MFC r354772: Implement a TCP CUBIC-specific after idle reaction.
This patch addresses a very common case of frequent application stalls,
where TCP runs idle and looses the state of the network.
Submitted by: rscheff
Reviewed by: Cheng Cui
Differential Revision: https://reviews.freebsd.org/D18954
Modified:
stable/12/sys/netinet/cc/cc_cubic.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netinet/cc/cc_cubic.c
==============================================================================
--- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:15:43 2020 (r362853)
+++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:23:15 2020 (r362854)
@@ -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. */
@@ -115,6 +116,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
@@ -206,7 +208,24 @@ 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)
{
free(ccv->cc_data, M_CUBIC);
@@ -303,9 +322,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);
}
More information about the svn-src-stable
mailing list