[5/6] net/cnxk: update frag offset calculation

Message ID 20250519125424.1435140-5-rbhansali@marvell.com (mailing list archive)
State Changes Requested
Delegated to: Jerin Jacob
Headers
Series [1/6] common/cnxk: config of CPT result address offset |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Rahul Bhansali May 19, 2025, 12:54 p.m. UTC
Update frag offset calculation based on CSR change.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/net/cnxk/cn20k_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/cnxk/cn20k_rx.h b/drivers/net/cnxk/cn20k_rx.h
index 09042e384d..5682631815 100644
--- a/drivers/net/cnxk/cn20k_rx.h
+++ b/drivers/net/cnxk/cn20k_rx.h
@@ -337,7 +337,7 @@  nix_cqe_xtract_mseg(const union nix_rx_parse_u *rx, struct rte_mbuf *mbuf, uint6
 		cq_w5 = *((const uint64_t *)rx + 4);
 		len = rlen + ((cq_w5 >> 16) & 0xFF) - (cq_w5 & 0xFF);
 		num_frags = hdr->w0.num_frags;
-		sg_base = cpth + (offset ? (offset << 3) : 256);
+		sg_base = cpth + (offset ? (offset << 5) : 256);
 		finfo = (const struct cpt_frag_info_s *)sg_base;
 		sg_base += num_frags ? (num_frags > 4 ? 32 : 16) : 0;
 		sg = *(uint64_t *)sg_base;