diff mbox series

examples/ipsec-secgw: fix unchecked return value

Message ID 1565181012-19553-1-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers show
Series examples/ipsec-secgw: fix unchecked return value | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-Compile-Testing success Compile Testing PASS
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Iremonger, Bernard Aug. 7, 2019, 12:30 p.m. UTC
Check the return value of the rte_eth_dev_rss_hash_conf_get function.

Coverity issue: 344970
Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 examples/ipsec-secgw/ipsec.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Akhil Goyal Aug. 7, 2019, 1:39 p.m. UTC | #1
> 
> Check the return value of the rte_eth_dev_rss_hash_conf_get function.
> 
> Coverity issue: 344970
> Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Thomas,
Could you please take this patch directly to master.

Regards,
Akhil
Thomas Monjalon Aug. 8, 2019, 7:22 a.m. UTC | #2
07/08/2019 15:39, Akhil Goyal:
> 
> > 
> > Check the return value of the rte_eth_dev_rss_hash_conf_get function.
> > 
> > Coverity issue: 344970
> > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > ---
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> 
> Thomas,
> Could you please take this patch directly to master.

It doesn't look critical at all.
Why do you want this in DPDK 19.08 without enough time for proper validation testing?
Akhil Goyal Aug. 9, 2019, 10:21 a.m. UTC | #3
> 
> 07/08/2019 15:39, Akhil Goyal:
> >
> > >
> > > Check the return value of the rte_eth_dev_rss_hash_conf_get function.
> > >
> > > Coverity issue: 344970
> > > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline
> crypto")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > > ---
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> >
> > Thomas,
> > Could you please take this patch directly to master.
> 
> It doesn't look critical at all.
> Why do you want this in DPDK 19.08 without enough time for proper validation
> testing?
Yes this one is not a critical fix. We can defer it to next release.
Akhil Goyal Sept. 19, 2019, 2:55 p.m. UTC | #4
> 
> >
> > 07/08/2019 15:39, Akhil Goyal:
> > >
> > > >
> > > > Check the return value of the rte_eth_dev_rss_hash_conf_get
> function.
> > > >
> > > > Coverity issue: 344970
> > > > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline
> > crypto")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > > > ---
> > > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> > >
> > > Thomas,
> > > Could you please take this patch directly to master.
> >
> > It doesn't look critical at all.
> > Why do you want this in DPDK 19.08 without enough time for proper
> validation
> > testing?
> Yes this one is not a critical fix. We can defer it to next release.

Applied to dpdk-next-crypto

Thanks.
diff mbox series

Patch

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index dc85adf..5f9d560 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -248,7 +248,14 @@  create_inline_session(struct socket_ctx *skt_ctx, struct ipsec_sa *sa)
 			/* Try RSS. */
 			sa->action[1].type = RTE_FLOW_ACTION_TYPE_RSS;
 			sa->action[1].conf = &action_rss;
-			rte_eth_dev_rss_hash_conf_get(sa->portid, &rss_conf);
+			ret = rte_eth_dev_rss_hash_conf_get(sa->portid,
+					&rss_conf);
+			if (ret != 0) {
+				RTE_LOG(ERR, IPSEC,
+					"rte_eth_dev_rss_hash_conf_get:ret=%d\n",
+					ret);
+				return -1;
+			}
 			for (i = 0, j = 0; i < dev_info.nb_rx_queues; ++i)
 				queue[j++] = i;