Lines Matching refs:tls

76 	return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS);  in can_tls_offload()
82 struct tls_ofld_info *tls_ofld = &toep->tls; in tls_tx_key()
127 struct tls_ofld_info *tls_ofld = &toep->tls; in clear_tls_keyid()
141 get_tp_plen_max(struct ktls_session *tls) in get_tp_plen_max() argument
145 return (tls->params.max_frame_len <= 8192 ? plen : FC_TP_PLEN_MAX); in get_tp_plen_max()
150 tls_program_key_id(struct toepcb *toep, struct ktls_session *tls, in tls_program_key_id() argument
153 struct tls_ofld_info *tls_ofld = &toep->tls; in tls_program_key_id()
184 t4_write_tlskey_wr(tls, direction, toep->tid, F_FW_WR_COMPL, keyid, in tls_program_key_id()
191 t4_tls_key_ctx(tls, direction, kctx); in tls_program_key_id()
207 tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) in tls_alloc_ktls() argument
231 switch (tls->params.cipher_algorithm) { in tls_alloc_ktls()
234 switch (tls->params.cipher_key_len) { in tls_alloc_ktls()
242 switch (tls->params.auth_algorithm) { in tls_alloc_ktls()
254 if (tls->params.iv_len != SALT_SIZE) { in tls_alloc_ktls()
257 switch (tls->params.cipher_key_len) { in tls_alloc_ktls()
273 if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || in tls_alloc_ktls()
274 tls->params.tls_vminor < TLS_MINOR_VER_ONE || in tls_alloc_ktls()
275 tls->params.tls_vminor > TLS_MINOR_VER_TWO) { in tls_alloc_ktls()
281 if (toep->tls.tx_key_addr != -1) in tls_alloc_ktls()
284 if (toep->tls.rx_key_addr != -1) in tls_alloc_ktls()
288 error = tls_program_key_id(toep, tls, direction); in tls_alloc_ktls()
293 toep->tls.scmd0.seqno_numivs = in tls_alloc_ktls()
295 V_SCMD_PROTO_VERSION(t4_tls_proto_ver(tls)) | in tls_alloc_ktls()
298 V_SCMD_CIPH_MODE(t4_tls_cipher_mode(tls)) | in tls_alloc_ktls()
299 V_SCMD_AUTH_MODE(t4_tls_auth_mode(tls)) | in tls_alloc_ktls()
300 V_SCMD_HMAC_CTRL(t4_tls_hmac_ctrl(tls)) | in tls_alloc_ktls()
303 toep->tls.scmd0.ivgen_hdrlen = in tls_alloc_ktls()
308 toep->tls.iv_len = explicit_iv_size; in tls_alloc_ktls()
309 toep->tls.frag_size = tls->params.max_frame_len; in tls_alloc_ktls()
310 toep->tls.fcplenmax = get_tp_plen_max(tls); in tls_alloc_ktls()
311 toep->tls.expn_per_ulp = tls->params.tls_hlen + in tls_alloc_ktls()
312 tls->params.tls_tlen; in tls_alloc_ktls()
313 toep->tls.pdus_per_ulp = 1; in tls_alloc_ktls()
314 toep->tls.adjusted_plen = toep->tls.expn_per_ulp + in tls_alloc_ktls()
315 tls->params.max_frame_len; in tls_alloc_ktls()
316 toep->tls.tx_key_info_size = t4_tls_key_info_size(tls); in tls_alloc_ktls()
319 toep->tls.rx_version = tls->params.tls_vmajor << 8 | in tls_alloc_ktls()
320 tls->params.tls_vminor; in tls_alloc_ktls()
333 struct tls_ofld_info *tls_ofld = &toep->tls; in tls_init_toep()
357 struct tls_ofld_info *tls_ofld = &toep->tls; in write_tlstx_wr()
386 struct tls_ofld_info *tls_ofld = &toep->tls; in write_tlstx_cpl()
590 MPASS(toep->tls.iv_len <= AES_BLOCK_LEN); in t4_push_ktls()
670 V_ULPTX_LEN16(toep->tls.tx_key_info_size >> 4)); in t4_push_ktls()
671 memrd->addr = htobe32(toep->tls.tx_key_addr >> 5); in t4_push_ktls()
675 memcpy(buf, thdr + 1, toep->tls.iv_len); in t4_push_ktls()
993 struct tls_ofld_info *tls_ofld = &toep->tls; in do_rx_data_tls()
1140 key_offset = toep->tls.rx_key_addr - sc->vres.key.start; in tls_update_tcb()
1182 MPASS(toep->tls.rx_resid == 0); in tls_check_rx_sockbuf()
1226 KASSERT(len <= toep->tls.rx_resid, in tls_received_starting_data()
1228 toep->tls.rx_resid)); in tls_received_starting_data()
1229 toep->tls.rx_resid -= len; in tls_received_starting_data()
1230 if (toep->tls.rx_resid != 0) in tls_received_starting_data()