diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2017-01-09 16:55:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-09 16:07:39 -0500 |
commit | bd4ad57718cc86d2972a20f9791cd079996a4dd6 (patch) | |
tree | 8dd6f3960a397907d58b335f4b0d024a57258665 /net/smc/smc_clc.c | |
parent | f38ba179c6ca94ebeb0ac6a0956c4ea533151ad8 (diff) | |
download | linux-bd4ad57718cc86d2972a20f9791cd079996a4dd6.tar.gz linux-bd4ad57718cc86d2972a20f9791cd079996a4dd6.tar.bz2 linux-bd4ad57718cc86d2972a20f9791cd079996a4dd6.zip |
smc: initialize IB transport incl. PD, MR, QP, CQ, event, WR
Prepare the link for RDMA transport:
Create a queue pair (QP) and move it into the state Ready-To-Receive (RTR).
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_clc.c')
-rw-r--r-- | net/smc/smc_clc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 4b475dddef16..e1e684c562b8 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -201,13 +201,15 @@ int smc_clc_send_confirm(struct smc_sock *smc) SMC_GID_SIZE); memcpy(&cclc.lcl.mac, &link->smcibdev->mac[link->ibport - 1], sizeof(link->smcibdev->mac)); - - /* tbd in follow-on patch: fill in rmb-related values */ - hton24(cclc.qpn, link->roce_qp->qp_num); + cclc.rmb_rkey = + htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey); cclc.conn_idx = 1; /* for now: 1 RMB = 1 RMBE */ cclc.rmbe_alert_token = htonl(conn->alert_token_local); cclc.qp_mtu = min(link->path_mtu, link->peer_mtu); + cclc.rmbe_size = conn->rmbe_size_short; + cclc.rmb_dma_addr = + cpu_to_be64((u64)conn->rmb_desc->dma_addr[SMC_SINGLE_LINK]); hton24(cclc.psn, link->psn_initial); memcpy(cclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER)); @@ -253,6 +255,8 @@ int smc_clc_send_accept(struct smc_sock *new_smc, int srv_first_contact) memcpy(&aclc.lcl.mac, link->smcibdev->mac[link->ibport - 1], sizeof(link->smcibdev->mac[link->ibport - 1])); hton24(aclc.qpn, link->roce_qp->qp_num); + aclc.rmb_rkey = + htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey); aclc.conn_idx = 1; /* as long as 1 RMB = 1 RMBE */ aclc.rmbe_alert_token = htonl(conn->alert_token_local); aclc.qp_mtu = link->path_mtu; |