Lines Matching refs:ifobj_tx
119 #define mode_string(test) (test)->ifobj_tx->xdp_flags & XDP_FLAGS_SKB_MODE ? "SKB" : "DRV"
331 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc, in parse_command_line() argument
350 ifobj = ifobj_tx; in parse_command_line()
376 static void __test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in __test_spec_init() argument
382 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in __test_spec_init()
407 test->ifobj_tx = ifobj_tx; in __test_spec_init()
414 static void test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in test_spec_init() argument
425 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in test_spec_init()
436 __test_spec_init(test, ifobj_tx, ifobj_rx); in test_spec_init()
441 __test_spec_init(test, test->ifobj_tx, test->ifobj_rx); in test_spec_reset()
481 if (test->ifobj_tx->pkt_stream != test->pkt_stream_default) { in pkt_stream_restore_default()
482 pkt_stream_delete(test->ifobj_tx->pkt_stream); in pkt_stream_restore_default()
483 test->ifobj_tx->pkt_stream = test->pkt_stream_default; in pkt_stream_restore_default()
540 pkt_stream = pkt_stream_generate(test->ifobj_tx->umem, nb_pkts, pkt_len); in pkt_stream_replace()
541 test->ifobj_tx->pkt_stream = pkt_stream; in pkt_stream_replace()
547 struct xsk_umem_info *umem = test->ifobj_tx->umem; in pkt_stream_replace_half()
557 test->ifobj_tx->pkt_stream = pkt_stream; in pkt_stream_replace_half()
596 test->ifobj_tx->pkt_stream = pkt_stream; in pkt_stream_generate_custom()
996 struct ifobject *ifobject = test->ifobj_tx; in worker_testapp_validate_tx()
1073 struct ifobject *ifobj_tx = test->ifobj_tx; in testapp_validate_traffic() local
1092 pthread_create(&t1, NULL, ifobj_tx->func_ptr, test); in testapp_validate_traffic()
1124 test->ifobj_tx->rx_on = true; in testapp_bidi()
1130 swap_directions(&test->ifobj_rx, &test->ifobj_tx); in testapp_bidi()
1133 swap_directions(&test->ifobj_rx, &test->ifobj_tx); in testapp_bidi()
1136 static void swap_xsk_resources(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx) in swap_xsk_resources() argument
1138 xsk_socket__delete(ifobj_tx->xsk->xsk); in swap_xsk_resources()
1139 xsk_umem__delete(ifobj_tx->umem->umem); in swap_xsk_resources()
1142 ifobj_tx->umem = &ifobj_tx->umem_arr[1]; in swap_xsk_resources()
1143 ifobj_tx->xsk = &ifobj_tx->xsk_arr[1]; in swap_xsk_resources()
1155 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx); in testapp_bpf_res()
1174 test->ifobj_tx->pacing_on = false; in testapp_stats()
1232 if (!hugepages_present(test->ifobj_tx)) { in testapp_unaligned()
1238 test->ifobj_tx->umem->unaligned_mode = true; in testapp_unaligned()
1280 if (test->ifobj_tx->umem->unaligned_mode) { in testapp_invalid_desc()
1284 if (test->ifobj_tx->umem->frame_size == XSK_UMEM__DEFAULT_FRAME_SIZE / 2) { in testapp_invalid_desc()
1345 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1353 test->ifobj_tx->use_poll = true; in run_pkt_test()
1364 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1370 test->ifobj_tx->umem->unaligned_mode = true; in run_pkt_test()
1424 struct ifobject *ifobj_tx, *ifobj_rx; in main() local
1431 ifobj_tx = ifobject_create(); in main()
1432 if (!ifobj_tx) in main()
1440 parse_command_line(ifobj_tx, ifobj_rx, argc, argv); in main()
1442 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) { in main()
1447 init_iface(ifobj_tx, MAC1, MAC2, IP1, IP2, UDP_PORT1, UDP_PORT2, in main()
1452 test_spec_init(&test, ifobj_tx, ifobj_rx, 0); in main()
1453 pkt_stream_default = pkt_stream_generate(ifobj_tx->umem, DEFAULT_PKT_CNT, PKT_SIZE); in main()
1462 test_spec_init(&test, ifobj_tx, ifobj_rx, i); in main()
1468 ifobject_delete(ifobj_tx); in main()