Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-09 Thread Phil Yang
> -Original Message- > From: Olivier Matz > Sent: Wednesday, July 8, 2020 7:44 PM > To: Phil Yang > Cc: david.march...@redhat.com; dev@dpdk.org; d...@linux.vnet.ibm.com; > Honnappa Nagarahalli ; Ruifeng Wang > ; nd > Subject: Re: [PATCH v2] mbuf: use C11 atomics for refcnt operations >

Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-09 Thread Phil Yang
t; To: Phil Yang > > > Cc: david.march...@redhat.com; dev@dpdk.org; > d...@linux.vnet.ibm.com; > > > Honnappa Nagarahalli ; > > > olivier.m...@6wind.com; Ruifeng Wang ; nd > > > > > > Subject: Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt > &

Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-08 Thread Olivier Matz
Hi, On Tue, Jul 07, 2020 at 06:10:33PM +0800, Phil Yang wrote: > Use C11 atomics with explicit ordering instead of rte_atomic ops which > enforce unnecessary barriers on aarch64. > > Signed-off-by: Phil Yang > Reviewed-by: Ruifeng Wang > --- > v2: > Fix ABI issue: revert the rte_mbuf_ext_shared

Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-08 Thread Olivier Matz
Honnappa Nagarahalli ; > > olivier.m...@6wind.com; Ruifeng Wang ; nd > > > > Subject: Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt > > operations > > > > On Tue, 7 Jul 2020 18:10:33 +0800 > > Phil Yang wrote: > > > > > + return

Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-07 Thread Phil Yang
> -Original Message- > From: dev On Behalf Of Phil Yang > Sent: Tuesday, July 7, 2020 6:11 PM > To: david.march...@redhat.com; dev@dpdk.org > Cc: d...@linux.vnet.ibm.com; Honnappa Nagarahalli > ; olivier.m...@6wind.com; Ruifeng Wang > ; nd > Subject: [dpdk-dev]

Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-07 Thread Phil Yang
[dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt > operations > > On Tue, 7 Jul 2020 18:10:33 +0800 > Phil Yang wrote: > > > + return (uint16_t)(__atomic_add_fetch((int16_t *)&shinfo- > >refcnt_atomic, > > + > > Why do you need so many casts

Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-07 Thread Stephen Hemminger
On Tue, 7 Jul 2020 18:10:33 +0800 Phil Yang wrote: > + return (uint16_t)(__atomic_add_fetch((int16_t *)&shinfo->refcnt_atomic, > + Why do you need so many casts here? The type of refcnt_atomic is now uint16 after your patch.

[dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations

2020-07-07 Thread Phil Yang
Use C11 atomics with explicit ordering instead of rte_atomic ops which enforce unnecessary barriers on aarch64. Signed-off-by: Phil Yang Reviewed-by: Ruifeng Wang --- v2: Fix ABI issue: revert the rte_mbuf_ext_shared_info struct refcnt field to refcnt_atomic. lib/librte_mbuf/rte_mbuf.c |