test_roundrobin_verify_promiscuous_enable_disable(void)
{
int i, promiscuous_en;
+ int ret;
/* Initialize bonded device with 4 slaves in round robin mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
BONDING_MODE_ROUND_ROBIN, 0, 4, 1),
"Failed to initialize bonded device with slaves");
- rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to enable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
promiscuous_en = rte_eth_promiscuous_get(test_params->bonded_port_id);
TEST_ASSERT_EQUAL(promiscuous_en, 1,
test_params->slave_port_ids[i]);
}
- rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to disable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
promiscuous_en = rte_eth_promiscuous_get(test_params->bonded_port_id);
TEST_ASSERT_EQUAL(promiscuous_en, 0,
test_activebackup_verify_promiscuous_enable_disable(void)
{
int i, primary_port, promiscuous_en;
+ int ret;
/* Initialize bonded device with 4 slaves in round robin mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
"failed to get primary slave for bonded port (%d)",
test_params->bonded_port_id);
- rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to enable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
TEST_ASSERT_EQUAL(rte_eth_promiscuous_get(test_params->bonded_port_id), 1,
"Port (%d) promiscuous mode not enabled",
}
- rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to disable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
TEST_ASSERT_EQUAL(rte_eth_promiscuous_get(test_params->bonded_port_id), 0,
"Port (%d) promiscuous mode not disabled\n",
test_balance_verify_promiscuous_enable_disable(void)
{
int i;
+ int ret;
/* Initialize bonded device with 4 slaves in round robin mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
BONDING_MODE_BALANCE, 0, 4, 1),
"Failed to initialise bonded device");
- rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to enable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
TEST_ASSERT_EQUAL(rte_eth_promiscuous_get(test_params->bonded_port_id), 1,
"Port (%d) promiscuous mode not enabled",
test_params->slave_port_ids[i]);
}
- rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to disable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
TEST_ASSERT_EQUAL(rte_eth_promiscuous_get(test_params->bonded_port_id), 0,
"Port (%d) promiscuous mode not disabled",
test_broadcast_verify_promiscuous_enable_disable(void)
{
int i;
+ int ret;
/* Initialize bonded device with 4 slaves in round robin mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
BONDING_MODE_BROADCAST, 0, 4, 1),
"Failed to initialise bonded device");
- rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to enable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
TEST_ASSERT_EQUAL(rte_eth_promiscuous_get(test_params->bonded_port_id), 1,
test_params->slave_port_ids[i]);
}
- rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to disable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
TEST_ASSERT_EQUAL(rte_eth_promiscuous_get(test_params->bonded_port_id), 0,
"Port (%d) promiscuous mode not disabled",
test_tlb_verify_promiscuous_enable_disable(void)
{
int i, primary_port, promiscuous_en;
+ int ret;
/* Initialize bonded device with 4 slaves in transmit load balancing mode */
TEST_ASSERT_SUCCESS( initialize_bonded_device_with_slaves(
"failed to get primary slave for bonded port (%d)",
test_params->bonded_port_id);
- rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_enable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to enable promiscuous mode for port %d: %s",
+ test_params->bonded_port_id, rte_strerror(-ret));
promiscuous_en = rte_eth_promiscuous_get(test_params->bonded_port_id);
TEST_ASSERT_EQUAL(promiscuous_en, (int)1,
}
- rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ ret = rte_eth_promiscuous_disable(test_params->bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed to disable promiscuous mode for port %d: %s\n",
+ test_params->bonded_port_id, rte_strerror(-ret));
promiscuous_en = rte_eth_promiscuous_get(test_params->bonded_port_id);
TEST_ASSERT_EQUAL(promiscuous_en, (int)0,
initialize_bonded_device_with_slaves(uint16_t slave_count, uint8_t external_sm)
{
uint8_t i;
+ int ret;
RTE_VERIFY(test_params.bonded_port_id != INVALID_PORT_ID);
/* Reset mode 4 configuration */
rte_eth_bond_8023ad_setup(test_params.bonded_port_id, NULL);
- rte_eth_promiscuous_disable(test_params.bonded_port_id);
+ ret = rte_eth_promiscuous_disable(test_params.bonded_port_id);
+ TEST_ASSERT_SUCCESS(ret,
+ "Failed disable promiscuous mode for port %d: %s",
+ test_params.bonded_port_id, rte_strerror(-ret));
if (external_sm) {
struct rte_eth_bond_8023ad_conf conf;
/* First try with promiscuous mode enabled.
* Add 2 packets to each slave. First with bonding MAC address, second with
* different. Check if we received all of them. */
- rte_eth_promiscuous_enable(test_params.bonded_port_id);
+ retval = rte_eth_promiscuous_enable(test_params.bonded_port_id);
+ TEST_ASSERT_SUCCESS(retval,
+ "Failed to enable promiscuous mode for port %d: %s",
+ test_params.bonded_port_id, rte_strerror(-retval));
expected_pkts_cnt = 0;
FOR_EACH_SLAVE(i, slave) {
/* Now, disable promiscuous mode. When promiscuous mode is disabled we
* expect to receive only packets that are directed to bonding port. */
- rte_eth_promiscuous_disable(test_params.bonded_port_id);
+ retval = rte_eth_promiscuous_disable(test_params.bonded_port_id);
+ TEST_ASSERT_SUCCESS(retval,
+ "Failed to disable promiscuous mode for port %d: %s",
+ test_params.bonded_port_id, rte_strerror(-retval));
expected_pkts_cnt = 0;
FOR_EACH_SLAVE(i, slave) {