virtio/vsock: replace virtio_vsock_pkt with sk_buff
authorBobby Eshleman <bobby.eshleman@bytedance.com>
Fri, 13 Jan 2023 22:21:37 +0000 (22:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jan 2023 13:26:33 +0000 (13:26 +0000)
commit71dc9ec9ac7d3eee785cdc986c3daeb821381e20
treef6d5f2252ef1696b47c90816a26a4ba5cc97b0fb
parent5ef2702ab48e3e4732cba73f69e11784c53f8f2b
virtio/vsock: replace virtio_vsock_pkt with sk_buff

This commit changes virtio/vsock to use sk_buff instead of
virtio_vsock_pkt. Beyond better conforming to other net code, using
sk_buff allows vsock to use sk_buff-dependent features in the future
(such as sockmap) and improves throughput.

This patch introduces the following performance changes:

Tool: Uperf
Env: Phys Host + L1 Guest
Payload: 64k
Threads: 16
Test Runs: 10
Type: SOCK_STREAM
Before: commit b7bfaa761d760 ("Linux 6.2-rc3")

Before
------
g2h: 16.77Gb/s
h2g: 10.56Gb/s

After
-----
g2h: 21.04Gb/s
h2g: 10.76Gb/s

Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/vsock.c
include/linux/virtio_vsock.h
net/vmw_vsock/virtio_transport.c
net/vmw_vsock/virtio_transport_common.c
net/vmw_vsock/vsock_loopback.c