From: Ivan Ilchenko Date: Thu, 12 Sep 2019 16:42:38 +0000 (+0100) Subject: examples/qos_sched: check status of getting ethdev info X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=45069992a301c8c74e9e1014eac4924287df0f60;p=dpdk.git 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 Signed-off-by: Andrew Rybchenko Acked-by: Jasvinder Singh --- diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index b05206d5ab..cf9e8f4ac7 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;