Skip to content

Commit

Permalink
net/tls: use version from prot
Browse files Browse the repository at this point in the history
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: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Jun 4, 2019
1 parent 1fe275d commit 9cd8198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/tls/tls_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static int tls_push_record(struct sock *sk,
skb_frag_address(frag),
record->len - prot->prepend_size,
record_type,
ctx->crypto_send.info.version);
prot->version);

/* HW doesn't care about the data in the tag, because it fills it. */
dummy_tag_frag.page = skb_frag_page(frag);
Expand All @@ -264,7 +264,7 @@ static int tls_push_record(struct sock *sk,
list_add_tail(&record->list, &offload_ctx->records_list);
spin_unlock_irq(&offload_ctx->lock);
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++) {
frag = &record->frags[i];
Expand Down

0 comments on commit 9cd8198

Please sign in to comment.