[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210628100348.571174-1-arseny.krasnov@kaspersky.com>
Date: Mon, 28 Jun 2021 13:03:45 +0300
From: Arseny Krasnov <arseny.krasnov@...persky.com>
To: Stefan Hajnoczi <stefanha@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Arseny Krasnov <arseny.krasnov@...persky.com>,
Jorgen Hansen <jhansen@...are.com>,
Andra Paraschiv <andraprs@...zon.com>,
Colin Ian King <colin.king@...onical.com>,
Norbert Slusarek <nslusarek@....net>
CC: <kvm@...r.kernel.org>, <virtualization@...ts.linux-foundation.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<oxffffaa@...il.com>
Subject: [RFC PATCH v1 09/16] af_vsock/virtio: update dequeue callback interface
This patch adds 'msg_ready' parameter to dequeue callback, it is
set to true if EOR is found(in case of virtio transport).
This patch contains small changes for both af_vsock and virtio
transport code to avoid build fails with partly applied patchset.
Signed-off-by: Arseny Krasnov <arseny.krasnov@...persky.com>
---
include/linux/virtio_vsock.h | 3 ++-
include/net/af_vsock.h | 2 +-
net/vmw_vsock/af_vsock.c | 2 +-
net/vmw_vsock/virtio_transport_common.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
index 719008d4235e..8d34f3d73bbb 100644
--- a/include/linux/virtio_vsock.h
+++ b/include/linux/virtio_vsock.h
@@ -88,7 +88,8 @@ virtio_transport_seqpacket_enqueue(struct vsock_sock *vsk,
ssize_t
virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk,
struct msghdr *msg,
- int flags);
+ int flags,
+ bool *msg_ready);
s64 virtio_transport_stream_has_data(struct vsock_sock *vsk);
s64 virtio_transport_stream_has_space(struct vsock_sock *vsk);
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
index bf5ea1873e6f..1747c0b564ef 100644
--- a/include/net/af_vsock.h
+++ b/include/net/af_vsock.h
@@ -137,7 +137,7 @@ struct vsock_transport {
/* SEQ_PACKET. */
ssize_t (*seqpacket_dequeue)(struct vsock_sock *vsk, struct msghdr *msg,
- int flags);
+ int flags, bool *msg_ready);
int (*seqpacket_enqueue)(struct vsock_sock *vsk, struct msghdr *msg,
size_t len);
bool (*seqpacket_allow)(u32 remote_cid);
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 9552f05119f2..ec54e4222cbf 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -2027,7 +2027,7 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg,
break;
}
- fragment_len = transport->seqpacket_dequeue(vsk, msg, flags);
+ fragment_len = transport->seqpacket_dequeue(vsk, msg, flags, &msg_ready);
if (fragment_len < 0) {
err = -ENOMEM;
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 319c3345f3e0..9c2bd84ab8e6 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -489,7 +489,7 @@ EXPORT_SYMBOL_GPL(virtio_transport_stream_dequeue);
ssize_t
virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk,
struct msghdr *msg,
- int flags)
+ int flags, bool *msg_ready)
{
if (flags & MSG_PEEK)
return -EOPNOTSUPP;
--
2.25.1
Powered by blists - more mailing lists