sleep in control plane thread
[dpdk.git] / app / test / test_pmd_ring.c
index 6414bbd..02873f2 100644 (file)
@@ -24,6 +24,7 @@ test_ethdev_configure_port(int port)
 {
        struct rte_eth_conf null_conf;
        struct rte_eth_link link;
+       int ret;
 
        memset(&null_conf, 0, sizeof(struct rte_eth_conf));
 
@@ -54,7 +55,12 @@ test_ethdev_configure_port(int port)
                return -1;
        }
 
-       rte_eth_link_get(port, &link);
+       ret = rte_eth_link_get(port, &link);
+       if (ret < 0) {
+               printf("Link get failed for port %u: %s",
+                      port, rte_strerror(-ret));
+               return -1;
+       }
 
        return 0;
 }
@@ -490,10 +496,17 @@ static int
 test_command_line_ring_port(void)
 {
        int port, cmdl_port0 = -1;
+       int ret;
+
        /* find a port created with the --vdev=net_ring0 command line option */
        RTE_ETH_FOREACH_DEV(port) {
                struct rte_eth_dev_info dev_info;
-               rte_eth_dev_info_get(port, &dev_info);
+
+               ret = rte_eth_dev_info_get(port, &dev_info);
+               TEST_ASSERT((ret == 0),
+                               "Error during getting device (port %d) info: %s\n",
+                               port, strerror(-ret));
+
                if (!strcmp(dev_info.driver_name, "Rings PMD")) {
                        printf("found a command line ring port=%d\n", port);
                        cmdl_port0 = port;