| 13cd6d5c | 23-Feb-2022 |
Alexander Kozyrev <[email protected]> |
ethdev: bring in async indirect actions operations
Queue-based flow rules management mechanism is suitable not only for flow rules creation/destruction, but also for speeding up other types of Flow
ethdev: bring in async indirect actions operations
Queue-based flow rules management mechanism is suitable not only for flow rules creation/destruction, but also for speeding up other types of Flow API management. Indirect action object operations may be executed asynchronously as well. Provide async versions for all indirect action operations, namely: rte_flow_async_action_handle_create, rte_flow_async_action_handle_destroy and rte_flow_async_action_handle_update.
Signed-off-by: Alexander Kozyrev <[email protected]> Acked-by: Ori Kam <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|
| 197e820c | 23-Feb-2022 |
Alexander Kozyrev <[email protected]> |
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
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 <[email protected]> Acked-by: Ori Kam <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|
| f076bcfb | 23-Feb-2022 |
Alexander Kozyrev <[email protected]> |
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,
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 <[email protected]> Acked-by: Ori Kam <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|
| 2edd037c | 03-Feb-2022 |
Dmitry Kozlyuk <[email protected]> |
mem: add dirty malloc element support
EAL malloc layer assumed all free elements content is filled with zeros ("clean"), as opposed to uninitialized ("dirty"). This assumption was ensured in two way
mem: add dirty malloc element support
EAL malloc layer assumed all free elements content is filled with zeros ("clean"), as opposed to uninitialized ("dirty"). This assumption was ensured in two ways: 1. EAL memalloc layer always returned clean memory. 2. Freed memory was cleared before returning into the heap.
Clearing the memory can be as slow as around 14 GiB/s. To save doing so, memalloc layer is allowed to return dirty memory. Such segments being marked with RTE_MEMSEG_FLAG_DIRTY. The allocator tracks elements that contain dirty memory using the new flag in the element header. When clean memory is requested via rte_zmalloc*() and the suitable element is dirty, it is cleared on allocation. When memory is deallocated, the freed element is joined with adjacent free elements, and the dirty flag is updated:
a) If the joint element contains dirty parts, it is dirty:
dirty + freed + dirty = dirty => no need to clean freed + dirty = dirty the freed memory
Dirty parts may be large (e.g. initial allocation), so clearing them could create unpredictable slowdown.
b) If the only dirty part of the joint element is the freed memory, the joint element can be made clean:
clean + freed + clean = clean => freed memory clean + freed = clean must be cleared freed + clean = clean freed = clean
This logic naturally reproduces the old behavior and always applies in modes when EAL memalloc layer returns only clean segments.
As a result, memory is either cleared on free, as before, or it will be cleared on allocation if need be, but never twice.
Signed-off-by: Dmitry Kozlyuk <[email protected]> Reviewed-by: Anatoly Burakov <[email protected]>
show more ...
|
| bef7c9ff | 26-Nov-2021 |
Viacheslav Ovsiienko <[email protected]> |
ethdev: announce migration to generic flow modify action
The generic RTE_FLOW_ACTION_TYPE_MODIFY_FIELD action was introduced by [1]. This action provides an unified way to perform various arithmetic
ethdev: announce migration to generic flow modify action
The generic RTE_FLOW_ACTION_TYPE_MODIFY_FIELD action was introduced by [1]. This action provides an unified way to perform various arithmetic and transfer operations over packet network header fields and packet metadata.
[1] 73b68f4c54a0 ("ethdev: introduce generic modify flow action")
On other side there are a bunch of multiple legacy actions, that can be superseded by the generic MODIFY_FIELD action:
RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL sfc RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC bnxt, cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_SET_IPV4_DST bnxt, cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_SET_IPV6_DST cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_SET_TP_SRC cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_SET_TP_DST cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_DEC_TTL mlx5, sfc RTE_FLOW_ACTION_TYPE_SET_TTL mlx5 RTE_FLOW_ACTION_TYPE_SET_MAC_SRC cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_SET_MAC_DST cxgbe, mlx5 RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ mlx5 RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ mlx5 RTE_FLOW_ACTION_TYPE_INC_TCP_ACK mlx5 RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK mlx5 RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP mlx5 RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP mlx5 RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID bnxt, cnxk, cxgbe, enic, mlx5, octeontx2, sfc RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP bnxt, cnxk, cxgbe, enic, mlx5, octeontx2, sfc RTE_FLOW_ACTION_TYPE_SET_TAG mlx5 RTE_FLOW_ACTION_TYPE_SET_META mlx5
This note deprecates the following RTE Flow actions, as not supported by any of PMDs:
RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN
The following actions are supposed to be deprecated in 22.07 and replaced by generic field modify action:
RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC RTE_FLOW_ACTION_TYPE_SET_IPV4_DST RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC RTE_FLOW_ACTION_TYPE_SET_IPV6_DST RTE_FLOW_ACTION_TYPE_SET_TP_SRC RTE_FLOW_ACTION_TYPE_SET_TP_DST RTE_FLOW_ACTION_TYPE_DEC_TTL RTE_FLOW_ACTION_TYPE_SET_TTL RTE_FLOW_ACTION_TYPE_SET_MAC_SRC RTE_FLOW_ACTION_TYPE_SET_MAC_DST RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ RTE_FLOW_ACTION_TYPE_INC_TCP_ACK RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP RTE_FLOW_ACTION_TYPE_SET_TAG RTE_FLOW_ACTION_TYPE_SET_META
The VLAN set actions are interrelated to VLAN header insertion/removal and supported by multiple PMDs and widely used by applications and not supposed to be deprecated due to potential large impact on drivers and applications.
Signed-off-by: Viacheslav Ovsiienko <[email protected]> Acked-by: Ferruh Yigit <[email protected]> Acked-by: Thomas Monjalon <[email protected]> Acked-by: Olivier Matz <[email protected]>
show more ...
|
| f3aa363d | 08-Nov-2021 |
Vladimir Medvedkin <[email protected]> |
doc: add RIB and FIB programmer guides
Currently, programmer's guide for the RIB and FIB libraries are missing. This commit adds them.
Signed-off-by: Vladimir Medvedkin <[email protected]
doc: add RIB and FIB programmer guides
Currently, programmer's guide for the RIB and FIB libraries are missing. This commit adds them.
Signed-off-by: Vladimir Medvedkin <[email protected]> Reviewed-by: Conor Walsh <[email protected]>
show more ...
|