[dpdk-stable] patch 'examples/ioat: fix unchecked return value' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Feb 17 18:44:55 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 727dfdf6df993015225cce1be5e66019ee8db288 Mon Sep 17 00:00:00 2001
From: Praveen Shetty <praveen.shetty at intel.com>
Date: Thu, 28 Nov 2019 11:27:14 +0000
Subject: [PATCH] examples/ioat: fix unchecked return value

[ upstream commit 4c2af82e542c51175781aebf8f1a9ccfef823a11 ]

patch checks the return value of function rte_eth_dev_info_get,
if return value is negative error message printed on the console.

Coverity issue: 350361
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")

Signed-off-by: Praveen Shetty <praveen.shetty at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 examples/ioat/ioatfwd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index e9117718fe..b39a098ec0 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -824,7 +824,11 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
 	/* Init port */
 	printf("Initializing port %u... ", portid);
 	fflush(stdout);
-	rte_eth_dev_info_get(portid, &dev_info);
+	ret = rte_eth_dev_info_get(portid, &dev_info);
+	if (ret < 0)
+		rte_exit(EXIT_FAILURE, "Cannot get device info: %s, port=%u\n",
+			rte_strerror(-ret), portid);
+
 	local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
 		dev_info.flow_type_rss_offloads;
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-17 17:00:15.454061289 +0000
+++ 0003-examples-ioat-fix-unchecked-return-value.patch	2020-02-17 17:00:15.263949832 +0000
@@ -1,14 +1,15 @@
-From 4c2af82e542c51175781aebf8f1a9ccfef823a11 Mon Sep 17 00:00:00 2001
+From 727dfdf6df993015225cce1be5e66019ee8db288 Mon Sep 17 00:00:00 2001
 From: Praveen Shetty <praveen.shetty at intel.com>
 Date: Thu, 28 Nov 2019 11:27:14 +0000
 Subject: [PATCH] examples/ioat: fix unchecked return value
 
+[ upstream commit 4c2af82e542c51175781aebf8f1a9ccfef823a11 ]
+
 patch checks the return value of function rte_eth_dev_info_get,
 if return value is negative error message printed on the console.
 
 Coverity issue: 350361
 Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
-Cc: stable at dpdk.org
 
 Signed-off-by: Praveen Shetty <praveen.shetty at intel.com>
 Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the stable mailing list