kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Arseny Krasnov <arseny.krasnov@kaspersky.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jorgen Hansen <jhansen@vmware.com>,
	Colin Ian King <colin.king@canonical.com>,
	Norbert Slusarek <nslusarek@gmx.net>,
	Andra Paraschiv <andraprs@amazon.com>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stsp2@yandex.ru, oxffffaa@gmail.com
Subject: Re: [RFC PATCH v6 16/22] vhost/vsock: SEQPACKET feature bit support
Date: Mon, 15 Mar 2021 12:28:30 +0100	[thread overview]
Message-ID: <20210315112830.3yqqjnqcgym2sdpg@steredhat> (raw)
In-Reply-To: <20210307180344.3466469-1-arseny.krasnov@kaspersky.com>

On Sun, Mar 07, 2021 at 09:03:41PM +0300, Arseny Krasnov wrote:
>This adds handling of SEQPACKET bit: if guest sets features with
>this bit cleared, then SOCK_SEQPACKET support will be disabled.
>
>Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
>---
> drivers/vhost/vsock.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)

I think is better to move this patch after we set the seqpackets ops,
so we are really able to handle SEQPACKET traffic.

>
>diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
>index 5e78fb719602..3b0a50e6de12 100644
>--- a/drivers/vhost/vsock.c
>+++ b/drivers/vhost/vsock.c
>@@ -31,7 +31,8 @@
>
> enum {
> 	VHOST_VSOCK_FEATURES = VHOST_FEATURES |
>-			       (1ULL << VIRTIO_F_ACCESS_PLATFORM)
>+			       (1ULL << VIRTIO_F_ACCESS_PLATFORM) |
>+			       (1ULL << VIRTIO_VSOCK_F_SEQPACKET)
> };
>
> enum {
>@@ -785,6 +786,9 @@ static int vhost_vsock_set_features(struct vhost_vsock *vsock, u64 features)
> 			goto err;
> 	}
>
>+	if (features & (1ULL << VIRTIO_VSOCK_F_SEQPACKET))
>+		vhost_transport.seqpacket_allow = true;
>+
> 	for (i = 0; i < ARRAY_SIZE(vsock->vqs); i++) {
> 		vq = &vsock->vqs[i];
> 		mutex_lock(&vq->mutex);
>-- 
>2.25.1
>


  reply	other threads:[~2021-03-15 11:29 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 17:57 [RFC PATCH v6 00/22] virtio/vsock: introduce SOCK_SEQPACKET support Arseny Krasnov
2021-03-07 17:58 ` [RFC PATCH v6 01/22] af_vsock: update functions for connectible socket Arseny Krasnov
2021-03-12 14:38   ` Stefano Garzarella
2021-03-07 17:59 ` [RFC PATCH v6 02/22] af_vsock: separate wait data loop Arseny Krasnov
2021-03-12 14:40   ` Stefano Garzarella
2021-03-07 17:59 ` [RFC PATCH v6 03/22] af_vsock: separate receive " Arseny Krasnov
2021-03-07 17:59 ` [RFC PATCH v6 04/22] af_vsock: implement SEQPACKET receive loop Arseny Krasnov
2021-03-12 15:01   ` Stefano Garzarella
2021-03-12 15:17   ` Stefano Garzarella
2021-03-15  7:49     ` Arseny Krasnov
2021-03-07 17:59 ` [RFC PATCH v6 05/22] af_vsock: separate wait space loop Arseny Krasnov
2021-03-07 18:00 ` [RFC PATCH v6 06/22] af_vsock: implement send logic for SEQPACKET Arseny Krasnov
2021-03-12 15:10   ` Stefano Garzarella
2021-03-15  7:49     ` Arseny Krasnov
2021-03-07 18:00 ` [RFC PATCH v6 07/22] af_vsock: rest of SEQPACKET support Arseny Krasnov
2021-03-12 15:28   ` Stefano Garzarella
2021-03-07 18:01 ` [RFC PATCH v6 08/22] af_vsock: update comments for stream sockets Arseny Krasnov
2021-03-12 15:29   ` Stefano Garzarella
2021-03-07 18:01 ` [RFC PATCH v6 09/22] virtio/vsock: set packet's type in virtio_transport_send_pkt_info() Arseny Krasnov
2021-03-12 15:31   ` Stefano Garzarella
2021-03-07 18:01 ` [RFC PATCH v6 10/22] virtio/vsock: simplify credit update function API Arseny Krasnov
2021-03-12 15:33   ` Stefano Garzarella
2021-03-07 18:02 ` [RFC PATCH v6 11/22] virtio/vsock: dequeue callback for SOCK_SEQPACKET Arseny Krasnov
2021-03-15 11:02   ` Stefano Garzarella
2021-03-07 18:02 ` [RFC PATCH v6 12/22] virtio/vsock: fetch length for SEQPACKET record Arseny Krasnov
2021-03-12 15:20   ` Stefano Garzarella
2021-03-15  7:49     ` Arseny Krasnov
2021-03-07 18:02 ` [RFC PATCH v6 13/22] virtio/vsock: add SEQPACKET receive logic Arseny Krasnov
2021-03-15 11:15   ` Stefano Garzarella
2021-03-07 18:03 ` [RFC PATCH v6 14/22] virtio/vsock: rest of SOCK_SEQPACKET support Arseny Krasnov
2021-03-15 11:25   ` Stefano Garzarella
2021-03-07 18:03 ` [RFC PATCH v6 15/22] virtio/vsock: SEQPACKET support feature bit Arseny Krasnov
2021-03-07 18:03 ` [RFC PATCH v6 16/22] vhost/vsock: SEQPACKET feature bit support Arseny Krasnov
2021-03-15 11:28   ` Stefano Garzarella [this message]
2021-03-07 18:04 ` [RFC PATCH v6 17/22] virtio/vsock: " Arseny Krasnov
2021-03-15 11:29   ` Stefano Garzarella
2021-03-07 18:04 ` [RFC PATCH v6 18/22] virtio/vsock: setup SEQPACKET ops for transport Arseny Krasnov
2021-03-07 18:04 ` [RFC PATCH v6 19/22] vhost/vsock: " Arseny Krasnov
2021-03-07 18:04 ` [RFC PATCH v6 20/22] vsock/loopback: " Arseny Krasnov
2021-03-07 18:05 ` [RFC PATCH v6 21/22] vsock_test: add SOCK_SEQPACKET tests Arseny Krasnov
2021-03-07 18:05 ` [RFC PATCH v6 22/22] virtio/vsock: update trace event for SEQPACKET Arseny Krasnov
2021-03-10 10:06 ` [RFC PATCH v6 00/22] virtio/vsock: introduce SOCK_SEQPACKET support Stefano Garzarella
2021-03-10 10:13   ` Arseny Krasnov
2021-03-15 11:40 ` Stefano Garzarella
2021-03-15 15:22   ` Arseny Krasnov
2021-03-16  3:37     ` Arseny Krasnov
2021-03-16  8:08       ` Stefano Garzarella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210315112830.3yqqjnqcgym2sdpg@steredhat \
    --to=sgarzare@redhat.com \
    --cc=andraprs@amazon.com \
    --cc=arseny.krasnov@kaspersky.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=jhansen@vmware.com \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nslusarek@gmx.net \
    --cc=oxffffaa@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=stsp2@yandex.ru \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).