Simulate HW offload

Make sure that offloading traffic to a virtual function works with RTE flow API

  1. Hotplug the representor of the VF

  2. Bind kernel or DPDK driver on a VF

  3. If use_dpdk_driver :

    • Hotplug VF

  4. If not use_dpdk_driver :

    • Add VF's kernel interface and bring it up

  5. Create a big enough mempool for PF, VF and representor ports

  6. Make flow rule pattern and template

  7. Start PF, VF and representor ports

  8. Check full traffic path (IUT - representor - TST) without flow rule

  9. Make flow rule attributes with transfer and ingress or egress depending on traffic direction

  10. Direct traffic to the VF (when receiving on IUT) or to the physical port (when receiving on TST)

  11. If count :

    • Add flow rule action "count" for counter query

  12. Validate and create the flow rule

  13. For each iteration (i = 0; i < nb_pkts; i++):

    • Check the traffic from VF to TST

    • Only on the error path:

      • Check the traffic at least reached PF or representor

  14. Destroy the flow rule and check the full traffic path again

Igor Romanov Igor.Romanov@oktetlabs.ru

Parameters:

flow_rule_pattern

Flow Rule pattern

use_dpdk_driver

Use DPDK driver on VF if TRUE, use kernel driver otherwise

count

Count offloaded packets if TRUE

iut_client

TRUE - IUT is client, FALSE - IUT is server

nb_pkts

Number of offloaded packets to send