Commit cfdca390 authored by Arseniy Krasnov's avatar Arseniy Krasnov Committed by David S. Miller

vsock/loopback: support MSG_ZEROCOPY for transport

Add 'msgzerocopy_allow()' callback for loopback transport.
Signed-off-by: default avatarArseniy Krasnov <avkrasnov@salutedevices.com>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2fcc326
...@@ -47,6 +47,10 @@ static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk) ...@@ -47,6 +47,10 @@ static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk)
} }
static bool vsock_loopback_seqpacket_allow(u32 remote_cid); static bool vsock_loopback_seqpacket_allow(u32 remote_cid);
static bool vsock_loopback_msgzerocopy_allow(void)
{
return true;
}
static struct virtio_transport loopback_transport = { static struct virtio_transport loopback_transport = {
.transport = { .transport = {
...@@ -79,6 +83,8 @@ static struct virtio_transport loopback_transport = { ...@@ -79,6 +83,8 @@ static struct virtio_transport loopback_transport = {
.seqpacket_allow = vsock_loopback_seqpacket_allow, .seqpacket_allow = vsock_loopback_seqpacket_allow,
.seqpacket_has_data = virtio_transport_seqpacket_has_data, .seqpacket_has_data = virtio_transport_seqpacket_has_data,
.msgzerocopy_allow = vsock_loopback_msgzerocopy_allow,
.notify_poll_in = virtio_transport_notify_poll_in, .notify_poll_in = virtio_transport_notify_poll_in,
.notify_poll_out = virtio_transport_notify_poll_out, .notify_poll_out = virtio_transport_notify_poll_out,
.notify_recv_init = virtio_transport_notify_recv_init, .notify_recv_init = virtio_transport_notify_recv_init,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment