DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dean Marx <dmarx@iol.unh.edu>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: orika@nvidia.com, dev <dev@dpdk.org>,
	 Bruce Richardson <bruce.richardson@intel.com>,
	ajit.khaparde@broadcom.com
Subject: Re: Flow API Test Suite Inquiry
Date: Tue, 22 Apr 2025 16:27:39 -0400	[thread overview]
Message-ID: <CABD7UXPfQcvLt4a5YrxSUaH5NNRJzZHjHUtXs9G-jBnNkiJw8w@mail.gmail.com> (raw)
In-Reply-To: <5050697.TLnPLrj5Ze@thomas>

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

Hi Thomas,

This is very helpful. I've drafted a test plan that I believe will
work best to cover these attributes. My plan is to submit
incrementally larger tests as I go, to avoid the issues I've had in
the past when trying to write one monolithic suite that covers
everything. I will likely write a basic flow suite sometime in the
near future covering the basics, so if anyone has anything they would
like to see added based on the test plan, let me know in this thread
and I'll make sure to add it.

[-- Attachment #2: RTE Flow Test Plan DTS.txt --]
[-- Type: text/plain, Size: 8184 bytes --]

RTE Flow Test Plan DTS

This plan aims to cover testing of all synchronous Flow API functionality, including the following:

Patterns

- RTE_FLOW_ITEM_TYPE_ETH
- RTE_FLOW_ITEM_TYPE_IPV4 / RTE_FLOW_ITEM_TYPE_IPV6
- RTE_FLOW_ITEM_TYPE_UDP
- RTE_FLOW_ITEM_TYPE_TCP
- RTE_FLOW_ITEM_TYPE_VLAN

Actions

- RTE_FLOW_ACTION_TYPE_QUEUE
- RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- RTE_FLOW_ACTION_TYPE_RSS
- RTE_FLOW_ACTION_TYPE_DROP
- RTE_FLOW_ACTION_TYPE_MODIFY_FIELD

Grouping

- rte_flow_attr.group
- rte_flow_attr.priority
- RTE_FLOW_ACTION_TYPE_JUMP

--------------------------------------------------------------------------------------------------

Prerequisites:

Two link port topology
Flow control capabilities
4 Tx queues for queue action cases
Tx only forward mode for egress case
	
--------------------------------------------------------------------------------------------------

Queue Action Eth

flow create 0 ingress pattern eth src is 02:00:00:00:00:00 / end actions queue index 1 / end
flow create 0 ingress pattern eth dst is 02:00:00:00:00:00 / end actions queue index 1 / end
flow create 0 ingress pattern eth type is 0x0800 / end actions queue index 1 / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify queue stats show a packet was received.
	
--------------------------------------------------------------------------------------------------

Queue Action IPv4/IPv6

flow create 0 ingress pattern ipv4 src is 192.0.2.0 / end actions queue index 1 / end
flow create 0 ingress pattern ipv4 dst is 192.0.2.0 / end actions queue index 1 / end
flow create 0 ingress pattern ipv4 next_proto_id is 6 / end actions queue index 1 / end
flow create 0 ingress pattern ipv4 ttl is 64 / end actions queue index 1 / end
flow create 0 ingress pattern ipv6 src is 2001:db8::1 / end actions queue index 1 / end
flow create 0 ingress pattern ipv6 dst is 2001:db8::2 / end actions queue index 1 / end
flow create 0 ingress pattern ipv6 proto is 17 / end actions queue index 1 / end
flow create 0 ingress pattern ipv6 hop_limits is 128 / end actions queue index 1 / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify queue stats show a packet was received.
	
--------------------------------------------------------------------------------------------------

Queue Action TCP/UDP

flow create 0 ingress pattern tcp src is 1234 / end actions queue index 1 / end
flow create 0 ingress pattern tcp dst is 80 / end actions queue index 1 / end
flow create 0 ingress pattern tcp flags is 0x02 / end actions queue index 1 / end
flow create 0 ingress pattern udp src is 5000 / end actions queue index 1 / end
flow create 0 ingress pattern udp dst is 53 / end actions queue index 1 / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify queue stats show a packet was received.
	
--------------------------------------------------------------------------------------------------

Queue Action VLAN

flow create 0 ingress pattern vlan tci is 0x0064 mask 0x0fff / end actions queue index 1 / end
flow create 0 ingress pattern vlan inner_type is 0x0800 / end actions queue index 1 / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify queue stats show a packet was received.
	
--------------------------------------------------------------------------------------------------

Drop Action Eth

flow create 0 ingress pattern eth src is 02:00:00:00:00:00 / end actions drop / end
flow create 0 ingress pattern eth dst is 02:00:00:00:00:00 / end actions drop / end
flow create 0 ingress pattern eth type is 0x0800 / end actions drop / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify sent packet is not received.
	
--------------------------------------------------------------------------------------------------

Drop Action IPv4/IPv6

flow create 0 ingress pattern ipv4 src is 192.0.2.0 / end actions drop / end
flow create 0 ingress pattern ipv4 dst is 192.0.2.0 / end actions drop / end
flow create 0 ingress pattern ipv4 next_proto_id is 6 / end actions drop / end
flow create 0 ingress pattern ipv4 ttl is 64 / end actions drop / end
flow create 0 ingress pattern ipv6 src is 2001:db8::1 / end actions drop / end
flow create 0 ingress pattern ipv6 dst is 2001:db8::2 / end actions drop / end
flow create 0 ingress pattern ipv6 proto is 17 / end actions drop / end
flow create 0 ingress pattern ipv6 hop_limits is 128 / end actions drop / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify sent packet is not received.
	
--------------------------------------------------------------------------------------------------

Drop Action TCP/UDP

flow create 0 ingress pattern tcp src is 1234 / end actions drop / end
flow create 0 ingress pattern tcp dst is 80 / end actions drop / end
flow create 0 ingress pattern tcp flags is 0x02 / end actions drop / end
flow create 0 ingress pattern udp src is 5000 / end actions drop / end
flow create 0 ingress pattern udp dst is 53 / end actions drop / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify sent packet is not received.
	
--------------------------------------------------------------------------------------------------

Drop Action VLAN 

flow create 0 ingress pattern vlan tci is 0x0064 mask 0x0fff / end actions drop / end
flow create 0 ingress pattern vlan inner_type is 0x0800 / end actions drop / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify sent packet is not received.
	
--------------------------------------------------------------------------------------------------

Modify Field Action

// rule to copy IPv4 src to IPv4 dst
flow create 0 ingress group 1 pattern eth / end actions modify_field op set dst_type ipv4_dst src_type ipv4_src width 32 / count / rss / end
// rule to copy src MAC to dst MAC
flow create 0 ingress group 1 pattern eth / end actions modify_field op set dst_type mac_dst src_type mac_src width 48 / count / rss / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify packet is received with the new attributes.
	
--------------------------------------------------------------------------------------------------

Egress rules

flow create 0 egress pattern eth src is 02:00:00:00:00:00 / end actions drop / end
flow create 0 egress pattern ipv4 src is 192.0.2.0 / end actions drop / end
flow create 0 egress pattern tcp src is 1234 / end actions drop / end
flow create 0 egress pattern udp src is 5000 / end actions drop / end
flow create 0 egress pattern vlan tci is 0x0064 mask 0x0fff / end actions drop / end

Steps:
	Start testpmd with 4 Tx queues and create first flow rule.
	Send test packet that matches the flow rule pattern.
	Destroy flow rule, repeat steps for all rules.
Verify:
	Verify packet is dropped.
	
--------------------------------------------------------------------------------------------------
	
RSS test cases are omitted from this test plan, as they will be written later once
the RSS test suites are finished to avoid redundant test coverage.

Represented port, group, and priority test cases will be added later in development.



      reply	other threads:[~2025-04-22 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 18:21 Dean Marx
2025-04-16 16:24 ` Thomas Monjalon
2025-04-22 20:27   ` Dean Marx [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABD7UXPfQcvLt4a5YrxSUaH5NNRJzZHjHUtXs9G-jBnNkiJw8w@mail.gmail.com \
    --to=dmarx@iol.unh.edu \
    --cc=ajit.khaparde@broadcom.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).