From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2BF69A00E6 for ; Wed, 7 Aug 2019 13:27:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0323C27D; Wed, 7 Aug 2019 13:27:47 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E0A2C27D for ; Wed, 7 Aug 2019 13:27:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2019 04:27:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,357,1559545200"; d="scan'208";a="168604269" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga008.jf.intel.com with ESMTP; 07 Aug 2019 04:27:42 -0700 Received: from sivswdev08.ir.intel.com (sivswdev08.ir.intel.com [10.237.217.47]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x77BRf1V024759; Wed, 7 Aug 2019 12:27:41 +0100 Received: from sivswdev08.ir.intel.com (localhost [127.0.0.1]) by sivswdev08.ir.intel.com with ESMTP id x77BRflq009250; Wed, 7 Aug 2019 12:27:41 +0100 Received: (from bairemon@localhost) by sivswdev08.ir.intel.com with LOCAL id x77BRfMV009241; Wed, 7 Aug 2019 12:27:41 +0100 From: Bernard Iremonger To: qabuild@intel.com Cc: Bernard Iremonger , stable@dpdk.org Date: Wed, 7 Aug 2019 12:27:38 +0100 Message-Id: <1565177258-8727-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-stable] [DPDK] examples/ipsec-secgw: fix unchecked return value X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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