On Sat, 27 May 2023 02:32:13 +0530 Anoob Joseph <[email protected]> wrote:
> +static inline uint32_t
> +pdcp_atomic_inc(uint32_t *val, const bool mt_safe)
> +{
> + if (mt_safe)
> + return __atomic_fetch_add(val, 1, __ATOMIC_RELAXED);
> + else
> + return (*val)++;
> +}
This is a bad pattern. None of the rest of DPDK does this.
Either be thread safe or not.

