Commit 3d70e0fb authored by Kalesh AP's avatar Kalesh AP Committed by Leon Romanovsky
Browse files

RDMA/bnxt_re: Fix to use correct page size for PDE table



In bnxt_qplib_alloc_init_hwq(), while allocating memory for PDE table
driver incorrectly is using the "pg_size" value passed to the function.
Fixed to use the right value 4K. Also, fixed the allocation size for
PBL table.

Fixes: 0c4dcd60 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
Signed-off-by: default avatarDamodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Signed-off-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/20251223131855.145955-1-kalesh-anakkur.purayil@broadcom.com


Reviewed-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 9b68a1cc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,
			if (npbl % BIT(MAX_PDL_LVL_SHIFT))
				npde++;
			/* Alloc PDE pages */
			sginfo.pgsize = npde * pg_size;
			sginfo.pgsize = npde * ROCE_PG_SIZE_4K;
			sginfo.npages = 1;
			rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_0], &sginfo);
			if (rc)
@@ -245,7 +245,7 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,

			/* Alloc PBL pages */
			sginfo.npages = npbl;
			sginfo.pgsize = PAGE_SIZE;
			sginfo.pgsize = ROCE_PG_SIZE_4K;
			rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_1], &sginfo);
			if (rc)
				goto fail;