summaryrefslogtreecommitdiffstats
path: root/net/tls/tls_device.c
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2019-07-30 16:40:33 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-30 23:21:32 +0200
commitb54c9d5bd6e38edac9ce3a3f95f14a1292b5268d (patch)
treeb09848a92e53ce9533b4df27953ef59874080b53 /net/tls/tls_device.c
parentlinux: Add skb_frag_t page_offset accessors (diff)
downloadlinux-b54c9d5bd6e38edac9ce3a3f95f14a1292b5268d.tar.xz
linux-b54c9d5bd6e38edac9ce3a3f95f14a1292b5268d.zip
net: Use skb_frag_off accessors
Use accessor functions for skb fragment's page_offset instead of direct references, in preparation for bvec conversion. Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_device.c')
-rw-r--r--net/tls/tls_device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index 4ec8a06fa5d1..d184230665eb 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -244,12 +244,12 @@ static void tls_append_frag(struct tls_record_info *record,
frag = &record->frags[record->num_frags - 1];
if (skb_frag_page(frag) == pfrag->page &&
- frag->page_offset + skb_frag_size(frag) == pfrag->offset) {
+ skb_frag_off(frag) + skb_frag_size(frag) == pfrag->offset) {
skb_frag_size_add(frag, size);
} else {
++frag;
__skb_frag_set_page(frag, pfrag->page);
- frag->page_offset = pfrag->offset;
+ skb_frag_off_set(frag, pfrag->offset);
skb_frag_size_set(frag, size);
++record->num_frags;
get_page(pfrag->page);
@@ -301,7 +301,7 @@ static int tls_push_record(struct sock *sk,
frag = &record->frags[i];
sg_unmark_end(&offload_ctx->sg_tx_data[i]);
sg_set_page(&offload_ctx->sg_tx_data[i], skb_frag_page(frag),
- skb_frag_size(frag), frag->page_offset);
+ skb_frag_size(frag), skb_frag_off(frag));
sk_mem_charge(sk, skb_frag_size(frag));
get_page(skb_frag_page(frag));
}
@@ -324,7 +324,7 @@ static int tls_create_new_record(struct tls_offload_context_tx *offload_ctx,
frag = &record->frags[0];
__skb_frag_set_page(frag, pfrag->page);
- frag->page_offset = pfrag->offset;
+ skb_frag_off_set(frag, pfrag->offset);
skb_frag_size_set(frag, prepend_size);
get_page(pfrag->page);