Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/tom/t4_tls.c
Show First 20 Lines • Show All 1,658 Lines • ▼ Show 20 Lines | #endif | ||||
txsd->iv_buffer = iv_buffer; | txsd->iv_buffer = iv_buffer; | ||||
txsd++; | txsd++; | ||||
if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) { | if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) { | ||||
toep->txsd_pidx = 0; | toep->txsd_pidx = 0; | ||||
txsd = &toep->txsd[0]; | txsd = &toep->txsd[0]; | ||||
} | } | ||||
toep->txsd_avail--; | toep->txsd_avail--; | ||||
atomic_add_long(&toep->vi->pi->tx_toe_tls_records, 1); | counter_u64_add(toep->ofld_txq->tx_toe_tls_records, 1); | ||||
atomic_add_long(&toep->vi->pi->tx_toe_tls_octets, plen); | counter_u64_add(toep->ofld_txq->tx_toe_tls_octets, plen); | ||||
t4_l2t_send(sc, wr, toep->l2te); | t4_l2t_send(sc, wr, toep->l2te); | ||||
} | } | ||||
} | } | ||||
#ifdef KERN_TLS | #ifdef KERN_TLS | ||||
static int | static int | ||||
count_ext_pgs_segs(struct mbuf *m) | count_ext_pgs_segs(struct mbuf *m) | ||||
▲ Show 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | #endif | ||||
txsd->tx_credits = credits; | txsd->tx_credits = credits; | ||||
txsd++; | txsd++; | ||||
if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) { | if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) { | ||||
toep->txsd_pidx = 0; | toep->txsd_pidx = 0; | ||||
txsd = &toep->txsd[0]; | txsd = &toep->txsd[0]; | ||||
} | } | ||||
toep->txsd_avail--; | toep->txsd_avail--; | ||||
atomic_add_long(&toep->vi->pi->tx_toe_tls_records, 1); | counter_u64_add(toep->ofld_txq->tx_toe_tls_records, 1); | ||||
atomic_add_long(&toep->vi->pi->tx_toe_tls_octets, m->m_len); | counter_u64_add(toep->ofld_txq->tx_toe_tls_octets, m->m_len); | ||||
t4_l2t_send(sc, wr, toep->l2te); | t4_l2t_send(sc, wr, toep->l2te); | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
/* | /* | ||||
* For TLS data we place received mbufs received via CPL_TLS_DATA into | * For TLS data we place received mbufs received via CPL_TLS_DATA into | ||||
Show All 19 Lines | KASSERT(!(toep->flags & TPF_SYNQE), | ||||
("%s: toep %p claims to be a synq entry", __func__, toep)); | ("%s: toep %p claims to be a synq entry", __func__, toep)); | ||||
KASSERT(toep->tid == tid, ("%s: toep tid/atid mismatch", __func__)); | KASSERT(toep->tid == tid, ("%s: toep tid/atid mismatch", __func__)); | ||||
/* strip off CPL header */ | /* strip off CPL header */ | ||||
m_adj(m, sizeof(*cpl)); | m_adj(m, sizeof(*cpl)); | ||||
len = m->m_pkthdr.len; | len = m->m_pkthdr.len; | ||||
atomic_add_long(&toep->vi->pi->rx_toe_tls_octets, len); | toep->ofld_rxq->rx_toe_tls_octets += len; | ||||
KASSERT(len == G_CPL_TLS_DATA_LENGTH(be32toh(cpl->length_pkd)), | KASSERT(len == G_CPL_TLS_DATA_LENGTH(be32toh(cpl->length_pkd)), | ||||
("%s: payload length mismatch", __func__)); | ("%s: payload length mismatch", __func__)); | ||||
INP_WLOCK(inp); | INP_WLOCK(inp); | ||||
if (inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT)) { | if (inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT)) { | ||||
CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", | CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", | ||||
__func__, tid, len, inp->inp_flags); | __func__, tid, len, inp->inp_flags); | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | #endif | ||||
KASSERT(toep->tid == tid, ("%s: toep tid/atid mismatch", __func__)); | KASSERT(toep->tid == tid, ("%s: toep tid/atid mismatch", __func__)); | ||||
KASSERT(!(toep->flags & TPF_SYNQE), | KASSERT(!(toep->flags & TPF_SYNQE), | ||||
("%s: toep %p claims to be a synq entry", __func__, toep)); | ("%s: toep %p claims to be a synq entry", __func__, toep)); | ||||
/* strip off CPL header */ | /* strip off CPL header */ | ||||
m_adj(m, sizeof(*cpl)); | m_adj(m, sizeof(*cpl)); | ||||
len = m->m_pkthdr.len; | len = m->m_pkthdr.len; | ||||
atomic_add_long(&toep->vi->pi->rx_toe_tls_records, 1); | toep->ofld_rxq->rx_toe_tls_records++; | ||||
KASSERT(len == G_CPL_RX_TLS_CMP_LENGTH(be32toh(cpl->pdulength_length)), | KASSERT(len == G_CPL_RX_TLS_CMP_LENGTH(be32toh(cpl->pdulength_length)), | ||||
("%s: payload length mismatch", __func__)); | ("%s: payload length mismatch", __func__)); | ||||
INP_WLOCK(inp); | INP_WLOCK(inp); | ||||
if (inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT)) { | if (inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT)) { | ||||
CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", | CTR4(KTR_CXGBE, "%s: tid %u, rx (%d bytes), inp_flags 0x%x", | ||||
__func__, tid, len, inp->inp_flags); | __func__, tid, len, inp->inp_flags); | ||||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |