From f67650d11ed6cb127bff74ca025554f7ebc44741 Mon Sep 17 00:00:00 2001 From: Selvin Xavier Date: Sun, 21 Sep 2025 16:16:31 -0700 Subject: [PATCH 1/3] bnxt_re/lib: Fix the inline size check Driver sets the max inline size supported for the QP based on the max WQE size supported. Avoid the check in the library as the driver can validate the input parameter while creating the QP. Fixes: fa8dce26b88c ("libbnxt_re: Add support for CQ and QP management") Signed-off-by: Selvin Xavier --- providers/bnxt_re/verbs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c index 051c80b7f..a35fbec91 100644 --- a/providers/bnxt_re/verbs.c +++ b/providers/bnxt_re/verbs.c @@ -1147,8 +1147,6 @@ static int bnxt_re_check_qp_limits(struct bnxt_re_context *cntx, return EINVAL; if (attr->cap.max_recv_sge > devattr->max_sge) return EINVAL; - if (attr->cap.max_inline_data > BNXT_RE_MAX_INLINE_SIZE) - return EINVAL; if (attr->cap.max_send_wr > devattr->max_qp_wr) return EINVAL; if (attr->cap.max_recv_wr > devattr->max_qp_wr) From 2e65381e401069abfe37ac3e0da47fe7fe97b454 Mon Sep 17 00:00:00 2001 From: Selvin Xavier Date: Thu, 27 Nov 2025 08:14:21 -0800 Subject: [PATCH 2/3] bnxt_re/lib: Fix the WQE size alignment WQE size alignment should be 16 bytes. Currently aligning for 32 bytes. Fix this. Fixes: 66aba73d4a7a ("bnxt_re/lib: Move hardware queue to 16B aligned indices") Signed-off-by: Selvin Xavier --- providers/bnxt_re/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c index a35fbec91..a2c81daf3 100644 --- a/providers/bnxt_re/verbs.c +++ b/providers/bnxt_re/verbs.c @@ -1215,7 +1215,7 @@ static int bnxt_re_get_sq_slots(struct bnxt_re_dev *rdev, if (ilsize) { cal_ils = hdr_sz + ilsize; wqe_size = MAX(cal_ils, wqe_size); - wqe_size = align(wqe_size, hdr_sz); + wqe_size = align(wqe_size, stride); } if (wqe_size > max_wqesz) return -EINVAL; From 73c6acbf2c0ce7db28ff7d741132ef321e5384c6 Mon Sep 17 00:00:00 2001 From: Selvin Xavier Date: Thu, 27 Nov 2025 08:20:21 -0800 Subject: [PATCH 3/3] bnxt_re/lib: Remove the unused function bnxt_re_get_sqe_sz is no longer used. So removing it. Fixes: 66aba73d4a7a ("bnxt_re/lib: Move hardware queue to 16B aligned indices") Signed-off-by: Selvin Xavier --- providers/bnxt_re/main.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/providers/bnxt_re/main.h b/providers/bnxt_re/main.h index 067b0c18d..557a19858 100644 --- a/providers/bnxt_re/main.h +++ b/providers/bnxt_re/main.h @@ -360,13 +360,6 @@ static inline struct bnxt_re_ah *to_bnxt_re_ah(struct ibv_ah *ibvah) return container_of(ibvah, struct bnxt_re_ah, ibvah); } -static inline uint32_t bnxt_re_get_sqe_sz(void) -{ - return sizeof(struct bnxt_re_bsqe) + - sizeof(struct bnxt_re_send) + - BNXT_RE_MAX_INLINE_SIZE; -} - static inline uint32_t bnxt_re_get_sqe_hdr_sz(void) { return sizeof(struct bnxt_re_bsqe) + sizeof(struct bnxt_re_send);