Skip to content

Commit

Permalink
examples/ipsec-secgw: fix unchecked return value
Browse files Browse the repository at this point in the history
[ upstream commit 23742f2 ]

Check the return value of the rte_eth_dev_rss_hash_conf_get function.

Coverity issue: 344970
Fixes: 3a690d5 ("examples/ipsec-secgw: fix first packet with inline crypto")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
  • Loading branch information
bairemon authored and kevintraynor committed Nov 22, 2019
1 parent a87111e commit 03f8a92
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/ipsec-secgw/ipsec.c
Expand Up @@ -200,8 +200,14 @@ create_session(struct ipsec_ctx *ipsec_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,
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;
Expand Down

0 comments on commit 03f8a92

Please sign in to comment.