diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2019-07-23 06:08:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-23 06:47:56 +0300 |
commit | d8e18a516f8f67404c0d21af8c93d0474fba0876 (patch) | |
tree | 040dd35953de9f34f2c83e4d921d67e7a7caedd3 /net/tls | |
parent | d7840976e3915669382c62ddd1700960f348328e (diff) | |
download | linux-d8e18a516f8f67404c0d21af8c93d0474fba0876.tar.xz |
net: Use skb accessors in network core
In preparation for unifying the skb_frag and bio_vec, use the fine
accessors which already exist and use skb_frag_t instead of
struct skb_frag_struct.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_device.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 7c0b2b778703..4ec8a06fa5d1 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -243,14 +243,14 @@ static void tls_append_frag(struct tls_record_info *record, skb_frag_t *frag; frag = &record->frags[record->num_frags - 1]; - if (frag->page.p == pfrag->page && - frag->page_offset + frag->size == pfrag->offset) { - frag->size += size; + if (skb_frag_page(frag) == pfrag->page && + frag->page_offset + skb_frag_size(frag) == pfrag->offset) { + skb_frag_size_add(frag, size); } else { ++frag; - frag->page.p = pfrag->page; + __skb_frag_set_page(frag, pfrag->page); frag->page_offset = pfrag->offset; - frag->size = size; + skb_frag_size_set(frag, size); ++record->num_frags; get_page(pfrag->page); } @@ -301,8 +301,8 @@ 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), - frag->size, frag->page_offset); - sk_mem_charge(sk, frag->size); + skb_frag_size(frag), frag->page_offset); + sk_mem_charge(sk, skb_frag_size(frag)); get_page(skb_frag_page(frag)); } sg_mark_end(&offload_ctx->sg_tx_data[record->num_frags - 1]); |