[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Jerin Jacob
On Fri, Jun 10, 2016 at 09:29:44AM +0200, Olivier Matz wrote: > Hi, > > On 06/09/2016 03:09 PM, Jan Viktorin wrote: > >>> My suggestion is to have an additional flag, > >>> 'MEMPOOL_F_PKT_ALLOC', which, if specified, would: > >>> > >>> ... #define MEMPOOL_F_SC_GET0x0008 #define > >>> MEMPOOL_

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Shreyansh Jain
Hi Olivier, > -Original Message- > From: Olivier Matz [mailto:olivier.matz at 6wind.com] > Sent: Friday, June 10, 2016 1:00 PM > To: Jan Viktorin ; Hunt, David > > Cc: Shreyansh Jain ; dev at dpdk.org; > jerin.jacob at caviumnetworks.com > Subject: Re: [dpdk-dev

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Shreyansh Jain
Hi David, > -Original Message- > From: Hunt, David [mailto:david.hunt at intel.com] > Sent: Friday, June 10, 2016 3:05 PM > To: Olivier Matz ; Jan Viktorin > > Cc: Shreyansh Jain ; dev at dpdk.org; > jerin.jacob at caviumnetworks.com > Subject: Re: [dpdk-dev

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Jan Viktorin
On Fri, 10 Jun 2016 09:29:44 +0200 Olivier Matz wrote: > Hi, > > On 06/09/2016 03:09 PM, Jan Viktorin wrote: > >>> My suggestion is to have an additional flag, > >>> 'MEMPOOL_F_PKT_ALLOC', which, if specified, would: > >>> > >>> ... #define MEMPOOL_F_SC_GET0x0008 #define > >>> MEMPOOL_F_PKT

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Hunt, David
Hi all, On 10/6/2016 8:29 AM, Olivier Matz wrote: > Hi, > > On 06/09/2016 03:09 PM, Jan Viktorin wrote: My suggestion is to have an additional flag, 'MEMPOOL_F_PKT_ALLOC', which, if specified, would: ... #define MEMPOOL_F_SC_GET0x0008 #define MEMPOOL_F_PKT_ALLOC 0x0010

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Hunt, David
Hi Jan, On 10/6/2016 9:49 AM, Jan Viktorin wrote: > On Fri, 10 Jun 2016 09:29:44 +0200 > Olivier Matz wrote: > >> Hi, >> >> On 06/09/2016 03:09 PM, Jan Viktorin wrote: > My suggestion is to have an additional flag, > 'MEMPOOL_F_PKT_ALLOC', which, if specified, would: > > ... #defi

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-10 Thread Olivier Matz
Hi, On 06/09/2016 03:09 PM, Jan Viktorin wrote: >>> My suggestion is to have an additional flag, >>> 'MEMPOOL_F_PKT_ALLOC', which, if specified, would: >>> >>> ... #define MEMPOOL_F_SC_GET0x0008 #define >>> MEMPOOL_F_PKT_ALLOC 0x0010 ... >>> >>> in rte_mempool_create_empty: ... after checkin

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Jerin Jacob
On Thu, Jun 09, 2016 at 02:18:57PM +0100, Hunt, David wrote: > > > > > > As I mentioned earlier, My take is not to create the separate API's for > > > > external mempool handlers.In my view, It's same, just that sepreate > > > > mempool handler through function pointers. > > > > > > > > To keep

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Jerin Jacob
On Thu, Jun 09, 2016 at 11:49:44AM +, Shreyansh Jain wrote: > Hi Jerin, Hi Shreyansh, > > > > Yes, this would simplify somewhat the creation of a pktmbuf pool, in that > > it > > > replaces > > > the rte_mempool_set_ops_byname with a flag bit. However, I'm not sure we > > > want > > > to int

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Jerin Jacob
; From: Hunt, David [mailto:david.hunt at intel.com] > > > Sent: Tuesday, June 07, 2016 2:56 PM > > > To: Shreyansh Jain ; dev at dpdk.org > > > Cc: olivier.matz at 6wind.com; viktorin at rehivetech.com; > > > jerin.jacob at caviumnetworks.com > >

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Jan Viktorin
t; >> From: Hunt, David [mailto:david.hunt at intel.com] > >> Sent: Tuesday, June 07, 2016 2:56 PM > >> To: Shreyansh Jain ; dev at dpdk.org > >> Cc: olivier.matz at 6wind.com; viktorin at rehivetech.com; > >> jerin.jacob at caviumnetworks.com > >> Subje

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Hunt, David
On 9/6/2016 1:30 PM, Jerin Jacob wrote: > On Thu, Jun 09, 2016 at 11:49:44AM +, Shreyansh Jain wrote: >> Hi Jerin, > Hi Shreyansh, > Yes, this would simplify somewhat the creation of a pktmbuf pool, in that >>> it replaces the rte_mempool_set_ops_byname with a flag bit. However

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Hunt, David
wind.com; viktorin at rehivetech.com; >> jerin.jacob at caviumnetworks.com >> Subject: Re: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool >> operations >> >> Hi Shreyansh, >> >> On 8/6/2016 2:48 PM, Shreyansh Jain wrote: >>> Hi David, >&g

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Shreyansh Jain
Hi Jerin, > -Original Message- > From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com] > Sent: Thursday, June 09, 2016 6:01 PM > To: Shreyansh Jain > Cc: Hunt, David ; dev at dpdk.org; olivier.matz at > 6wind.com; > viktorin at rehivetech.com > Subject: Re

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Hunt, David
.. >>> >>>> -Original Message- >>>> From: Hunt, David [mailto:david.hunt at intel.com] >>>> Sent: Tuesday, June 07, 2016 2:56 PM >>>> To: Shreyansh Jain ; dev at dpdk.org >>>> Cc: olivier.matz at 6wind.com; viktorin at rehivet

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Shreyansh Jain
t; > > Cc: olivier.matz at 6wind.com; viktorin at rehivetech.com; > > > > jerin.jacob at caviumnetworks.com > > > > Subject: Re: [dpdk-dev] [PATCH v8 1/3] mempool: support external > mempool > > > > operations > > > > > > > > Hi

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Shreyansh Jain
l Message- > >> From: Hunt, David [mailto:david.hunt at intel.com] > >> Sent: Tuesday, June 07, 2016 2:56 PM > >> To: Shreyansh Jain ; dev at dpdk.org > >> Cc: olivier.matz at 6wind.com; viktorin at rehivetech.com; > >> jerin.jacob at caviumnetworks.com &g

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Hunt, David
Hi Olivier, On 8/6/2016 1:13 PM, Olivier Matz wrote: > Hi David, > > Please find some comments below. > > On 06/03/2016 04:58 PM, David Hunt wrote: > >> --- a/lib/librte_mempool/rte_mempool.h >> +++ b/lib/librte_mempool/rte_mempool.h >> +/** >> + * Prototype for implementation specific data provis

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-09 Thread Hunt, David
To: Shreyansh Jain ; dev at dpdk.org >> Cc: olivier.matz at 6wind.com; viktorin at rehivetech.com; >> jerin.jacob at caviumnetworks.com >> Subject: Re: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool >> operations >> >> Hi Shreyansh, >> >> On

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-08 Thread Shreyansh Jain
om; viktorin at rehivetech.com; > jerin.jacob at caviumnetworks.com; David Hunt > Subject: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool > operations > [...] > +int > +rte_mempool_ops_register(const struct rte_mempool_ops *h) > +{ > + struct rte_memp

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-08 Thread Olivier Matz
Hi David, Please find some comments below. On 06/03/2016 04:58 PM, David Hunt wrote: > --- a/lib/librte_mempool/rte_mempool.h > +++ b/lib/librte_mempool/rte_mempool.h > +/** > + * Prototype for implementation specific data provisioning function. > + * > + * The function should provide the imple

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-08 Thread Shreyansh Jain
rehivetech.com; > jerin.jacob at caviumnetworks.com > Subject: Re: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool > operations > > Hi Shreyansh, > > On 6/6/2016 3:38 PM, Shreyansh Jain wrote: > > Hi, > > > > (Apologies for overly-eager email sent on

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-07 Thread Hunt, David
Hi Shreyansh, On 6/6/2016 3:38 PM, Shreyansh Jain wrote: > Hi, > > (Apologies for overly-eager email sent on this thread earlier. Will be more > careful in future). > > This is more of a question/clarification than a comment. (And I have taken > only some snippets from original mail to keep it c

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-07 Thread Shreyansh Jain
ct: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool > operations > [...] > +int > +rte_mempool_ops_register(const struct rte_mempool_ops *h) > +{ > + struct rte_mempool_ops *ops; > + int16_t ops_index; > + > + rte_spinlock

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-06 Thread Shreyansh Jain
Hi, (Apologies for overly-eager email sent on this thread earlier. Will be more careful in future). This is more of a question/clarification than a comment. (And I have taken only some snippets from original mail to keep it cleaner) > +MEMPOOL_REGISTER_OPS(ops_mp_mc); > +MEMPOOL_REGISTER_OPS(

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-06 Thread Shreyansh Jain
Hi, This is more of a question/clarification than a comment. (And I have taken only some snippets from original mail to keep it cleaner) > +MEMPOOL_REGISTER_OPS(ops_mp_mc); > +MEMPOOL_REGISTER_OPS(ops_sp_sc); > +MEMPOOL_REGISTER_OPS(ops_mp_sc); > +MEMPOOL_REGISTER_OPS(ops_sp_mc); > + /*

[dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations

2016-06-03 Thread David Hunt
Until now, the objects stored in a mempool were internally stored in a ring. This patch introduces the possibility to register external handlers replacing the ring. The default behavior remains unchanged, but calling the new function rte_mempool_set_handler() right after rte_mempool_create_empty()