lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 334/545] RDMA/rtrs-srv: Fix modinfo output for stringify
    Date
    From: Jack Wang <jinpu.wang@ionos.com>

    [ 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 <jinpu.wang@ionos.com>
    Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
    Reviewed-by: Aleksei Marov <aleksei.marov@ionos.com>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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


    \
     
     \ /
      Last update: 2022-08-19 18:27    [W:4.042 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site