diff options
author | Hans Wippel <hwippel@linux.ibm.com> | 2018-06-28 13:05:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-30 07:42:26 -0400 |
commit | be244f28d22f77d939ba2b973c102ad2b49d3496 (patch) | |
tree | c819462ffbf01974dcc81d7069050cb3a384efd0 /net/smc/smc_rx.c | |
parent | c758dfddc1b5b1c9b8c64e5e4bb9bf24b74f4a59 (diff) |
net/smc: add SMC-D support in data transfer
The data transfer and CDC message headers differ in SMC-R and SMC-D.
This patch adds support for the SMC-D data transfer to the existing SMC
code. It consists of the following:
* SMC-D CDC support
* SMC-D tx support
* SMC-D rx support
The CDC header is stored at the beginning of the receive buffer. Thus, a
rx_offset variable is added for the CDC header offset within the buffer
(0 for SMC-R).
Signed-off-by: Hans Wippel <hwippel@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Suggested-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_rx.c')
-rw-r--r-- | net/smc/smc_rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c index 3d77b383cccd..b329803c8339 100644 --- a/net/smc/smc_rx.c +++ b/net/smc/smc_rx.c | |||
@@ -305,7 +305,7 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, | |||
305 | target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); | 305 | target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); |
306 | 306 | ||
307 | /* we currently use 1 RMBE per RMB, so RMBE == RMB base addr */ | 307 | /* we currently use 1 RMBE per RMB, so RMBE == RMB base addr */ |
308 | rcvbuf_base = conn->rmb_desc->cpu_addr; | 308 | rcvbuf_base = conn->rx_off + conn->rmb_desc->cpu_addr; |
309 | 309 | ||
310 | do { /* while (read_remaining) */ | 310 | do { /* while (read_remaining) */ |
311 | if (read_done >= target || (pipe && read_done)) | 311 | if (read_done >= target || (pipe && read_done)) |