#
ec4e11d4 |
| 02-Nov-2021 |
Dmitry Kozlyuk <dkozlyuk@nvidia.com> |
net/mlx5: preserve indirect actions on restart
MLX5 PMD uses reference counting to manage RX queue resources. After port stop shared RSS actions kept references to RX queues, preventing resource rel
net/mlx5: preserve indirect actions on restart
MLX5 PMD uses reference counting to manage RX queue resources. After port stop shared RSS actions kept references to RX queues, preventing resource release. As a result, internal PMD mempool for such queues had been exhausted after a number of port restarts. Diagnostic message from rte_eth_dev_start():
Rx queue allocation failed: Cannot allocate memory
Dereference RX queues used by indirect actions on port stop (detach) and restore references on port start (attach) in order to allow RX queue resource release, but keep indirect RSS across the port restart. Replace queue IDs in HW by drop queue ID on detach and restore actual queue IDs on attach.
When the port is stopped, create indirect RSS in the detached state. As a result, MLX5 PMD is able to keep all its indirect actions across port restart. Advertise this capability.
Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action") Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to have 'rte_eth' prefix.
All internal components switched to using new names.
Syntax fixed on lines that this patch touches.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Wisam Jaddo <wisamm@nvidia.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
#
56bb3c84 |
| 21-Jul-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: reduce PCI dependency
To support more bus types, remove PCI dependency where possible.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.c
net/mlx5: reduce PCI dependency
To support more bus types, remove PCI dependency where possible.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
10eaf41d |
| 05-Jul-2021 |
Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> |
ethdev: keep count of representor ranges in API
In its current state, the API can overflow the user-passed buffer if a new representor range appears between function calls.
In order to solve this p
ethdev: keep count of representor ranges in API
In its current state, the API can overflow the user-passed buffer if a new representor range appears between function calls.
In order to solve this problem, augment the representor info structure with the numbers of allocated and initialized ranges. This way the users of this structure can be sure they will not overrun the buffer.
Fixes: 85e1588ca72f ("ethdev: add API to get representor info") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Xueming Li <xuemingl@nvidia.com>
show more ...
|
#
377b69fb |
| 12-Apr-2021 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: separate Tx function declarations to another file
This patch separates Tx function declarations to different header file in preparation for removing their implementation from the source fi
net/mlx5: separate Tx function declarations to another file
This patch separates Tx function declarations to different header file in preparation for removing their implementation from the source file and as an optional preparation for Tx cleanup.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
151cbe3a |
| 12-Apr-2021 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: separate Rx function declarations to another file
The mlx5_rxtx.c file contains a lot of Tx burst functions, each of those is performance-optimized for the specific set of requested offloa
net/mlx5: separate Rx function declarations to another file
The mlx5_rxtx.c file contains a lot of Tx burst functions, each of those is performance-optimized for the specific set of requested offloads. These ones are generated on the basis of the template function and it takes significant time to compile, just due to a large number of giant functions generated in the same file and this compilation is not being done in parallel with using multithreading.
Therefore we can split the mlx5_rxtx.c file into several separate files to allow different functions to be compiled simultaneously. In this patch, we separate Rx function declarations to different header file in preparation for removing them from the source file and as an optional preparation step for further consolidation of Rx burst functions.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
91766fae |
| 28-Mar-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: probe host PF representor with sub-function
To simplify BlueField HPF representor(vf[-1]) probe, this patch allows probe it with "sf" syntax: "sf[-1]".
Signed-off-by: Xueming Li <xuemingl
net/mlx5: probe host PF representor with sub-function
To simplify BlueField HPF representor(vf[-1]) probe, this patch allows probe it with "sf" syntax: "sf[-1]".
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
f5f4c482 |
| 28-Mar-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: save bonding member ports information
Since kernel bonding netdev doesn't provide statistics counter that reflects all member ports, PMD has to manually summarize counters from each member
net/mlx5: save bonding member ports information
Since kernel bonding netdev doesn't provide statistics counter that reflects all member ports, PMD has to manually summarize counters from each member ports.
As a preparation, this patch collects bonding member port information and saves to shared context data.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
f926cce3 |
| 28-Mar-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: refactor bonding representor probing
To probe representor on 2nd PF of kernel bonding device, had to specify PF1 BDF in devarg: <PF1_BDF>,representor=0 When closing bonding device, all r
net/mlx5: refactor bonding representor probing
To probe representor on 2nd PF of kernel bonding device, had to specify PF1 BDF in devarg: <PF1_BDF>,representor=0 When closing bonding device, all representors had to be closed together and this implies all representors have to use primary PF of bonding device. So after probing representor port on 2nd PF, when locating new probed device using device argument, the filter used 2nd PF as PCI address and failed to locate new device.
Conflict happened by using current representor devargs: - Use PCI BDF to specify representor owner PF - Use PCI BDF to locate probed representor device. - PMD uses primary PCI BDF as PCI device.
To resolve such conflicts, new representor syntax is introduced here: <primary BDF>,representor=pfXvfY All representors must use primary PF as owner PCI device, PMD internally locate owner PCI address by checking representor "pfX" part. To EAL, all representors are registered to primary PCI device, the 2nd PF is hidden to EAL, thus all search should be consistent.
Same to VF representor, HPF (host PF on BlueField) uses same syntax to probe, example: representor=pf1vf[0-3,-1]
This patch also adds pf index into kernel bonding representor port name: <BDF>_<ib_name>_representor_pf<X>vf<Y>
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
cb95feef |
| 28-Mar-2021 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: support sub-function representor
This patch adds support for SF representor. Similar to VF representor, switch port name of SF representor in phys_port_name sysfs key is "pf<x>sf<y>".
Dev
net/mlx5: support sub-function representor
This patch adds support for SF representor. Similar to VF representor, switch port name of SF representor in phys_port_name sysfs key is "pf<x>sf<y>".
Device representor argument is "representors=sf[list]", list member could be mix of instance and range. Example: representors=sf[0,2,4,8-12,-1]
To probe VF representor and SF representor, need to separate into 2 devices: -a <BDF>,representor=vf[list] -a <BDF>,representor=sf[list]
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
df96fd0d |
| 29-Jan-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed.
Signed-off-by:
ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are for drivers only and should be a private to DPDK and not installed.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Steven Webster <steven.webster@windriver.com>
show more ...
|
#
ddb03843 |
| 11-Dec-2020 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
net/mlx5: fix buffer split offload advertising
The buffer split Rx offload is not compatible with Multi-Packet Receiving Queue (MPRQ) Rx offload, hence, the buffer split offload flag RTE_ETH_RX_OFFL
net/mlx5: fix buffer split offload advertising
The buffer split Rx offload is not compatible with Multi-Packet Receiving Queue (MPRQ) Rx offload, hence, the buffer split offload flag RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT and other related values should be advertised only if there is no MPRQ engaged.
Fixes: 6c8f7f1c1877 ("net/mlx5: report Rx buffer split capabilities") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Reviewed-by: Asaf Penso <asafp@nvidia.com>
show more ...
|
#
cdbdcd46 |
| 04-Nov-2020 |
Dong Zhou <dongzhou@nvidia.com> |
net/mlx5: fix switch port id when representor in bonding
In the bonding configurations the port switch id for representors was composed of pf index in bonding as the 1 MSB and the representor's inde
net/mlx5: fix switch port id when representor in bonding
In the bonding configurations the port switch id for representors was composed of pf index in bonding as the 1 MSB and the representor's index as the remaining 15 LSBs. The special corner case for the host PF representor on BF setups with representor id 0xFFFF was missed as well.
The new switch port id consists of 4 MSBs for the pf bonding index and the remaining 12 LSBs for the representor index. The switch port id ranges for each type of representors are as follows:
Uplink representor(AKA master): 0xFFFF Host PF representor: 0x<pf_bond>FFF VF representor: 0x<pf_bond>[0-FFE]
Fixes: bee57a0a3565 ("net/mlx5: update switch port id in bonding configuration") Cc: stable@dpdk.org
Signed-off-by: Dong Zhou <dongzhou@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
6db1fde3 |
| 27-Oct-2020 |
Alexander Kozyrev <akozyrev@mellanox.com> |
net/mlx: do not enforce RSS hash offload
Rx RSS hash offload should be controlled by the user and should not be enforced by RSS multi-queue Rx mode.
Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS
net/mlx: do not enforce RSS hash offload
Rx RSS hash offload should be controlled by the user and should not be enforced by RSS multi-queue Rx mode.
Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities") Cc: stable@dpdk.org
Author: Andrew Rybchenko <arybchenko@solarflare.com> Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
b5c8b3e7 |
| 27-Oct-2020 |
Alexander Kozyrev <akozyrev@nvidia.com> |
net/mlx5: use C11 atomics for RxQ/TxQ refcounts
The rte_atomic API is deprecated and needs to be replaced with C11 atomic builtins. Use the relaxed ordering for RxQ/TxQ refcounts.
Signed-off-by: Al
net/mlx5: use C11 atomics for RxQ/TxQ refcounts
The rte_atomic API is deprecated and needs to be replaced with C11 atomic builtins. Use the relaxed ordering for RxQ/TxQ refcounts.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
6c8f7f1c |
| 26-Oct-2020 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
net/mlx5: report Rx buffer split capabilities
Add rte_eth_dev_info->rx_seg_capa parameters: - receiving to multiple pools is supported - buffer offsets are supported - no offset alignment requ
net/mlx5: report Rx buffer split capabilities
Add rte_eth_dev_info->rx_seg_capa parameters: - receiving to multiple pools is supported - buffer offsets are supported - no offset alignment requirement - reports the maximal number of segments - reports the buffer split offload flag
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
0f20acbf |
| 21-Oct-2020 |
Alexander Kozyrev <akozyrev@nvidia.com> |
net/mlx5: implement vectorized MPRQ burst
MPRQ (Multi-Packet Rx Queue) processes one packet at a time using simple scalar instructions. MPRQ works by posting a single large buffer (consisted of mult
net/mlx5: implement vectorized MPRQ burst
MPRQ (Multi-Packet Rx Queue) processes one packet at a time using simple scalar instructions. MPRQ works by posting a single large buffer (consisted of multiple fixed-size strides) in order to receive multiple packets at once on this buffer. A Rx packet is then copied to a user-provided mbuf or PMD attaches the Rx packet to the mbuf by the pointer to an external buffer.
There is an opportunity to speed up the packet receiving by processing 4 packets simultaneously using SIMD (single instruction, multiple data) extensions. Allocate mbufs in batches for every MPRQ buffer and process the packets in groups of 4 until all the strides are exhausted. Then switch to another MPRQ buffer and repeat the process over again.
The vectorized MPRQ burst routine is engaged automatically in case the mprq_en=1 devarg is specified and the vectorization is not disabled explicitly by providing rx_vec_en=0 devarg. There is a limitation: LRO is not supported and scalar MPRQ is selected if it is on.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
af270529 |
| 02-Nov-2020 |
Thomas Monjalon <thomas@monjalon.net> |
ethdev: include mbuf registration in Tx timestamp API
Previously, the Tx timestamp field and flag were registered in testpmd, as described in mlx5 guide. For consistency between Rx and Tx timestamps
ethdev: include mbuf registration in Tx timestamp API
Previously, the Tx timestamp field and flag were registered in testpmd, as described in mlx5 guide. For consistency between Rx and Tx timestamps, managing mbuf registrations inside the driver, as properly documented, is a simpler expectation.
The only driver to support this feature (mlx5) is updated as well as the testpmd application.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Olivier Matz <olivier.matz@6wind.com>
show more ...
|
#
c21e5fac |
| 15-Sep-2020 |
Xueming Li <xuemingl@nvidia.com> |
net/mlx5: use bond index for netdev operations
In case of bonding, device ifindex was detected as the PF ifindex, so any operation using ifindex applied to PF instead of the bond device. These opera
net/mlx5: use bond index for netdev operations
In case of bonding, device ifindex was detected as the PF ifindex, so any operation using ifindex applied to PF instead of the bond device. These operations includes MTU get/set, up/down and mac address manipulation, etc.
This patch detects bond interface ifindex and name for PF that join a bond interface, uses it by default for netdev operations.
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
b00f7603 |
| 13-Sep-2020 |
Michael Baum <michaelba@nvidia.com> |
net/mlx5: fix hairpin dependency on destination DevX TIR
The PMD supports hairpin only if DevX is supported and DV flow is enabled.
When destination DevX TIR is not supported, the PMD tries to crea
net/mlx5: fix hairpin dependency on destination DevX TIR
The PMD supports hairpin only if DevX is supported and DV flow is enabled.
When destination DevX TIR is not supported, the PMD tries to create TIR action, and fails.
Avoid supporting hairpin when destination DevX TIR is not supported.
Fixes: b6b3bf86bd1a ("net/mlx5: get hairpin capabilities") Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
83c2047c |
| 28-Jun-2020 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: convert control path memory to unified malloc
This commit allocates the control path memory from unified malloc function.
The objects be changed:
1. hlist; 2. rss key; 3. vlan vmwa; 4. i
net/mlx5: convert control path memory to unified malloc
This commit allocates the control path memory from unified malloc function.
The objects be changed:
1. hlist; 2. rss key; 3. vlan vmwa; 4. indexed pool; 5. fdir objects; 6. meter profile; 7. flow counter pool; 8. hrxq and indirect table; 9. flow object cache resources; 10. temporary resources in flow create;
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
1256805d |
| 10-Jun-2020 |
Ophir Munk <ophirmu@mellanox.com> |
net/mlx5: move Linux-specific functions
File mlx5_ethdev.c is partially moved to linux/mlx5_ethdev_os.c for functions which are Linux specific. Functions which are Linux agnostics remain in mlx5_eth
net/mlx5: move Linux-specific functions
File mlx5_ethdev.c is partially moved to linux/mlx5_ethdev_os.c for functions which are Linux specific. Functions which are Linux agnostics remain in mlx5_ethdev.c file.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
e85f623e |
| 03-Jun-2020 |
Ophir Munk <ophirmu@mellanox.com> |
net/mlx5: remove attributes dependency on Verbs
Define 'struct mlx5_dev_attr' which is ibv and dv independent. It contains attribute that were originally contained in 'struct ibv_device_attr_ex' and
net/mlx5: remove attributes dependency on Verbs
Define 'struct mlx5_dev_attr' which is ibv and dv independent. It contains attribute that were originally contained in 'struct ibv_device_attr_ex' and 'struct mlx5dv_context dv_attr'. Add a new API mlx5_os_get_dev_attr() which fills in the new defined struct.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
6e88bc42 |
| 03-Jun-2020 |
Ophir Munk <ophirmu@mellanox.com> |
net/mlx5: rename Verbs shared object
Replace all 'mlx5_ibv_shared' appearances with 'mlx5_dev_ctx_shared'.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
|
#
33860cfa |
| 28-May-2020 |
Suanming Mou <suanmingm@mellanox.com> |
net/mlx5: fix interrupt installation timing
Currently, the DevX counter query works asynchronously with Devx interrupt handler return the query result. When port closes, the interrupt handler will b
net/mlx5: fix interrupt installation timing
Currently, the DevX counter query works asynchronously with Devx interrupt handler return the query result. When port closes, the interrupt handler will be uninstalled and the Devx comp obj will also be destroyed. Meanwhile the query is still not cancelled.
In this case, counter query may use the invalid Devx comp which has been destroyed, and query failure with invalid FD will be reported.
Adjust the shared interrupt install and uninstall timing to make the counter asynchronous query stop before interrupt uninstall.
Fixes: f15db67df09c ("net/mlx5: accelerate DV flow counter query") Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|