* [dpdk-dev] [PATCH] app/testpmd: remove unnecessary tunnel UDP cmd check
@ 2021-02-18 3:06 Xiaoyun Li
2021-02-22 10:44 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Xiaoyun Li @ 2021-02-18 3:06 UTC (permalink / raw)
To: ferruh.yigit; +Cc: dev, Xiaoyun Li, stable
cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
only for rx_vxlan_port. The unnecessary cmd check will cause uninit
coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.
Coverity issue: 366155
Fixes: bd948f20d609 ("app/testpmd: VXLAN packet identification")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/cmdline.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 59722d268b..d77958b783 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -9098,7 +9098,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
/* *** CONFIGURE TUNNEL UDP PORT *** */
struct cmd_tunnel_udp_config {
- cmdline_fixed_string_t cmd;
+ cmdline_fixed_string_t rx_vxlan_port;
cmdline_fixed_string_t what;
uint16_t udp_port;
portid_t port_id;
@@ -9114,9 +9114,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
int ret;
tunnel_udp.udp_port = res->udp_port;
-
- if (!strcmp(res->cmd, "rx_vxlan_port"))
- tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
+ tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
if (!strcmp(res->what, "add"))
ret = rte_eth_dev_udp_tunnel_port_add(res->port_id,
@@ -9129,9 +9127,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
printf("udp tunneling add error: (%s)\n", strerror(-ret));
}
-cmdline_parse_token_string_t cmd_tunnel_udp_config_cmd =
+cmdline_parse_token_string_t cmd_tunnel_udp_config_rx_vxlan_port =
TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
- cmd, "rx_vxlan_port");
+ rx_vxlan_port, "rx_vxlan_port");
cmdline_parse_token_string_t cmd_tunnel_udp_config_what =
TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
what, "add#rm");
@@ -9148,7 +9146,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {
.help_str = "rx_vxlan_port add|rm <udp_port> <port_id>: "
"Add/Remove a tunneling UDP port filter",
.tokens = {
- (void *)&cmd_tunnel_udp_config_cmd,
+ (void *)&cmd_tunnel_udp_config_rx_vxlan_port,
(void *)&cmd_tunnel_udp_config_what,
(void *)&cmd_tunnel_udp_config_udp_port,
(void *)&cmd_tunnel_udp_config_port_id,
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: remove unnecessary tunnel UDP cmd check
2021-02-18 3:06 [dpdk-dev] [PATCH] app/testpmd: remove unnecessary tunnel UDP cmd check Xiaoyun Li
@ 2021-02-22 10:44 ` Ferruh Yigit
2021-02-25 16:56 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2021-02-22 10:44 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: dev, stable
On 2/18/2021 3:06 AM, Xiaoyun Li wrote:
> cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
> only for rx_vxlan_port. The unnecessary cmd check will cause uninit
> coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.
>
> Coverity issue: 366155
> Fixes: bd948f20d609 ("app/testpmd: VXLAN packet identification")
> Cc: stable@dpdk.org
>
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: remove unnecessary tunnel UDP cmd check
2021-02-22 10:44 ` Ferruh Yigit
@ 2021-02-25 16:56 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2021-02-25 16:56 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: dev, stable
On 2/22/2021 10:44 AM, Ferruh Yigit wrote:
> On 2/18/2021 3:06 AM, Xiaoyun Li wrote:
>> cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
>> only for rx_vxlan_port. The unnecessary cmd check will cause uninit
>> coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.
>>
>> Coverity issue: 366155
>> Fixes: bd948f20d609 ("app/testpmd: VXLAN packet identification")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-25 16:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 3:06 [dpdk-dev] [PATCH] app/testpmd: remove unnecessary tunnel UDP cmd check Xiaoyun Li
2021-02-22 10:44 ` Ferruh Yigit
2021-02-25 16:56 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).