lkml.org 
[lkml]   [2020]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 008/408] net/smc: fix valid DMBE buffer sizes
    Date
    From: Karsten Graul <kgraul@linux.ibm.com>

    [ Upstream commit ef12ad45880b696eb993d86c481ca891836ab593 ]

    The SMCD_DMBE_SIZES should include all valid DMBE buffer sizes, so the
    correct value is 6 which means 1MB. With 7 the registration of an ISM
    buffer would always fail because of the invalid size requested.
    Fix that and set the value to 6.

    Fixes: c6ba7c9ba43d ("net/smc: add base infrastructure for SMC-D and ISM")
    Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/smc/smc_core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/smc/smc_core.c
    +++ b/net/smc/smc_core.c
    @@ -795,7 +795,7 @@ static struct smc_buf_desc *smcr_new_buf
    return buf_desc;
    }

    -#define SMCD_DMBE_SIZES 7 /* 0 -> 16KB, 1 -> 32KB, .. 6 -> 1MB */
    +#define SMCD_DMBE_SIZES 6 /* 0 -> 16KB, 1 -> 32KB, .. 6 -> 1MB */

    static struct smc_buf_desc *smcd_new_buf_create(struct smc_link_group *lgr,
    bool is_dmb, int bufsize)

    \
     
     \ /
      Last update: 2020-10-27 15:32    [W:4.049 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site