summaryrefslogtreecommitdiffstats
path: root/net/smc/af_smc.c
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.vnet.ibm.com>2017-07-28 13:56:22 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-29 11:22:58 -0700
commit10428dd8354cc1c74ee806df45c2227c1f9d7b0c (patch)
treeaeba542906415b93991296bbae5ad5f983587bcc /net/smc/af_smc.c
parentb33982c3a6838d13024ae5a32e1f21897767b04b (diff)
downloadlinux-10428dd8354cc1c74ee806df45c2227c1f9d7b0c.tar.bz2
net/smc: synchronize buffer usage with device
Usage of send buffer "sndbuf" is synced (a) before filling sndbuf for cpu access (b) after filling sndbuf for device access Usage of receive buffer "RMB" is synced (a) before reading RMB content for cpu access (b) after reading RMB content for device access Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r--net/smc/af_smc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 75518879b68a..8c6d24b2995d 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -474,6 +474,7 @@ static int smc_connect_rdma(struct smc_sock *smc)
}
}
}
+ smc_rmb_sync_sg_for_device(&smc->conn);
rc = smc_clc_send_confirm(smc);
if (rc)
@@ -832,6 +833,7 @@ static void smc_listen_work(struct work_struct *work)
}
}
}
+ smc_rmb_sync_sg_for_device(&new_smc->conn);
rc = smc_clc_send_accept(new_smc, local_contact);
if (rc)