Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1864321rwb; Fri, 19 Aug 2022 10:39:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4E6jGc/vJ+gTHVEAkXw3hx9RE+xGNYVDy8F3TL7vZdDuZfNWGZuDo9ylgP514wBk/5H1vu X-Received: by 2002:a17:903:1c3:b0:16f:878:ed42 with SMTP id e3-20020a17090301c300b0016f0878ed42mr8273939plh.163.1660930760275; Fri, 19 Aug 2022 10:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930760; cv=none; d=google.com; s=arc-20160816; b=uAnN9SzB5QS5i9puNH5umVdaK4BOuo+pk5P7V5xaysnl8mEKARnyHez8Jj96P6zWHI O3U8NHLcXduisuhwXP01b9Yc9vlKd6y8d9/lfYkoP0c3lh2arAZw4GPCUJQzMKb3XMsl gkPD6PePpSf18x0RvIlXtGbIeLaAi+UeMGacMM9c/Ia0E/EpJymbZGHYxnH+r1i10wzV dBQbA4dCAQCvrqnNErOkd906Tavmt2MSohVboAdGL3FrNBogLc0SQ/PhEdTrgc4usEL3 +GZqUXYd82/HudsNrR6yOPqrM7t1hNwN/VCdzs+POLhjSsPUZA6cuZaFwwNyoGJcnuwT 2MIw== 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=qd7vOaqVLlpNSZvMEJDsLgwOgW1Eyp7yOrkjPf2JnJk=; b=JYBg2is4MnG2XoMLuQvTBi3tBKZA4zk87+B7whofuac36fksoFx6jFYrFxVQCk7pOO F6B0iFf7wcWBlLhywtJmkwYrqNU5RecSwgUdSfNtJUzYWCz0EmioSmeaC13nxYq2P2oj 3YYTj75iEjHv/0j0xf8UWw00kh5lxVCMUC+TWZ69Z61/wvyllxpFgzbjg4FXSvoqvC8P Zh0QjkKA35iQEaM58PL5OfI8sopBKxwFN8wtFBnu0sU4wN5LTQtl4ymK4WcmCXrG1nMS Lets8van1JRCydm7imXwXgMj+70wjOcw/Fokf2n/Gsr55sPR2z+5FWWTQzrfNtcqvPXo ResQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h/wLmrcD"; 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 k10-20020a63d84a000000b0041a60be4df2si4601484pgj.22.2022.08.19.10.39.09; Fri, 19 Aug 2022 10:39:20 -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="h/wLmrcD"; 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 S1352243AbiHSQ0d (ORCPT + 99 others); Fri, 19 Aug 2022 12:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352485AbiHSQVG (ORCPT ); Fri, 19 Aug 2022 12:21:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D906BB1FF; Fri, 19 Aug 2022 09:02:31 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 73F4B614DA; Fri, 19 Aug 2022 16:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D11FC433D6; Fri, 19 Aug 2022 16:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924950; bh=LmDpmWOQcXXrIrLrEhtTfbOhhz7j4W6Q0gjC0cl/cDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/wLmrcD/srtS0gMJURdAZr7NKVo6Hra8aW2L6QZkLej8w7KYFKOUv0jsb6dWW4S1 yiKg0U227HFXQhsGn9f/QJ4GLW4Lw8O7ulRV9YztWLT8wsTmfPxKGbfIhRgPSRTKvL UFiaTdaAnLcJWiVAkjvvfDlVjBujEo9a98iEXaCA= 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.10 334/545] RDMA/rtrs-srv: Fix modinfo output for stringify Date: Fri, 19 Aug 2022 17:41:44 +0200 Message-Id: <20220819153844.328916898@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 77e98ff9008a..c5ca123d52a8 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