]> git.droids-corp.org - dpdk.git/commit
ethdev: add flow item/action templates
authorAlexander Kozyrev <akozyrev@nvidia.com>
Wed, 23 Feb 2022 03:02:31 +0000 (05:02 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 24 Feb 2022 13:04:47 +0000 (14:04 +0100)
commitf076bcfbcf1dac45d42f3fa77db6a2ef7f93e15f
treeeacaf457b349ba1fc51102ef97546f8eb4ebf492
parent4ff58b734bc96fa5ef28a9b6b8a58db56de914f5
ethdev: add flow item/action templates

Treating every single flow rule as a completely independent and separate
entity negatively impacts the flow rules insertion rate. Oftentimes in an
application, many flow rules share a common structure (the same item mask
and/or action list) so they can be grouped and classified together.
This knowledge may be used as a source of optimization by a PMD/HW.

The pattern template defines common matching fields (the item mask) without
values. The actions template holds a list of action types that will be used
together in the same rule. The specific values for items and actions will
be given only during the rule creation.

A table combines pattern and actions templates along with shared flow rule
attributes (group ID, priority and traffic direction). This way a PMD/HW
can prepare all the resources needed for efficient flow rules creation in
the datapath. To avoid any hiccups due to memory reallocation, the maximum
number of flow rules is defined at the table creation time.

The flow rule creation is done by selecting a table, a pattern template
and an actions template (which are bound to the table), and setting unique
values for the items and actions.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
doc/guides/prog_guide/rte_flow.rst
doc/guides/rel_notes/release_22_03.rst
lib/ethdev/rte_flow.c
lib/ethdev/rte_flow.h
lib/ethdev/rte_flow_driver.h
lib/ethdev/version.map