DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH v1 1/1] mempool/octeontx2: remove minimum chunck size limitation
@ 2019-09-10 11:03 vattunuru
  2019-10-04 15:48 ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: vattunuru @ 2019-09-10 11:03 UTC (permalink / raw)
  To: dev; +Cc: thomas, jerinj, Vamsi Attunuru

From: Vamsi Attunuru <vattunuru@marvell.com>

Memory required for the mempool objects need not be physically
contiguous on octeontx2's HW, mempool pmd supports the minimum chunk
size set by the default handler. Hence discarding the limitation set
by the pmd on the min_chunk_size value.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
 drivers/mempool/octeontx2/otx2_mempool_ops.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
index f5a4fe3..d769575 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
@@ -713,24 +713,12 @@ static ssize_t
 otx2_npa_calc_mem_size(const struct rte_mempool *mp, uint32_t obj_num,
 		       uint32_t pg_shift, size_t *min_chunk_size, size_t *align)
 {
-	ssize_t mem_size;
-
 	/*
 	 * Simply need space for one more object to be able to
 	 * fulfill alignment requirements.
 	 */
-	mem_size = rte_mempool_op_calc_mem_size_default(mp, obj_num + 1,
-							pg_shift,
-							min_chunk_size, align);
-	if (mem_size >= 0) {
-		/*
-		 * Memory area which contains objects must be physically
-		 * contiguous.
-		 */
-		*min_chunk_size = mem_size;
-	}
-
-	return mem_size;
+	return rte_mempool_op_calc_mem_size_default(mp, obj_num + 1, pg_shift,
+						    min_chunk_size, align);
 }
 
 static int
-- 
2.8.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] mempool/octeontx2: remove minimum chunck size limitation
  2019-09-10 11:03 [dpdk-dev] [PATCH v1 1/1] mempool/octeontx2: remove minimum chunck size limitation vattunuru
@ 2019-10-04 15:48 ` Jerin Jacob
  2019-10-24 19:43   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob @ 2019-10-04 15:48 UTC (permalink / raw)
  To: Vamsi Attunuru; +Cc: dpdk-dev, Thomas Monjalon, Jerin Jacob

On Tue, Sep 10, 2019 at 4:33 PM <vattunuru@marvell.com> wrote:
>
> From: Vamsi Attunuru <vattunuru@marvell.com>
>
> Memory required for the mempool objects need not be physically
> contiguous on octeontx2's HW, mempool pmd supports the minimum chunk
> size set by the default handler. Hence discarding the limitation set
> by the pmd on the min_chunk_size value.
>
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>

This patch needs to go through to master repo based on MAINTAINERS
file. Changing the "Delegate to" to Thomas in patchwork.

> ---
>  drivers/mempool/octeontx2/otx2_mempool_ops.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
> index f5a4fe3..d769575 100644
> --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
> +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
> @@ -713,24 +713,12 @@ static ssize_t
>  otx2_npa_calc_mem_size(const struct rte_mempool *mp, uint32_t obj_num,
>                        uint32_t pg_shift, size_t *min_chunk_size, size_t *align)
>  {
> -       ssize_t mem_size;
> -
>         /*
>          * Simply need space for one more object to be able to
>          * fulfill alignment requirements.
>          */
> -       mem_size = rte_mempool_op_calc_mem_size_default(mp, obj_num + 1,
> -                                                       pg_shift,
> -                                                       min_chunk_size, align);
> -       if (mem_size >= 0) {
> -               /*
> -                * Memory area which contains objects must be physically
> -                * contiguous.
> -                */
> -               *min_chunk_size = mem_size;
> -       }
> -
> -       return mem_size;
> +       return rte_mempool_op_calc_mem_size_default(mp, obj_num + 1, pg_shift,
> +                                                   min_chunk_size, align);
>  }
>
>  static int
> --
> 2.8.4
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] mempool/octeontx2: remove minimum chunck size limitation
  2019-10-04 15:48 ` Jerin Jacob
@ 2019-10-24 19:43   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2019-10-24 19:43 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Vamsi Attunuru, dpdk-dev, Thomas Monjalon, Jerin Jacob

On Fri, Oct 4, 2019 at 5:49 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Tue, Sep 10, 2019 at 4:33 PM <vattunuru@marvell.com> wrote:
> >
> > From: Vamsi Attunuru <vattunuru@marvell.com>
> >
> > Memory required for the mempool objects need not be physically
> > contiguous on octeontx2's HW, mempool pmd supports the minimum chunk
> > size set by the default handler. Hence discarding the limitation set
> > by the pmd on the min_chunk_size value.
> >
> > Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
>
> Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks.



--
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 11:03 [dpdk-dev] [PATCH v1 1/1] mempool/octeontx2: remove minimum chunck size limitation vattunuru
2019-10-04 15:48 ` Jerin Jacob
2019-10-24 19:43   ` David Marchand

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox