summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-10-14 19:43:28 +0200
committerJakub Kicinski <kuba@kernel.org>2020-10-15 09:54:43 -0700
commitef12ad45880b696eb993d86c481ca891836ab593 (patch)
treef4d46f5420b536e7db6941834e87adbaf887c9e7 /net
parentd535ca1367787ddc8bff22d679a11f864c8228bc (diff)
downloadlinux-stable-ef12ad45880b696eb993d86c481ca891836ab593.tar.gz
linux-stable-ef12ad45880b696eb993d86c481ca891836ab593.tar.bz2
linux-stable-ef12ad45880b696eb993d86c481ca891836ab593.zip
net/smc: fix valid DMBE buffer sizes
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>
Diffstat (limited to 'net')
-rw-r--r--net/smc/smc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index a406627b1d55..7c0e4fac9748 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -1597,7 +1597,7 @@ out:
return rc;
}
-#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)