Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3115430rwb; Mon, 15 Aug 2022 18:29:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5edVsPXsmxy2cdRPMwSQcZpv/8GSVCUQr4aNds3BeIj3PdRcVOs1TOEd3fr15pBK7d5M9/ X-Received: by 2002:a17:902:cec8:b0:16f:8081:54bc with SMTP id d8-20020a170902cec800b0016f808154bcmr19009415plg.139.1660613375031; Mon, 15 Aug 2022 18:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660613375; cv=none; d=google.com; s=arc-20160816; b=WbK7He8GA/v2i8LqnxeJHEydrFSTefUoZk9vNPRCbv6STFF4OAU4pDAkcVuOVBDRNa A0c4/hqivqGyVMINo7k1j6ttoh2hgtpvXFQufiRwGlHKi3A6WZzhz4CI6FZK8KJWvk6C jO8Cf1pyluPixnOsbRaCQ1xZeBKJA7N/1t9x9XkP3GVXv2rrIhWCcidaieYbQMNvONF0 Caiz0+/TMB0NkfK16b/veECxp7vio3a9srjKmu9KZip53VDMUhUYxHHQl3SZDQpP/HZt VgChfciN4pjsQG37ZiFTZNtVW2T3BjcHdoDEzX9odCErxvcMvxQz92lT/ox8L4X3ajA6 UZDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oeQOBGrJGO/ruusc7/liyXhw+0vo97pOdkd0pmS1JM4=; b=Gbm45HKe/wVlZoTAZJnL4yJ4NFY9PCEXeAUsFhr0wusZ73ZOQ8cGW5kd5zNG1cUmjv xHQN5ECFxzlBiXGckYiQSLTgCz/GFBfKrBWstjRwVt03GubnP0FHMK3XnV+uGWIKOm/i E+Kbxdt0z3c6P40c68qqAdWRkmEb/5OqQ4fJlN4MQK+dBF0wLe6WNPWGXnnSwwjGFWrT UjehNSN352YRIrwhhdL/Jnwy0MgRZGno2oCDJgk0ejpyq5f3IIbR8YsDZJOEA9H/Cw7J WTMTzFnD73z6IfC+DhMsWkTamPNhvOcnM/WYhqBXhIkaIvcYwA4zp100RqenEDQiMnrF L91A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bqr9z7oT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a170902ba8900b00170a2d880d9si10374700pls.266.2022.08.15.18.29.23; Mon, 15 Aug 2022 18:29:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bqr9z7oT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352977AbiHPAY2 (ORCPT + 99 others); Mon, 15 Aug 2022 20:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357240AbiHPAWd (ORCPT ); Mon, 15 Aug 2022 20:22:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C47217DA85; Mon, 15 Aug 2022 13:34:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A1919B8114A; Mon, 15 Aug 2022 20:33:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3DD1C433C1; Mon, 15 Aug 2022 20:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595628; bh=weok3iHwUqW9l/tFNEfGTuwTKgKYFlTygOvmoFYZ3F0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bqr9z7oTKnvK+iBrwAAhn75glf2+j/VJErxGPPwxhFnMG/BzPvjuuolXXiuKkMe8J 2NCjnHybF9DUNFtkth6X19+amN8z+GztiYtUqX/GPYyFL5Wk3AjuqTI7KCru/PFUdd 8AzHnMcFkwqyIDmp3KeEmRAjvfzWJYhqDqETbXS8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, jinpu.wang@ionos.com, Md Haris Iqbal , Aleksei Marov , Leon Romanovsky , Sasha Levin Subject: [PATCH 5.19 0823/1157] RDMA/rtrs-srv: Fix modinfo output for stringify Date: Mon, 15 Aug 2022 20:02:59 +0200 Message-Id: <20220815180512.408006196@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jack Wang [ Upstream commit ed6e53820ee4f68ed927de17e5675ff2a07a47e2 ] stringify works with define, not enum. Fixes: 91fddedd439c ("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: Jack Wang Signed-off-by: Md Haris Iqbal Reviewed-by: Aleksei Marov Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/rtrs/rtrs-pri.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/ulp/rtrs/rtrs-pri.h b/drivers/infiniband/ulp/rtrs/rtrs-pri.h index 9a1e5c2ae55c..ac0df734eba8 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-pri.h +++ b/drivers/infiniband/ulp/rtrs/rtrs-pri.h @@ -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, -- 2.35.1