#
fe46b20c |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share HCA capabilities handle
Add HCA attributes structure as a field of device config structure. It query in common probing, and updates the timestamp format fields.
Each driver use H
common/mlx5: share HCA capabilities handle
Add HCA attributes structure as a field of device config structure. It query in common probing, and updates the timestamp format fields.
Each driver use HCA attributes from common device config structure, instead of query it for itself.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
e35ccf24 |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share protection domain object
Create shared Protection Domain in common area and add it and its PDN as fields of common device structure.
Use this Protection Domain in all drivers and
common/mlx5: share protection domain object
Create shared Protection Domain in common area and add it and its PDN as fields of common device structure.
Use this Protection Domain in all drivers and remove the PD and PDN fields from their private structure.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
ca1418ce |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share device context object
Create shared context device in common area and add it as a field of common device. Use this context device in all drivers and remove the ctx field from thei
common/mlx5: share device context object
Create shared context device in common area and add it as a field of common device. Use this context device in all drivers and remove the ctx field from their private structure.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
85209924 |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share memory related devargs
Add device configure structure and function to parse user device arguments into it. Move parsing and management of relevant device arguments to common.
Sig
common/mlx5: share memory related devargs
Add device configure structure and function to parse user device arguments into it. Move parsing and management of relevant device arguments to common.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
a77bedf2 |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share common definitions
Create MACRO definitions file in the common driver as preparation for MR and basic probe sharing. Move relevant definitions from the net driver to the above fil
common/mlx5: share common definitions
Create MACRO definitions file in the common driver as preparation for MR and basic probe sharing. Move relevant definitions from the net driver to the above file.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
7af08c8f |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: share basic probing with internal drivers
Create common probing structure that includes, for now, basic probing information detected by the common driver and share it with all the inter
common/mlx5: share basic probing with internal drivers
Create common probing structure that includes, for now, basic probing information detected by the common driver and share it with all the internal drivers.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
dffae63d |
| 12-Sep-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: fix resource cleaning in device removal
The common remove function call in a loop to remove function for each driver which have been registered.
If all removes are succeeded, it return
common/mlx5: fix resource cleaning in device removal
The common remove function call in a loop to remove function for each driver which have been registered.
If all removes are succeeded, it return 0 without to free the device which allocated in probe function. Otherwise, it free the device. In fact we expect exactly the opposite behavior. If all removes are failed, it returns error without freeing the device which allocated in probe function. Otherwise, it free the device and return 0.
Replace it with the correct behavior.
Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers") Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
dc26c9c2 |
| 12-Sep-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: fix device list operations concurrency
The mlx5 common driver has a global list of mlx5 devices which are probed.
In probe function it creates one and insert it to the list. Similarly
common/mlx5: fix device list operations concurrency
The mlx5 common driver has a global list of mlx5 devices which are probed.
In probe function it creates one and insert it to the list. Similarly it removes the device in remove function. These operations are not safe as there can be such operations in parallel, by different threads.
Add global lock for the list and use it to insert or remove.
Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers") Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
288d7c3f |
| 12-Sep-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: fix class combination validation
The common probe function gets as a user argument the classes it should create, and checks whether the combination is valid.
In case the device already
common/mlx5: fix class combination validation
The common probe function gets as a user argument the classes it should create, and checks whether the combination is valid.
In case the device already exists, it checks the integration of the above with the classes that the device has. However, the function does not check the combination when the device does not exist and it has to create it.
Check if the combination is valid for all cases.
Fixes: ad435d320473 ("common/mlx5: add bus-agnostic layer") Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
d3c52126 |
| 21-Jul-2021 |
Xueming Li <xuemingl@nvidia.com> |
common/mlx5: remove legacy PCI driver
Clean up legacy PCI bus driver since all mlx5 PMDs are moved to the new bus-agnostic driver interface.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by
common/mlx5: remove legacy PCI driver
Clean up legacy PCI bus driver since all mlx5 PMDs are moved to the new bus-agnostic driver interface.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
4d567938 |
| 21-Jul-2021 |
Thomas Monjalon <thomas@monjalon.net> |
common/mlx5: get PCI device address from any bus
A function is exported to allow retrieving the PCI address of the parent PCI device of a Sub-Function in auxiliary bus sysfs. The function mlx5_dev_t
common/mlx5: get PCI device address from any bus
A function is exported to allow retrieving the PCI address of the parent PCI device of a Sub-Function in auxiliary bus sysfs. The function mlx5_dev_to_pci_str() is accepting both PCI and auxiliary devices. In case of a PCI device, it is simply using the device name.
The function mlx5_dev_to_pci_addr(), which is based on sysfs path and do not use any device object, is renamed to mlx5_get_pci_addr() for clarity purpose.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
777b72a9 |
| 21-Jul-2021 |
Xueming Li <xuemingl@nvidia.com> |
common/mlx5: support auxiliary bus
Add auxiliary bus support for Sub-Function.
As a limitation of current driver, NUMA node of device is detected from PCI bus of device sysfs symbol link. It will b
common/mlx5: support auxiliary bus
Add auxiliary bus support for Sub-Function.
As a limitation of current driver, NUMA node of device is detected from PCI bus of device sysfs symbol link. It will be removed once NUMA node file will be available in sysfs.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
ad435d32 |
| 21-Jul-2021 |
Xueming Li <xuemingl@nvidia.com> |
common/mlx5: add bus-agnostic layer
To support auxiliary bus, introduces common device driver and callbacks, supposed to replace mlx5 common PCI bus driver.
Mlx5 class drivers, i.e. eth, vDPA, rege
common/mlx5: add bus-agnostic layer
To support auxiliary bus, introduces common device driver and callbacks, supposed to replace mlx5 common PCI bus driver.
Mlx5 class drivers, i.e. eth, vDPA, regex and compress normally consumes single Verbs device context to probe a device. The Verbs device comes from PCI address if the device is PCI bus device, from Auxiliary sysfs if the device is auxiliary bus device. Currently only PCI bus is supported.
Common device driver is a middle layer between mlx5 class drivers and bus, resolve and abstract bus info to Verbs device for class drivers. Both PCI bus driver and Auxiliary bus driver can utilize the common driver layer to cast bus operations to mlx5 class drivers.
Legacy mlx5 common PCI bus driver still being used by mlx5 eth, vDPA, regex and compress PMD, will be removed once all PMD drivers migrate to new common driver.
Signed-off-by: Xueming Li <xuemingl@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
eeded204 |
| 26-Apr-2021 |
David Marchand <david.marchand@redhat.com> |
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype with their class reflected in it, and libraries use a lib. logtype.
Introduce two new
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype with their class reflected in it, and libraries use a lib. logtype.
Introduce two new macros: - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is used in a component. It is associated to the default name provided by the build system, - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used, and then the passed name is appended to the default name,
RTE_LOG_REGISTER is left untouched for existing external users and for components that do not comply with the convention.
There is a new Meson variable log_prefix to adapt the default name for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
Note: achieved with below commands + reverted change on net/bonding + edits on crypto/virtio, compress/mlx5, regex/mlx5
$ git grep -l RTE_LOG_REGISTER drivers/ | while read file; do pattern=${file##drivers/}; class=${pattern%%/*}; pattern=${pattern#$class/}; drv=${pattern%%/*}; case "$class" in baseband) pattern=pmd.bb.$drv;; bus) pattern=bus.$drv;; mempool) pattern=mempool.$drv;; *) pattern=pmd.$class.$drv;; esac sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done
$ git grep -l RTE_LOG_REGISTER lib/ | while read file; do pattern=${file##lib/}; pattern=lib.${pattern%%/*}; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done
Signed-off-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
25245d5d |
| 04-May-2021 |
Shiri Kuzin <shirik@nvidia.com> |
common/mlx5: share hash list tool
In order to use the hash list defined in net in other drivers, the hash list is moved to common utilities.
In addition, the log definition was moved from the commo
common/mlx5: share hash list tool
In order to use the hash list defined in net in other drivers, the hash list is moved to common utilities.
In addition, the log definition was moved from the common utilities to a dedicated new log file in common in order to prevent a conflict.
Signed-off-by: Shiri Kuzin <shirik@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
3be42081 |
| 06-Apr-2021 |
Thomas Monjalon <thomas@monjalon.net> |
drivers: fix log level after loading
When compiled as a shared object, and loaded at runtime as a plugin, the drivers should get the log level set earlier at EAL init by the user through --log-level
drivers: fix log level after loading
When compiled as a shared object, and loaded at runtime as a plugin, the drivers should get the log level set earlier at EAL init by the user through --log-level option.
The function for applying the log level setting is rte_log_register_type_and_pick_level(). It is called by most drivers via RTE_LOG_REGISTER().
The drivers common/mlx5, bcmfs and e1000 were missing, so the user-specified log level was not applied when those drivers were loaded as plugins. The macro RTE_LOG_REGISTER() is used for those drivers.
The unnecessary protection for double registration is removed from e1000.
Fixes: 9c99878aa1b1 ("log: introduce logtype register macro") Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver") Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: David Marchand <david.marchand@redhat.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
show more ...
|
#
7819b8fb |
| 06-Jan-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: remove doorbell allocation functions
The mlx5_devx_dbr_page structure was used to allocate and release the umem of the doorbells. Since doorbell and buffer have used same umem, this str
common/mlx5: remove doorbell allocation functions
The mlx5_devx_dbr_page structure was used to allocate and release the umem of the doorbells. Since doorbell and buffer have used same umem, this structure is useless.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
07a99de8 |
| 28-Dec-2020 |
Tal Shnaiderman <talshn@nvidia.com> |
net/mlx5: wrap glue reg/dereg UMEM per OS
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters.
Signed
net/mlx5: wrap glue reg/dereg UMEM per OS
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Signed-off-by: Ophir Munk <ophirmu@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
9cc0e99c |
| 10-Nov-2020 |
Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
common/mlx5: share UAR allocation routine
This patch introduces the routine to allocate the UAR (User Access Region) with various memory mapping types. The origin patch being fixed provided the UAR
common/mlx5: share UAR allocation routine
This patch introduces the routine to allocate the UAR (User Access Region) with various memory mapping types. The origin patch being fixed provided the UAR allocation workaround for the mlx5 net PMD only. As it was found the other mlx5 based drivers - vdpa and regex are affected by the issue as well and must be fixed.
Fixes: a0bfe9d56f74 ("net/mlx5: fix UAR memory mapping type") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
44c1b52b |
| 21-Jul-2020 |
Viacheslav Ovsiienko <viacheslavo@mellanox.com> |
common/mlx5: fix queue doorbell record size
When Rx/Tx queue was being created with DevX the allocated doorbell record size was only uint64_t. That was definitely less than size of CPU cacheline and
common/mlx5: fix queue doorbell record size
When Rx/Tx queue was being created with DevX the allocated doorbell record size was only uint64_t. That was definitely less than size of CPU cacheline and it might have happened the doorbell records attached to different queues handled by different cores were allocated within same cacheline. It might have caused the contention on doorbell record writing.
This patch extends the allocated memory size for doorbell record to cacheline size.
Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX") Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
f6d099d7 |
| 27-Jul-2020 |
Parav Pandit <parav@mellanox.com> |
common/mlx5: remove class check from class drivers
Now that mlx5_pci PMD checks for enabled classes and performs probe(), remove() of associated classes, individual class driver does not need to che
common/mlx5: remove class check from class drivers
Now that mlx5_pci PMD checks for enabled classes and performs probe(), remove() of associated classes, individual class driver does not need to check if other driver is enabled.
Signed-off-by: Parav Pandit <parav@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
8a41f4de |
| 27-Jul-2020 |
Parav Pandit <parav@mellanox.com> |
common/mlx5: introduce layer for multiple class drivers
Add generic mlx5 PCI PMD layer as part of existing common_mlx5 module. This enables multiple classes (net, regex, vdpa) PMDs to be supported a
common/mlx5: introduce layer for multiple class drivers
Add generic mlx5 PCI PMD layer as part of existing common_mlx5 module. This enables multiple classes (net, regex, vdpa) PMDs to be supported at same time.
Signed-off-by: Parav Pandit <parav@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
82088001 |
| 27-Jul-2020 |
Parav Pandit <parav@mellanox.com> |
common/mlx5: avoid class constructor priority
mlx5_common is shared library between mlx5 net, VDPA and regex PMD. It is better to use common initialization helper instead of using RTE_PRIORITY_CLASS
common/mlx5: avoid class constructor priority
mlx5_common is shared library between mlx5 net, VDPA and regex PMD. It is better to use common initialization helper instead of using RTE_PRIORITY_CLASS priority.
Suggested-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
fd970a54 |
| 28-Jun-2020 |
Suanming Mou <suanmingm@mellanox.com> |
common/mlx5: convert data path objects to unified malloc
This commit allocates the data path object page and B-tree table memory from unified malloc function with explicit flag MLX5_MEM_RTE.
Signed
common/mlx5: convert data path objects to unified malloc
This commit allocates the data path object page and B-tree table memory from unified malloc function with explicit flag MLX5_MEM_RTE.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
b458bd4c |
| 13-Jul-2020 |
Thomas Monjalon <thomas@monjalon.net> |
common/mlx5: fix link with ibverbs glue dlopen option
In case the ibverbs glue is a separate library to dlopen, the PMD library must allocate a glue structure to be filled by dlopen.
The glue manag
common/mlx5: fix link with ibverbs glue dlopen option
In case the ibverbs glue is a separate library to dlopen, the PMD library must allocate a glue structure to be filled by dlopen.
The glue management was in mlx5_common.c and moved to mlx5_common_os.c, but the variable allocation was not removed from the original file. The consequence was a link failure, if ibverbs dlopen option is enabled, because of the redefinition of the variable (with GCC 10): multiple definition of 'mlx5_glue'
The original definition is removed to keep only the one moved in the Linux sub-directory.
Fixes: 79aa430721b1 ("common/mlx5: split common file under Linux directory") Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|