Skip to content

Commit

Permalink
common/cnxk: fix pool buffer size in opaque mode
Browse files Browse the repository at this point in the history
[ upstream commit 95377ce2106eb8a7b560c93d38fe98af44813b5b ]

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

Fixes: f765f56 ("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>
  • Loading branch information
ShivaShankarKommula authored and kevintraynor committed Nov 15, 2023
1 parent 587aea0 commit 4adc748
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/common/cnxk/roc_npa.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,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;
Expand Down

0 comments on commit 4adc748

Please sign in to comment.