Lines Matching refs:record

123 static void destroy_record(struct tls_record_info *record)  in destroy_record()  argument
127 for (i = 0; i < record->num_frags; i++) in destroy_record()
128 __skb_frag_unref(&record->frags[i]); in destroy_record()
129 kfree(record); in destroy_record()
232 static void tls_append_frag(struct tls_record_info *record, in tls_append_frag() argument
238 frag = &record->frags[record->num_frags - 1]; in tls_append_frag()
247 ++record->num_frags; in tls_append_frag()
252 record->len += size; in tls_append_frag()
258 struct tls_record_info *record, in tls_push_record() argument
266 record->end_seq = tp->write_seq + record->len; in tls_push_record()
267 list_add_tail_rcu(&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()
291 struct tls_record_info *record, in tls_device_record_close() argument
307 tls_append_frag(record, pfrag, prot->tag_size); in tls_device_record_close()
310 if (record->len <= prot->overhead_size) in tls_device_record_close()
315 tls_fill_prepend(ctx, skb_frag_address(&record->frags[0]), in tls_device_record_close()
316 record->len - prot->overhead_size, in tls_device_record_close()
325 struct tls_record_info *record; in tls_create_new_record() local
328 record = kmalloc(sizeof(*record), GFP_KERNEL); in tls_create_new_record()
329 if (!record) in tls_create_new_record()
332 frag = &record->frags[0]; in tls_create_new_record()
340 record->num_frags = 1; in tls_create_new_record()
341 record->len = prepend_size; in tls_create_new_record()
342 offload_ctx->open_record = record; in tls_create_new_record()
409 struct tls_record_info *record = ctx->open_record; in tls_push_data() local
450 record = ctx->open_record; in tls_push_data()
451 if (!record) in tls_push_data()
460 destroy_record(record); in tls_push_data()
462 } else if (record->len > prot->prepend_size) { in tls_push_data()
469 record = ctx->open_record; in tls_push_data()
471 copy = min_t(size_t, copy, (max_open_record_len - record->len)); in tls_push_data()
477 tls_append_frag(record, pfrag, copy); in tls_push_data()
485 !!record->num_frags; in tls_push_data()
492 if (done || record->len >= max_open_record_len || in tls_push_data()
493 (record->num_frags >= MAX_SKB_FRAGS - 1)) { in tls_push_data()
494 rc = tls_device_record_close(sk, tls_ctx, record, in tls_push_data()
501 destroy_record(record); in tls_push_data()
510 record, in tls_push_data()