Skip to content

Commit 4cf1caf

Browse files
Aarnav JPJerin Jacob
authored andcommitted
common/cnxk: fix CPT res address config for inline
Fix CPT res address config logic to avoid garbage values and trigger only when inline dev is present. Fixes: 3c31a74 ("common/cnxk: config CPT result address for CN20K") Cc: [email protected] Signed-off-by: Aarnav JP <[email protected]>
1 parent ea868a4 commit 4cf1caf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/common/cnxk/roc_nix_inl.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ nix_inl_reass_inb_sa_tbl_setup(struct roc_nix *roc_nix)
581581
struct nix_inl_dev *inl_dev = NULL;
582582
uint64_t max_sa = 1, sa_pow2_sz;
583583
uint64_t sa_idx_w, lenm1_max;
584-
uint64_t res_addr_offset;
584+
uint64_t res_addr_offset = 0;
585585
uint64_t def_cptq = 0;
586586
size_t inb_sa_sz = 1;
587587
uint8_t profile_id;
@@ -626,12 +626,11 @@ nix_inl_reass_inb_sa_tbl_setup(struct roc_nix *roc_nix)
626626
inl_dev = idev->nix_inl_dev;
627627
if (inl_dev->nb_inb_cptlfs)
628628
def_cptq = inl_dev->nix_inb_qids[inl_dev->inb_cpt_lf_id];
629+
res_addr_offset = (uint64_t)(inl_dev->res_addr_offset & 0xFF) << 48;
630+
if (res_addr_offset)
631+
res_addr_offset |= (1UL << 56);
629632
}
630633

631-
res_addr_offset = (uint64_t)(inl_dev->res_addr_offset & 0xFF) << 48;
632-
if (res_addr_offset)
633-
res_addr_offset |= (1UL << 56);
634-
635634
lf_cfg->enable = 1;
636635
lf_cfg->profile_id = profile_id;
637636
lf_cfg->rx_inline_sa_base = (uintptr_t)nix->inb_sa_base[profile_id];

0 commit comments

Comments
 (0)