]> git.droids-corp.org - dpdk.git/commit
ethdev: bring in async queue-based flow rules operations
authorAlexander Kozyrev <akozyrev@nvidia.com>
Wed, 23 Feb 2022 03:02:32 +0000 (05:02 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 24 Feb 2022 13:04:47 +0000 (14:04 +0100)
commit197e820c6685993ad75387de79707c81b5e1fc10
tree9384c8c866ea19599e32efc1f7d6ffccaec5d2f6
parentf076bcfbcf1dac45d42f3fa77db6a2ef7f93e15f
ethdev: bring in async queue-based flow rules operations

A new, faster, queue-based flow rules management mechanism is needed for
applications offloading rules inside the datapath. This asynchronous
and lockless mechanism frees the CPU for further packet processing and
reduces the performance impact of the flow rules creation/destruction
on the datapath. Note that queues are not thread-safe and the queue
should be accessed from the same thread for all queue operations.
It is the responsibility of the app to sync the queue functions in case
of multi-threaded access to the same queue.

The rte_flow_async_create() function enqueues a flow creation to the
requested queue. It benefits from already configured resources and sets
unique values on top of item and action templates. A flow rule is enqueued
on the specified flow queue and offloaded asynchronously to the hardware.
The function returns immediately to spare CPU for further packet
processing. The application must invoke the rte_flow_pull() function
to complete the flow rule operation offloading, to clear the queue, and to
receive the operation status. The rte_flow_async_destroy() function
enqueues a flow destruction to the requested queue.

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/img/rte_flow_async_init.svg [new file with mode: 0644]
doc/guides/prog_guide/img/rte_flow_async_usage.svg [new file with mode: 0644]
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