aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-06-10 08:33:50 -0700
committerDave Barach <openvpp@barachs.net>2019-06-11 00:24:05 +0000
commit4e116fb56fc195fc8f823aa231665fcb9b9c2996 (patch)
tree7ea243f9d84ef078ba41e027ce31bea26c2933c2 /src/vnet/tcp/tcp.c
parent5368bb016f5a0d8888456140ba2bf49371e6985c (diff)
tcp: allow registration of new cc algo types
Type: feature Change-Id: I83e21b508a19df1beb207d961c8f2b52347deca0 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 835bd4877c3..f72b9577eba 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -102,6 +102,14 @@ tcp_cc_algo_get (tcp_cc_algorithm_type_e type)
return &tm->cc_algos[type];
}
+tcp_cc_algorithm_type_e
+tcp_cc_algo_new_type (const tcp_cc_algorithm_t * vft)
+{
+ tcp_main_t *tm = vnet_get_tcp_main ();
+ tcp_cc_algo_register (++tm->cc_last_type, vft);
+ return tm->cc_last_type;
+}
+
static u32
tcp_connection_bind (u32 session_index, transport_endpoint_t * lcl)
{
@@ -1499,7 +1507,7 @@ tcp_main_enable (vlib_main_t * vm)
tcp_initialize_iss_seed (tm);
tm->bytes_per_buffer = vlib_buffer_get_default_data_size (vm);
-
+ tm->cc_last_type = TCP_CC_LAST;
return error;
}