#
ddb68e47 |
| 20-Oct-2022 |
Bing Zhao <bingz@nvidia.com> |
net/mlx5: add extended metadata mode for HWS
The new mode 4 of devarg "dv_xmeta_en" is added for HWS only. In this mode, the Rx / Tx metadata with 32b width copy between FDB and NIC is supported.
T
net/mlx5: add extended metadata mode for HWS
The new mode 4 of devarg "dv_xmeta_en" is added for HWS only. In this mode, the Rx / Tx metadata with 32b width copy between FDB and NIC is supported.
The mark is only supported in NIC and there is no copy supported.
Signed-off-by: Bing Zhao <bingz@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
1939eb6f |
| 20-Oct-2022 |
Dariusz Sosnowski <dsosnowski@nvidia.com> |
net/mlx5: support flow port action with HWS
This patch implements creating and caching of port action for use with HW Steering FDB flows.
Actions are created on flow template API configuration and
net/mlx5: support flow port action with HWS
This patch implements creating and caching of port action for use with HW Steering FDB flows.
Actions are created on flow template API configuration and created only on the port designated as the master. Attaching and detaching ports in the same switching domain causes an update to the port actions cache by, respectively, creating and destroying actions.
A new devarg fdb_def_rule_en is being added and it's used to control the default dedicated E-Switch rules that are created by the PMD implicitly or not, and PMD sets this value to 1 by default.
If set to 0, the default E-Switch rule will not be created and the user can create the specific E-Switch rules on the root table if needed.
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
17f95513 |
| 01-Mar-2022 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
net/mlx5: fix link status change detection
Sometimes net/mlx5 devices did not detect link status change to "up".
Each shared device was monitoring IBV_EVENT_PORT_{ACTIVE,ERR} and queried the link s
net/mlx5: fix link status change detection
Sometimes net/mlx5 devices did not detect link status change to "up".
Each shared device was monitoring IBV_EVENT_PORT_{ACTIVE,ERR} and queried the link status upon receiving the event. IBV_EVENT_PORT_ACTIVE is delivered when the logical link status (UP flag) is set, but the physical link status (RUNNING flag) may be down at that time, in which case the new link status would be erroneously considered down.
IBV interface is insufficient for the task. Monitor interface events using Netlink.
Fixes: 198a3c339a8f ("mlx5: handle link status interrupts") Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
c06f77ae |
| 24-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: optimize queue type checks
The RxQ/TxQ control structure has a field named type. This type is enum with values for standard and hairpin. The use of this field is to check whether the queue
net/mlx5: optimize queue type checks
The RxQ/TxQ control structure has a field named type. This type is enum with values for standard and hairpin. The use of this field is to check whether the queue is of the hairpin type or standard.
This patch replaces it with a boolean variable that saves whether it is a hairpin.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
c4b86201 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: refactor to detect operation by DevX
Add inline function indicating whether HW objects operations can be created by DevX. It makes the code more readable.
Signed-off-by: Michael Baum <mic
net/mlx5: refactor to detect operation by DevX
Add inline function indicating whether HW objects operations can be created by DevX. It makes the code more readable.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
a13ec19c |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: add shared device context config structure
Add configuration structure for shared device context. This structure contains all configurations coming from devargs which oriented to device. I
net/mlx5: add shared device context config structure
Add configuration structure for shared device context. This structure contains all configurations coming from devargs which oriented to device. It is a field of shared device context (SH) structure, and is updated once in mlx5_alloc_shared_dev_ctx() function. This structure cannot be changed when probing again, so add function to prevent it. The mlx5_probe_again_args_validate() function creates a temporary IB context configure structure according to new devargs attached in probing again, then checks the match between the temporary structure and the existing IB context configure structure.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
87af0d1e |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: concentrate all device configurations
Move all device configure to be performed by mlx5_os_cap_config() function instead of the spawn function. In addition move all relevant fields from ml
net/mlx5: concentrate all device configurations
Move all device configure to be performed by mlx5_os_cap_config() function instead of the spawn function. In addition move all relevant fields from mlx5_dev_config structure to mlx5_dev_cap.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
91d1cfaf |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: rearrange device attribute structure
Rearrange the mlx5_os_get_dev_attr() function in such a way that it first executes the queries and only then updates the fields. In addition, it change
net/mlx5: rearrange device attribute structure
Rearrange the mlx5_os_get_dev_attr() function in such a way that it first executes the queries and only then updates the fields. In addition, it changed its name in preparation for expanding its operations to configure the capabilities inside it.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
cf004fd3 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: add E-Switch mode flag
This patch adds in SH structure a flag which indicates whether is E-Switch mode. When configure "dv_esw_en" from devargs, it is enabled only when is E-switch mode. S
net/mlx5: add E-Switch mode flag
This patch adds in SH structure a flag which indicates whether is E-Switch mode. When configure "dv_esw_en" from devargs, it is enabled only when is E-switch mode. So, since dv_esw_en has been configure, it is enough to check if "dv_esw_en" is valid. This patch also removes E-Switch mode check when "dv_esw_en" is checked too.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
6dc0cbc6 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: remove DevX flag duplication
The sharing device context structure has a field named "devx" which indicates if DevX is supported. The common configure structure has also field named "devx"
net/mlx5: remove DevX flag duplication
The sharing device context structure has a field named "devx" which indicates if DevX is supported. The common configure structure has also field named "devx" with the same meaning.
There is no need for this duplication, because there is a reference to the common structure from within the sharing device context structure.
This patch removes it from sharing device context structure and uses the common config structure instead.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
53820561 |
| 14-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: remove HCA attribute structure duplication
The HCA attribute structure is field of net configure structure. It is also field of common configure structure.
There is no need for this dupli
net/mlx5: remove HCA attribute structure duplication
The HCA attribute structure is field of net configure structure. It is also field of common configure structure.
There is no need for this duplication, because there is a reference to the common structure from within the net structures.
This patch removes it from net configure structure and uses the common config structure instead.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
a41f593f |
| 11-Feb-2022 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.
These dummy functions are very simple, introduce a common function in the ethdev an
ethdev: introduce generic dummy packet burst function
Multiple PMDs have dummy/noop Rx/Tx packet burst functions.
These dummy functions are very simple, introduce a common function in the ethdev and update drivers to use it instead of each driver having its own functions.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|
#
b53d106d |
| 22-Nov-2021 |
Sean Morrissey <sean.morrissey@intel.com> |
remove repeated 'the' in the code
Remove the use of double "the" as it does not make sense.
Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com> Signed-off-by: Conor Fogart
remove repeated 'the' in the code
Remove the use of double "the" as it does not make sense.
Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com> Signed-off-by: Conor Fogarty <conor.fogarty@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com> Reviewed-by: Conor Walsh <conor.walsh@intel.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
08ac0358 |
| 19-Nov-2021 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
common/mlx5: fix mempool registration
Mempool registration was not correctly processing mempools with RTE_PKTMBUF_F_PINEND_EXT_BUF flag set ("pinned mempools" for short), because it is not known at
common/mlx5: fix mempool registration
Mempool registration was not correctly processing mempools with RTE_PKTMBUF_F_PINEND_EXT_BUF flag set ("pinned mempools" for short), because it is not known at registration time whether the mempool is a pktmbuf one, and its elements may not yet be initialized to analyze them. Attempts had been made to recognize such pools, but there was no robust solution, only the owner of a mempool (the application or a device) knows its type. This patch extends common/mlx5 registration code to accept a hint that the mempool is a pinned one and uses this capability from net/mlx5 driver.
1. Remove all code assuming pktmbuf pool type or trying to recognize the type of a pool. 2. Register pinned mempools used for Rx and their external memory on port start. Populate the MR cache with all their MRs. 3. Change Tx slow path logic as follows: 3.1. Search the mempool database for a memory region (MR) by the mbuf pool and its buffer address. 3.2. If not MR for the address is found for the mempool, and the mempool contains only pinned external buffers, perform the mempool registration of the mempool and its external pinned memory. 3.3. Fall back to using page-based MRs in other cases (for example, a buffer with externally attached memory, but not from a pinned mempool).
Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities") Fixes: fec28ca0e3a9 ("net/mlx5: support mempool registration")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Matan Azrad <matan@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
e4c402af |
| 16-Nov-2021 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
common/mlx5: fix MPRQ mempool registration
Mempool registration code had a wrong assumption that it is always dealing with packet mempools and always called rte_pktmbuf_priv_flags(), which returned
common/mlx5: fix MPRQ mempool registration
Mempool registration code had a wrong assumption that it is always dealing with packet mempools and always called rte_pktmbuf_priv_flags(), which returned a random value for different types of mempools. In particular, it could consider MPRQ mempools as having externally pinned buffers, which is wrong. Packet mempools cannot be reliably recognized, but it is sufficient to check that the mempool is not a packet one, so it cannot have externally pinned buffers. Compare mempool private data size to that of packet mempools to check.
Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities") Fixes: fec28ca0e3a9 ("net/mlx5: support mempool registration")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
5c078fce |
| 16-Nov-2021 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
net/mlx5: fix keeping indirect RSS non-isolated mode
When a port starts in non-isolated mode, an internal indirect RSS is created that includes all configured queues and a flow rule is created that
net/mlx5: fix keeping indirect RSS non-isolated mode
When a port starts in non-isolated mode, an internal indirect RSS is created that includes all configured queues and a flow rule is created that references this indirect RSS. If before switching to non-isolated mode an indirect RSS was created that includes the same set of queues, it would be reused at this point. However, because the port had been stopped (or not yet started), the TIR for this indirect RSS had been destroyed (or not yet created). The flow rule could not be created and the port start failed.
Creation of TIRs is moved before configuring non-isolated mode flows, but it is not enough because of the following issue.
Commit 0cedf34da78f ("net/mlx5: move Rx queue reference count") changed mlx5_rxq_get() not to increment RxQ control structure reference count, mlx5_rxq_ref() was introduced for this purpose. mlx5_ind_table_obj_attach() was not updated to use the new function, so when the port was stopped, the control structure reference count of an RxQ used in RSS reached zero and the structure was destroyed.
Use mlx5_rxq_ref() to keep RxQ control structure needed for indirect RSS persistence across port restart.
Fixes: ec4e11d41d12 ("net/mlx5: preserve indirect actions on restart") Fixes: 0cedf34da78f ("net/mlx5: move Rx queue reference count") Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
7297d2cd |
| 09-Nov-2021 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
common/mlx5: fix external memory pool registration
Registration of packet mempools with RTE_PKTMBUF_POOL_PINNED_EXT_MEM was performed incorrectly: after population of such mempool chunks only contai
common/mlx5: fix external memory pool registration
Registration of packet mempools with RTE_PKTMBUF_POOL_PINNED_EXT_MEM was performed incorrectly: after population of such mempool chunks only contain memory for rte_mbuf structures, while pointers to actual external memory are not yet filled. MR LKeys could not be obtained for external memory addresses of such mempools. Rx datapath assumes all used mempools are registered and does not fallback to dynamic MR creation in such case, so no packets could be received.
Skip registration of extmem pools on population because it is useless. If used for Rx, they are registered at port start. During registration, recognize such pools, inspect their mbufs and recover the pages they reside in.
While MRs for these pages may already be created by rte_dev_dma_map(), they are not reused to avoid synchronization on Rx datapath in case these MRs are changed in the database.
Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Reviewed-by: Matan Azrad <matan@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
20489176 |
| 03-Nov-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: make multi-process MR management port-agnostic
In the multi-process mechanism, there are things that the secondary process does not perform itself but asks the primary process to perfor
common/mlx5: make multi-process MR management port-agnostic
In the multi-process mechanism, there are things that the secondary process does not perform itself but asks the primary process to perform for it. There is a special API for communication between the processes that receives parameters necessary for the specific action required as well as a special structure called mp_id that contains the port number of the processes through which the initial process finds the relevant ETH device for the processes.
One of the operations performed through this mechanism is the creation of a memory region, where the secondary process sends the virtual address as a parameter and the mp_id structure with the port number inside it. However, once the memory area management is shared between the drivers and either port number or ETH device is no longer relevant to them, it seems unnecessary to continue communicating between the processes through the mp_id variable.
In this patch we will remove the use of the above structure for all MR management, and add to the specific parameter of operations a pointer to the common device that contains everything needed to create/register MR.
Fixes: 9f1d636f3ef08 ("common/mlx5: share MR management")
Signed-off-by: Michael Baum <michaelba@nvidia.com> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Reviewed-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
e8482187 |
| 05-Nov-2021 |
Bing Zhao <bingz@nvidia.com> |
net/mlx5: check delay drop settings in kernel driver
The delay drop is the common feature managed on per device basis and the kernel driver is responsible one for the initialization and rearming.
B
net/mlx5: check delay drop settings in kernel driver
The delay drop is the common feature managed on per device basis and the kernel driver is responsible one for the initialization and rearming.
By default, the timeout value is set to activate the delay drop when the driver is loaded.
A private flag "dropless_rq" is used to control the rearming. Only when it is on, the rearming will be handled once received a timeout event. Or else, the delay drop will be deactivated after the first timeout occurs and all the Rx queues won't have this feature.
The PMD is trying to query this flag and warn the application when some queues are created with delay drop but the flag is off.
Signed-off-by: Bing Zhao <bingz@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
09c25553 |
| 04-Nov-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: support shared Rx queue
This patch introduces shared RxQ. All shared Rx queues with same group and queue ID share the same rxq_ctrl. Rxq_ctrl and rxq_data are shared, all queues from diffe
net/mlx5: support shared Rx queue
This patch introduces shared RxQ. All shared Rx queues with same group and queue ID share the same rxq_ctrl. Rxq_ctrl and rxq_data are shared, all queues from different member port share same WQ and CQ, essentially one Rx WQ, mbufs are filled into this singleton WQ.
Shared rxq_data is set into device Rx queues of all member ports as RxQ object, used for receiving packets. Polling queue of any member ports returns packets of any member, mbuf->port is used to identify source port.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
5cf0707f |
| 04-Nov-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: remove Rx queue data list from device
Rx queue data list(priv->rxqs) can be replaced by Rx queue list(priv->rxq_privs), removes it and replaces with universal wrapper API.
Signed-off-by:
net/mlx5: remove Rx queue data list from device
Rx queue data list(priv->rxqs) can be replaced by Rx queue list(priv->rxq_privs), removes it and replaces with universal wrapper API.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
5ceb3a02 |
| 04-Nov-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: move Rx queue DevX resource
To support shared RX queue, moves DevX RQ which is per queue resource to Rx queue private data.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viach
net/mlx5: move Rx queue DevX resource
To support shared RX queue, moves DevX RQ which is per queue resource to Rx queue private data.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
5db77fef |
| 04-Nov-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: remove port info from shareable Rx queue
To prepare for shared Rx queue, removes port info from shareable Rx queue control.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viach
net/mlx5: remove port info from shareable Rx queue
To prepare for shared Rx queue, removes port info from shareable Rx queue control.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
44126bd9 |
| 04-Nov-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: move Rx queue hairpin info to private data
Hairpin info of Rx queue can't be shared, moves to private queue data.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsi
net/mlx5: move Rx queue hairpin info to private data
Hairpin info of Rx queue can't be shared, moves to private queue data.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
0cedf34d |
| 04-Nov-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: move Rx queue reference count
Rx queue reference count is counter of RQ, used to count reference to RQ object. To prepare for shared Rx queue, this patch moves it from rxq_ctrl to Rx queue
net/mlx5: move Rx queue reference count
Rx queue reference count is counter of RQ, used to count reference to RQ object. To prepare for shared Rx queue, this patch moves it from rxq_ctrl to Rx queue private data.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|