Commit 432554a8 authored by Jack Wang's avatar Jack Wang Committed by Zheng Zengkai
Browse files

RDMA/rtrs-srv: Fix modinfo output for stringify

stable inclusion
from stable-v5.10.137
commit 84f83a26194aef0ae7ed0e784f9ae15c3a915fae
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

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

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

[ Upstream commit ed6e5382 ]

stringify works with define, not enum.

Fixes: 91fddedd ("RDMA/rtrs: private headers with rtrs protocol structs and helpers")
Cc: jinpu.wang@ionos.com
Link: https://lore.kernel.org/r/20220712103113.617754-2-haris.iqbal@ionos.com


Signed-off-by: default avatarJack Wang <jinpu.wang@ionos.com>
Signed-off-by: default avatarMd Haris Iqbal <haris.iqbal@ionos.com>
Reviewed-by: default avatarAleksei Marov <aleksei.marov@ionos.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent ce843bd9
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -23,6 +23,17 @@
#define RTRS_PROTO_VER_STRING __stringify(RTRS_PROTO_VER_MAJOR) "." \
			       __stringify(RTRS_PROTO_VER_MINOR)

/*
 * Max IB immediate data size is 2^28 (MAX_IMM_PAYL_BITS)
 * and the minimum chunk size is 4096 (2^12).
 * So the maximum sess_queue_depth is 65536 (2^16) in theory.
 * But mempool_create, create_qp and ib_post_send fail with
 * "cannot allocate memory" error if sess_queue_depth is too big.
 * Therefore the pratical max value of sess_queue_depth is
 * somewhere between 1 and 65534 and it depends on the system.
 */
#define MAX_SESS_QUEUE_DEPTH 65535

enum rtrs_imm_const {
	MAX_IMM_TYPE_BITS = 4,
	MAX_IMM_TYPE_MASK = ((1 << MAX_IMM_TYPE_BITS) - 1),
@@ -46,16 +57,6 @@ enum {

	MAX_PATHS_NUM = 128,

	/*
	 * Max IB immediate data size is 2^28 (MAX_IMM_PAYL_BITS)
	 * and the minimum chunk size is 4096 (2^12).
	 * So the maximum sess_queue_depth is 65536 (2^16) in theory.
	 * But mempool_create, create_qp and ib_post_send fail with
	 * "cannot allocate memory" error if sess_queue_depth is too big.
	 * Therefore the pratical max value of sess_queue_depth is
	 * somewhere between 1 and 65534 and it depends on the system.
	 */
	MAX_SESS_QUEUE_DEPTH = 65535,
	MIN_CHUNK_SIZE = 8192,

	RTRS_HB_INTERVAL_MS = 5000,