summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_tx.c
diff options
context:
space:
mode:
authorHans Wippel <hwippel@linux.ibm.com>2018-05-18 09:34:13 +0200
committerDavid S. Miller <davem@davemloft.net>2018-05-18 13:15:01 -0400
commit95d8d26306ee19f9ba32b6381571a72ee924a0b6 (patch)
tree68647ffb7b30a9f8ccf9e04545155235aad5e1ee /net/smc/smc_tx.c
parent92a138e333ead89918db5f72e573264cb3b91cb5 (diff)
downloadop-kernel-dev-95d8d26306ee19f9ba32b6381571a72ee924a0b6.zip
op-kernel-dev-95d8d26306ee19f9ba32b6381571a72ee924a0b6.tar.gz
net/smc: calculate write offset in RMB only once per connection
Currently, the write offset within the RMB is calculated on each write operation although it is fixed for each connection. With this patch, the offset is calculated once and stored in a connection specific variable. Signed-off-by: Hans Wippel <hwippel@linux.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_tx.c')
-rw-r--r--net/smc/smc_tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c
index 58a56c9..1f4a38b 100644
--- a/net/smc/smc_tx.c
+++ b/net/smc/smc_tx.c
@@ -261,7 +261,7 @@ static int smc_tx_rdma_write(struct smc_connection *conn, int peer_rmbe_offset,
rdma_wr.remote_addr =
lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].dma_addr +
/* RMBE within RMB */
- ((conn->peer_rmbe_idx - 1) * conn->peer_rmbe_size) +
+ conn->tx_off +
/* offset within RMBE */
peer_rmbe_offset;
rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;
OpenPOWER on IntegriCloud