Commit 9cd81988 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

net/tls: use version from prot

ctx->prot holds the same information as per-direction contexts.
Almost all code gets TLS version from this structure, convert
the last two stragglers, this way we can improve the cache
utilization by moving the per-direction data into cold cache lines.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1fe275d4
...@@ -252,7 +252,7 @@ static int tls_push_record(struct sock *sk, ...@@ -252,7 +252,7 @@ static int tls_push_record(struct sock *sk,
skb_frag_address(frag), skb_frag_address(frag),
record->len - prot->prepend_size, record->len - prot->prepend_size,
record_type, record_type,
ctx->crypto_send.info.version); prot->version);
/* HW doesn't care about the data in the tag, because it fills it. */ /* HW doesn't care about the data in the tag, because it fills it. */
dummy_tag_frag.page = skb_frag_page(frag); dummy_tag_frag.page = skb_frag_page(frag);
...@@ -264,7 +264,7 @@ static int tls_push_record(struct sock *sk, ...@@ -264,7 +264,7 @@ static int tls_push_record(struct sock *sk,
list_add_tail(&record->list, &offload_ctx->records_list); list_add_tail(&record->list, &offload_ctx->records_list);
spin_unlock_irq(&offload_ctx->lock); spin_unlock_irq(&offload_ctx->lock);
offload_ctx->open_record = NULL; offload_ctx->open_record = NULL;
tls_advance_record_sn(sk, &ctx->tx, ctx->crypto_send.info.version); tls_advance_record_sn(sk, &ctx->tx, prot->version);
for (i = 0; i < record->num_frags; i++) { for (i = 0; i < record->num_frags; i++) {
frag = &record->frags[i]; frag = &record->frags[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment