Re: [PATCH v3] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-19 Thread Thomas Monjalon
15/11/2024 17:18, Stephen Hemminger: > On Fri, 15 Nov 2024 07:25:30 -0800 > Andre Muezerie wrote: > > > From reading the code this is also a bugfix: > > (1 << id), where id = thread_id & 0x3f, was wrong when thread_id > 0x1f. > > Since this seems to be a common anti-pattern in DPDK, > I wonder i

RE: [PATCH v3] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-19 Thread Morten Brørup
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Tuesday, 19 November 2024 10.26 > > 15/11/2024 17:18, Stephen Hemminger: > > On Fri, 15 Nov 2024 07:25:30 -0800 > > Andre Muezerie wrote: > > > > > From reading the code this is also a bugfix: > > > (1 << id), where id = thread_id & 0x3

Re: [PATCH v3] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-19 Thread Thomas Monjalon
15/11/2024 16:25, Andre Muezerie: > ../lib/rcu/rte_rcu_qsbr.c(101): warning C4334: '<<': result of 32-bit > shift implicitly converted to 64 bits (was 64-bit shift intended?) > ../lib/rcu/rte_rcu_qsbr.c(107): warning C4334: '<<': result of 32-bit > shift implicitly converted to 64 bits (was 64-bi

[PATCH v3] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion

2024-11-15 Thread Andre Muezerie
../lib/rcu/rte_rcu_qsbr.c(101): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) ../lib/rcu/rte_rcu_qsbr.c(107): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) ../lib/rcu/rte_rcu_qsbr