Lines Matching refs:offload_ctx
71 struct tls_offload_context_tx *offload_ctx = in tls_device_tx_del_task() local
73 struct tls_context *ctx = offload_ctx->ctx; in tls_device_tx_del_task()
110 struct tls_offload_context_tx *offload_ctx = tls_offload_ctx_tx(ctx); in tls_device_queue_ctx_destruction() local
115 queue_work(destruct_wq, &offload_ctx->destruct_work); in tls_device_queue_ctx_destruction()
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()
279 struct tls_offload_context_tx *offload_ctx, in tls_push_record() argument
289 list_add_tail_rcu(&record->list, &offload_ctx->records_list); in tls_push_record()
290 offload_ctx->open_record = NULL; in tls_push_record()
299 sg_unmark_end(&offload_ctx->sg_tx_data[i]); in tls_push_record()
300 sg_set_page(&offload_ctx->sg_tx_data[i], skb_frag_page(frag), in tls_push_record()
305 sg_mark_end(&offload_ctx->sg_tx_data[record->num_frags - 1]); in tls_push_record()
308 return tls_push_sg(sk, ctx, offload_ctx->sg_tx_data, 0, flags); in tls_push_record()
340 static int tls_create_new_record(struct tls_offload_context_tx *offload_ctx, in tls_create_new_record() argument
360 offload_ctx->open_record = record; in tls_create_new_record()
365 struct tls_offload_context_tx *offload_ctx, in tls_do_allocation() argument
371 if (!offload_ctx->open_record) { in tls_do_allocation()
379 ret = tls_create_new_record(offload_ctx, pfrag, prepend_size); in tls_do_allocation()
1035 struct tls_offload_context_tx *offload_ctx; in alloc_offload_ctx_tx() local
1038 offload_ctx = kzalloc(sizeof(*offload_ctx), GFP_KERNEL); in alloc_offload_ctx_tx()
1039 if (!offload_ctx) in alloc_offload_ctx_tx()
1042 INIT_WORK(&offload_ctx->destruct_work, tls_device_tx_del_task); in alloc_offload_ctx_tx()
1043 INIT_LIST_HEAD(&offload_ctx->records_list); in alloc_offload_ctx_tx()
1044 spin_lock_init(&offload_ctx->lock); in alloc_offload_ctx_tx()
1045 sg_init_table(offload_ctx->sg_tx_data, in alloc_offload_ctx_tx()
1046 ARRAY_SIZE(offload_ctx->sg_tx_data)); in alloc_offload_ctx_tx()
1050 offload_ctx->unacked_record_sn = be64_to_cpu(rcd_sn) - 1; in alloc_offload_ctx_tx()
1052 offload_ctx->ctx = ctx; in alloc_offload_ctx_tx()
1054 return offload_ctx; in alloc_offload_ctx_tx()
1060 struct tls_offload_context_tx *offload_ctx; in tls_set_device_offload() local
1114 offload_ctx = alloc_offload_ctx_tx(ctx); in tls_set_device_offload()
1115 if (!offload_ctx) { in tls_set_device_offload()
1120 rc = tls_sw_fallback_init(sk, offload_ctx, crypto_info); in tls_set_device_offload()
1127 list_add_tail(&start_marker_record->list, &offload_ctx->records_list); in tls_set_device_offload()
1152 ctx->priv_ctx_tx = offload_ctx; in tls_set_device_offload()
1176 crypto_free_aead(offload_ctx->aead_send); in tls_set_device_offload()
1178 kfree(offload_ctx); in tls_set_device_offload()