Lines Matching refs:ifobj_rx

431 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc,  in parse_command_line()  argument
452 ifobj = ifobj_rx; in parse_command_line()
471 ifobj_rx->busy_poll = true; in parse_command_line()
481 struct ifobject *ifobj_rx) in __test_spec_init() argument
486 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx; in __test_spec_init()
518 test->ifobj_rx = ifobj_rx; in __test_spec_init()
526 struct ifobject *ifobj_rx, enum test_mode mode) 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()
602 struct pkt_stream *rx_pkt_stream = test->ifobj_rx->pkt_stream; in pkt_stream_restore_default()
610 pkt_stream_delete(test->ifobj_rx->pkt_stream); in pkt_stream_restore_default()
611 test->ifobj_rx->pkt_stream = test->rx_pkt_stream_default; in pkt_stream_restore_default()
674 pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, nb_pkts, pkt_len); in pkt_stream_replace()
675 test->ifobj_rx->pkt_stream = pkt_stream; in pkt_stream_replace()
696 __pkt_stream_replace_half(test->ifobj_rx, pkt_len, offset); in pkt_stream_replace_half()
701 struct xsk_umem_info *umem = test->ifobj_rx->umem; in pkt_stream_receive_half()
705 test->ifobj_rx->pkt_stream = pkt_stream_generate(umem, pkt_stream->nb_pkts, in pkt_stream_receive_half()
707 pkt_stream = test->ifobj_rx->pkt_stream; in pkt_stream_receive_half()
761 __pkt_stream_generate_custom(test->ifobj_rx, pkts, nb_pkts); in pkt_stream_generate_custom()
912 struct pkt_stream *pkt_stream = test->ifobj_rx->pkt_stream; in receive_pkts()
914 struct xsk_socket_info *xsk = test->ifobj_rx->xsk; in receive_pkts()
915 struct ifobject *ifobj = test->ifobj_rx; in receive_pkts()
1090 bool timeout = !is_umem_valid(test->ifobj_rx); in send_pkts()
1240 xsk_configure_socket(test, ifobject, test->ifobj_rx->umem, true); in thread_common_ops_tx()
1242 ifobject->xsk_map_fd = test->ifobj_rx->xsk_map_fd; in thread_common_ops_tx()
1243 memcpy(ifobject->umem, test->ifobj_rx->umem, sizeof(struct xsk_umem_info)); in thread_common_ops_tx()
1367 struct ifobject *ifobject = test->ifobj_rx; in worker_testapp_validate_rx()
1428 test->ifobj_rx->shared_umem = false; in testapp_validate_traffic_single_thread()
1449 test->ifobj_rx->shared_umem = old_shared_umem; in testapp_validate_traffic_single_thread()
1458 struct ifobject *ifobj_rx = test->ifobj_rx; in testapp_validate_traffic() local
1465 pkt_stream_reset(ifobj_rx->pkt_stream); in testapp_validate_traffic()
1469 pthread_create(&t0, NULL, ifobj_rx->func_ptr, test); in testapp_validate_traffic()
1483 xsk_socket__delete(ifobj_rx->xsk->xsk); in testapp_validate_traffic()
1484 testapp_clean_xsk_umem(ifobj_rx); in testapp_validate_traffic()
1520 test->ifobj_rx->tx_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
1537 xsk_socket__delete(ifobj_rx->xsk->xsk); in swap_xsk_resources()
1539 ifobj_rx->xsk = &ifobj_rx->xsk_arr[1]; in swap_xsk_resources()
1541 ret = xsk_socket__update_xskmap(ifobj_rx->xsk->xsk, ifobj_rx->xsk_map_fd); in swap_xsk_resources()
1554 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx); in testapp_bpf_res()
1561 test->ifobj_rx->umem->frame_headroom = UMEM_HEADROOM_TEST_SIZE; in testapp_headroom()
1569 test->ifobj_rx->umem->frame_headroom = test->ifobj_rx->umem->frame_size - in testapp_stats_rx_dropped()
1572 test->ifobj_rx->validation_func = validate_rx_dropped; in testapp_stats_rx_dropped()
1590 test->ifobj_rx->pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, in testapp_stats_rx_full()
1592 if (!test->ifobj_rx->pkt_stream) in testapp_stats_rx_full()
1595 test->ifobj_rx->xsk->rxqsize = DEFAULT_UMEM_BUFFERS; in testapp_stats_rx_full()
1596 test->ifobj_rx->release_rx = false; in testapp_stats_rx_full()
1597 test->ifobj_rx->validation_func = validate_rx_full; in testapp_stats_rx_full()
1607 test->ifobj_rx->pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, in testapp_stats_fill_empty()
1609 if (!test->ifobj_rx->pkt_stream) in testapp_stats_fill_empty()
1612 test->ifobj_rx->use_fill_ring = false; in testapp_stats_fill_empty()
1613 test->ifobj_rx->validation_func = validate_fill_empty; in testapp_stats_fill_empty()
1643 test->ifobj_rx->umem->unaligned_mode = true; in testapp_unaligned()
1646 test->ifobj_rx->pkt_stream->use_addr_for_fill = true; in testapp_unaligned()
1763 test->ifobj_rx->umem->frame_size = 2048; in run_pkt_test()
1770 test->ifobj_rx->use_poll = true; in run_pkt_test()
1790 test->ifobj_rx->use_poll = true; in run_pkt_test()
1791 testapp_validate_traffic_single_thread(test, test->ifobj_rx, type); in run_pkt_test()
1800 test->ifobj_rx->umem->frame_size = 2048; in run_pkt_test()
1810 test->ifobj_rx->umem->unaligned_mode = true; in run_pkt_test()
1898 struct ifobject *ifobj_tx, *ifobj_rx; in main() local
1910 ifobj_rx = ifobject_create(); in main()
1911 if (!ifobj_rx) 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()
1920 ifobj_rx->shared_umem = shared_umem; in main()
1922 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) { in main()
1929 init_iface(ifobj_rx, MAC2, MAC1, IP2, IP1, UDP_PORT2, UDP_PORT1, in main()
1938 test_spec_init(&test, ifobj_tx, ifobj_rx, 0); in main()
1940 rx_pkt_stream_default = pkt_stream_generate(ifobj_rx->umem, DEFAULT_PKT_CNT, PKT_SIZE); in main()
1950 test_spec_init(&test, ifobj_tx, ifobj_rx, i); in main()
1961 ifobject_delete(ifobj_rx); in main()