tcp: fix unformat cwnd multiplier
Type: fix Change-Id: Ife4e650cb8b16f84ca6f77ba7b1d17a0f452fc3f Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:

committed by
Dave Barach

parent
bb73ae7b14
commit
1df833e6de
@ -1699,7 +1699,9 @@ unformat_tcp_cc_algo_cfg (unformat_input_t * input, va_list * va)
|
|||||||
static clib_error_t *
|
static clib_error_t *
|
||||||
tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
||||||
{
|
{
|
||||||
|
u32 cwnd_multiplier, tmp_time;
|
||||||
uword memory_size;
|
uword memory_size;
|
||||||
|
|
||||||
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
|
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
|
||||||
{
|
{
|
||||||
if (unformat (input, "preallocated-connections %d",
|
if (unformat (input, "preallocated-connections %d",
|
||||||
@ -1723,8 +1725,8 @@ tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
|||||||
&tcp_cfg.rwnd_min_update_ack))
|
&tcp_cfg.rwnd_min_update_ack))
|
||||||
;
|
;
|
||||||
else if (unformat (input, "initial-cwnd-multiplier %u",
|
else if (unformat (input, "initial-cwnd-multiplier %u",
|
||||||
&tcp_cfg.initial_cwnd_multiplier))
|
&cwnd_multiplier))
|
||||||
;
|
tcp_cfg.initial_cwnd_multiplier = cwnd_multiplier;
|
||||||
else if (unformat (input, "no-tx-pacing"))
|
else if (unformat (input, "no-tx-pacing"))
|
||||||
tcp_cfg.enable_tx_pacing = 0;
|
tcp_cfg.enable_tx_pacing = 0;
|
||||||
else if (unformat (input, "cc-algo %U", unformat_tcp_cc_algo,
|
else if (unformat (input, "cc-algo %U", unformat_tcp_cc_algo,
|
||||||
@ -1732,20 +1734,20 @@ tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
|||||||
;
|
;
|
||||||
else if (unformat (input, "%U", unformat_tcp_cc_algo_cfg))
|
else if (unformat (input, "%U", unformat_tcp_cc_algo_cfg))
|
||||||
;
|
;
|
||||||
else if (unformat (input, "closewait-time %u", &tcp_cfg.closewait_time))
|
else if (unformat (input, "closewait-time %u", &tmp_time))
|
||||||
tcp_cfg.closewait_time /= TCP_TIMER_TICK;
|
tcp_cfg.closewait_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else if (unformat (input, "timewait-time %u", &tcp_cfg.timewait_time))
|
else if (unformat (input, "timewait-time %u", &tmp_time))
|
||||||
tcp_cfg.timewait_time /= TCP_TIMER_TICK;
|
tcp_cfg.timewait_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else if (unformat (input, "finwait1-time %u", &tcp_cfg.finwait1_time))
|
else if (unformat (input, "finwait1-time %u", &tmp_time))
|
||||||
tcp_cfg.finwait1_time /= TCP_TIMER_TICK;
|
tcp_cfg.finwait1_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else if (unformat (input, "finwait2-time %u", &tcp_cfg.finwait2_time))
|
else if (unformat (input, "finwait2-time %u", &tmp_time))
|
||||||
tcp_cfg.finwait2_time /= TCP_TIMER_TICK;
|
tcp_cfg.finwait2_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else if (unformat (input, "lastack-time %u", &tcp_cfg.lastack_time))
|
else if (unformat (input, "lastack-time %u", &tmp_time))
|
||||||
tcp_cfg.lastack_time /= TCP_TIMER_TICK;
|
tcp_cfg.lastack_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else if (unformat (input, "closing-time %u", &tcp_cfg.closing_time))
|
else if (unformat (input, "closing-time %u", &tmp_time))
|
||||||
tcp_cfg.closing_time /= TCP_TIMER_TICK;
|
tcp_cfg.closing_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else if (unformat (input, "cleanup-time %u", &tcp_cfg.cleanup_time))
|
else if (unformat (input, "cleanup-time %u", &tmp_time))
|
||||||
tcp_cfg.cleanup_time /= TCP_TIMER_TICK;
|
tcp_cfg.cleanup_time = tmp_time / TCP_TIMER_TICK;
|
||||||
else
|
else
|
||||||
return clib_error_return (0, "unknown input `%U'",
|
return clib_error_return (0, "unknown input `%U'",
|
||||||
format_unformat_error, input);
|
format_unformat_error, input);
|
||||||
|
Reference in New Issue
Block a user