mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] =
test_params->bonded_slave_count-1;
- rte_eth_macaddr_get(
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(
test_params->slave_port_ids[test_params->bonded_slave_count-1],
- &read_mac_addr);
+ &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[test_params->bonded_slave_count-1]);
TEST_ASSERT_SUCCESS(memcmp(mac_addr, &read_mac_addr, sizeof(read_mac_addr)),
"bonded port mac address not set to that of primary port\n");
expected_mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] = i;
/* Check primary slave MAC */
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port mac address not set to that of primary port\n");
/* Check bonded MAC */
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&read_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port mac address not set to that of primary port\n");
/* Check other slaves MACs */
for (j = 0; j < 4; j++) {
if (j != i) {
- rte_eth_macaddr_get(test_params->slave_port_ids[j],
- &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[j],
+ &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[j]);
TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port mac address not set to that of primary "
}
/* Check bonded MAC */
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(mac_addr, &read_mac_addr, sizeof(read_mac_addr)),
"bonded port mac address not set to that of primary port");
/* Check other slaves MACs */
for (i = 0; i < 4; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port mac address not set to that of primary port");
slave_port_ids[i], 1);
}
- rte_eth_macaddr_get(bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port mac address not as expected");
- rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 0 mac address not as expected");
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100;
- rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 1 mac address not as expected");
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 2 + 100;
- rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[2]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 2 mac address not as expected");
"Failed to start bonded pmd eth device %d.",
bonded_port_id);
- rte_eth_macaddr_get(bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port mac address not as expected");
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0 + 100;
- rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 0 mac address not as expected");
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100;
- rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 1 mac address not as expected");
- rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[2]);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 2 mac address not as expected");
slave_count, 0);
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0 + 100;
- rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 0 mac address not as expected");
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100;
- rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 1 mac address not as expected");
slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 2 + 100;
- rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ slave_port_ids[2]);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 2 mac address not as expected");
int i;
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0);
- rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_2);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_2),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[2]);
/* Initialize bonded device with 4 slaves in round robin mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
/* Verify that all MACs are the same as first slave added to bonded dev */
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->bonded_port_id, test_params->slave_port_ids[i]);
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address has changed to that of primary"
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded device");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(
memcmp(&expected_mac_addr_2, &read_mac_addr, sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of new primary port",
test_params->slave_port_ids[i]);
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_2, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of new primary"
(struct rte_ether_addr *)bonded_mac),
"Failed to set MAC");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of new primary port",
test_params->slave_port_ids[i]);
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)), "slave port (%d) mac address not set to"
" that of new primary port\n", test_params->slave_port_ids[i]);
struct rte_ether_addr read_mac_addr;
struct rte_ether_addr expected_mac_addr_0, expected_mac_addr_1;
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
/* Initialize bonded device with 2 slaves in active backup mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
/* Verify that bonded MACs is that of first slave and that the other slave
* MAC hasn't been changed */
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
"Failed to set bonded port (%d) primary port to (%d)",
test_params->bonded_port_id, test_params->slave_port_ids[1]);
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start device");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
(struct rte_ether_addr *)bonded_mac),
"failed to set MAC address");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of bonded port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of bonded port",
struct rte_ether_addr read_mac_addr;
struct rte_ether_addr expected_mac_addr_0, expected_mac_addr_1;
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
/* Initialize bonded device with 2 slaves in active backup mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
/* Verify that bonded MACs is that of first slave and that the other slave
* MAC hasn't been changed */
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
"Failed to set bonded port (%d) primary port to (%d)\n",
test_params->bonded_port_id, test_params->slave_port_ids[1]);
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded device");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
(struct rte_ether_addr *)bonded_mac),
"failed to set MAC");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of bonded port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected\n",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of bonded port",
int i;
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0);
- rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_1);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[2], &expected_mac_addr_1),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[2]);
/* Initialize bonded device with 4 slaves in round robin mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
/* Verify that all MACs are the same as first slave added to bonded
* device */
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->bonded_port_id, test_params->slave_port_ids[i]);
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address has changed to that of primary "
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start bonded device");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of new primary port",
test_params->slave_port_ids[i]);
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of new primary "
(struct rte_ether_addr *)bonded_mac),
"Failed to set MAC address");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of new primary port",
for (i = 0; i < test_params->bonded_slave_count; i++) {
- rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[i]);
TEST_ASSERT_SUCCESS(memcmp(bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of new primary "
struct rte_ether_addr read_mac_addr;
struct rte_ether_addr expected_mac_addr_0, expected_mac_addr_1;
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &expected_mac_addr_0),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &expected_mac_addr_1),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
/* Initialize bonded device with 2 slaves in active backup mode */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
/* Verify that bonded MACs is that of first slave and that the other slave
* MAC hasn't been changed */
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
"Failed to set bonded port (%d) primary port to (%d)",
test_params->bonded_port_id, test_params->slave_port_ids[1]);
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params->bonded_port_id),
"Failed to start device");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of primary port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_1, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of primary port",
(struct rte_ether_addr *)bonded_mac),
"failed to set MAC address");
- rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->bonded_port_id);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"bonded port (%d) mac address not set to that of bonded port",
test_params->bonded_port_id);
- rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[0], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[0]);
TEST_ASSERT_SUCCESS(memcmp(&expected_mac_addr_0, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not as expected",
test_params->slave_port_ids[0]);
- rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr);
+ TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->slave_port_ids[1], &read_mac_addr),
+ "Failed to get mac address (port %d)",
+ test_params->slave_port_ids[1]);
TEST_ASSERT_SUCCESS(memcmp(&bonded_mac, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port (%d) mac address not set to that of bonded port",