diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2017-01-09 16:55:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-09 22:07:40 +0100 |
commit | 9bf9abead28abaf11d0776b6e0c5d34b6525e846 (patch) | |
tree | 99650da84bd065fa569ca6ea65c5a3fcbb7ffb78 /net/smc/smc_core.c | |
parent | smc: initialize IB transport incl. PD, MR, QP, CQ, event, WR (diff) | |
download | linux-9bf9abead28abaf11d0776b6e0c5d34b6525e846.tar.xz linux-9bf9abead28abaf11d0776b6e0c5d34b6525e846.zip |
smc: link layer control (LLC)
send and receive LLC messages CONFIRM_LINK (via IB message send and CQE)
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_core.c')
-rw-r--r-- | net/smc/smc_core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 0e9adbd9cd68..906d88c266c0 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -21,9 +21,13 @@ #include "smc_core.h" #include "smc_ib.h" #include "smc_wr.h" +#include "smc_llc.h" +#define SMC_LGR_NUM_INCR 256 #define SMC_LGR_FREE_DELAY (600 * HZ) +static u32 smc_lgr_num; /* unique link group number */ + /* Register connection's alert token in our lookup structure. * To use rbtrees we have to implement our own insert core. * Requires @conns_lock @@ -152,6 +156,8 @@ static int smc_lgr_create(struct smc_sock *smc, __be32 peer_in_addr, INIT_LIST_HEAD(&lgr->sndbufs[i]); INIT_LIST_HEAD(&lgr->rmbs[i]); } + smc_lgr_num += SMC_LGR_NUM_INCR; + memcpy(&lgr->id, (u8 *)&smc_lgr_num, SMC_LGR_ID_SIZE); INIT_DELAYED_WORK(&lgr->free_work, smc_lgr_free_work); lgr->conns_all = RB_ROOT; @@ -177,6 +183,8 @@ static int smc_lgr_create(struct smc_sock *smc, __be32 peer_in_addr, rc = smc_wr_create_link(lnk); if (rc) goto destroy_qp; + init_completion(&lnk->llc_confirm); + init_completion(&lnk->llc_confirm_resp); smc->conn.lgr = lgr; rwlock_init(&lgr->conns_lock); |