RE: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-11 Thread Wathsala Wathawana Vithanage
> Subject: [PATCH] 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. Use of wfe based rte_wa

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-09 Thread Tyler Retzlaff
On Thu, May 09, 2024 at 12:11:50PM +0100, Daniel Gregory wrote: > On Fri, May 03, 2024 at 06:02:36PM -0700, Stephen Hemminger wrote: > > On Thu, 2 May 2024 15:21:16 +0100 > > Daniel Gregory wrote: > > > > > The ARM implementation of rte_pause uses RTE_BUILD_BUG_ON to check > > > memorder, which

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-09 Thread Daniel Gregory
On Fri, May 03, 2024 at 06:02:36PM -0700, Stephen Hemminger wrote: > On Thu, 2 May 2024 15:21:16 +0100 > Daniel Gregory wrote: > > > 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_

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-09 Thread Daniel Gregory
On Fri, May 03, 2024 at 05:56:24PM -0700, Stephen Hemminger wrote: > On Fri, 3 May 2024 10:46:05 +0100 > Daniel Gregory wrote: > > > On Thu, May 02, 2024 at 02:48:26PM -0700, Stephen Hemminger wrote: > > > There are already constant checks like this elsewhere in the file. > > > > Yes, but they

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-03 Thread Stephen Hemminger
On Thu, 2 May 2024 15:21:16 +0100 Daniel Gregory wrote: > 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_w

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-03 Thread Stephen Hemminger
On Fri, 3 May 2024 10:46:05 +0100 Daniel Gregory wrote: > On Thu, May 02, 2024 at 02:48:26PM -0700, Stephen Hemminger wrote: > > There are already constant checks like this elsewhere in the file. > > Yes, but they're in macros, rather than inlined functions, so my > understanding was that at c

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-03 Thread Daniel Gregory
On Fri, May 03, 2024 at 03:32:20PM +0200, David Marchand wrote: > - RTE_BUILD_BUG_ON() should not be used indeed. > IIRC, this issue was introduced with 875f350924b8 ("eal: add a new > helper for wait until scheme"). > Please add a corresponding Fixes: tag in next revision. Will do. Should I CC st

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-03 Thread David Marchand
On Thu, May 2, 2024 at 4:22 PM Daniel Gregory wrote: > > 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_

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-03 Thread Daniel Gregory
On Thu, May 02, 2024 at 02:48:26PM -0700, Stephen Hemminger wrote: > There are already constant checks like this elsewhere in the file. Yes, but they're in macros, rather than inlined functions, so my understanding was that at compile time, macro expansion has put the memorder constant in the _Sta

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-02 Thread Stephen Hemminger
On Thu, 2 May 2024 18:44:20 +0100 Daniel Gregory wrote: > On Thu, May 02, 2024 at 09:20:45AM -0700, Stephen Hemminger wrote: > > Why not: > > diff --git a/lib/eal/arm/include/rte_pause_64.h > > b/lib/eal/arm/include/rte_pause_64.h > > index 5cb8b59056..81987de771 100644 > > --- a/lib/eal/arm/inc

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-02 Thread Stephen Hemminger
On Thu, 2 May 2024 18:44:20 +0100 Daniel Gregory wrote: > What toolchain are you using? With your change I still get errors about > the expression not being constant: > > In file included from ../lib/eal/arm/include/rte_pause.h:13, > from ../lib/eal/include/generic/rte_spinlock.

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-02 Thread Daniel Gregory
On Thu, May 02, 2024 at 09:20:45AM -0700, Stephen Hemminger wrote: > Why not: > diff --git a/lib/eal/arm/include/rte_pause_64.h > b/lib/eal/arm/include/rte_pause_64.h > index 5cb8b59056..81987de771 100644 > --- a/lib/eal/arm/include/rte_pause_64.h > +++ b/lib/eal/arm/include/rte_pause_64.h > @@ -1

Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-02 Thread Stephen Hemminger
On Thu, 2 May 2024 15:21:16 +0100 Daniel Gregory wrote: > 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_w

[PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant

2024-05-02 Thread Daniel Gregory
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: e