Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2018-01-18 Thread Thomas Monjalon
08/12/2017 16:46, Olivier Matz: > When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference > counter uses an atomic operation. This is not necessary and impacts > the performance (seen with TRex traffic generator). > > We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update

Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2017-12-11 Thread Olivier MATZ
On Fri, Dec 08, 2017 at 04:46:51PM +0100, Olivier Matz wrote: > When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference > counter uses an atomic operation. This is not necessary and impacts > the performance (seen with TRex traffic generator). > > We cannot replace rte_atomic16_add_retu

Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2017-12-10 Thread Hanoch Haim (hhaim)
Oliver, Looks great. Thanks, Hanoh -Original Message- From: Olivier Matz [mailto:olivier.m...@6wind.com] Sent: Friday, December 08, 2017 5:47 PM To: dev@dpdk.org; Hanoch Haim (hhaim) Cc: matvejchi...@gmail.com; konstantin.anan...@intel.com Subject: [PATCH v4] mbuf: fix mbuf free perfor

Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2017-12-08 Thread Stephen Hemminger
On Fri, 8 Dec 2017 16:46:51 +0100 Olivier Matz wrote: > +/* internal */ > +static inline uint16_t > +__rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value) > +{ > + return (uint16_t)(rte_atomic16_add_return(&m->refcnt_atomic, value)); > +} You don't need the cast (or paren's around rte

Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2017-12-08 Thread Olivier MATZ
On Fri, Dec 08, 2017 at 08:04:50PM +0400, Ilya Matveychikov wrote: > Olivier, > > > On Dec 8, 2017, at 7:46 PM, Olivier Matz wrote: > > > > > > > lib/librte_mbuf/rte_mbuf.h | 23 ++- > > 1 file changed, 18 insertions(+), 5 deletions(-) > > > > diff --git a/lib/librte_mbuf/r

Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2017-12-08 Thread Ilya Matveychikov
Olivier, > On Dec 8, 2017, at 7:46 PM, Olivier Matz wrote: > > > lib/librte_mbuf/rte_mbuf.h | 23 ++- > 1 file changed, 18 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index ce8a05ddf..dd08cb72b 100644 > --- a/lib/

[dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt

2017-12-08 Thread Olivier Matz
When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference counter uses an atomic operation. This is not necessary and impacts the performance (seen with TRex traffic generator). We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update() because it would add an additional chec