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