[v1,1/1] mempool/octeontx2: remove minimum chunck size limitation

Message ID 20190910110324.27861-1-vattunuru@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v1,1/1] mempool/octeontx2: remove minimum chunck size limitation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Vamsi Krishna Attunuru Sept. 10, 2019, 11:03 a.m. UTC
  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(-)
  

Comments

Jerin Jacob Oct. 4, 2019, 3:48 p.m. UTC | #1
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
>
  
David Marchand Oct. 24, 2019, 7:43 p.m. UTC | #2
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
  

Patch

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