Rx checksum offload sanity checkΒΆ

Make sure that valid Rx checksum flags are put into mbufs

The test receives one packet with valid checksums and one with wrong. Then checksum status is verified for the packets by means of peeking at the mbuf checksum flags.

  1. Make a copy of the template to be used for bad checksum testing

  2. Inspect the 2nd template to discover outer and inner (if any) PDUs

  3. Spoil checksums in the outer PDUs of the 2nd template and make notes on the standard checksum flags which _could be expected

  4. Spoil checksums in the inner PDUs of the 2nd template and make notes on the standard checksum flags which _could be expected

  5. Prepare TEST_ETHDEV_INITIALIZED state

  6. Check the capabilities and adjust the expectations of checksum flags

  7. Toggle Rx checksum offload feature based on rx_ol_cksum

  8. Prepare TEST_ETHDEV_STARTED state

  9. Configure tunnel UDP port number if need be

  10. Enable promiscuous mode if supported

  11. Ensure that interface is UP on Tester side

  12. Transmit both packets and get the corresponding patterns

  13. Capture and recognise both packets

  14. Make note on the tunnel type value detected by the PMD

  15. Retrieve offload flags from the two mbufs

  16. Make sure that NONE flags are unset for the packets

  17. Determine what flags (for outer or inner PDUs) must be checked and verify external IP BAD checksum flag in the case of tunnel

Parameters:

tmpl

Traffic template

rx_ol_cksum

Rx checksum offload toggle