Lines Matching refs:ifobj_tx

122 #define busy_poll_string(test) (test)->ifobj_tx->busy_poll ? "BUSY-POLL " : ""
405 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc, in parse_command_line() argument
422 ifobj = ifobj_tx; in parse_command_line()
444 ifobj_tx->busy_poll = true; in parse_command_line()
454 static void __test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in __test_spec_init() argument
460 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in __test_spec_init()
491 test->ifobj_tx = ifobj_tx; in __test_spec_init()
499 test->xdp_prog_tx = ifobj_tx->xdp_progs->progs.xsk_def_prog; in __test_spec_init()
500 test->xskmap_tx = ifobj_tx->xdp_progs->maps.xsk; in __test_spec_init()
503 static void test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in test_spec_init() argument
517 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in test_spec_init()
527 __test_spec_init(test, ifobj_tx, ifobj_rx); in test_spec_init()
532 __test_spec_init(test, test->ifobj_tx, test->ifobj_rx); in test_spec_reset()
583 struct pkt_stream *tx_pkt_stream = test->ifobj_tx->pkt_stream; in pkt_stream_restore_default()
587 pkt_stream_delete(test->ifobj_tx->pkt_stream); in pkt_stream_restore_default()
588 test->ifobj_tx->pkt_stream = test->tx_pkt_stream_default; in pkt_stream_restore_default()
654 pkt_stream = pkt_stream_generate(test->ifobj_tx->umem, nb_pkts, pkt_len); in pkt_stream_replace()
655 test->ifobj_tx->pkt_stream = pkt_stream; in pkt_stream_replace()
677 __pkt_stream_replace_half(test->ifobj_tx, pkt_len, offset); in pkt_stream_replace_half()
684 struct pkt_stream *pkt_stream = test->ifobj_tx->pkt_stream; in pkt_stream_receive_half()
742 __pkt_stream_generate_custom(test->ifobj_tx, pkts, nb_pkts); in pkt_stream_generate_custom()
924 if (!is_umem_valid(test->ifobj_tx)) in receive_pkts()
1299 struct ifobject *ifobject = test->ifobj_tx; in worker_testapp_validate_tx()
1403 struct ifobject *ifobj_tx) in xsk_attach_xdp_progs() argument
1408 if (!ifobj_tx || ifobj_tx->shared_umem) in xsk_attach_xdp_progs()
1411 if (xdp_prog_changed(test, ifobj_tx)) in xsk_attach_xdp_progs()
1412 xsk_reattach_xdp(ifobj_tx, test->xdp_prog_tx, test->xskmap_tx, test->mode); in xsk_attach_xdp_progs()
1463 struct ifobject *ifobj_tx = test->ifobj_tx; in testapp_validate_traffic() local
1465 xsk_attach_xdp_progs(test, ifobj_rx, ifobj_tx); in testapp_validate_traffic()
1466 return __testapp_validate_traffic(test, ifobj_rx, ifobj_tx); in testapp_validate_traffic()
1501 test->ifobj_tx->rx_on = true; in testapp_bidi()
1508 swap_directions(&test->ifobj_rx, &test->ifobj_tx); in testapp_bidi()
1509 __testapp_validate_traffic(test, test->ifobj_rx, test->ifobj_tx); in testapp_bidi()
1511 swap_directions(&test->ifobj_rx, &test->ifobj_tx); in testapp_bidi()
1514 static void swap_xsk_resources(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx) in swap_xsk_resources() argument
1518 xsk_socket__delete(ifobj_tx->xsk->xsk); in swap_xsk_resources()
1520 ifobj_tx->xsk = &ifobj_tx->xsk_arr[1]; in swap_xsk_resources()
1536 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx); in testapp_bpf_res()
1562 test->ifobj_tx->validation_func = validate_tx_invalid_descs; in testapp_stats_tx_invalid_descs()
1612 if (!hugepages_present(test->ifobj_tx)) { in testapp_unaligned()
1618 test->ifobj_tx->umem->unaligned_mode = true; in testapp_unaligned()
1658 if (test->ifobj_tx->umem->unaligned_mode) { in testapp_invalid_desc()
1662 if (test->ifobj_tx->umem->frame_size == XSK_UMEM__DEFAULT_FRAME_SIZE / 2) { in testapp_invalid_desc()
1667 if (test->ifobj_tx->shared_umem) { in testapp_invalid_desc()
1679 struct xsk_xdp_progs *skel_tx = test->ifobj_tx->xdp_progs; in testapp_xdp_drop()
1693 test->ifobj_tx->use_poll = true; in testapp_poll_txq_tmout()
1695 test->ifobj_tx->umem->frame_size = 2048; in testapp_poll_txq_tmout()
1697 testapp_validate_traffic_single_thread(test, test->ifobj_tx); in testapp_poll_txq_tmout()
1787 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1798 test->ifobj_tx->use_poll = true; in run_pkt_test()
1814 test->ifobj_tx->umem->frame_size = 2048; in run_pkt_test()
1819 if (!hugepages_present(test->ifobj_tx)) { in run_pkt_test()
1824 test->ifobj_tx->umem->unaligned_mode = true; in run_pkt_test()
1912 struct ifobject *ifobj_tx, *ifobj_rx; in main() local
1921 ifobj_tx = ifobject_create(); in main()
1922 if (!ifobj_tx) in main()
1930 parse_command_line(ifobj_tx, ifobj_rx, argc, argv); in main()
1932 shared_netdev = (ifobj_tx->ifindex == ifobj_rx->ifindex); in main()
1933 ifobj_tx->shared_umem = shared_netdev; in main()
1936 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) { in main()
1941 if (is_xdp_supported(ifobj_tx->ifindex)) { in main()
1943 if (ifobj_zc_avail(ifobj_tx)) in main()
1949 init_iface(ifobj_tx, MAC2, MAC1, IP2, IP1, UDP_PORT2, UDP_PORT1, in main()
1952 test_spec_init(&test, ifobj_tx, ifobj_rx, 0); in main()
1953 tx_pkt_stream_default = pkt_stream_generate(ifobj_tx->umem, DEFAULT_PKT_CNT, PKT_SIZE); in main()
1964 test_spec_init(&test, ifobj_tx, ifobj_rx, i); in main()
1975 xsk_unload_xdp_programs(ifobj_tx); in main()
1977 ifobject_delete(ifobj_tx); in main()