Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-19 Thread Dmitry Kozlyuk
> -Original Message- > From: Olivier Matz > Sent: 15 октября 2021 г. 16:43 > To: Dmitry Kozlyuk > Cc: dev@dpdk.org; Andrew Rybchenko ; Matan > Azrad > Subject: Re: [PATCH v4 2/4] mempool: add non-IO flag > > External email: Use caution opening links or attachments > > > On Fri, Oct 15

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Olivier Matz
On Fri, Oct 15, 2021 at 01:27:59PM +, Dmitry Kozlyuk wrote: > > [...] > > > +static int > > > +test_mempool_flag_non_io_set_when_no_iova_contig_set(void) > > > +{ > > > + struct rte_mempool *mp; > > > + int ret; > > > + > > > + mp = rte_mempool_create_empty("empty", MEMPOOL_SIZE, >

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Dmitry Kozlyuk
> [...] > > +static int > > +test_mempool_flag_non_io_set_when_no_iova_contig_set(void) > > +{ > > + struct rte_mempool *mp; > > + int ret; > > + > > + mp = rte_mempool_create_empty("empty", MEMPOOL_SIZE, > > + MEMPOOL_ELT_SIZE, 0, 0, > > +

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Olivier Matz
Hi Dmitry, On Wed, Oct 13, 2021 at 02:01:29PM +0300, Dmitry Kozlyuk wrote: > Mempool is a generic allocator that is not necessarily used for device > IO operations and its memory for DMA. Add MEMPOOL_F_NON_IO flag to mark > such mempools automatically if their objects are not contiguous > or IOVA

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Olivier Matz
On Fri, Oct 15, 2021 at 01:41:40PM +0200, David Marchand wrote: > On Fri, Oct 15, 2021 at 12:42 PM Dmitry Kozlyuk wrote: > > > a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index > > > 8d5f99f7e7..27d197fe86 100644 > > > --- a/lib/mempool/rte_mempool.c > > > +++ b/lib/mempool/rte_mempool

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Olivier Matz
On Fri, Oct 15, 2021 at 09:58:49AM +, Dmitry Kozlyuk wrote: > > > > -Original Message- > > From: Olivier Matz > > Sent: 15 октября 2021 г. 12:43 > > To: Andrew Rybchenko > > Cc: Dmitry Kozlyuk ; dev@dpdk.org; Matan Azrad > > > > Subject: Re: [PATCH v4 2/4] mempool: add non-IO flag

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread David Marchand
On Fri, Oct 15, 2021 at 12:42 PM Dmitry Kozlyuk wrote: > > a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index > > 8d5f99f7e7..27d197fe86 100644 > > --- a/lib/mempool/rte_mempool.c > > +++ b/lib/mempool/rte_mempool.c > > @@ -802,6 +802,7 @@ rte_mempool_cache_free(struct rte_mempool_cache

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Dmitry Kozlyuk
Hello David, > [...] > - When rebasing on main, you probably won't be able to call this new flag. > The diff should be something like: > > diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index > d886f4800c..35c80291fa 100644 > --- a/app/test/test_mempool.c > +++ b/app/test/test_mem

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Dmitry Kozlyuk
> -Original Message- > From: Olivier Matz > Sent: 15 октября 2021 г. 12:43 > To: Andrew Rybchenko > Cc: Dmitry Kozlyuk ; dev@dpdk.org; Matan Azrad > > Subject: Re: [PATCH v4 2/4] mempool: add non-IO flag > > External email: Use caution opening links or attachments > > > On Fri, Oct

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Olivier Matz
On Fri, Oct 15, 2021 at 12:33:31PM +0300, Andrew Rybchenko wrote: > On 10/15/21 12:18 PM, Dmitry Kozlyuk wrote: > >> -Original Message- > >> From: Andrew Rybchenko > >> [...] > >>> diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c > >>> index 51c0ba2931..2204f140b3 100644

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Dmitry Kozlyuk
> -Original Message- > From: Andrew Rybchenko > Sent: 15 октября 2021 г. 12:34 > To: Dmitry Kozlyuk ; dev@dpdk.org > Cc: Matan Azrad ; Olivier Matz > Subject: Re: [PATCH v4 2/4] mempool: add non-IO flag > > External email: Use caution opening links or attachments > > > On 10/15/21 12

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Andrew Rybchenko
On 10/15/21 12:18 PM, Dmitry Kozlyuk wrote: >> -Original Message- >> From: Andrew Rybchenko >> [...] >>> diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c >>> index 51c0ba2931..2204f140b3 100644 >>> --- a/lib/mempool/rte_mempool.c >>> +++ b/lib/mempool/rte_mempool.c >>> @@

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread David Marchand
Hello Dmitry, On Wed, Oct 13, 2021 at 1:02 PM Dmitry Kozlyuk wrote: > diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h > index 663123042f..029b62a650 100644 > --- a/lib/mempool/rte_mempool.h > +++ b/lib/mempool/rte_mempool.h > @@ -262,6 +262,8 @@ struct rte_mempool { > #define

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Dmitry Kozlyuk
> -Original Message- > From: Andrew Rybchenko > [...] > > diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c > > index 51c0ba2931..2204f140b3 100644 > > --- a/lib/mempool/rte_mempool.c > > +++ b/lib/mempool/rte_mempool.c > > @@ -371,6 +371,8 @@ rte_mempool_populate_iova(str

Re: [dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-15 Thread Andrew Rybchenko
On 10/13/21 2:01 PM, Dmitry Kozlyuk wrote: > Mempool is a generic allocator that is not necessarily used for device > IO operations and its memory for DMA. Add MEMPOOL_F_NON_IO flag to mark > such mempools automatically if their objects are not contiguous > or IOVA are not available. Components can

[dpdk-dev] [PATCH v4 2/4] mempool: add non-IO flag

2021-10-13 Thread Dmitry Kozlyuk
Mempool is a generic allocator that is not necessarily used for device IO operations and its memory for DMA. Add MEMPOOL_F_NON_IO flag to mark such mempools automatically if their objects are not contiguous or IOVA are not available. Components can inspect this flag in order to optimize their memor