Re: [dpdk-dev] [PATCH] net/mlx5: fix use of atomic cmpset for age state

2020-10-19 Thread Raslan Darawsheh
Hi, > -Original Message- > From: dev On Behalf Of Dekel Peled > Sent: Thursday, October 15, 2020 2:44 PM > To: Matan Azrad ; Shahaf Shuler > ; Slava Ovsiienko > Cc: dev@dpdk.org; sta...@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix use of atomic

[dpdk-dev] [PATCH] net/mlx5: fix use of atomic cmpset for age state

2020-10-15 Thread Dekel Peled
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