rte_flow Test Suite

RTE Flow testing suite.

This suite verifies a range of flow rules built using patterns and actions from the RTE Flow API. It would be impossible to cover every valid flow rule, but this suite aims to test the most important and common functionalities across PMDs.

class TestRteFlow

Bases: TestSuite

RTE Flow test suite.

This suite consists of 12 test cases: 1. Queue Action Ethernet: Verifies queue actions with ethernet patterns 2. Queue Action IP: Verifies queue actions with IPv4 and IPv6 patterns 3. Queue Action L4: Verifies queue actions with TCP and UDP patterns 4. Queue Action VLAN: Verifies queue actions with VLAN patterns 5. Drop Action Eth: Verifies drop action with ethernet patterns 6. Drop Action IP: Verifies drop actions with IPV4 and IPv6 patterns 7. Drop Action L4: Verifies drop actions with TCP and UDP patterns 8. Drop Action VLAN: Verifies drop actions with VLAN patterns 9. Modify Field Action: Verifies packet modification patterns 10. Egress Rules: Verifies previously covered rules are still valid as egress 11. Jump Action: Verifies packet behavior given grouped flows 12. Priority Attribute: Verifies packet behavior given flows with different priorities

queue_action_ETH() None

Validate flow rules with queue actions and ethernet patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Each packet is received on the appropriate queue.

queue_action_IP() None

Validate flow rules with queue actions and IPv4/IPv6 patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Each packet is received on the appropriate queue.

queue_action_L4() None

Validate flow rules with queue actions and TCP/UDP patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Each packet is received on the appropriate queue.

queue_action_VLAN() None

Validate flow rules with queue actions and VLAN patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Each packet is received on the appropriate queue.

drop_action_ETH() None

Validate flow rules with drop actions and ethernet patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Packet is dropped.

One packet will be sent as a confidence check, to ensure packets are being received under normal circumstances.

drop_action_IP() None

Validate flow rules with drop actions and ethernet patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Packet is dropped.

One packet will be sent as a confidence check, to ensure packets are being received under normal circumstances.

drop_action_L4() None

Validate flow rules with drop actions and ethernet patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Packet is dropped.

One packet will be sent as a confidence check, to ensure packets are being received under normal circumstances.

drop_action_VLAN() None

Validate flow rules with drop actions and ethernet patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Packet is dropped.

One packet will be sent as a confidence check, to ensure packets are being received under normal circumstances.

modify_actions() None

Validate flow rules with actions that modify that packet during transmission.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Verify packet is received with the new attributes.

egress_rules() None

Validate flow rules with egress directions.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Packet is dropped.

One packet will be sent as a confidence check, to ensure packets are being received under normal circumstances.

jump_action() None

Validate flow rules with different group levels and jump actions.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd with the necessary configuration.

  • Create each flow rule in testpmd.

  • Send each packet in the list, check Rx queue ID.

Verify:
  • Check that each packet is received on the appropriate Rx queue.

priority_attribute() None

Validate flow rules with queue actions and ethernet patterns.

Steps:
  • Create a list of packets to test, with a corresponding flow list.

  • Launch testpmd.

  • Create first flow rule in flow list.

  • Send first packet in packet list, capture verbose output.

  • Delete flow rule, repeat for all flows/packets.

Verify:
  • Each packet is received on the appropriate queue.

required_capabilities: ClassVar[set[Capability]] = {27}

The capabilities the test case or suite requires in order to be executed.