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>
This commit is contained in:
Ursula Braun
2017-01-09 16:55:23 +01:00
committed by David S. Miller
parent 5f08318f61
commit e6727f3900
6 changed files with 491 additions and 4 deletions

View File

@@ -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 */