Lines Matching refs:test_params

94 #define TEST_DEFAULT_SLAVE_COUNT     RTE_DIM(test_params.slave_ports)
101 static struct link_bonding_unittest_params test_params = { variable
131 FOR_EACH(_i, _port, test_params.slave_ports, \
132 RTE_DIM(test_params.slave_ports))
183 return rte_eth_rx_burst(test_params.bonded_port_id, 0, buf, size); in bond_rx()
189 return rte_eth_tx_burst(test_params.bonded_port_id, 0, buf, size); in bond_tx()
210 rte_eth_dev_socket_id(port_id), NULL, test_params.mbuf_pool) == 0, in configure_ethdev()
231 RTE_VERIFY(test_params.slave_ports <= slave && in add_slave()
232 slave - test_params.slave_ports < (int)RTE_DIM(test_params.slave_ports)); in add_slave()
244 TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params.bonded_port_id, in add_slave()
247 (uint8_t)(slave - test_params.slave_ports), slave->port_id, in add_slave()
248 test_params.bonded_port_id); in add_slave()
269 ptrdiff_t slave_idx = slave - test_params.slave_ports; in remove_slave()
271 RTE_VERIFY(test_params.slave_ports <= slave && in remove_slave()
272 slave_idx < (ptrdiff_t)RTE_DIM(test_params.slave_ports)); in remove_slave()
285 TEST_ASSERT_EQUAL(rte_eth_bond_slave_remove(test_params.bonded_port_id, in remove_slave()
289 test_params.bonded_port_id); in remove_slave()
320 RTE_VERIFY(test_params.bonded_port_id != INVALID_PORT_ID); in initialize_bonded_device_with_slaves()
323 TEST_ASSERT_SUCCESS(add_slave(&test_params.slave_ports[i], 1), in initialize_bonded_device_with_slaves()
325 test_params.slave_ports[i].port_id); in initialize_bonded_device_with_slaves()
329 rte_eth_bond_8023ad_setup(test_params.bonded_port_id, NULL); in initialize_bonded_device_with_slaves()
330 ret = rte_eth_promiscuous_disable(test_params.bonded_port_id); in initialize_bonded_device_with_slaves()
333 test_params.bonded_port_id, rte_strerror(-ret)); in initialize_bonded_device_with_slaves()
338 rte_eth_bond_8023ad_conf_get(test_params.bonded_port_id, &conf); in initialize_bonded_device_with_slaves()
340 rte_eth_bond_8023ad_setup(test_params.bonded_port_id, &conf); in initialize_bonded_device_with_slaves()
344 TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bonded_port_id), in initialize_bonded_device_with_slaves()
358 TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params.bonded_port_id), in remove_slaves_and_stop_bonded_device()
360 test_params.bonded_port_id); in remove_slaves_and_stop_bonded_device()
365 retval = rte_eth_bond_slaves_get(test_params.bonded_port_id, slaves, in remove_slaves_and_stop_bonded_device()
370 test_params.bonded_port_id, retval); in remove_slaves_and_stop_bonded_device()
393 if (test_params.mbuf_pool == NULL) { in test_setup()
396 test_params.mbuf_pool = rte_pktmbuf_pool_create("TEST_MODE4", in test_setup()
400 TEST_ASSERT(test_params.mbuf_pool != NULL, in test_setup()
406 port = &test_params.slave_ports[i]; in test_setup()
442 if (test_params.bonded_port_id == INVALID_PORT_ID) { in test_setup()
449 test_params.bonded_port_id = retval; in test_setup()
450 TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bonded_port_id, 0), in test_setup()
452 } else if (rte_eth_bond_mode_get(test_params.bonded_port_id) != in test_setup()
454 TEST_ASSERT(rte_eth_bond_mode_set(test_params.bonded_port_id, in test_setup()
457 test_params.bonded_port_id, BONDING_MODE_8023AD); in test_setup()
473 rte_eth_dev_stop(test_params.bonded_port_id); in testsuite_teardown()
592 if (rte_eth_bond_8023ad_conf_get(test_params.bonded_port_id, &conf) < 0) { in bond_get_update_timeout_ms()
613 uint8_t status[RTE_DIM(test_params.slave_ports)] = { 0 }; in bond_handshake()
651 #define TEST_LACP_SLAVE_COUT RTE_DIM(test_params.slave_ports)
679 test_params.bonded_port_id, AGG_STABLE); in test_mode4_agg_mode_selection()
686 test_params.bonded_port_id); in test_mode4_agg_mode_selection()
700 test_params.bonded_port_id, in test_mode4_agg_mode_selection()
708 test_params.bonded_port_id); in test_mode4_agg_mode_selection()
721 test_params.bonded_port_id, AGG_COUNT); in test_mode4_agg_mode_selection()
728 test_params.bonded_port_id); in test_mode4_agg_mode_selection()
772 retval = generate_packet_burst(test_params.mbuf_pool, buf, in generate_packets()
832 retval = rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); in test_mode4_rx()
846 retval = rte_eth_promiscuous_enable(test_params.bonded_port_id); in test_mode4_rx()
849 test_params.bonded_port_id, rte_strerror(-retval)); in test_mode4_rx()
865 retval = rte_eth_rx_burst(test_params.bonded_port_id, 0, pkts, in test_mode4_rx()
894 retval = rte_eth_promiscuous_disable(test_params.bonded_port_id); in test_mode4_rx()
897 test_params.bonded_port_id, rte_strerror(-retval)); in test_mode4_rx()
913 retval = rte_eth_rx_burst(test_params.bonded_port_id, 0, pkts, in test_mode4_rx()
1020 retval = rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); in test_mode4_tx_burst()
1211 marker_pkt = rte_pktmbuf_alloc(test_params.mbuf_pool); in test_mode4_marker()
1224 retval = rte_eth_rx_burst(test_params.bonded_port_id, 0, pkts, in test_mode4_marker()
1232 retval = rte_eth_tx_burst(test_params.bonded_port_id, 0, NULL, 0); in test_mode4_marker()
1290 rte_eth_bond_8023ad_conf_get(test_params.bonded_port_id, &conf); in test_mode4_expired()
1299 rte_eth_bond_8023ad_setup(test_params.bonded_port_id, &conf); in test_mode4_expired()
1402 lacp_tx_buf[i] = rte_pktmbuf_alloc(test_params.mbuf_pool); in test_mode4_ext_ctrl()
1413 test_params.bonded_port_id, in test_mode4_ext_ctrl()
1417 test_params.bonded_port_id, in test_mode4_ext_ctrl()
1456 lacp_tx_buf[i] = rte_pktmbuf_alloc(test_params.mbuf_pool); in test_mode4_ext_lacp()
1473 test_params.bonded_port_id, in test_mode4_ext_lacp()
1524 uint16_t slaves[RTE_DIM(test_params.slave_ports)]; in check_environment()
1545 slaves_count = rte_eth_bond_slaves_get(test_params.bonded_port_id, in check_environment()