Lines Matching refs:ifobj_rx

405 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc,  in parse_command_line()  argument
424 ifobj = ifobj_rx; in parse_command_line()
445 ifobj_rx->busy_poll = true; in parse_command_line()
455 struct ifobject *ifobj_rx) in __test_spec_init() argument
460 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in __test_spec_init()
492 test->ifobj_rx = ifobj_rx; in __test_spec_init()
497 test->xdp_prog_rx = ifobj_rx->xdp_progs->progs.xsk_def_prog; in __test_spec_init()
498 test->xskmap_rx = ifobj_rx->xdp_progs->maps.xsk; in __test_spec_init()
504 struct ifobject *ifobj_rx, enum test_mode mode) 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()
584 struct pkt_stream *rx_pkt_stream = test->ifobj_rx->pkt_stream; in pkt_stream_restore_default()
592 pkt_stream_delete(test->ifobj_rx->pkt_stream); in pkt_stream_restore_default()
593 test->ifobj_rx->pkt_stream = test->rx_pkt_stream_default; in pkt_stream_restore_default()
656 pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, nb_pkts, pkt_len); in pkt_stream_replace()
657 test->ifobj_rx->pkt_stream = pkt_stream; in pkt_stream_replace()
678 __pkt_stream_replace_half(test->ifobj_rx, pkt_len, offset); in pkt_stream_replace_half()
683 struct xsk_umem_info *umem = test->ifobj_rx->umem; in pkt_stream_receive_half()
687 test->ifobj_rx->pkt_stream = pkt_stream_generate(umem, pkt_stream->nb_pkts, in pkt_stream_receive_half()
689 pkt_stream = test->ifobj_rx->pkt_stream; in pkt_stream_receive_half()
743 __pkt_stream_generate_custom(test->ifobj_rx, pkts, nb_pkts); in pkt_stream_generate_custom()
894 struct pkt_stream *pkt_stream = test->ifobj_rx->pkt_stream; in receive_pkts()
896 struct xsk_socket_info *xsk = test->ifobj_rx->xsk; in receive_pkts()
897 struct ifobject *ifobj = test->ifobj_rx; in receive_pkts()
1073 bool timeout = !is_umem_valid(test->ifobj_rx); in send_pkts()
1223 xsk_configure_socket(test, ifobject, test->ifobj_rx->umem, true); in thread_common_ops_tx()
1225 ifobject->xskmap = test->ifobj_rx->xskmap; in thread_common_ops_tx()
1226 memcpy(ifobject->umem, test->ifobj_rx->umem, sizeof(struct xsk_umem_info)); in thread_common_ops_tx()
1324 struct ifobject *ifobject = test->ifobj_rx; in worker_testapp_validate_rx()
1402 static void xsk_attach_xdp_progs(struct test_spec *test, struct ifobject *ifobj_rx, in xsk_attach_xdp_progs() argument
1405 if (xdp_prog_changed(test, ifobj_rx)) in xsk_attach_xdp_progs()
1406 xsk_reattach_xdp(ifobj_rx, test->xdp_prog_rx, test->xskmap_rx, test->mode); in xsk_attach_xdp_progs()
1462 struct ifobject *ifobj_rx = test->ifobj_rx; 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()
1502 test->ifobj_rx->tx_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
1519 xsk_socket__delete(ifobj_rx->xsk->xsk); in swap_xsk_resources()
1521 ifobj_rx->xsk = &ifobj_rx->xsk_arr[1]; in swap_xsk_resources()
1523 ret = xsk_update_xskmap(ifobj_rx->xskmap, ifobj_rx->xsk->xsk); in swap_xsk_resources()
1536 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx); in testapp_bpf_res()
1543 test->ifobj_rx->umem->frame_headroom = UMEM_HEADROOM_TEST_SIZE; in testapp_headroom()
1551 test->ifobj_rx->umem->frame_headroom = test->ifobj_rx->umem->frame_size - in testapp_stats_rx_dropped()
1554 test->ifobj_rx->validation_func = validate_rx_dropped; in testapp_stats_rx_dropped()
1570 test->ifobj_rx->pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, in testapp_stats_rx_full()
1572 if (!test->ifobj_rx->pkt_stream) in testapp_stats_rx_full()
1575 test->ifobj_rx->xsk->rxqsize = DEFAULT_UMEM_BUFFERS; in testapp_stats_rx_full()
1576 test->ifobj_rx->release_rx = false; in testapp_stats_rx_full()
1577 test->ifobj_rx->validation_func = validate_rx_full; in testapp_stats_rx_full()
1585 test->ifobj_rx->pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, in testapp_stats_fill_empty()
1587 if (!test->ifobj_rx->pkt_stream) in testapp_stats_fill_empty()
1590 test->ifobj_rx->use_fill_ring = false; in testapp_stats_fill_empty()
1591 test->ifobj_rx->validation_func = validate_fill_empty; in testapp_stats_fill_empty()
1619 test->ifobj_rx->umem->unaligned_mode = true; in testapp_unaligned()
1622 test->ifobj_rx->pkt_stream->use_addr_for_fill = true; in testapp_unaligned()
1678 struct xsk_xdp_progs *skel_rx = test->ifobj_rx->xdp_progs; in testapp_xdp_drop()
1703 test->ifobj_rx->use_poll = true; in testapp_poll_rxq_tmout()
1704 testapp_validate_traffic_single_thread(test, test->ifobj_rx); in testapp_poll_rxq_tmout()
1788 test->ifobj_rx->umem->frame_size = 2048; in run_pkt_test()
1793 test->ifobj_rx->use_poll = true; in run_pkt_test()
1815 test->ifobj_rx->umem->frame_size = 2048; in run_pkt_test()
1825 test->ifobj_rx->umem->unaligned_mode = true; in run_pkt_test()
1912 struct ifobject *ifobj_tx, *ifobj_rx; in main() local
1924 ifobj_rx = ifobject_create(); in main()
1925 if (!ifobj_rx) 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()
1934 ifobj_rx->shared_umem = shared_netdev; in main()
1936 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) { in main()
1947 init_iface(ifobj_rx, MAC1, MAC2, IP1, IP2, UDP_PORT1, UDP_PORT2, in main()
1952 test_spec_init(&test, ifobj_tx, ifobj_rx, 0); in main()
1954 rx_pkt_stream_default = pkt_stream_generate(ifobj_rx->umem, DEFAULT_PKT_CNT, PKT_SIZE); in main()
1964 test_spec_init(&test, ifobj_tx, ifobj_rx, i); in main()
1976 xsk_unload_xdp_programs(ifobj_rx); in main()
1978 ifobject_delete(ifobj_rx); in main()