struct rte_eth_link link_status;
int retval;
- 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);
retval = rte_eth_link_get(test_params->bonded_port_id, &link_status);
TEST_ASSERT(retval >= 0,
TEST_ASSERT_SUCCESS(test_remove_slave_from_bonded_device(),
"test_remove_slave_from_bonded_device failed");
- 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);
+
rte_eth_stats_reset(test_params->bonded_port_id);
rte_eth_bond_mac_address_reset(test_params->bonded_port_id);
test_params->slave_port_ids[i]);
/* stop/start bonded eth dev to apply new MAC */
- 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);
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded port %d",
slave_port_ids[2]),
"failed to set primary port on bonded device.");
- rte_eth_dev_stop(bonded_port_id);
+ TEST_ASSERT_SUCCESS(rte_eth_dev_stop(bonded_port_id),
+ "Failed to stop bonded port %u",
+ bonded_port_id);
+
TEST_ASSERT_SUCCESS(rte_eth_dev_start(bonded_port_id),
"Failed to start bonded pmd eth device %d.",
bonded_port_id);
* b - remove slave ethdevs
* c - Verify slave ethdevs MACs are restored
*/
- rte_eth_dev_stop(bonded_port_id);
+ TEST_ASSERT_SUCCESS(rte_eth_dev_stop(bonded_port_id),
+ "Failed to stop bonded port %u",
+ bonded_port_id);
for (i = 0; i < BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT; i++) {
TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(bonded_port_id,
/* stop / start bonded device and verify that primary MAC address is
* propagate to bonded device and slaves */
- 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);
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded device");
/* stop / start bonded device and verify that primary MAC address is
* propagated to bonded device and slaves */
- 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);
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start device");
/* stop / start bonded device and verify that primary MAC address is
* propagated to bonded device and slaves */
- 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);
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded device");
/* stop / start bonded device and verify that primary MAC address is
* propagated to bonded device and slaves */
- 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);
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded device");
/* stop / start bonded device and verify that primary MAC address is
* propagated to bonded device and slaves */
- 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);
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start device");
struct rte_eth_stats stats, stats2;
struct rte_mbuf buf, *pbuf = &buf;
struct rte_eth_conf null_conf;
+ int ret;
memset(&null_conf, 0, sizeof(struct rte_eth_conf));
return TEST_FAILED;
}
- rte_eth_dev_stop(rxtx_portd);
- rte_eth_dev_stop(rxtx_porte);
+ ret = rte_eth_dev_stop(rxtx_portd);
+ if (ret != 0)
+ printf("Error: failed to stop port %u: %s\n",
+ rxtx_portd, rte_strerror(-ret));
+ ret = rte_eth_dev_stop(rxtx_porte);
+ if (ret != 0)
+ printf("Error: failed to stop port %u: %s\n",
+ rxtx_porte, rte_strerror(-ret));
return TEST_SUCCESS;
}
static void
test_cleanup_resources(void)
{
- int itr;
+ int itr, ret;
for (itr = 0; itr < NUM_RINGS; itr++)
rte_ring_free(rxtx[itr]);
- rte_eth_dev_stop(tx_porta);
- rte_eth_dev_stop(rx_portb);
- rte_eth_dev_stop(rxtx_portc);
+ ret = rte_eth_dev_stop(tx_porta);
+ if (ret != 0)
+ printf("Error: failed to stop port %u: %s\n",
+ tx_porta, rte_strerror(-ret));
+ ret = rte_eth_dev_stop(rx_portb);
+ if (ret != 0)
+ printf("Error: failed to stop port %u: %s\n",
+ rx_portb, rte_strerror(-ret));
+ ret = rte_eth_dev_stop(rxtx_portc);
+ if (ret != 0)
+ printf("Error: failed to stop port %u: %s\n",
+ rxtx_portc, rte_strerror(-ret));
rte_mempool_free(mp);
rte_vdev_uninit("net_ring_net_ringa");
"test stats reset cmdl_port0 is failed");
TEST_ASSERT((test_get_stats(cmdl_port0) < 0),
"test get stats cmdl_port0 is failed");
- rte_eth_dev_stop(cmdl_port0);
+ TEST_ASSERT((rte_eth_dev_stop(cmdl_port0) == 0),
+ "test stop cmdl_port0 is failed");
}
return TEST_SUCCESS;
}