Test RTE flow API VLAN ID matchingΒΆ

Make sure that RTE flow API VLAN ID matching is carried out correctly

  1. Prepare TEST_ETHDEV_STARTED state

  2. Substisute environment bindings in flow_rule_pattern

  3. Set NIC MAC address in pattern if promiscuous is disabled

  4. Make flow rule attributes with only one "ingress" attribute

  5. Make the TCI mask of flow_rule_pattern do not cover non VLAN ID bits

  6. Get the VLAN ID value from flow_rule_pattern

  7. Make two flow rule patterns from flow_rule_pattern: one that has non VLAN ID bits set, another that has these bits cleared. Both patterns have the same VLAN ID

  8. Make flow rule actions with only one "drop" action

  9. Validate and create flow rule with non VLAN ID bits cleared

  10. Prepare template with non VLAN ID bits cleared that matches the filter

  11. Prepare template with different VLAN ID which does not match the filter

  12. Prepare template with non VLAN ID bits set which should still match the filter

  13. Prepare template with different VLAN ID and non VLAN ID bits set which does not match the filter

  14. Enable promiscuous mode if need be

    • Transmit packets with match template. Check that the packets were dropped.

    • Transmit and receive packets with dissimilar templates. Check that packets were received.

    • Destroy the flow rule

    • Validate and create flow rule with non VLAN ID bits set

    • Check that the same packets are received or dropped as before

Parameters:

flow_rule_pattern

Flow rule pattern that must have VLAN ID match

promisc

Test with promiscuous mode enabled if TRUE