File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ roc_npa_buf_type_mask(uint64_t aura_handle)
6060uint64_t
6161roc_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
You can’t perform that action at this time.
0 commit comments