* [PATCH net-next v3] vsock/virtio: use skb_frag_*() helpers
@ 2024-01-02 20:59 Mina Almasry
2024-01-04 3:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Mina Almasry @ 2024-01-02 20:59 UTC (permalink / raw)
To: kvm, virtualization, netdev, linux-kernel
Cc: Mina Almasry, Stefan Hajnoczi, Stefano Garzarella,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
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>
---
v3:
- Applied Stefano's Acked-by.
- Forked this patch from 'Abstract page from net stack'.
v2:
- Also fix skb_frag_off() + skb_frag_size() (David)
- Did not apply the reviewed-by from Stefano since the patch changed
relatively much.
---
net/vmw_vsock/virtio_transport.c | 6 +++---
1 file 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++;
}
}
--
2.43.0.472.g3155946c3a-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v3] vsock/virtio: use skb_frag_*() helpers
2024-01-02 20:59 [PATCH net-next v3] vsock/virtio: use skb_frag_*() helpers Mina Almasry
@ 2024-01-04 3:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-04 3:00 UTC (permalink / raw)
To: Mina Almasry
Cc: kvm, virtualization, netdev, linux-kernel, stefanha, sgarzare,
davem, edumazet, kuba, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 2 Jan 2024 12:59:04 -0800 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- [net-next,v3] vsock/virtio: use skb_frag_*() helpers
https://git.kernel.org/netdev/net-next/c/06d9b446c4d4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-04 3:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-02 20:59 [PATCH net-next v3] vsock/virtio: use skb_frag_*() helpers Mina Almasry
2024-01-04 3:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox