[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Jerin Jacob
On Fri, Jun 03, 2016 at 11:28:14AM +0100, Hunt, David wrote: > > > > > static inline struct rte_mempool_ops * > > > rte_mempool_ops_get(int ops_index) > > > > > > return &rte_mempool_ops_table.ops[ops_index]; > > |> 2) Considering "get" and "put" are the fast-path callbacks for > > |> pool-manger

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Olivier MATZ
Hi, Some comments below. On 06/02/2016 03:27 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 implementation specific memory f

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Jan Viktorin
Hello, sorry for top-posting. I vote for passing rte_mempool instead of void *. This is what I've already pointed at, a kind of type-safety...? Passing uint64_t just hides the problem. Another way is to name the union and pass it as eg. union rte_mempool_priv * to the callbacks. Jan?Viktorin R

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Hunt, David
On 6/3/2016 12:07 PM, Olivier MATZ wrote: > > On 06/03/2016 12:28 PM, Hunt, David wrote: >> On 6/3/2016 7:38 AM, Jerin Jacob wrote: >>> On Thu, Jun 02, 2016 at 02:27:19PM +0100, David Hunt wrote: +/** + * @internal wrapper for external mempool manager put callback. + * + * @pa

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Olivier MATZ
On 06/03/2016 12:28 PM, Hunt, David wrote: > On 6/3/2016 7:38 AM, Jerin Jacob wrote: >> On Thu, Jun 02, 2016 at 02:27:19PM +0100, David Hunt wrote: >>> +/** >>> + * @internal wrapper for external mempool manager put callback. >>> + * >>> + * @param mp >>> + * Pointer to the memory pool. >>> + *

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Jerin Jacob
On Thu, Jun 02, 2016 at 02:27:19PM +0100, David Hunt wrote: [snip] > /* create the internal ring if not already done */ > if ((mp->flags & MEMPOOL_F_RING_CREATED) == 0) { |> 1) May be RING can be replaced with some other higher abstraction name |> for the internal MEMPOOL_F_RING_CREA

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-03 Thread Hunt, David
On 6/3/2016 7:38 AM, Jerin Jacob wrote: > On Thu, Jun 02, 2016 at 02:27:19PM +0100, David Hunt wrote: > > [snip] > >> /* create the internal ring if not already done */ >> if ((mp->flags & MEMPOOL_F_RING_CREATED) == 0) { > |> 1) May be RING can be replaced with some other higher abstrac

[dpdk-dev] [PATCH v7 1/5] mempool: support external mempool operations

2016-06-02 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()