DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] common/cnxk: fix pool buffer size in opaque mode
@ 2023-10-13 16:35 Ashwin Sekhar T K
  2023-10-18  4:29 ` Jerin Jacob
  2023-10-18  4:30 ` Jerin Jacob
  0 siblings, 2 replies; 3+ messages in thread
From: Ashwin Sekhar T K @ 2023-10-13 16:35 UTC (permalink / raw)
  To: dev, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: jerinj, pbhagavatula, psatheesh, asekhar, anoobj, gakhil, hkalra,
	Kommula Shiva Shankar

From: Kommula Shiva Shankar <kshankar@marvell.com>

Pool buffer size in opaque mode must always be set to 0.

Fixes: f765f5611240 ("common/cnxk: add NPA pool HW operations")

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
 drivers/common/cnxk/roc_npa.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index b76b8e2342..6c14c49901 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -517,7 +517,11 @@ npa_aura_pool_pair_alloc(struct npa_lf *lf, const uint32_t block_size,
 	/* Update pool fields */
 	pool->stack_base = mz->iova;
 	pool->ena = 1;
-	pool->buf_size = block_size / ROC_ALIGN;
+	/* In opaque mode buffer size must be 0 */
+	if (!pool->nat_align)
+		pool->buf_size = 0;
+	else
+		pool->buf_size = block_size / ROC_ALIGN;
 	pool->stack_max_pages = stack_size;
 	pool->shift = plt_log2_u32(block_count);
 	pool->shift = pool->shift < 8 ? 0 : pool->shift - 8;
-- 
2.25.1


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

* Re: [PATCH] common/cnxk: fix pool buffer size in opaque mode
  2023-10-13 16:35 [PATCH] common/cnxk: fix pool buffer size in opaque mode Ashwin Sekhar T K
@ 2023-10-18  4:29 ` Jerin Jacob
  2023-10-18  4:30 ` Jerin Jacob
  1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2023-10-18  4:29 UTC (permalink / raw)
  To: Ashwin Sekhar T K
  Cc: dev, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, jerinj, pbhagavatula, psatheesh, anoobj, gakhil,
	hkalra, Kommula Shiva Shankar

On Fri, Oct 13, 2023 at 10:06 PM Ashwin Sekhar T K <asekhar@marvell.com> wrote:
>
> From: Kommula Shiva Shankar <kshankar@marvell.com>
>
> Pool buffer size in opaque mode must always be set to 0.
>
> Fixes: f765f5611240 ("common/cnxk: add NPA pool HW operations")
>
> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>


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


> ---
>  drivers/common/cnxk/roc_npa.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
> index b76b8e2342..6c14c49901 100644
> --- a/drivers/common/cnxk/roc_npa.c
> +++ b/drivers/common/cnxk/roc_npa.c
> @@ -517,7 +517,11 @@ npa_aura_pool_pair_alloc(struct npa_lf *lf, const uint32_t block_size,
>         /* Update pool fields */
>         pool->stack_base = mz->iova;
>         pool->ena = 1;
> -       pool->buf_size = block_size / ROC_ALIGN;
> +       /* In opaque mode buffer size must be 0 */
> +       if (!pool->nat_align)
> +               pool->buf_size = 0;
> +       else
> +               pool->buf_size = block_size / ROC_ALIGN;
>         pool->stack_max_pages = stack_size;
>         pool->shift = plt_log2_u32(block_count);
>         pool->shift = pool->shift < 8 ? 0 : pool->shift - 8;
> --
> 2.25.1
>

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

* Re: [PATCH] common/cnxk: fix pool buffer size in opaque mode
  2023-10-13 16:35 [PATCH] common/cnxk: fix pool buffer size in opaque mode Ashwin Sekhar T K
  2023-10-18  4:29 ` Jerin Jacob
@ 2023-10-18  4:30 ` Jerin Jacob
  1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2023-10-18  4:30 UTC (permalink / raw)
  To: Ashwin Sekhar T K
  Cc: dev, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, jerinj, pbhagavatula, psatheesh, anoobj, gakhil,
	hkalra, Kommula Shiva Shankar

On Fri, Oct 13, 2023 at 10:06 PM Ashwin Sekhar T K <asekhar@marvell.com> wrote:
>
> From: Kommula Shiva Shankar <kshankar@marvell.com>
>
> Pool buffer size in opaque mode must always be set to 0.
>
> Fixes: f765f5611240 ("common/cnxk: add NPA pool HW operations")
>
> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>


Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/common/cnxk/roc_npa.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
> index b76b8e2342..6c14c49901 100644
> --- a/drivers/common/cnxk/roc_npa.c
> +++ b/drivers/common/cnxk/roc_npa.c
> @@ -517,7 +517,11 @@ npa_aura_pool_pair_alloc(struct npa_lf *lf, const uint32_t block_size,
>         /* Update pool fields */
>         pool->stack_base = mz->iova;
>         pool->ena = 1;
> -       pool->buf_size = block_size / ROC_ALIGN;
> +       /* In opaque mode buffer size must be 0 */
> +       if (!pool->nat_align)
> +               pool->buf_size = 0;
> +       else
> +               pool->buf_size = block_size / ROC_ALIGN;
>         pool->stack_max_pages = stack_size;
>         pool->shift = plt_log2_u32(block_count);
>         pool->shift = pool->shift < 8 ? 0 : pool->shift - 8;
> --
> 2.25.1
>

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

end of thread, other threads:[~2023-10-18  4:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13 16:35 [PATCH] common/cnxk: fix pool buffer size in opaque mode Ashwin Sekhar T K
2023-10-18  4:29 ` Jerin Jacob
2023-10-18  4:30 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).