Lines Matching defs:toep

79 	struct toepcb *toep = lookup_atid(sc, atid);
80 struct inpcb *inp = toep->inp;
83 KASSERT(toep->tid == atid, ("%s: toep tid/atid mismatch", __func__));
88 CURVNET_SET(toep->vnet);
90 toep->tid = tid;
91 insert_tid(sc, tid, toep, inp->inp_vflag & INP_IPV6 ? 2 : 1);
93 update_tid_qid_sel(toep->vi, &toep->params, tid);
94 toep->ofld_txq = &sc->sge.ofld_txq[toep->params.txq_idx];
95 toep->ctrlq = &sc->sge.ctrlq[toep->params.ctrlq_idx];
102 send_flowc_wr(toep, NULL);
103 send_reset(sc, toep, be32toh(cpl->snd_isn));
107 make_established(toep, be32toh(cpl->snd_isn) - 1,
119 act_open_failure_cleanup(struct adapter *sc, struct toepcb *toep, u_int status)
121 struct inpcb *inp = toep->inp;
122 struct toedev *tod = &toep->td->tod;
126 if (toep->tid >= 0) {
127 free_atid(sc, toep->tid);
128 toep->tid = -1;
130 if (toep->flags & TPF_IN_TOEP_LIST) {
131 toep->flags &= ~TPF_IN_TOEP_LIST;
132 TAILQ_REMOVE(&td->toep_list, toep, link);
137 CURVNET_SET(toep->vnet);
142 final_cpl_received(toep); /* unlocks inp */
159 struct toepcb *toep = lookup_atid(sc, atid);
163 KASSERT(toep->tid == atid, ("%s: toep tid/atid mismatch", __func__));
172 release_tid(sc, GET_TID(cpl), toep->ctrlq);
175 act_open_failure_cleanup(sc, toep, rc);
255 struct toepcb *toep = NULL;
296 toep = alloc_toepcb(vi, M_NOWAIT);
297 if (toep == NULL)
300 toep->tid = alloc_atid(sc, toep);
301 if (toep->tid < 0)
304 toep->l2te = t4_l2t_get(vi->pi, rt_ifp,
306 if (toep->l2te == NULL)
309 toep->vnet = so->so_vnet;
311 toep->l2te->idx, &toep->params);
312 init_toepcb(vi, toep);
315 wr = alloc_wrqe(act_open_cpl_size(sc, isipv6), toep->ctrlq);
319 qid_atid = V_TID_QID(toep->ofld_rxq->iq.abs_id) | V_TID_TID(toep->tid) |
322 ntuple = select_ntuple(vi, toep->l2te);
332 toep->ce = t4_get_clip_entry(sc, &inp->in6p_laddr, true);
333 if (toep->ce == NULL)
366 cpl->opt0 = calc_options0(vi, &toep->params);
367 cpl->opt2 = calc_options2(vi, &toep->params);
370 "%s: atid %u, toep %p, inp %p, opt0 %#016lx, opt2 %#08x",
371 __func__, toep->tid, toep, inp, be64toh(cpl->opt0),
404 cpl->opt0 = calc_options0(vi, &toep->params);
405 cpl->opt2 = calc_options2(vi, &toep->params);
408 "%s: atid %u, toep %p, inp %p, opt0 %#016lx, opt2 %#08x",
409 __func__, toep->tid, toep, inp, be64toh(cpl->opt0),
413 offload_socket(so, toep);
415 td = toep->td;
417 TAILQ_INSERT_TAIL(&td->toep_list, toep, link);
418 toep->flags |= TPF_IN_TOEP_LIST;
421 rc = t4_l2t_send(sc, wr, toep->l2te);
424 toep->flags |= TPF_CPL_PENDING;
438 if (toep) {
439 if (toep->tid >= 0)
440 free_atid(sc, toep->tid);
441 if (toep->l2te)
442 t4_l2t_release(toep->l2te);
443 if (toep->ce)
444 t4_release_clip_entry(sc, toep->ce);
445 free_toepcb(toep);