From aa01abb2b732abfb44559d25c9a11adfed57ac8b Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 12 Nov 2018 09:13:10 -0800 Subject: tcp: cubic fast convergence Change-Id: I3a15960fe346763faf13e8728ce36c2f3bf7b05a Signed-off-by: Florin Coras --- src/vnet/tcp/tcp.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/vnet/tcp/tcp.c') diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 2511a176e00..25c2615b101 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -1448,6 +1448,29 @@ unformat_tcp_cc_algo (unformat_input_t * input, va_list * va) return 1; } +uword +unformat_tcp_cc_algo_cfg (unformat_input_t * input, va_list * va) +{ + tcp_main_t *tm = vnet_get_tcp_main (); + tcp_cc_algorithm_t *cc_alg; + unformat_input_t sub_input; + int found = 0; + + vec_foreach (cc_alg, tm->cc_algos) + { + if (!unformat (input, cc_alg->name)) + continue; + + if (cc_alg->unformat_cfg + && unformat (input, "%U", unformat_vlib_cli_sub_input, &sub_input)) + { + if (cc_alg->unformat_cfg (&sub_input)) + found = 1; + } + } + return found; +} + static clib_error_t * tcp_config_fn (vlib_main_t * vm, unformat_input_t * input) { @@ -1472,6 +1495,8 @@ tcp_config_fn (vlib_main_t * vm, unformat_input_t * input) else if (unformat (input, "cc-algo %U", unformat_tcp_cc_algo, &tm->cc_algo)) ; + else if (unformat (input, "%U", unformat_tcp_cc_algo_cfg)) + ; else return clib_error_return (0, "unknown input `%U'", format_unformat_error, input); -- cgit 1.2.3-korg