.. index:: pair: group; Rx classification rule and AF_XDP socket .. _doxid-group__rss-af__xdp__rx__rule: Rx classification rule and AF_XDP socket ======================================== .. toctree:: :hidden: Check that a packet directed to Rx queue by Rx classification rule can be received and replied by AF_XDP socket. #. Create UDP socket on Tester, bind it to **tst_addr**. #. From IUT TA pin XSK BPF map of **rxq_stats** XDP program to a file. From IUT RPC server open that file to obtain file descriptor of the map. #. Find out which Rx queue on IUT will be used for packets sent from **tst_addr** to **iut_addr** according to RSS indirection table. #. Choose a different Rx queue **rule_queue** on IUT. #. Create Rx classification rule on IUT redirecting packets sent from **tst_addr** to **iut_addr** to Rx queue **rule_queue**. #. Configure **rxq_stats** XDP program on IUT to process only packets going from **tst_addr** to **iut_addr**. #. Create AF_XDP socket on IUT bound to **rule_queue**. Set corresponding record of XSK map of **rxq_stats** program to its file descriptor. #. Send a packet from the Tester UDP socket. Check that the AF_XDP socket gets that packet on IUT. Construct a reply by inverting addresses and ports of the received packet. Send it back to Tester over the AF_XDP socket. Check that the Tester socket gets it and its payload is the same as in the previously sent packet. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer ` * :ref:`env.peer2peer_ipv6 ` * - copy_mode - XDP copy mode: * ``none`` (kernel tries zero-copy, falls back to copy mode if it fails) * ``copy`` * ``zerocopy``