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: 9cc0e99c81ab0 ("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>
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
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%