Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Ananyev, Konstantin
Hi Olivier, > I agree with Konstantin's comment done in another thread [1]: > > ''' > That would cause extra read; cmp (and possible slowdown) for atomic refcnt. > If that really need to be fixed - probably we need to introduce a new > function > that would do update without trying to re

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Ilya Matveychikov
> On Nov 16, 2017, at 1:37 PM, Olivier MATZ wrote: > > On Thu, Nov 16, 2017 at 01:32:13PM +0400, Ilya Matveychikov wrote: >> >>> On Nov 16, 2017, at 1:06 PM, Hanoch Haim (hhaim) wrote: >>> >>> Understood >>> >>> rte_mbuf_refcnt_update_blind() >>> >>> should be good., it will take care the

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Olivier MATZ
On Thu, Nov 16, 2017 at 01:32:13PM +0400, Ilya Matveychikov wrote: > > > On Nov 16, 2017, at 1:06 PM, Hanoch Haim (hhaim) wrote: > > > > Understood > > > > rte_mbuf_refcnt_update_blind() > > > > should be good., it will take care the RTE_MBUF_REFCNT_ATOMIC > > > > > Why guys not to add j

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Ilya Matveychikov
> On Nov 16, 2017, at 1:06 PM, Hanoch Haim (hhaim) wrote: > > Understood > > rte_mbuf_refcnt_update_blind() > > should be good., it will take care the RTE_MBUF_REFCNT_ATOMIC > Why guys not to add just __rte_mbuf_refcnt_update() as a wrapper over rte_atomic16_add_return() and use it in in

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Hanoch Haim (hhaim)
Matveychikov; dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage Hi Hanoh, On Thu, Nov 16, 2017 at 07:16:31AM +, Hanoch Haim (hhaim) wrote: > Hi Oliver, > > It's hard for me to follow this thread. Yes, here are some few tips to

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Olivier MATZ
Hi Hanoh, On Thu, Nov 16, 2017 at 07:16:31AM +, Hanoch Haim (hhaim) wrote: > Hi Oliver, > > It's hard for me to follow this thread. Yes, here are some few tips to make it easier to follow: - avoid top-posting - prefix quoted lines with "> " - describe the problem and how you solve it in th

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-16 Thread Ilya Matveychikov
> On Nov 16, 2017, at 11:16 AM, Hanoch Haim (hhaim) wrote: > > Hi Oliver, > > It's hard for me to follow this thread. > > 1) It is not about clear/not-clear, it is error prone to *replicate* code > that has the same logic. > > "I'm not convinced that: > >__rte_pktmbuf_reset_nb_segs(m

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-15 Thread Hanoch Haim (hhaim)
return NULL; Hanoh -Original Message- From: Olivier MATZ [mailto:olivier.m...@6wind.com] Sent: Wednesday, November 15, 2017 7:31 PM To: Hanoch Haim (hhaim) Cc: Ilya Matveychikov; dev@dpdk.org; Konstantin Ananyev Subject: Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-15 Thread Olivier MATZ
, 2017 1:14 PM > To: Hanoch Haim (hhaim) > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix > atomic usage > > > > On Nov 15, 2017, at 1:14 PM, Hanoh Haim wrote: > > I think the patch should be renamed in something like:

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-15 Thread Hanoch Haim (hhaim)
will run faster. Thanks, Hanoh -Original Message- From: Ilya Matveychikov [mailto:matvejchi...@gmail.com] Sent: Wednesday, November 15, 2017 1:14 PM To: Hanoch Haim (hhaim) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage > O

Re: [dpdk-dev] [PATCH v3] mbuf: cleanup rte_pktmbuf_lastseg(), fix atomic usage

2017-11-15 Thread Ilya Matveychikov
> On Nov 15, 2017, at 1:14 PM, Hanoh Haim wrote: > > Signed-off-by: Hanoh Haim > --- > lib/librte_mbuf/rte_mbuf.h | 27 +-- > 1 file changed, 13 insertions(+), 14 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index 7e326bb..ab110