summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_cdc.c
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.vnet.ibm.com>2017-01-09 16:55:23 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 16:07:40 -0500
commite6727f39004bd95725342b3b343a14c7d59df07f (patch)
tree376bebbead3f9f2cabaddd75cfd34c32fe16ffda /net/smc/smc_cdc.c
parent5f08318f617b05b6ee389d8bd174c7af921ebf19 (diff)
downloadlinux-e6727f39004bd95725342b3b343a14c7d59df07f.tar.bz2
smc: send data (through RDMA)
copy data to kernel send buffer, and trigger RDMA write Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_cdc.c')
-rw-r--r--net/smc/smc_cdc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/smc/smc_cdc.c b/net/smc/smc_cdc.c
index 111d23ff9e17..77fe16967376 100644
--- a/net/smc/smc_cdc.c
+++ b/net/smc/smc_cdc.c
@@ -14,6 +14,7 @@
#include "smc.h"
#include "smc_wr.h"
#include "smc_cdc.h"
+#include "smc_tx.h"
/********************************** send *************************************/
@@ -52,7 +53,7 @@ static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd,
smc_curs_read(&cdcpend->cursor, cdcpend->conn),
cdcpend->conn);
}
- /* subsequent patch: wake if send buffer space available */
+ smc_tx_sndbuf_nonfull(smc);
bh_unlock_sock(&smc->sk);
}
@@ -204,7 +205,9 @@ static void smc_cdc_msg_recv_action(struct smc_sock *smc,
/* subsequent patch: terminate connection */
/* piggy backed tx info */
- /* subsequent patch: wake receivers if receive buffer space available */
+ /* trigger sndbuf consumer: RDMA write into peer RMBE and CDC */
+ if (diff_cons && smc_tx_prepared_sends(conn))
+ smc_tx_sndbuf_nonempty(conn);
/* subsequent patch: trigger socket release if connection closed */