[PATCH v2] eal/arm: replace RTE_BUILD_BUG on non-constant
Ruifeng Wang
Ruifeng.Wang at arm.com
Mon May 6 11:30:38 CEST 2024
+ Arm team to the loop.
Removed invalid email address.
From: Daniel Gregory <daniel.gregory at bytedance.com>
Date: Saturday, May 4, 2024 at 2:27 AM
To: Ruifeng Wang <Ruifeng.Wang at arm.com>
Cc: dev at dpdk.org <dev at dpdk.org>, Punit Agrawal <punit.agrawal at bytedance.com>, Liang Ma <liangma at bytedance.com>, Daniel Gregory <daniel.gregory at bytedance.com>, Feifei Wang <Feifei.Wang2 at arm.com>
Subject: [PATCH v2] eal/arm: replace RTE_BUILD_BUG on non-constant
The ARM implementation of rte_pause uses RTE_BUILD_BUG_ON to check
memorder, which is not constant. This causes compile errors when it is
enabled with RTE_ARM_USE_WFE. eg.
../lib/eal/arm/include/rte_pause_64.h: In function ‘rte_wait_until_equal_16’:
../lib/eal/include/rte_common.h:530:56: error: expression in static assertion is not constant
530 | #define RTE_BUILD_BUG_ON(condition) do { static_assert(!(condition), #condition); } while (0)
| ^~~~~~~~~~~~
../lib/eal/arm/include/rte_pause_64.h:156:9: note: in expansion of macro ‘RTE_BUILD_BUG_ON’
156 | RTE_BUILD_BUG_ON(memorder != rte_memory_order_acquire &&
| ^~~~~~~~~~~~~~~~
Fix the compile errors by replacing the check with an assert, like in
the generic implementation (lib/eal/include/generic/rte_pause.h).
Fixes: 875f350924b8 ("eal: add a new helper for wait until scheme")
Signed-off-by: Daniel Gregory <daniel.gregory at bytedance.com>
---
Cc: feifei.wang2 at arm.com
---
lib/eal/arm/include/rte_pause_64.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20240506/75f11793/attachment-0001.htm>
More information about the dev
mailing list