From: Thomas Monjalon <thomas@monjalon.net>
To: Dean Marx <dmarx@iol.unh.edu>
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: Wed, 16 Apr 2025 18:24:32 +0200 [thread overview]
Message-ID: <5050697.TLnPLrj5Ze@thomas> (raw)
In-Reply-To: <CABD7UXNy9yymZ0+4SfHJ9tcA9ibg1rfph8Ee1tkgPxsbJwtaGw@mail.gmail.com>
Hi,
15/04/2025 20:21, Dean Marx:
> The flow API allows for an extremely broad set of rules to be created.
> My understanding from my first pass at writing the test suite is that
> there is a small subset of those rules that are “core functionality”
> that the flow API aims to support, and there are also rules which
> technically can be created, but may not be supported by the main PMDs
> and/or may not be useful rules that people want to see tested.
>
> For instance, I am pretty confident that a rule like the one below is
> one which the community will care about, and which PMDs will support:
>
> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end
> actions drop / end
>
> But I do not know what is the full set of rules that I should be
> validating from a DTS testsuite. Is it possible for you (or anyone
> else on this mailing list) to provide some feedback on what rules are
> most important and I should include in my test suite? If I can get
> that feedback, I will draft a test plan and share it back on this
> thread for community approval before I write up and submit the DTS
> patch.
Ultimately it would be nice to test all flow items and actions.
As this is the first step of this long journey,
I agree we should focus on the minimum.
We can focus on the simple synchronous API for now,
and leave the template asynchronous API for a next step.
Let's talk about basic items and actions to test
simple forwarding rules.
Items are describing protocols.
The most common ones are:
- 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
Some header field values may be specified as well in the rule.
You probably want to test matching each field of these items,
except checksums, lengths, offsets.
The traffic direction can be specified with:
- rte_flow_attr.ingress
- rte_flow_attr.egress
The most basic actions are to specify where to forward a flow:
- RTE_FLOW_ACTION_TYPE_QUEUE
- RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- RTE_FLOW_ACTION_TYPE_RSS
- RTE_FLOW_ACTION_TYPE_DROP
Next we want to create flow rules in groups:
- rte_flow_attr.group
- rte_flow_attr.priority
and connect groups with
- RTE_FLOW_ACTION_TYPE_JUMP
The most versatile action is to modify packets (like TTL or src/dest) with
- RTE_FLOW_ACTION_TYPE_MODIFY_FIELD
I believe you should play with that first.
Any other opinions?
prev parent reply other threads:[~2025-04-16 16:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 18:21 Dean Marx
2025-04-16 16:24 ` Thomas Monjalon [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=5050697.TLnPLrj5Ze@thomas \
--to=thomas@monjalon.net \
--cc=ajit.khaparde@broadcom.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=orika@nvidia.com \
/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).