[PATCH] lib/lpm: use standard atomic_store_explicit

David Marchand david.marchand at redhat.com
Wed Dec 4 08:56:35 CET 2024


Hello Andre,

On Wed, Dec 4, 2024 at 3:20 AM Andre Muezerie
<andremue at linux.microsoft.com> wrote:
>
> MSVC issues the warning below:
>
> ../lib/lpm/rte_lpm.c(297): warning C4013
>     '__atomic_store' undefined; assuming extern returning int
> ../lib/lpm/rte_lpm.c(298): error C2065:
>     '__ATOMIC_RELAXED': undeclared identifier
>
> The fix is to use standard atomic_store_explicit() instead of
> gcc specific __atomic_store().
> atomic_store_explicit() was already being used in other parts
> of DPDK and is compatible
> with many compilers, including MSVC.
>
> Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>

With this change, is there anything remaining that blocks this library
compilation with MSVC?
If not, please update meson.build so that CI can test lpm compilation
with MSVC on this patch (and that will detect regressions once
merged).


-- 
David Marchand



More information about the dev mailing list