[dpdk-dev] app/testpmd: fix default RX/TX flow control values
Commit Message
From: Ding Zhi <zhi.ding@6wind.com>
This variable has undefined values in some cases.
Fixes: 422a20a4e62d ("app/testpmd: fix uninitialized flow control variables")
Signed-off-by: Ding Zhi <zhi.ding@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> This variable has undefined values in some cases.
>
> Fixes: 422a20a4e62d ("app/testpmd: fix uninitialized flow control variables")
> Signed-off-by: Ding Zhi <zhi.ding@6wind.com>
> Signed-off-by: David Marchand <david.marchand@6wind.com>
[...]
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -4743,7 +4743,7 @@ cmd_link_flow_ctrl_set_parsed(void *parsed_result,
> struct cmd_link_flow_ctrl_set_result *res = parsed_result;
> cmdline_parse_inst_t *cmd = data;
> struct rte_eth_fc_conf fc_conf;
> - int rx_fc_en, tx_fc_en = 0;
> + int rx_fc_en = 0, tx_fc_en = 0;
> int ret;
Applied with lines split to conform with the coding rules:
http://dpdk.org/browse/dpdk/tree/doc/guides/guidelines/coding_style.rst#n461
@@ -4743,7 +4743,7 @@ cmd_link_flow_ctrl_set_parsed(void *parsed_result,
struct cmd_link_flow_ctrl_set_result *res = parsed_result;
cmdline_parse_inst_t *cmd = data;
struct rte_eth_fc_conf fc_conf;
- int rx_fc_en, tx_fc_en = 0;
+ int rx_fc_en = 0, tx_fc_en = 0;
int ret;
/*