Commit b219a6b0 authored by Kashyap Desai's avatar Kashyap Desai Committed by Wen Zhiwei
Browse files

RDMA/bnxt_re: Fix max SGEs for the Work Request

stable inclusion
from stable-v6.6.70
commit 3de1b50f055dc2ca7072a526cdda21f691c22dd9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBOHV1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3de1b50f055dc2ca7072a526cdda21f691c22dd9



--------------------------------

commit 79d330fbdffd8cee06d8bdf38d82cb62d8363a27 upstream.

Gen P7 supports up to 13 SGEs for now. WQE software structure
can hold only 6 now. Since the max send sge is reported as
13, the stack can give requests up to 13 SGEs. This is causing
traffic failures and system crashes.

Use the define for max SGE supported for variable size. This
will work for both static and variable WQEs.

Fixes: 227f51743b61 ("RDMA/bnxt_re: Fix the max WQE size for static WQE support")
Signed-off-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/20241204075416.478431-2-kalesh-anakkur.purayil@broadcom.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent fac08010
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ struct bnxt_qplib_sge {
	u32				size;
};

#define BNXT_QPLIB_QP_MAX_SGL	6
struct bnxt_qplib_swq {
	u64				wr_id;
	int				next_idx;
@@ -153,7 +152,7 @@ struct bnxt_qplib_swqe {
#define BNXT_QPLIB_SWQE_FLAGS_UC_FENCE			BIT(2)
#define BNXT_QPLIB_SWQE_FLAGS_SOLICIT_EVENT		BIT(3)
#define BNXT_QPLIB_SWQE_FLAGS_INLINE			BIT(4)
	struct bnxt_qplib_sge		sg_list[BNXT_QPLIB_QP_MAX_SGL];
	struct bnxt_qplib_sge		sg_list[BNXT_VAR_MAX_SGE];
	int				num_sge;
	/* Max inline data is 96 bytes */
	u32				inline_len;