[ovs-dev] [PATCH ovs-dev, dpdk-latest 1/2] ovs-atomic: Rename memory_order -> ovs_memory_order
i.maximets at ovn.org
Mon Oct 12 15:04:53 UTC 2020
On 10/12/20 4:37 PM, Gaëtan Rivet wrote:
> On 12/10/20 14:04 +0000, Eli Britstein wrote:
>> DPDK commit  uses function variables named "memory_order".
>> Compilation fails with:
>> error: declaration of 'memory_order' shadows a global declaration
>> 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 126.96.36.199 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.
I agree here. And, also, OVS defines this enum only for cases where
it is not defined by environment (e.g. stdatomic.h). So, this patch will
actually fail the build on systems where ovs-atomic-c11.h is chosen as
an implementation for atomics, because it will not find ovs_memory_order
type defined. Basically, I can not build OVS locally with this patch
applied because of this.
>>  672a15056380 ("eal: add wrapper for C11 atomic thread fence")
>> Signed-off-by: Eli Britstein <elibr at nvidia.com>
More information about the dev