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>
This commit is contained in:

committed by
David S. Miller

parent
92a138e333
commit
95d8d26306
@@ -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;
|
||||
|
Reference in New Issue
Block a user