Lines Matching defs:ifobj_tx
118 #define busy_poll_string(test) (test)->ifobj_tx->busy_poll ? "BUSY-POLL " : ""
335 static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj_rx, int argc,
352 ifobj = ifobj_tx;
371 ifobj_tx->busy_poll = true;
381 static void __test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx,
387 struct ifobject *ifobj = i ? ifobj_rx : ifobj_tx;
416 test->ifobj_tx = ifobj_tx;
425 test->xdp_prog_tx = ifobj_tx->xdp_progs->progs.xsk_def_prog;
426 test->xskmap_tx = ifobj_tx->xdp_progs->maps.xsk;
429 static void test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx,
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);
486 if (test->ifobj_tx->mtu != mtu) {
487 err = xsk_set_mtu(test->ifobj_tx->ifindex, mtu);
490 test->ifobj_tx->mtu = mtu;
529 struct pkt_stream *tx_pkt_stream = test->ifobj_tx->pkt_stream;
533 pkt_stream_delete(test->ifobj_tx->pkt_stream);
534 test->ifobj_tx->pkt_stream = test->tx_pkt_stream_default;
645 pkt_stream = pkt_stream_generate(test->ifobj_tx->umem, nb_pkts, pkt_len);
646 test->ifobj_tx->pkt_stream = pkt_stream;
667 __pkt_stream_replace_half(test->ifobj_tx, pkt_len, offset);
674 struct pkt_stream *pkt_stream = test->ifobj_tx->pkt_stream;
764 pkt_stream = __pkt_stream_generate_custom(test->ifobj_tx, pkts, nb_pkts, true);
765 test->ifobj_tx->pkt_stream = pkt_stream;
1003 if (!is_umem_valid(test->ifobj_tx))
1468 struct ifobject *ifobject = test->ifobj_tx;
1554 struct ifobject *ifobj = test->ifobj_tx;
1583 struct ifobject *ifobj_tx)
1588 if (!ifobj_tx || ifobj_tx->shared_umem)
1592 xsk_reattach_xdp(ifobj_tx, test->xdp_prog_tx, test->xskmap_tx, test->mode);
1664 struct ifobject *ifobj_tx = test->ifobj_tx;
1667 (ifobj_tx->umem->unaligned_mode && !ifobj_tx->unaligned_supp)) {
1672 xsk_attach_xdp_progs(test, ifobj_rx, ifobj_tx);
1673 return __testapp_validate_traffic(test, ifobj_rx, ifobj_tx);
1712 test->ifobj_tx->rx_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)
1730 xsk_socket__delete(ifobj_tx->xsk->xsk);
1732 ifobj_tx->xsk = &ifobj_tx->xsk_arr[1];
1748 swap_xsk_resources(test->ifobj_tx, test->ifobj_rx);
1779 test->ifobj_tx->validation_func = validate_tx_invalid_descs;
1811 test->ifobj_tx->umem->unaligned_mode = true;
1823 test->ifobj_tx->umem->unaligned_mode = true;
1848 struct xsk_umem_info *umem = test->ifobj_tx->umem;
1888 struct xsk_umem_info *umem = test->ifobj_tx->umem;
1921 if (test->ifobj_tx->shared_umem) {
1934 struct xsk_xdp_progs *skel_tx = test->ifobj_tx->xdp_progs;
1947 struct xsk_xdp_progs *skel_tx = test->ifobj_tx->xdp_progs;
1971 test->ifobj_tx->use_poll = true;
1973 test->ifobj_tx->umem->frame_size = 2048;
1975 return testapp_validate_traffic_single_thread(test, test->ifobj_tx);
1992 max_frags = test->ifobj_tx->xdp_zc_max_segs;
2133 test->ifobj_tx->umem->frame_size = 2048;
2144 test->ifobj_tx->use_poll = true;
2160 test->ifobj_tx->umem->frame_size = 2048;
2166 test->ifobj_tx->umem->unaligned_mode = true;
2175 test->ifobj_tx->umem->frame_size = 4001;
2177 test->ifobj_tx->umem->unaligned_mode = true;
2183 umem_size = test->ifobj_tx->umem->num_frames * test->ifobj_tx->umem->frame_size;
2195 test->ifobj_tx->umem->unaligned_mode = true;
2297 struct ifobject *ifobj_tx, *ifobj_rx;
2306 ifobj_tx = ifobject_create();
2307 if (!ifobj_tx)
2315 parse_command_line(ifobj_tx, ifobj_rx, argc, argv);
2317 shared_netdev = (ifobj_tx->ifindex == ifobj_rx->ifindex);
2318 ifobj_tx->shared_umem = shared_netdev;
2321 if (!validate_interface(ifobj_tx) || !validate_interface(ifobj_rx)) {
2326 if (is_xdp_supported(ifobj_tx->ifindex)) {
2328 if (ifobj_zc_avail(ifobj_tx))
2333 init_iface(ifobj_tx, MAC2, MAC1, worker_testapp_validate_tx);
2335 test_spec_init(&test, ifobj_tx, ifobj_rx, 0);
2336 tx_pkt_stream_default = pkt_stream_generate(ifobj_tx->umem, DEFAULT_PKT_CNT, MIN_PKT_SIZE);
2347 test_spec_init(&test, ifobj_tx, ifobj_rx, i);
2358 xsk_unload_xdp_programs(ifobj_tx);
2360 ifobject_delete(ifobj_tx);