Dekel Peled
90e30c7488
net/mlx5: fix use of atomic cmpset for age state
According to documentation [1], function rte_atomic16_cmpset() return value is non-zero on success; 0 on failure. In existing code this function is called, and the return value is compared to AGE_CANDIDATE, which is defined as 1. Such comparison is incorrect and can lead to unwanted behavior. This patch updates the calls to rte_atomic16_cmpset(), to check that the return value is 0 or non-zero. [1] https://doc.dpdk.org/api/rte__atomic_8h.html Fixes: fa2d01c87d2b ("net/mlx5: support flow aging") Cc: stable@dpdk.org Signed-off-by: Dekel Peled <dekelp@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%