From: Bernard Iremonger <bernard.iremonger@intel.com>
To: dev@dpdk.org, konstantin.ananyev@intel.com, akhil.goyal@nxp.com
Cc: Bernard Iremonger <bernard.iremonger@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix unchecked return value
Date: Wed, 7 Aug 2019 13:30:12 +0100 [thread overview]
Message-ID: <1565181012-19553-1-git-send-email-bernard.iremonger@intel.com> (raw)
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(-)
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;
--
2.7.4
next reply other threads:[~2019-08-07 12:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 12:30 Bernard Iremonger [this message]
2019-08-07 13:39 ` Akhil Goyal
2019-08-08 7:22 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-08-09 10:21 ` Akhil Goyal
2019-09-19 14:55 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1565181012-19553-1-git-send-email-bernard.iremonger@intel.com \
--to=bernard.iremonger@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).