#
1094dd94 |
| 28-Oct-2022 |
David Marchand <david.marchand@redhat.com> |
cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated a lot of discrepancies about inclusion of the rte_compat.h header.
Some headers are including i
cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated a lot of discrepancies about inclusion of the rte_compat.h header.
Some headers are including it where unneeded, while others rely on implicit inclusion.
Fix unneeded inclusions: $ git grep -l include..rte_compat.h | xargs grep -LE '__rte_(internal|experimental)' | xargs sed -i -e '/#include..rte_compat.h/d'
Fix missing inclusion, by inserting rte_compat.h before the first inclusion of a DPDK header: $ git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h | xargs sed -i -e \ '0,/#include..\(rte_\|.*pmd.h.$\)/{ s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/ }'
Fix missing inclusion, by inserting rte_compat.h after the last inclusion of a non DPDK header: $ for file in $(git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h); do tac $file > $file.$$ sed -i -e \ '0,/#include../{ s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/ }' $file.$$ tac $file.$$ > $file rm $file.$$ done
Fix missing inclusion, by inserting rte_compat.h after the header guard: $ git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h | xargs sed -i -e \ '0,/#define/{ s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/ }'
And finally, exclude rte_compat.h itself. $ git checkout lib/eal/include/rte_compat.h
At the end of all this, we have a clean tree: $ git grep -lE '__rte_(internal|experimental)' | xargs grep -L include..rte_compat.h buildtools/check-symbols.sh devtools/checkpatches.sh doc/guides/contributing/abi_policy.rst doc/guides/rel_notes/release_20_11.rst lib/eal/include/rte_compat.h
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
#
1f37cb2b |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus/pci: make driver-only headers private
The pci bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentatio
bus/pci: make driver-only headers private
The pci bus interface is for drivers only. Mark as internal and move the header in the driver headers list.
While at it, cleanup the code: - fix indentation, - remove unneeded reference to bus specific singleton object, - remove unneeded list head structure type, - reorder the definitions and macro manipulating the bus singleton object, - remove inclusion of rte_bus.h and fix the code that relied on implicit inclusion,
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
72d7efe4 |
| 16-Jun-2022 |
Spike Du <spiked@nvidia.com> |
common/mlx5: share interrupt management
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API.
Sig
common/mlx5: share interrupt management
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API.
Signed-off-by: Spike Du <spiked@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
71adf25d |
| 02-Mar-2022 |
Gregory Etelson <getelson@nvidia.com> |
net/mlx5: fix flex item availability
Flex item availability is restricted to BlueField-2 and BlueField-3 PF ports.
The patch validates port type compliance before proceeding to flex item creation.
net/mlx5: fix flex item availability
Flex item availability is restricted to BlueField-2 and BlueField-3 PF ports.
The patch validates port type compliance before proceeding to flex item creation.
Fixes: db25cadc0887 ("net/mlx5: add flex item operations") Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
show more ...
|
#
9d936f4f |
| 24-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: support remote PD and CTX
Add option to probe common device using import CTX/PD functions instead of create functions. This option requires accepting the context FD and the PD handle as
common/mlx5: support remote PD and CTX
Add option to probe common device using import CTX/PD functions instead of create functions. This option requires accepting the context FD and the PD handle as devargs.
This sharing can be useful for applications that use PMD for only some operations. For example, an app that generates queues itself and uses PMD just to configure flow rules.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
c2e3059a |
| 24-Feb-2022 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: consider local functions as internal
The functions which are not explicitly marked as internal were exported because the local catch-all rule was missing in the version script. After ad
common/mlx5: consider local functions as internal
The functions which are not explicitly marked as internal were exported because the local catch-all rule was missing in the version script. After adding the missing rule, all local functions are hidden. The function mlx5_get_device_guid is used in another library, so it needs to be exported (as internal).
Because the local functions were exported as non-internal in DPDK 21.11, any change in these functions would break the ABI. An ABI exception is added for this library, considering that all functions are either local or internal.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
4c74ad3e |
| 26-Oct-2021 |
Rongwei Liu <rongweil@nvidia.com> |
common/mlx5: support PCIe device GUID query
sysfs entry "phys_switch_id" holds each PCIe device' guid.
The devices which reside in the same physical NIC should have the same guid.
Signed-off-by: R
common/mlx5: support PCIe device GUID query
sysfs entry "phys_switch_id" holds each PCIe device' guid.
The devices which reside in the same physical NIC should have the same guid.
Signed-off-by: Rongwei Liu <rongweil@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@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 ...
|
#
662d0dc6 |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: disable RoCE in device context creation
Add option to get IB device after disabling RoCE. It is relevant if there is vDPA class in device arguments list.
Use common device context in v
common/mlx5: disable RoCE in device context creation
Add option to get IB device after disabling RoCE. It is relevant if there is vDPA class in device arguments list.
Use common device context in vDPA driver and remove the ctx field from its private structure.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
887183ef |
| 19-Oct-2021 |
Michael Baum <michaelba@nvidia.com> |
common/mlx5: move basic probing functions to common
Move open IBV/DevX device function to common.
Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
|
#
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 ...
|
#
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 ...
|
#
c31f3f7f |
| 04-May-2021 |
Shiri Kuzin <shirik@nvidia.com> |
common/mlx5: share Verbs device match function
The get_ib_device_match function iterates over the list of ib devices returned by the get_device_list glue function and returns the ib device matching
common/mlx5: share Verbs device match function
The get_ib_device_match function iterates over the list of ib devices returned by the get_device_list glue function and returns the ib device matching the provided address.
Since this function is in use by several drivers, in this patch we share the function in common part.
Signed-off-by: Shiri Kuzin <shirik@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
8ec36fb1 |
| 11-Apr-2021 |
Tal Shnaiderman <talshn@nvidia.com> |
common/mlx5: add missing internal tags
Several functions introduced in the addition of the Windows support to mlx5 were missing the __rte_internal tag. This miss is better revealed when symbols beca
common/mlx5: add missing internal tags
Several functions introduced in the addition of the Windows support to mlx5 were missing the __rte_internal tag. This miss is better revealed when symbols became exported on Linux too, and it is caught by the symbol checker with --buildtype=debug.
Fixes: 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows") Fixes: 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions on Windows") Fixes: ba420719823c ("common/mlx5: add reg/dereg MR on Windows") Fixes: 56ea803e878e ("build: remove Windows export symbol list") Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
show more ...
|
#
98174626 |
| 28-Dec-2020 |
Tal Shnaiderman <talshn@nvidia.com> |
common/mlx5: wrap event channel functions per OS
Wrap the API to create/destroy event channel and to subscribe an event with OS calls. In Linux those calls are implemented by glue functions while in
common/mlx5: wrap event channel functions per OS
Wrap the API to create/destroy event channel and to subscribe an event with OS calls. In Linux those calls are implemented by glue functions while in Windows they are not supported.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
7e7af4e9 |
| 28-Dec-2020 |
Ophir Munk <ophirmu@nvidia.com> |
common/mlx5: wrap memory allocation on Linux
mlx5_malloc() API has an alignment parameter for system memory allocations. malloc() is called for non-aligned allocations and posix_memalign() is called
common/mlx5: wrap memory allocation on Linux
mlx5_malloc() API has an alignment parameter for system memory allocations. malloc() is called for non-aligned allocations and posix_memalign() is called for aligned allocations. When calling mlx5_free() there is no distinction whether the memory was originally allocated with or without alignment. Freeing a memory may be handled differently by operating systems. Therefore this commit wraps these APIs with OS specific calls: mlx5_os_malloc(), mlx5_os_free().
Signed-off-by: Ophir Munk <ophirmu@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 ...
|
#
1cb210ab |
| 28-Dec-2020 |
Ophir Munk <ophirmu@nvidia.com> |
net/mlx5: wrap glue alloc/dealloc PD per OS
Wrap glue calls alloc_pd() and dealloc_pd() with generic OS calls. In Linux - protection domain allocations are implemented by Verbs glue API while in Wi
net/mlx5: wrap glue alloc/dealloc PD per OS
Wrap glue calls alloc_pd() and dealloc_pd() with generic OS calls. In Linux - protection domain allocations are implemented by Verbs glue API while in Windows it is by DevX API.
Signed-off-by: Ophir Munk <ophirmu@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
show more ...
|
#
1f66ac5b |
| 25-Aug-2020 |
Ophir Munk <ophirmu@mellanox.com> |
net/mlx5: remove more Direct Verbs dependencies
Several DV-based structs of type 'struct mlx5dv_devx_XXX' are replaced with 'void *' to enable compilation under non-Linux operating systems. New gett
net/mlx5: remove more Direct Verbs dependencies
Several DV-based structs of type 'struct mlx5dv_devx_XXX' are replaced with 'void *' to enable compilation under non-Linux operating systems. New getter functions were added to retrieve the specific fields that were previously accessed directly.
Replaced structs: 'struct mlx5dv_pp *' 'struct mlx5dv_devx_event_channel *' 'struct mlx5dv_devx_umem *' 'struct mlx5dv_devx_uar *'
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
9d60f545 |
| 19-Jul-2020 |
Ophir Munk <ophirmu@mellanox.com> |
common/mlx5: remove inclusion of Verbs header files
Several source files include Verbs header files as in (1). These source files will not compile under non-Linux operating systems. This commit remo
common/mlx5: remove inclusion of Verbs header files
Several source files include Verbs header files as in (1). These source files will not compile under non-Linux operating systems. This commit removes this inclusion in two cases:
Case 1: There is no usage of ibv_* or mlx5dv_* symbols in the source file so the inclusion in (1) can be safely removed.
Case 2: Verbs symbols are used. Please note the inclusion in (1) already appears in file linux/mlx5_glue.h (which represents the interface to the rdma-core library). Therefore, replace (1) in the source file with (2). Under non-Linux operating systems - file mlx5_glue.h will not include (1).
(1) #include <infiniband/verbs.h> #include <infiniband/mlx5dv.h>
(2) #include <mlx5_glue.h>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|
#
391b8bcc |
| 19-Jun-2020 |
Ophir Munk <ophirmu@mellanox.com> |
common/mlx5: move some getter functions from net driver
Getter functions such as: 'mlx5_os_get_ctx_device_name', 'mlx5_os_get_ctx_device_path', 'mlx5_os_get_dev_device_name', 'mlx5_os_get_umem_id' a
common/mlx5: move some getter functions from net driver
Getter functions such as: 'mlx5_os_get_ctx_device_name', 'mlx5_os_get_ctx_device_path', 'mlx5_os_get_dev_device_name', 'mlx5_os_get_umem_id' are implemented under net directory. To enable additional devices (e.g. regex, vdpa) to access these getter functions they are moved under common directory.
As part of this commit string sizes DEV_SYSFS_NAME_MAX and DEV_SYSFS_PATH_MAX are increased by 1 to make sure that the destination string size in strncpy() function is bigger than the source string size. This update will avoid GCC version 8 error -Werror=stringop-truncation.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
show more ...
|