Lines Matching refs:ifobj_rx
335 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc,
354 ifobj = ifobj_rx;
372 ifobj_rx->busy_poll = true;
382 struct ifobject *ifobj_rx)
387 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx;
417 test->ifobj_rx = ifobj_rx;
423 test->xdp_prog_rx = ifobj_rx->xdp_progs->progs.xsk_def_prog;
424 test->xskmap_rx = ifobj_rx->xdp_progs->maps.xsk;
430 struct ifobject *ifobj_rx, enum test_mode mode)
443 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx;
453 __test_spec_init(test, ifobj_tx, ifobj_rx);
458 __test_spec_init(test, test->ifobj_tx, test->ifobj_rx);
480 if (test->ifobj_rx->mtu != mtu) {
481 err = xsk_set_mtu(test->ifobj_rx->ifindex, mtu);
484 test->ifobj_rx->mtu = mtu;
530 struct pkt_stream *rx_pkt_stream = test->ifobj_rx->pkt_stream;
538 pkt_stream_delete(test->ifobj_rx->pkt_stream);
539 test->ifobj_rx->pkt_stream = test->rx_pkt_stream_default;
647 pkt_stream = pkt_stream_generate(test->ifobj_rx->umem, nb_pkts, pkt_len);
648 test->ifobj_rx->pkt_stream = pkt_stream;
668 __pkt_stream_replace_half(test->ifobj_rx, pkt_len, offset);
673 struct xsk_umem_info *umem = test->ifobj_rx->umem;
677 test->ifobj_rx->pkt_stream = pkt_stream_generate(umem, pkt_stream->nb_pkts,
679 pkt_stream = test->ifobj_rx->pkt_stream;
767 pkt_stream = __pkt_stream_generate_custom(test->ifobj_rx, pkts, nb_pkts, false);
768 test->ifobj_rx->pkt_stream = pkt_stream;
970 struct pkt_stream *pkt_stream = test->ifobj_rx->pkt_stream;
971 struct xsk_socket_info *xsk = test->ifobj_rx->xsk;
973 struct ifobject *ifobj = test->ifobj_rx;
1219 bool timeout = !is_umem_valid(test->ifobj_rx);
1378 xsk_configure_socket(test, ifobject, test->ifobj_rx->umem, true);
1380 ifobject->xskmap = test->ifobj_rx->xskmap;
1381 memcpy(ifobject->umem, test->ifobj_rx->umem, sizeof(struct xsk_umem_info));
1493 struct ifobject *ifobject = test->ifobj_rx;
1547 struct ifobject *ifobj = test->ifobj_rx;
1582 static void xsk_attach_xdp_progs(struct test_spec *test, struct ifobject *ifobj_rx,
1586 xsk_reattach_xdp(ifobj_rx, test->xdp_prog_rx, test->xskmap_rx, test->mode);
1663 struct ifobject *ifobj_rx = test->ifobj_rx;
1666 if ((ifobj_rx->umem->unaligned_mode && !ifobj_rx->unaligned_supp) ||
1672 xsk_attach_xdp_progs(test, ifobj_rx, ifobj_tx);
1673 return __testapp_validate_traffic(test, ifobj_rx, ifobj_tx);
1713 test->ifobj_rx->tx_on = true;
1719 swap_directions(&test->ifobj_rx, &test->ifobj_tx);
1720 res = __testapp_validate_traffic(test, test->ifobj_rx, test->ifobj_tx);
1722 swap_directions(&test->ifobj_rx, &test->ifobj_tx);
1726 static void swap_xsk_resources(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx)
1731 xsk_socket__delete(ifobj_rx->xsk->xsk);
1733 ifobj_rx->xsk = &ifobj_rx->xsk_arr[1];
1735 ret = xsk_update_xskmap(ifobj_rx->xskmap, ifobj_rx->xsk->xsk);
1748 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx);
1755 test->ifobj_rx->umem->frame_headroom = UMEM_HEADROOM_TEST_SIZE;
1768 test->ifobj_rx->umem->frame_headroom = test->ifobj_rx->umem->frame_size -
1771 test->ifobj_rx->validation_func = validate_rx_dropped;
1787 test->ifobj_rx->pkt_stream = pkt_stream_generate(test->ifobj_rx->umem,
1790 test->ifobj_rx->xsk->rxqsize = DEFAULT_UMEM_BUFFERS;
1791 test->ifobj_rx->release_rx = false;
1792 test->ifobj_rx->validation_func = validate_rx_full;
1800 test->ifobj_rx->pkt_stream = pkt_stream_generate(test->ifobj_rx->umem,
1803 test->ifobj_rx->use_fill_ring = false;
1804 test->ifobj_rx->validation_func = validate_fill_empty;
1812 test->ifobj_rx->umem->unaligned_mode = true;
1824 test->ifobj_rx->umem->unaligned_mode = true;
1933 struct xsk_xdp_progs *skel_rx = test->ifobj_rx->xdp_progs;
1946 struct xsk_xdp_progs *skel_rx = test->ifobj_rx->xdp_progs;
1955 test->ifobj_rx->use_metadata = true;
1981 test->ifobj_rx->use_poll = true;
1982 return testapp_validate_traffic_single_thread(test, test->ifobj_rx);
2134 test->ifobj_rx->umem->frame_size = 2048;
2139 test->ifobj_rx->use_poll = true;
2161 test->ifobj_rx->umem->frame_size = 2048;
2167 test->ifobj_rx->umem->unaligned_mode = true;
2176 test->ifobj_rx->umem->frame_size = 4001;
2178 test->ifobj_rx->umem->unaligned_mode = true;
2196 test->ifobj_rx->umem->unaligned_mode = true;
2297 struct ifobject *ifobj_tx, *ifobj_rx;
2309 ifobj_rx = ifobject_create();
2310 if (!ifobj_rx)
2315 parse_command_line(ifobj_tx, ifobj_rx, argc, argv);
2317 shared_netdev = (ifobj_tx->ifindex == ifobj_rx->ifindex);
2319 ifobj_rx->shared_umem = shared_netdev;
2321 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) {
2332 init_iface(ifobj_rx, MAC1, MAC2, worker_testapp_validate_rx);
2335 test_spec_init(&test, ifobj_tx, ifobj_rx, 0);
2337 rx_pkt_stream_default = pkt_stream_generate(ifobj_rx->umem, DEFAULT_PKT_CNT, MIN_PKT_SIZE);
2347 test_spec_init(&test, ifobj_tx, ifobj_rx, i);
2359 xsk_unload_xdp_programs(ifobj_rx);
2361 ifobject_delete(ifobj_rx);