| 93e1ea6d | 06-Apr-2022 |
Huisong Li <[email protected]> |
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag is not set in dev_configure, RSS will be not configured and enabled. However, RSS h
ethdev: fix RSS update when RSS is disabled
The RTE_ETH_MQ_RX_RSS_FLAG flag is a switch to enable RSS. If the flag is not set in dev_configure, RSS will be not configured and enabled. However, RSS hash and reta can still be configured by ethdev ops to enable RSS if the flag isn't set. The behavior is inconsistent.
Fixes: 99a2dd955fba ("lib: remove librte_ prefix from directory names") Cc: [email protected]
Signed-off-by: Huisong Li <[email protected]> Signed-off-by: Min Hu (Connor) <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
| 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 ...
|
| 4b4f810e | 11-Feb-2022 |
Ferruh Yigit <[email protected]> |
ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and library, these APIs are declared in the rte_ethdev.h public header. Other in
ethdev: move driver interface functions to its own file
ethdev has two interfaces, one interface between applications and library, these APIs are declared in the rte_ethdev.h public header. Other interface is between drivers and library, these functions are declared in ethdev_driver.h and marked as internal.
But all functions are defined in rte_ethdev.c file. This patch moves functions for drivers to its own file, ethdev_driver.c for cleanup, no functional change in functions.
Some public APIs and driver helpers call common internal functions, which were mostly static since both were in same file. To be able to move driver helpers, common functions are moved to ethdev_private.c. (ethdev_private.c is used for functions that are internal to the library and shared by multiple .c files in the ethdev library.)
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
show more ...
|
| 3c059b2c | 08-Feb-2022 |
Akhil Goyal <[email protected]> |
ethdev: add mbuf dynfield for incomplete IP reassembly
Hardware IP reassembly may be incomplete for multiple reasons like reassembly timeout reached, duplicate fragments, etc. To save application cy
ethdev: add mbuf dynfield for incomplete IP reassembly
Hardware IP reassembly may be incomplete for multiple reasons like reassembly timeout reached, duplicate fragments, etc. To save application cycles to process these packets again, a new mbuf dynflag is added to show that the mbuf received is not reassembled properly.
Now if this dynflag is set, application can retrieve corresponding chain of mbufs using mbuf dynfield set by the PMD. Now, it will be up to application to either drop those fragments or wait for more time.
Signed-off-by: Akhil Goyal <[email protected]>
show more ...
|
| a75ab6e5 | 08-Feb-2022 |
Akhil Goyal <[email protected]> |
ethdev: introduce IP reassembly offload
IP Reassembly is a costly operation if it is done in software. The operation becomes even more costlier if IP fragments are encrypted. However, if it is offlo
ethdev: introduce IP reassembly offload
IP Reassembly is a costly operation if it is done in software. The operation becomes even more costlier if IP fragments are encrypted. However, if it is offloaded to HW, it can considerably save application cycles.
Hence, a new offload feature is exposed in eth_dev ops for devices which can attempt IP reassembly of packets in hardware. - rte_eth_ip_reassembly_capability_get() - to get the maximum values of reassembly configuration which can be set. - rte_eth_ip_reassembly_conf_set() - to set IP reassembly configuration and to enable the feature in the PMD (to be called before rte_eth_dev_start()). - rte_eth_ip_reassembly_conf_get() - to get the current configuration set in PMD.
Now when the offload is enabled using rte_eth_ip_reassembly_conf_set(), the resulting reassembled IP packet would be a typical segmented mbuf in case of success.
And if reassembly of IP fragments is failed or is incomplete (if fragments do not come before the reass_timeout, overlap, etc), the mbuf dynamic flags can be updated by the PMD. This is updated in a subsequent patch.
Signed-off-by: Akhil Goyal <[email protected]>
show more ...
|
| 0de345e9 | 08-Feb-2022 |
Jerin Jacob <[email protected]> |
ethdev: support queue-based priority flow control
Based on device support and use-case need, there are two different ways to enable PFC. The first case is the port level PFC configuration, in this c
ethdev: support queue-based priority flow control
Based on device support and use-case need, there are two different ways to enable PFC. The first case is the port level PFC configuration, in this case, rte_eth_dev_priority_flow_ctrl_set() API shall be used to configure the PFC, and PFC frames will be generated using based on VLAN TC value.
The second case is the queue level PFC configuration, in this case, Any packet field content can be used to steer the packet to the specific queue using rte_flow or RSS and then use rte_eth_dev_priority_flow_ctrl_queue_configure() to configure the TC mapping on each queue. Based on congestion selected on the specific queue, configured TC shall be used to generate PFC frames.
Signed-off-by: Jerin Jacob <[email protected]> Signed-off-by: Sunil Kumar Kori <[email protected]> Reviewed-by: Ferruh Yigit <[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 ...
|