Go to file
Michael Baum d1325200ac common/mlx5: remove unreachable branch in UAR allocation
The User Access Region (UAR) provides access to the hardware resources
like Doorbell Register from userspace.
It means the resources should be mapped by the kernel to some virtual
address range. There two types of memory mapping are supported by mlx5
kernel driver:

 MLX5DV_UAR_ALLOC_TYPE_NC - non-cached, all writes promoted directly to
			    hardware.
 MLX5DV_UAR_ALLOC_TYPE_BF - "BlueFlame", all writes might be cached by
			    CPU, and will be flushed to hardware
			    explicitly with memory barriers.

The supported mapping types depend on the platform (x86/ARM/etc), kernel
version, driver version, virtualization environment (hypervisor), etc.

In UAR allocation, if the system supports the allocation with non-cached
mapping, the first attempt is performed with MLX5DV_UAR_ALLOC_TYPE_NC.
Then, if this fails, the next attempt is done with
MLX5DV_UAR_ALLOC_TYPE_BF.

However, the function adds a condition for the case where the first
attempt was performed with MLX5DV_UAR_ALLOC_TYPE_BF, a condition that is
unattainable since the first attempt was always performed with
MLX5DV_UAR_ALLOC_TYPE_NC.

Remove the unreachable code.

Fixes: 9cc0e99c81 ("common/mlx5: share UAR allocation routine")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-07 16:21:03 +01:00
.ci ci: fix aarch64 cross compilation in GHA 2021-11-01 18:15:24 +01:00
.github/workflows ci: fix aarch64 cross compilation in GHA 2021-11-01 18:15:24 +01:00
app app/testpmd: remove double dependency on bitrate lib 2021-11-06 00:46:00 +01:00
buildtools buildtools: fix build with Meson 0.60 2021-11-03 14:16:29 +01:00
config sched: add PIE based congestion management 2021-11-04 15:41:49 +01:00
devtools devtools: forbid indent with tabs in Meson 2021-11-02 19:25:30 +01:00
doc net/mlx5: check delay drop settings in kernel driver 2021-11-05 17:04:53 +01:00
drivers common/mlx5: remove unreachable branch in UAR allocation 2021-11-07 16:21:03 +01:00
examples crypto/mlx5: support 1MB data-unit 2021-11-04 19:46:27 +01:00
kernel kni: fix build for SLES15-SP3 2021-10-25 15:30:23 +02:00
lib ethdev: fix crash on owner delete 2021-11-05 15:35:57 +01:00
license lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
usertools usertools/devbind: conform to PEP8 recommended style 2021-10-25 22:31:53 +02:00
.editorconfig doc: add Meson coding style to contributors guide 2021-04-21 14:04:09 +02:00
.gitattributes
.gitignore doc: add cryptodev table for supported operating systems 2021-11-04 19:51:11 +01:00
.travis.yml version: 21.11-rc0 2021-08-17 08:37:52 +02:00
ABI_VERSION version: 21.11-rc0 2021-08-17 08:37:52 +02:00
MAINTAINERS vdpa/sfc: introduce Xilinx vDPA driver 2021-11-04 13:43:23 +01:00
Makefile build: create dummy Makefile 2020-09-07 23:51:57 +02:00
meson_options.txt config: add option for atomic mbuf reference counting 2021-10-25 17:53:30 +02:00
meson.build lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 21.11-rc1 2021-10-25 22:42:47 +02:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org