Lines Matching refs:offload_ctx

148 static void delete_all_records(struct tls_offload_context_tx *offload_ctx)  in delete_all_records()  argument
152 list_for_each_entry_safe(info, temp, &offload_ctx->records_list, list) { in delete_all_records()
157 offload_ctx->retransmit_hint = NULL; in delete_all_records()
244 struct tls_offload_context_tx *offload_ctx, in tls_push_record() argument
268 spin_lock_irq(&offload_ctx->lock); in tls_push_record()
269 list_add_tail(&record->list, &offload_ctx->records_list); in tls_push_record()
270 spin_unlock_irq(&offload_ctx->lock); in tls_push_record()
271 offload_ctx->open_record = NULL; in tls_push_record()
277 sg_unmark_end(&offload_ctx->sg_tx_data[i]); in tls_push_record()
278 sg_set_page(&offload_ctx->sg_tx_data[i], skb_frag_page(frag), in tls_push_record()
283 sg_mark_end(&offload_ctx->sg_tx_data[record->num_frags - 1]); in tls_push_record()
286 return tls_push_sg(sk, ctx, offload_ctx->sg_tx_data, 0, flags); in tls_push_record()
289 static int tls_create_new_record(struct tls_offload_context_tx *offload_ctx, in tls_create_new_record() argument
310 offload_ctx->open_record = record; in tls_create_new_record()
315 struct tls_offload_context_tx *offload_ctx, in tls_do_allocation() argument
321 if (!offload_ctx->open_record) { in tls_do_allocation()
329 ret = tls_create_new_record(offload_ctx, pfrag, prepend_size); in tls_do_allocation()
661 struct tls_offload_context_tx *offload_ctx; in tls_set_device_offload() local
683 offload_ctx = kzalloc(TLS_OFFLOAD_CONTEXT_SIZE_TX, GFP_KERNEL); in tls_set_device_offload()
684 if (!offload_ctx) { in tls_set_device_offload()
725 rc = tls_sw_fallback_init(sk, offload_ctx, crypto_info); in tls_set_device_offload()
731 offload_ctx->unacked_record_sn = be64_to_cpu(rcd_sn) - 1; in tls_set_device_offload()
737 INIT_LIST_HEAD(&offload_ctx->records_list); in tls_set_device_offload()
738 list_add_tail(&start_marker_record->list, &offload_ctx->records_list); in tls_set_device_offload()
739 spin_lock_init(&offload_ctx->lock); in tls_set_device_offload()
740 sg_init_table(offload_ctx->sg_tx_data, in tls_set_device_offload()
741 ARRAY_SIZE(offload_ctx->sg_tx_data)); in tls_set_device_offload()
781 ctx->priv_ctx_tx = offload_ctx; in tls_set_device_offload()
804 crypto_free_aead(offload_ctx->aead_send); in tls_set_device_offload()
810 kfree(offload_ctx); in tls_set_device_offload()