[dpdk-dev] [PATCH v2 41/54] examples/tep_termination: check dev info get result

Andrew Rybchenko arybchenko at solarflare.com
Tue Sep 3 15:57:15 CEST 2019


From: Ivan Ilchenko <Ivan.Ilchenko at 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/tep_termination according to its new return type.

Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko at oktetlabs.com>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 examples/tep_termination/vxlan_setup.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 9a08800..8d6514d 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -119,7 +119,11 @@
 
 	pconf->dst_port = udp_port;
 
-	rte_eth_dev_info_get(port, &dev_info);
+	retval = rte_eth_dev_info_get(port, &dev_info);
+	if (retval != 0)
+		rte_exit(EXIT_FAILURE,
+			"Error during getting device (port %u) info: %s\n",
+			port, strerror(-retval));
 
 	if (dev_info.max_rx_queues > MAX_QUEUES) {
 		rte_exit(EXIT_FAILURE,
-- 
1.8.3.1



More information about the dev mailing list