Send one packet

Make sure that a packet can be sent correctly

Validate PMD Tx operation in general and various Tx offloads in particular.

  1. Reconcile interdependent test parameters

  2. Initialize the Ethernet device to get its capabilities

  3. Conduct environment substitutions in the traffic template

  4. Learn about protocol types present in the traffic template

  5. Learn about offload capabilities supported by the PMD

  6. Update traffic template in accordance with device capabilities and offloads to be tested

    • Spoil outer IP checksum in the traffic template

    • Set outer L4 checksum to 0 in the traffic template if need be

    • Spoil inner IP checksum in the traffic template

    • Spoil inner L4 checksum in the traffic template

  7. Set payload length in the traffic template

  8. Configure tunnel UDP port number in the PMD

  9. Enable offloads to be tested

    • Enable VLAN offload in the PMD

    • Enable outer IP checksum offload in the PMD

    • Enable outer UDP checksum offload in the PMD

    • Enable inner IP checksum offload in the PMD

    • Enable inner L4 checksum offload in the PMD

    • Enable TSO in the PMD

    • Enable multisegment mbuf support in the PMD

  10. Configure the Ethernet device and setup its Rx queues

  11. Prepare mbufs to transmit by traffic template and offloads to be tested

    • Generate mbuf and a packet sample from the traffic template

    • Add VLAN offload request to the mbuf

    • Add outer offload flags for the outer frame to the mbuf

    • Reconcile inner header length fields in the mbuf so that they refer to the outer header and fill zeros in outer header length fields

    • Add inner offload flags for the outer frame to the mbuf

    • Add inner offload flags for the inner frame to the mbuf

    • Add TSO request to the mbuf

    • Redistribute the packet data across multiple mbuf segments

  12. Override the number of descriptors by the maximum supported value since the NIC may need additional descriptor room for TSO transaction while being unable to report this in limits

  13. Setup Tx queue

  14. Enlarge MTU on both ends to cope with big frame(s)

  15. Start the Ethernet device and wait for link up

  16. Check mbuf segmentation vs limits

  17. Validate Tx offloads for the packet

  18. Create an Rx CSAP on the TST host according to the template

  19. Update expected packet in accordance with offloads to be done

    • Inject VLAN tag to the packet sample

    • Replace checksums in the outer frame of the packet sample with script values to demand that the checksums in the packet(s) received by peer be correct

    • Replace checksums in the inner frame of the packet sample with script values to demand that the checksums in the packet(s) received by the peer be correct

    • Conduct TSO edits for the packet sample

    • Prepare a traffic pattern from TSO packet samples

    • Mask TCP flag CWR in the first packet to handle it gracefully

    • Prepare a traffic pattern from the packet sample

  20. Ensure that interface is UP on Tester side

  21. Start to capture traffic with the pattern prepared

  22. Send the packet

  23. Check that no extra packets are received on Tester

  24. Verify the number of matching packets received

  25. Fail if TCP CWR flag is lost

Parameters:

tmpl

Traffic template

payload_len

Payload length

inner_ip_cksum_offload

Inner or no-tunnel IP checksum offload toggle

l4_cksum_offload

L4 checksum offload toggle

vlan_id

VLAN offload: VLAN ID (ON) or -1 (OFF)

tso_segsz

TSO: segment size > 0 (ON) or 0 (OFF)

segmentation

Mbuf segmentation pattern or an empty line