From 69cb7dc0218b2c54416722eddf181e720f24c305 Mon Sep 17 00:00:00 2001 From: Hans Wippel Date: Fri, 18 May 2018 09:34:10 +0200 Subject: net/smc: add common buffer size in send and receive buffer descriptors In addition to the buffer references, SMC currently stores the sizes of the receive and send buffers in each connection as separate variables. This patch introduces a buffer length variable in the common buffer descriptor and uses this length instead. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller --- net/smc/smc_core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'net/smc/smc_core.h') diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h index 845dc073de13..4885a7efa84f 100644 --- a/net/smc/smc_core.h +++ b/net/smc/smc_core.h @@ -124,6 +124,7 @@ struct smc_buf_desc { struct list_head list; void *cpu_addr; /* virtual address of buffer */ struct page *pages; + int len; /* length of buffer */ struct sg_table sgt[SMC_LINKS_PER_LGR_MAX];/* virtual buffer */ struct ib_mr *mr_rx[SMC_LINKS_PER_LGR_MAX]; /* for rmb only: memory region -- cgit