[ovs-dev] [PATCH ovs-dev, dpdk-latest 1/2] ovs-atomic: Rename memory_order -> ovs_memory_order

Gaëtan Rivet grive at u256.net
Mon Oct 12 14:37:12 UTC 2020

On 12/10/20 14:04 +0000, Eli Britstein wrote:
> DPDK commit [1] uses function variables named "memory_order".
> Compilation fails with:
> error: declaration of 'memory_order' shadows a global declaration
> [-Werror=shadow]
>  rte_atomic_thread_fence(int memory_order)
> Rename enum memory_order to ovs_memory_order to avoid that conflict.

Hi Eli,

The C11 standard section defines 'memory_order' as the
"enumerated type whose enumerators identify memory ordering constraints".
I think in this case this is a DPDK bug. Its API should be compatible
with the C standard.

> [1] 672a15056380 ("eal: add wrapper for C11 atomic thread fence")
> Signed-off-by: Eli Britstein <elibr at nvidia.com>
> ---


More information about the dev mailing list