Skip to content

Commit fbfdfb9

Browse files
rbhansaliJerin Jacob
authored andcommitted
common/cnxk: change in aura field width
Aura field width has changed from 20 bits to 17 bits for cn20k. Signed-off-by: Rahul Bhansali <[email protected]>
1 parent 870e0bd commit fbfdfb9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/common/cnxk/roc_npa_type.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ roc_npa_buf_type_mask(uint64_t aura_handle)
6060
uint64_t
6161
roc_npa_buf_type_limit_get(uint64_t type_mask)
6262
{
63-
uint64_t wdata, reg;
63+
uint64_t wdata, reg, shift;
6464
uint64_t limit = 0;
6565
struct npa_lf *lf;
6666
uint64_t aura_id;
@@ -72,6 +72,7 @@ roc_npa_buf_type_limit_get(uint64_t type_mask)
7272
if (lf == NULL)
7373
return NPA_ERR_PARAM;
7474

75+
shift = roc_model_is_cn20k() ? 47 : 44;
7576
for (aura_id = 0; aura_id < lf->nr_pools; aura_id++) {
7677
if (plt_bitmap_get(lf->npa_bmp, aura_id))
7778
continue;
@@ -87,7 +88,7 @@ roc_npa_buf_type_limit_get(uint64_t type_mask)
8788
continue;
8889
}
8990

90-
wdata = aura_id << 44;
91+
wdata = aura_id << shift;
9192
addr = (int64_t *)(lf->base + NPA_LF_AURA_OP_LIMIT);
9293
reg = roc_atomic64_add_nosync(wdata, addr);
9394

0 commit comments

Comments
 (0)