app: check status of getting ethdev info
[dpdk.git] / app / test-eventdev / test_perf_common.c
index aa925a7..e75582b 100644 (file)
@@ -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;