From: Ivan Ilchenko <ivan.ilche...@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 app/test-eventdev according to its new return type.
Signed-off-by: Ivan Ilchenko <ivan.ilche...@oktetlabs.com> Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com> --- app/test-eventdev/test_perf_common.c | 8 +++++++- app/test-eventdev/test_pipeline_common.c | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index aa925a7ef7..e75582b1a2 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -660,6 +660,7 @@ int perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) { uint16_t i; + int ret; struct test_perf *t = evt_test_priv(test); struct rte_eth_conf port_conf = { .rxmode = { @@ -688,7 +689,12 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) struct rte_eth_dev_info dev_info; struct rte_eth_conf local_port_conf = port_conf; - rte_eth_dev_info_get(i, &dev_info); + ret = rte_eth_dev_info_get(i, &dev_info); + if (ret != 0) { + evt_err("Error during getting device (port %u) info: %s\n", + i, strerror(-ret)); + return ret; + } local_port_conf.rx_adv_conf.rss_conf.rss_hf &= dev_info.flow_type_rss_offloads; diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 16c49b8608..ef8ae28c93 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -159,6 +159,7 @@ int pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) { uint16_t i; + int ret; uint8_t nb_queues = 1; struct test_pipeline *t = evt_test_priv(test); struct rte_eth_rxconf rx_conf; @@ -191,7 +192,13 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) t->internal_port = 0; - rte_eth_dev_info_get(i, &dev_info); + ret = rte_eth_dev_info_get(i, &dev_info); + if (ret != 0) { + evt_err("Error during getting device (port %u) info: %s\n", + i, strerror(-ret)); + return ret; + } + rx_conf = dev_info.default_rxconf; rx_conf.offloads = port_conf.rxmode.offloads; -- 2.17.1