Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/tom/t4_tls.c
Show First 20 Lines • Show All 1,187 Lines • ▼ Show 20 Lines | #endif | ||||
SOCKBUF_UNLOCK_ASSERT(sb); | SOCKBUF_UNLOCK_ASSERT(sb); | ||||
if (toep->flags & TPF_SEND_FIN) | if (toep->flags & TPF_SEND_FIN) | ||||
t4_close_conn(sc, toep); | t4_close_conn(sc, toep); | ||||
return; | return; | ||||
} | } | ||||
/* Read the header of the next TLS record. */ | /* Read the header of the next TLS record. */ | ||||
sndptr = sbsndmbuf(sb, tls_ofld->sb_off, &sndptroff); | sndptr = sbsndmbuf(sb, tls_ofld->sb_off, &sndptroff); | ||||
MPASS(!IS_AIOTX_MBUF(sndptr)); | |||||
m_copydata(sndptr, sndptroff, sizeof(thdr), (caddr_t)&thdr); | m_copydata(sndptr, sndptroff, sizeof(thdr), (caddr_t)&thdr); | ||||
tls_size = htons(thdr.length); | tls_size = htons(thdr.length); | ||||
plen = TLS_HEADER_LENGTH + tls_size; | plen = TLS_HEADER_LENGTH + tls_size; | ||||
pdus = howmany(tls_size, tls_ofld->k_ctx.frag_size); | pdus = howmany(tls_size, tls_ofld->k_ctx.frag_size); | ||||
iv_len = pdus * CIPHER_BLOCK_SIZE; | iv_len = pdus * CIPHER_BLOCK_SIZE; | ||||
if (sbavail(sb) < tls_ofld->sb_off + plen) { | if (sbavail(sb) < tls_ofld->sb_off + plen) { | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 418 Lines • Show Last 20 Lines |