Re: [dpdk-dev] atomic operations

2021-07-07 Thread Thomas Monjalon
07/07/2021 21:04, Honnappa Nagarahalli: > > > > > > In the deprecation notices of DPDK 21.05, we can still read this: > > " > > * rte_atomicNN_xxx: These APIs do not take memory order parameter. This > > does > > not allow for writing optimized code for all the CPU architectures > > supported

Re: [dpdk-dev] atomic operations

2021-07-07 Thread Honnappa Nagarahalli
> > In the deprecation notices of DPDK 21.05, we can still read this: > " > * rte_atomicNN_xxx: These APIs do not take memory order parameter. This > does > not allow for writing optimized code for all the CPU architectures supported > in DPDK. DPDK will adopt C11 atomic operations semantics

Re: [dpdk-dev] atomic operations

2021-07-05 Thread Stephen Hemminger
On Mon, 5 Jul 2021 08:33:21 + Ruifeng Wang wrote: > > > > > > One simple example: increment a counter atomically. > > > > __atomic_fetch_add(&counter, 1, __ATOMIC_RELAXED); or > > > > __atomic_add_fetch(&counter, 1, __ATOMIC_RELAXED); > > > > I really hate how atomics are "documented" i

Re: [dpdk-dev] atomic operations

2021-07-05 Thread Ruifeng Wang
en ; > nd > Subject: Re: [dpdk-dev] atomic operations > > 05/07/2021 09:00, Ruifeng Wang: > > From: Thomas Monjalon > > > 03/07/2021 13:29, Thomas Monjalon: > > > > In the deprecation notices of DPDK 21.05, we can still read this: > > > >

Re: [dpdk-dev] atomic operations

2021-07-05 Thread Thomas Monjalon
05/07/2021 09:00, Ruifeng Wang: > From: Thomas Monjalon > > 03/07/2021 13:29, Thomas Monjalon: > > > In the deprecation notices of DPDK 21.05, we can still read this: > > > " > > > * rte_atomicNN_xxx: These APIs do not take memory order parameter. > > This does > > > not allow for writing optimi

Re: [dpdk-dev] atomic operations

2021-07-05 Thread Ruifeng Wang
dk.org; > david.march...@redhat.com; David Christensen > Subject: Re: [dpdk-dev] atomic operations > > 03/07/2021 13:29, Thomas Monjalon: > > In the deprecation notices of DPDK 21.05, we can still read this: > > " > > * rte_atomicNN_xxx: These APIs do not take memory

Re: [dpdk-dev] atomic operations

2021-07-03 Thread Thomas Monjalon
03/07/2021 19:30, Stephen Hemminger: > Thomas Monjalon wrote: > > It is very difficult to find which wrapper to use. > > > > This is the guide we have: > > https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html#locks-and-atomic-operations > > There are 2 blog posts: > > https://www.dp

Re: [dpdk-dev] atomic operations

2021-07-03 Thread Thomas Monjalon
03/07/2021 13:29, Thomas Monjalon: > In the deprecation notices of DPDK 21.05, we can still read this: > " > * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does > not allow for writing optimized code for all the CPU architectures supported > in DPDK. DPDK will adopt C11

Re: [dpdk-dev] atomic operations

2021-07-03 Thread Stephen Hemminger
On Sat, 03 Jul 2021 13:29:38 +0200 Thomas Monjalon wrote: > In the deprecation notices of DPDK 21.05, we can still read this: > " > * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does > not allow for writing optimized code for all the CPU architectures supported > in

[dpdk-dev] atomic operations

2021-07-03 Thread Thomas Monjalon
In the deprecation notices of DPDK 21.05, we can still read this: " * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does not allow for writing optimized code for all the CPU architectures supported in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrap