Lines Matching refs:ifobj_tx

127 #define busy_poll_string(test) (test)->ifobj_tx->busy_poll ? "BUSY-POLL " : ""
431 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc, in parse_command_line() argument
450 ifobj = ifobj_tx; in parse_command_line()
470 ifobj_tx->busy_poll = true; in parse_command_line()
480 static void __test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in __test_spec_init() argument
486 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in __test_spec_init()
517 test->ifobj_tx = ifobj_tx; in __test_spec_init()
525 static void test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in test_spec_init() argument
539 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in test_spec_init()
555 __test_spec_init(test, ifobj_tx, ifobj_rx); in test_spec_init()
560 __test_spec_init(test, test->ifobj_tx, test->ifobj_rx); in test_spec_reset()
601 struct pkt_stream *tx_pkt_stream = test->ifobj_tx->pkt_stream; in pkt_stream_restore_default()
605 pkt_stream_delete(test->ifobj_tx->pkt_stream); in pkt_stream_restore_default()
606 test->ifobj_tx->pkt_stream = test->tx_pkt_stream_default; in pkt_stream_restore_default()
672 pkt_stream = pkt_stream_generate(test->ifobj_tx->umem, nb_pkts, pkt_len); in pkt_stream_replace()
673 test->ifobj_tx->pkt_stream = pkt_stream; in pkt_stream_replace()
695 __pkt_stream_replace_half(test->ifobj_tx, pkt_len, offset); in pkt_stream_replace_half()
702 struct pkt_stream *pkt_stream = test->ifobj_tx->pkt_stream; in pkt_stream_receive_half()
760 __pkt_stream_generate_custom(test->ifobj_tx, pkts, nb_pkts); in pkt_stream_generate_custom()
942 if (!is_umem_valid(test->ifobj_tx)) in receive_pkts()
1342 struct ifobject *ifobject = test->ifobj_tx; in worker_testapp_validate_tx()
1429 test->ifobj_tx->shared_umem = false; in testapp_validate_traffic_single_thread()
1450 test->ifobj_tx->shared_umem = old_shared_umem; in testapp_validate_traffic_single_thread()
1457 struct ifobject *ifobj_tx = test->ifobj_tx; in testapp_validate_traffic() local
1476 pthread_create(&t1, NULL, ifobj_tx->func_ptr, test); in testapp_validate_traffic()
1482 xsk_socket__delete(ifobj_tx->xsk->xsk); in testapp_validate_traffic()
1485 if (!ifobj_tx->shared_umem) in testapp_validate_traffic()
1486 testapp_clean_xsk_umem(ifobj_tx); in testapp_validate_traffic()
1519 test->ifobj_tx->rx_on = true; in testapp_bidi()
1526 swap_directions(&test->ifobj_rx, &test->ifobj_tx); in testapp_bidi()
1529 swap_directions(&test->ifobj_rx, &test->ifobj_tx); in testapp_bidi()
1532 static void swap_xsk_resources(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx) in swap_xsk_resources() argument
1536 xsk_socket__delete(ifobj_tx->xsk->xsk); in swap_xsk_resources()
1538 ifobj_tx->xsk = &ifobj_tx->xsk_arr[1]; in swap_xsk_resources()
1554 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx); in testapp_bpf_res()
1580 test->ifobj_tx->validation_func = validate_tx_invalid_descs; in testapp_stats_tx_invalid_descs()
1636 if (!hugepages_present(test->ifobj_tx)) { in testapp_unaligned()
1642 test->ifobj_tx->umem->unaligned_mode = true; in testapp_unaligned()
1684 if (test->ifobj_tx->umem->unaligned_mode) { in testapp_invalid_desc()
1688 if (test->ifobj_tx->umem->frame_size == XSK_UMEM__DEFAULT_FRAME_SIZE / 2) { in testapp_invalid_desc()
1693 if (test->ifobj_tx->shared_umem) { in testapp_invalid_desc()
1762 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1775 test->ifobj_tx->use_poll = true; in run_pkt_test()
1781 test->ifobj_tx->use_poll = true; in run_pkt_test()
1783 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1785 testapp_validate_traffic_single_thread(test, test->ifobj_tx, type); in run_pkt_test()
1799 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1804 if (!hugepages_present(test->ifobj_tx)) { in run_pkt_test()
1809 test->ifobj_tx->umem->unaligned_mode = true; in run_pkt_test()
1898 struct ifobject *ifobj_tx, *ifobj_rx; in main() local
1907 ifobj_tx = ifobject_create(); in main()
1908 if (!ifobj_tx) in main()
1916 parse_command_line(ifobj_tx, ifobj_rx, argc, argv); in main()
1917 shared_umem = !strcmp(ifobj_tx->ifname, ifobj_rx->ifname); in main()
1919 ifobj_tx->shared_umem = shared_umem; in main()
1922 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) { in main()
1927 init_iface(ifobj_tx, MAC1, MAC2, IP1, IP2, UDP_PORT1, UDP_PORT2, in main()
1932 if (is_xdp_supported(ifobj_tx)) { in main()
1934 if (ifobj_zc_avail(ifobj_tx)) in main()
1938 test_spec_init(&test, ifobj_tx, ifobj_rx, 0); in main()
1939 tx_pkt_stream_default = pkt_stream_generate(ifobj_tx->umem, DEFAULT_PKT_CNT, PKT_SIZE); in main()
1950 test_spec_init(&test, ifobj_tx, ifobj_rx, i); in main()
1960 ifobject_delete(ifobj_tx); in main()