vhost: fix async callbacks return type
[dpdk.git] / app / test / test_link_bonding_mode4.c
index ff54d7b..2c835fa 100644 (file)
@@ -355,7 +355,9 @@ remove_slaves_and_stop_bonded_device(void)
        uint16_t slaves[RTE_MAX_ETHPORTS];
        uint16_t i;
 
-       rte_eth_dev_stop(test_params.bonded_port_id);
+       TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params.bonded_port_id),
+                       "Failed to stop bonded port %u",
+                       test_params.bonded_port_id);
 
        FOR_EACH_SLAVE(i, slave)
                remove_slave(slave);
@@ -368,7 +370,9 @@ remove_slaves_and_stop_bonded_device(void)
                        test_params.bonded_port_id, retval);
 
        FOR_EACH_PORT(i, slave) {
-               rte_eth_dev_stop(slave->port_id);
+               TEST_ASSERT_SUCCESS(rte_eth_dev_stop(slave->port_id),
+                               "Failed to stop bonded port %u",
+                               slave->port_id);
 
                TEST_ASSERT(slave->bonded == 0,
                        "Port id=%u is still marked as enslaved.", slave->port_id);
@@ -585,7 +589,13 @@ bond_get_update_timeout_ms(void)
 {
        struct rte_eth_bond_8023ad_conf conf;
 
-       rte_eth_bond_8023ad_conf_get(test_params.bonded_port_id, &conf);
+       if (rte_eth_bond_8023ad_conf_get(test_params.bonded_port_id, &conf) < 0) {
+               RTE_LOG(DEBUG, EAL, "Failed to get bonding configuration: "
+                                   "%s at %d\n", __func__, __LINE__);
+               RTE_TEST_TRACE_FAILURE(__FILE__, __LINE__, __func__);
+               return 0;
+       }
+
        return conf.update_timeout_ms;
 }