Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/tom/t4_cpl_io.c
Show First 20 Lines • Show All 718 Lines • ▼ Show 20 Lines | t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) | ||||
KASSERT(toep->ulp_mode == ULP_MODE_NONE || | KASSERT(toep->ulp_mode == ULP_MODE_NONE || | ||||
toep->ulp_mode == ULP_MODE_TCPDDP || | toep->ulp_mode == ULP_MODE_TCPDDP || | ||||
toep->ulp_mode == ULP_MODE_TLS || | toep->ulp_mode == ULP_MODE_TLS || | ||||
toep->ulp_mode == ULP_MODE_RDMA, | toep->ulp_mode == ULP_MODE_RDMA, | ||||
("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); | ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); | ||||
#ifdef VERBOSE_TRACES | #ifdef VERBOSE_TRACES | ||||
CTR4(KTR_CXGBE, "%s: tid %d toep flags %#x tp flags %#x drop %d", | CTR5(KTR_CXGBE, "%s: tid %d toep flags %#x tp flags %#x drop %d", | ||||
__func__, toep->tid, toep->flags, tp->t_flags); | __func__, toep->tid, toep->flags, tp->t_flags, drop); | ||||
jhb: How did this even compile before? | |||||
npAuthorUnsubmitted Done Inline ActionsI don't think it did. I added -DVERBOSE_TRACES to t4_tom module makefile and ran np: I don't think it did. I added -DVERBOSE_TRACES to t4_tom module makefile and ran
into this… | |||||
#endif | #endif | ||||
if (__predict_false(toep->flags & TPF_ABORT_SHUTDOWN)) | if (__predict_false(toep->flags & TPF_ABORT_SHUTDOWN)) | ||||
return; | return; | ||||
#ifdef RATELIMIT | #ifdef RATELIMIT | ||||
if (__predict_false(inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) && | if (__predict_false(inp->inp_flags2 & INP_RATE_LIMIT_CHANGED) && | ||||
(update_tx_rate_limit(sc, toep, so->so_max_pacing_rate) == 0)) { | (update_tx_rate_limit(sc, toep, so->so_max_pacing_rate) == 0)) { | ||||
inp->inp_flags2 &= ~INP_RATE_LIMIT_CHANGED; | inp->inp_flags2 &= ~INP_RATE_LIMIT_CHANGED; | ||||
▲ Show 20 Lines • Show All 502 Lines • ▼ Show 20 Lines | #endif | ||||
KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__)); | KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__)); | ||||
CURVNET_SET(toep->vnet); | CURVNET_SET(toep->vnet); | ||||
INP_INFO_RLOCK_ET(&V_tcbinfo, et); | INP_INFO_RLOCK_ET(&V_tcbinfo, et); | ||||
INP_WLOCK(inp); | INP_WLOCK(inp); | ||||
tp = intotcpcb(inp); | tp = intotcpcb(inp); | ||||
CTR5(KTR_CXGBE, "%s: tid %u (%s), toep_flags 0x%x, inp %p", __func__, | CTR6(KTR_CXGBE, | ||||
tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags, inp); | "%s: tid %u (%s), toep_flags 0x%x, ddp_flags 0x%x, inp %p", | ||||
__func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags, | |||||
toep->ddp.flags, inp); | |||||
if (toep->flags & TPF_ABORT_SHUTDOWN) | if (toep->flags & TPF_ABORT_SHUTDOWN) | ||||
goto done; | goto done; | ||||
tp->rcv_nxt++; /* FIN */ | tp->rcv_nxt++; /* FIN */ | ||||
so = inp->inp_socket; | so = inp->inp_socket; | ||||
socantrcvmore(so); | socantrcvmore(so); | ||||
▲ Show 20 Lines • Show All 965 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
t4_aiotx_queue_toep(struct socket *so, struct toepcb *toep) | t4_aiotx_queue_toep(struct socket *so, struct toepcb *toep) | ||||
{ | { | ||||
SOCKBUF_LOCK_ASSERT(&toep->inp->inp_socket->so_snd); | SOCKBUF_LOCK_ASSERT(&toep->inp->inp_socket->so_snd); | ||||
#ifdef VERBOSE_TRACES | #ifdef VERBOSE_TRACES | ||||
CTR3(KTR_CXGBE, "%s: queueing aiotx task for tid %d, active = %s", | CTR3(KTR_CXGBE, "%s: queueing aiotx task for tid %d, active = %s", | ||||
__func__, toep->tid, toep->aiotx_task_active ? "true" : "false"); | __func__, toep->tid, toep->aiotx_so != NULL ? "true" : "false"); | ||||
#endif | #endif | ||||
if (toep->aiotx_so != NULL) | if (toep->aiotx_so != NULL) | ||||
return; | return; | ||||
soref(so); | soref(so); | ||||
toep->aiotx_so = so; | toep->aiotx_so = so; | ||||
hold_toepcb(toep); | hold_toepcb(toep); | ||||
soaio_enqueue(&toep->aiotx_task); | soaio_enqueue(&toep->aiotx_task); | ||||
} | } | ||||
Show All 39 Lines | t4_aio_queue_aiotx(struct socket *so, struct kaiocb *job) | ||||
if (!sc->tt.tx_zcopy) | if (!sc->tt.tx_zcopy) | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
if (tls_tx_key(toep)) | if (tls_tx_key(toep)) | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
SOCKBUF_LOCK(&so->so_snd); | SOCKBUF_LOCK(&so->so_snd); | ||||
#ifdef VERBOSE_TRACES | #ifdef VERBOSE_TRACES | ||||
CTR2(KTR_CXGBE, "%s: queueing %p", __func__, job); | CTR3(KTR_CXGBE, "%s: queueing %p for tid %u", __func__, job, toep->tid); | ||||
#endif | #endif | ||||
if (!aio_set_cancel_function(job, t4_aiotx_cancel)) | if (!aio_set_cancel_function(job, t4_aiotx_cancel)) | ||||
panic("new job was cancelled"); | panic("new job was cancelled"); | ||||
TAILQ_INSERT_TAIL(&toep->aiotx_jobq, job, list); | TAILQ_INSERT_TAIL(&toep->aiotx_jobq, job, list); | ||||
if (sowriteable(so)) | if (sowriteable(so)) | ||||
t4_aiotx_queue_toep(so, toep); | t4_aiotx_queue_toep(so, toep); | ||||
SOCKBUF_UNLOCK(&so->so_snd); | SOCKBUF_UNLOCK(&so->so_snd); | ||||
return (0); | return (0); | ||||
Show All 10 Lines |
How did this even compile before?