Skip to content

Commit 4f33f7c

Browse files
karstengrgregkh
authored andcommitted
net/smc: fix valid DMBE buffer sizes
[ Upstream commit ef12ad4 ] 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: c6ba7c9 ("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>
1 parent 3d1b5d3 commit 4f33f7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/smc/smc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ static int smcr_buf_map_usable_links(struct smc_link_group *lgr,
15971597
return rc;
15981598
}
15991599

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

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

0 commit comments

Comments
 (0)