[dpdk-dev] [EXT] [PATCH v1] examples/ipsec-secgw: resolve coverity issue

Shetty, Praveen praveen.shetty at intel.com
Wed May 6 12:40:20 CEST 2020


Hi Anoob,

Thank you.

I have modified the commit message and headline accordingly and sent v2.

Regards,
Praveen

-----Original Message-----
From: Anoob Joseph <anoobj at marvell.com> 
Sent: Wednesday, May 6, 2020 3:13 PM
To: Shetty, Praveen <praveen.shetty at intel.com>; dev at dpdk.org; Doherty, Declan <declan.doherty at intel.com>; akhil.goyal at nxp.com
Cc: Iremonger, Bernard <bernard.iremonger at intel.com>; Ananyev, Konstantin <konstantin.ananyev at intel.com>
Subject: RE: [EXT] [PATCH v1] examples/ipsec-secgw: resolve coverity issue

Hi Praveen,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Praveen Shetty <praveen.shetty at intel.com>
> Sent: Wednesday, May 6, 2020 2:33 PM
> To: dev at dpdk.org; declan.doherty at intel.com; akhil.goyal at nxp.com; Anoob 
> Joseph <anoobj at marvell.com>
> Cc: bernard.iremonger at intel.com; konstantin.ananyev at intel.com; 
> praveen.shetty at intel.com
> Subject: [EXT] [PATCH v1] examples/ipsec-secgw: resolve coverity issue

[Anoob] I believe Thomas insists on explaining the issue that you are trying to fix rather than stating "resolve coverity issue" (which is too generic). So I guess you can remove all such references to coverity and retain rest of your description.
 
> 
> External Email
> 
> ----------------------------------------------------------------------
> Function create_ipsec_esp_flow returns a negative number in case of 
> any failure. But passing negative number to strerror is causing the coverity issue.
> In case of failure, displaying exact error message to console is 
> handled in create_ipsec_esp_flow function.So it is not required to 
> print the error message again using strerror.
> This patch will remove the unnecessary calling of strerror function to 
> fix the coverity issue.
> 
> Coverity issue: 357691
> Fixes: 6738c0a95695 ("examples/ipsec-secgw: support flow director")
> Cc: praveen.shetty at intel.com
> 
> Signed-off-by: Praveen Shetty <praveen.shetty at intel.com>
> ---
>  examples/ipsec-secgw/sa.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c 
> index
> e3a1a5aff..632482176 100644
> --- a/examples/ipsec-secgw/sa.c
> +++ b/examples/ipsec-secgw/sa.c
> @@ -1223,8 +1223,7 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct 
> ipsec_sa entries[],
>  			rc = create_ipsec_esp_flow(sa);
>  			if (rc != 0)
>  				RTE_LOG(ERR, IPSEC_ESP,
> -					"create_ipsec_esp_flow() failed %s\n",
> -					strerror(rc));
> +					"create_ipsec_esp_flow() failed\n");
>  		}
>  		print_one_sa_rule(sa, inbound);
>  	}
> --
> 2.17.1



More information about the dev mailing list