Lines Matching refs:record
136 static void destroy_record(struct tls_record_info *record) in destroy_record() argument
138 int nr_frags = record->num_frags; in destroy_record()
142 frag = &record->frags[nr_frags]; in destroy_record()
145 kfree(record); in destroy_record()
219 static void tls_append_frag(struct tls_record_info *record, in tls_append_frag() argument
225 frag = &record->frags[record->num_frags - 1]; in tls_append_frag()
234 ++record->num_frags; in tls_append_frag()
239 record->len += size; in tls_append_frag()
245 struct tls_record_info *record, in tls_push_record() argument
256 frag = &record->frags[0]; in tls_push_record()
259 record->len - ctx->tx.prepend_size, in tls_push_record()
266 tls_append_frag(record, &dummy_tag_frag, ctx->tx.tag_size); in tls_push_record()
267 record->end_seq = tp->write_seq + record->len; in tls_push_record()
269 list_add_tail(&record->list, &offload_ctx->records_list); in tls_push_record()
275 for (i = 0; i < record->num_frags; i++) { in tls_push_record()
276 frag = &record->frags[i]; in tls_push_record()
283 sg_mark_end(&offload_ctx->sg_tx_data[record->num_frags - 1]); in tls_push_record()
293 struct tls_record_info *record; in tls_create_new_record() local
296 record = kmalloc(sizeof(*record), GFP_KERNEL); in tls_create_new_record()
297 if (!record) in tls_create_new_record()
300 frag = &record->frags[0]; in tls_create_new_record()
308 record->num_frags = 1; in tls_create_new_record()
309 record->len = prepend_size; in tls_create_new_record()
310 offload_ctx->open_record = record; in tls_create_new_record()
352 struct tls_record_info *record = ctx->open_record; in tls_push_data() local
387 record = ctx->open_record; in tls_push_data()
388 if (!record) in tls_push_data()
397 destroy_record(record); in tls_push_data()
399 } else if (record->len > tls_ctx->tx.prepend_size) { in tls_push_data()
406 record = ctx->open_record; in tls_push_data()
408 copy = min_t(size_t, copy, (max_open_record_len - record->len)); in tls_push_data()
416 tls_append_frag(record, pfrag, copy); in tls_push_data()
424 record->num_frags; in tls_push_data()
431 if (done || record->len >= max_open_record_len || in tls_push_data()
432 (record->num_frags >= MAX_SKB_FRAGS - 1)) { in tls_push_data()
436 record, in tls_push_data()