Lines Matching refs:toep

79 	struct toepcb *toep = lookup_atid(sc, atid);  in do_act_establish()  local
80 struct inpcb *inp = toep->inp; in do_act_establish()
83 KASSERT(toep->tid == atid, ("%s: toep tid/atid mismatch", __func__)); in do_act_establish()
88 CURVNET_SET(toep->vnet); in do_act_establish()
90 toep->tid = tid; in do_act_establish()
91 insert_tid(sc, tid, toep, inp->inp_vflag & INP_IPV6 ? 2 : 1); in do_act_establish()
96 send_flowc_wr(toep, NULL); in do_act_establish()
97 send_reset(sc, toep, be32toh(cpl->snd_isn)); in do_act_establish()
101 make_established(toep, be32toh(cpl->snd_isn) - 1, in do_act_establish()
113 act_open_failure_cleanup(struct adapter *sc, struct toepcb *toep, u_int status) in act_open_failure_cleanup() argument
115 struct inpcb *inp = toep->inp; in act_open_failure_cleanup()
116 struct toedev *tod = &toep->td->tod; in act_open_failure_cleanup()
120 if (toep->tid >= 0) { in act_open_failure_cleanup()
121 free_atid(sc, toep->tid); in act_open_failure_cleanup()
122 toep->tid = -1; in act_open_failure_cleanup()
124 if (toep->flags & TPF_IN_TOEP_LIST) { in act_open_failure_cleanup()
125 toep->flags &= ~TPF_IN_TOEP_LIST; in act_open_failure_cleanup()
126 TAILQ_REMOVE(&td->toep_list, toep, link); in act_open_failure_cleanup()
131 CURVNET_SET(toep->vnet); in act_open_failure_cleanup()
136 final_cpl_received(toep); /* unlocks inp */ in act_open_failure_cleanup()
153 struct toepcb *toep = lookup_atid(sc, atid); in do_act_open_rpl() local
157 KASSERT(toep->tid == atid, ("%s: toep tid/atid mismatch", __func__)); in do_act_open_rpl()
166 release_tid(sc, GET_TID(cpl), toep->ctrlq); in do_act_open_rpl()
169 act_open_failure_cleanup(sc, toep, rc); in do_act_open_rpl()
245 struct toepcb *toep = NULL; in t4_connect() local
285 toep = alloc_toepcb(vi, M_NOWAIT); in t4_connect()
286 if (toep == NULL) in t4_connect()
289 toep->tid = alloc_atid(sc, toep); in t4_connect()
290 if (toep->tid < 0) in t4_connect()
293 toep->l2te = t4_l2t_get(vi->pi, rt_ifp, in t4_connect()
295 if (toep->l2te == NULL) in t4_connect()
298 toep->vnet = so->so_vnet; in t4_connect()
300 toep->l2te->idx, &toep->params); in t4_connect()
301 init_toepcb(vi, toep); in t4_connect()
304 wr = alloc_wrqe(act_open_cpl_size(sc, isipv6), toep->ctrlq); in t4_connect()
308 qid_atid = V_TID_QID(toep->ofld_rxq->iq.abs_id) | V_TID_TID(toep->tid) | in t4_connect()
319 toep->ce = t4_get_clip_entry(sc, &inp->in6p_laddr, true); in t4_connect()
320 if (toep->ce == NULL) in t4_connect()
326 cpl->params = select_ntuple(vi, toep->l2te); in t4_connect()
331 cpl5->params = select_ntuple(vi, toep->l2te); in t4_connect()
337 cpl6->params = select_ntuple(vi, toep->l2te); in t4_connect()
348 cpl->opt0 = calc_options0(vi, &toep->params); in t4_connect()
349 cpl->opt2 = calc_options2(vi, &toep->params); in t4_connect()
353 __func__, toep->tid, toep, inp, be64toh(cpl->opt0), in t4_connect()
363 cpl->params = select_ntuple(vi, toep->l2te); in t4_connect()
368 cpl5->params = select_ntuple(vi, toep->l2te); in t4_connect()
374 cpl6->params = select_ntuple(vi, toep->l2te); in t4_connect()
381 cpl->opt0 = calc_options0(vi, &toep->params); in t4_connect()
382 cpl->opt2 = calc_options2(vi, &toep->params); in t4_connect()
386 __func__, toep->tid, toep, inp, be64toh(cpl->opt0), in t4_connect()
390 offload_socket(so, toep); in t4_connect()
392 td = toep->td; in t4_connect()
394 TAILQ_INSERT_TAIL(&td->toep_list, toep, link); in t4_connect()
395 toep->flags |= TPF_IN_TOEP_LIST; in t4_connect()
398 rc = t4_l2t_send(sc, wr, toep->l2te); in t4_connect()
401 toep->flags |= TPF_CPL_PENDING; in t4_connect()
415 if (toep) { in t4_connect()
416 if (toep->tid >= 0) in t4_connect()
417 free_atid(sc, toep->tid); in t4_connect()
418 if (toep->l2te) in t4_connect()
419 t4_l2t_release(toep->l2te); in t4_connect()
420 if (toep->ce) in t4_connect()
421 t4_release_clip_entry(sc, toep->ce); in t4_connect()
422 free_toepcb(toep); in t4_connect()