Test of RX scatter function

Test checks work of RX scatter function with different buffer sizes

  1. Prepare Ethernet device for test using buffer size of rx_buf_size for set up a receive queue. Configure Rx scatter offload if required by enable_scatter

  2. Carry out a sophisticated check to detect the absence of Rx scatter feature in the PMD, if DPDK release supports the offload definition.

  3. Set MTU according to pre_rxq_setup_mtu

  4. Prepare traffic template

  5. Setup Rx queue with sufficient number of Rx descriptors

  6. To handle both zero and non-zero remainder add 1 to the result

  7. Add extra Rx descriptor number to handle the case when free descriptors number is insufficient due to previous refill that freed only aligned number of descriptors.

  8. Check that mtu on iut_port and tst_if is enough to send one packet with size equal to the payload_size plus packet_headers_size, otherwise set sufficient MTU.

  9. Ensure that interface is UP on Tester side

  10. Repeat following steps with extra payload size from 0 to max_extra_size inclusive.

    • Set payload of template according to payload_size + extra size

    • Transmit and sniff one packet from tst_if to the iut_port

    • Receive the packet on port iut_port and check that the received packet matches the sent one.

    • Get information about the number of segments in the mbuf chain.

Parameters:

enable_scatter

Test with Rx scatter offload enabled

rx_buf_size

The size of RTE mbuf data buffer

payload_size

The size of payload data of packet

packet_headers_size

Sufficient size for headers of all package layers

max_extra_size

The maximum extra size added to packet payload