[v3,42/54] examples/server_node_efd: check dev info get result

Message ID 1567755066-31389-43-git-send-email-arybchenko@solarflare.com
State Superseded
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/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Sept. 6, 2019, 7:30 a.m.
From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.com>

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

Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 examples/server_node_efd/server/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index af5a18e285..773780b4d2 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -111,7 +111,10 @@  init_port(uint16_t port_num)
 	printf("Port %u init ... ", port_num);
 	fflush(stdout);
 
-	rte_eth_dev_info_get(port_num, &dev_info);
+	retval = rte_eth_dev_info_get(port_num, &dev_info);
+	if (retval != 0)
+		return retval;
+
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 		port_conf.txmode.offloads |=
 			DEV_TX_OFFLOAD_MBUF_FAST_FREE;