diff options
author | Mina Almasry <almasrymina@google.com> | 2024-01-02 23:59:04 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-01-04 05:37:16 +0300 |
commit | 06d9b446c4d445f0facb4b87cbbaeacd28c5a747 (patch) | |
tree | a9687dad83fc288397c548cae7df3ae5a5f0799d | |
parent | 530496985ceae54b78c301baf7819eac0012d0f8 (diff) | |
download | linux-06d9b446c4d445f0facb4b87cbbaeacd28c5a747.tar.xz |
vsock/virtio: use skb_frag_*() helpers
Minor fix for virtio: code wanting to access the fields inside an skb
frag should use the skb_frag_*() helpers, instead of accessing the
fields directly. This allows for extensions where the underlying
memory is not a page.
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Link: https://lore.kernel.org/r/20240102205905.793738-1-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/vmw_vsock/virtio_transport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index f495b9e5186b..1748268e0694 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -153,10 +153,10 @@ virtio_transport_send_pkt_work(struct work_struct *work) * 'virt_to_phys()' later to fill the buffer descriptor. * We don't touch memory at "virtual" address of this page. */ - va = page_to_virt(skb_frag->bv_page); + va = page_to_virt(skb_frag_page(skb_frag)); sg_init_one(sgs[out_sg], - va + skb_frag->bv_offset, - skb_frag->bv_len); + va + skb_frag_off(skb_frag), + skb_frag_size(skb_frag)); out_sg++; } } |