diff options
author | Florin Coras <fcoras@cisco.com> | 2018-11-12 09:13:10 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-11-13 18:16:19 +0000 |
commit | aa01abb2b732abfb44559d25c9a11adfed57ac8b (patch) | |
tree | 60bedc4b55bfd9f991075431b73b02fe6034e961 /src/vnet/tcp/tcp.c | |
parent | b688fb129746c040f5e6f880de592e53aff772d9 (diff) |
tcp: cubic fast convergence
Change-Id: I3a15960fe346763faf13e8728ce36c2f3bf7b05a
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r-- | src/vnet/tcp/tcp.c | 25 |
1 files changed, 25 insertions, 0 deletions
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); |