uint8_t bonded_mac[] = {0xAA, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF };
struct link_bonding_unittest_params {
uint8_t bonded_mac[] = {0xAA, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF };
struct link_bonding_unittest_params {
- int8_t bonded_port_id;
- int8_t slave_port_ids[TEST_MAX_NUMBER_OF_PORTS];
- uint8_t bonded_slave_count;
+ int16_t bonded_port_id;
+ int16_t slave_port_ids[TEST_MAX_NUMBER_OF_PORTS];
+ uint16_t bonded_slave_count;
/* Don't try to recreate bonded device if re-running test suite*/
if (test_params->bonded_port_id == -1) {
/* Don't try to recreate bonded device if re-running test suite*/
if (test_params->bonded_port_id == -1) {
TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params->bonded_port_id,
test_params->slave_port_ids[test_params->bonded_slave_count]),
TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params->bonded_port_id,
test_params->slave_port_ids[test_params->bonded_slave_count]),
TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(test_params->bonded_port_id,
test_params->slave_port_ids[test_params->bonded_slave_count-1]),
TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(test_params->bonded_port_id,
test_params->slave_port_ids[test_params->bonded_slave_count-1]),
test_add_already_bonded_slave_to_bonded_device(void)
{
int port_id, current_slave_count;
test_add_already_bonded_slave_to_bonded_device(void)
{
int port_id, current_slave_count;
TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
"Failed to add slave to bonded device");
TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
"Failed to add slave to bonded device");
struct rte_eth_link link_status;
int current_slave_count, current_bonding_mode, primary_port;
struct rte_eth_link link_status;
int current_slave_count, current_bonding_mode, primary_port;
/* Add slave to bonded device*/
TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
/* Add slave to bonded device*/
TEST_ASSERT_SUCCESS(test_add_slave_to_bonded_device(),
int slave_port_ids[BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT];
struct ether_addr slave_mac_addr, bonded_mac_addr, read_mac_addr;
int slave_port_ids[BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT];
struct ether_addr slave_mac_addr, bonded_mac_addr, read_mac_addr;
{
/* Configure bonded device */
TEST_ASSERT_SUCCESS(configure_ethdev(test_params->bonded_port_id, 0,
{
/* Configure bonded device */
TEST_ASSERT_SUCCESS(configure_ethdev(test_params->bonded_port_id, 0,
enum rte_eth_event_type type __rte_unused,
void *param __rte_unused,
void *ret_param __rte_unused)
enum rte_eth_event_type type __rte_unused,
void *param __rte_unused,
void *ret_param __rte_unused)
/* initialized bonding device with T slaves */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
/* initialized bonding device with T slaves */
TEST_ASSERT_SUCCESS(initialize_bonded_device_with_slaves(
static int
generate_test_burst(struct rte_mbuf **pkts_burst, uint16_t burst_size,
uint8_t vlan, uint8_t ipv4, uint8_t toggle_dst_mac,
static int
generate_test_burst(struct rte_mbuf **pkts_burst, uint16_t burst_size,
uint8_t vlan, uint8_t ipv4, uint8_t toggle_dst_mac,
int i, burst_size, slave_count, primary_port;
int i, burst_size, slave_count, primary_port;
int i, burst_size, slave_count, primary_port;
int i, burst_size, slave_count, primary_port;