[PATCH 17/19] common/cnxk: change in aura field width
Nithin Dabilpuram
ndabilpuram at marvell.com
Mon Sep 1 09:30:33 CEST 2025
From: Rahul Bhansali <rbhansali at marvell.com>
Aura field width has changed from 20 bits to 17 bits for
cn20k.
Signed-off-by: Rahul Bhansali <rbhansali at marvell.com>
---
drivers/common/cnxk/roc_npa_type.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_npa_type.c b/drivers/common/cnxk/roc_npa_type.c
index ed90138944..4c794972c0 100644
--- a/drivers/common/cnxk/roc_npa_type.c
+++ b/drivers/common/cnxk/roc_npa_type.c
@@ -60,7 +60,7 @@ roc_npa_buf_type_mask(uint64_t aura_handle)
uint64_t
roc_npa_buf_type_limit_get(uint64_t type_mask)
{
- uint64_t wdata, reg;
+ uint64_t wdata, reg, shift;
uint64_t limit = 0;
struct npa_lf *lf;
uint64_t aura_id;
@@ -72,6 +72,7 @@ roc_npa_buf_type_limit_get(uint64_t type_mask)
if (lf == NULL)
return NPA_ERR_PARAM;
+ shift = roc_model_is_cn20k() ? 47 : 44;
for (aura_id = 0; aura_id < lf->nr_pools; aura_id++) {
if (plt_bitmap_get(lf->npa_bmp, aura_id))
continue;
@@ -87,7 +88,7 @@ roc_npa_buf_type_limit_get(uint64_t type_mask)
continue;
}
- wdata = aura_id << 44;
+ wdata = aura_id << shift;
addr = (int64_t *)(lf->base + NPA_LF_AURA_OP_LIMIT);
reg = roc_atomic64_add_nosync(wdata, addr);
--
2.34.1
More information about the dev
mailing list