[06/51] pdump: check status of getting ethdev info
diff mbox series

Message ID 1566915962-5472-7-git-send-email-arybchenko@solarflare.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • ethdev: change rte_eth_dev_info_get() return value to int
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko Aug. 27, 2019, 2:25 p.m. UTC
From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>

rte_eth_dev_info_get() return value was changed from void to int,
so this patch modify rte_eth_dev_info_get() usage across
pdump component according to its new return type.

Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_pdump/rte_pdump.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index cd24dd0..ac94fea 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -333,7 +333,14 @@  struct pdump_response {
 	if (queue == RTE_PDUMP_ALL_QUEUES) {
 		struct rte_eth_dev_info dev_info;
 
-		rte_eth_dev_info_get(port, &dev_info);
+		ret = rte_eth_dev_info_get(port, &dev_info);
+		if (ret != 0) {
+			RTE_LOG(ERR, PDUMP,
+				"Error during getting device (port %u) info: %s\n",
+				port, strerror(-ret));
+			return ret;
+		}
+
 		nb_rx_q = dev_info.nb_rx_queues;
 		nb_tx_q = dev_info.nb_tx_queues;
 		if (nb_rx_q == 0 && flags & RTE_PDUMP_FLAG_RX) {