summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>2019-09-12 17:42:38 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 14:45:35 +0200
commit45069992a301c8c74e9e1014eac4924287df0f60 (patch)
treebb19b272542e563610516ba8d17cf585396ab143
parentd9a66c56b845ca53d6bdafb3c07712b726bbda38 (diff)
downloaddpdk-45069992a301c8c74e9e1014eac4924287df0f60.zip
dpdk-45069992a301c8c74e9e1014eac4924287df0f60.tar.gz
dpdk-45069992a301c8c74e9e1014eac4924287df0f60.tar.xz
examples/qos_sched: check status of getting ethdev info
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/qos_sched according to its new return type. Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
-rw-r--r--examples/qos_sched/init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index b05206d..cf9e8f4 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -98,7 +98,13 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
/* init port */
RTE_LOG(INFO, APP, "Initializing port %"PRIu16"... ", 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,
+ "Error during getting device (port %u) info: %s\n",
+ portid, strerror(-ret));
+
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
local_port_conf.txmode.offloads |=
DEV_TX_OFFLOAD_MBUF_FAST_FREE;