Re: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-05 Thread Tyler Retzlaff
On Tue, Mar 05, 2024 at 09:02:34PM +0100, Mattias Rönnblom wrote: > On 2024-03-05 19:22, Tyler Retzlaff wrote: > >On Tue, Mar 05, 2024 at 07:08:36PM +0100, Mattias Rönnblom wrote: > >>On 2024-03-04 17:42, Tyler Retzlaff wrote: > >>>On Sat, Mar 02, 2024 at 02:53:23PM +0100, Mattias Rönnblom wrote: >

Re: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-05 Thread Mattias Rönnblom
On 2024-03-05 19:22, Tyler Retzlaff wrote: On Tue, Mar 05, 2024 at 07:08:36PM +0100, Mattias Rönnblom wrote: On 2024-03-04 17:42, Tyler Retzlaff wrote: On Sat, Mar 02, 2024 at 02:53:23PM +0100, Mattias Rönnblom wrote: Add bit-level test/set/clear/assign macros operating on both 32-bit and 64-b

Re: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-05 Thread Tyler Retzlaff
On Tue, Mar 05, 2024 at 07:08:36PM +0100, Mattias Rönnblom wrote: > On 2024-03-04 17:42, Tyler Retzlaff wrote: > >On Sat, Mar 02, 2024 at 02:53:23PM +0100, Mattias Rönnblom wrote: > >>Add bit-level test/set/clear/assign macros operating on both 32-bit > >>and 64-bit words by means of C11 generic se

Re: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-05 Thread Mattias Rönnblom
On 2024-03-04 17:42, Tyler Retzlaff wrote: On Sat, Mar 02, 2024 at 02:53:23PM +0100, Mattias Rönnblom wrote: Add bit-level test/set/clear/assign macros operating on both 32-bit and 64-bit words by means of C11 generic selection. Signed-off-by: Mattias Rönnblom --- _Generic is nice here. shou

Re: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-04 Thread Tyler Retzlaff
On Sat, Mar 02, 2024 at 02:53:23PM +0100, Mattias Rönnblom wrote: > Add bit-level test/set/clear/assign macros operating on both 32-bit > and 64-bit words by means of C11 generic selection. > > Signed-off-by: Mattias Rönnblom > --- _Generic is nice here. should we discourage direct use of the in

Re: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-04 Thread Mattias Rönnblom
ject: [RFC 2/7] eal: add generic bit manipulation macros Add bit-level test/set/clear/assign macros operating on both 32-bit and 64-bit words by means of C11 generic selection. Signed-off-by: Mattias Rönnblom --- lib/eal/include/rte_bitops.h | 81 1 file cha

RE: [RFC 2/7] eal: add generic bit manipulation macros

2024-03-04 Thread Heng Wang
for example, (uint32_t)1 << 35? Maybe we could add an assert in the implementation? Regards, Heng -Original Message- From: Mattias Rönnblom Sent: Saturday, March 2, 2024 2:53 PM To: dev@dpdk.org Cc: hof...@lysator.liu.se; Heng Wang ; Mattias Rönnblom Subject: [RFC 2/7] eal: add ge

[RFC 2/7] eal: add generic bit manipulation macros

2024-03-02 Thread Mattias Rönnblom
Add bit-level test/set/clear/assign macros operating on both 32-bit and 64-bit words by means of C11 generic selection. Signed-off-by: Mattias Rönnblom --- lib/eal/include/rte_bitops.h | 81 1 file changed, 81 insertions(+) diff --git a/lib/eal/include/rte_b