Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3209889pxf; Mon, 15 Mar 2021 04:30:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfRf4AcTmH0W1I6SM0CisKV511xiWV5MVds09wCBCnIZgnz0ooR0u72kQAJjxNNXatqTIM X-Received: by 2002:a17:906:384e:: with SMTP id w14mr22614817ejc.285.1615807827325; Mon, 15 Mar 2021 04:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615807827; cv=none; d=google.com; s=arc-20160816; b=CjX8SomDRNS6WDURmVhmdhZPdra3zUkfNMVmUXR+8Wgm1byI6/Op7xiNZ7C4c+bTRP RrUmboxRr5SEwAu5AnsGaUi5ZYfIvhVkv+aGsCtYE0tM2JZ4EJfMvn4RwTcw21uf2Zrb nPD9d2fmsYEJd7M5tpcychj844ko4ubEkC4cnB1NlAAVFAIoewYC3/MZ9u0SYV76HH7P ii5Ok6C8YlsUEf+J4GkZCwgpG/nIP+VmqBfVq4nT78pp+MRlZ5mj46wSQMMBoJMLCLTY 23n3e0roO8nNcfmrBZBk20Sk+7oCuIM9nzOSz5juYs2s+bGf01ubI9W0vAeTkgsGQsZG CG5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6+Ab4d7pdKrk5yb3Huo0eOHzorz4U2kFO+nloggYgTE=; b=w5pAi68KQnTUnTtJbU3qvb2HOYeanRCqCXP9DLg4Aq9y2kOpt2CqpNcoip4BjXg4hD LOB2f/12ww1psYxbFsHNAeYn6N6FiPN9CKNBv/TIHUYLtF8z1mb5TNBYJZjqHhazrTyb TWd253gaKXW6whsjCRcRaSgcYOX2ELpsEO1BRi3U3hm4GePA33nuHsZrRgFVsfDnpbKB YW/81TTj5cCE+cw45MVcpCoZrts3VqYmnOdAAXsMmaVDe80ywfuMDN3+zYR/bsWIIKuu DOkVOVCK3gOFxyW0GECDha6VlQTsCGlxdDi0CQk25rpYgoyNDznpYuxf84/NWrHhQ6nc DqWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OcUYvPCd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qt26si10600487ejb.216.2021.03.15.04.30.04; Mon, 15 Mar 2021 04:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OcUYvPCd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbhCOL2t (ORCPT + 99 others); Mon, 15 Mar 2021 07:28:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21806 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbhCOL2g (ORCPT ); Mon, 15 Mar 2021 07:28:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615807716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6+Ab4d7pdKrk5yb3Huo0eOHzorz4U2kFO+nloggYgTE=; b=OcUYvPCdxjkF2sc/qvdK0P4v6Pja5Sfm3ns5etFBiZeoVnPsGUpiIbSJrYU1uTvDy9Lp3x 8noaAOtJl6mW4gXstQxMX07GMX/W+VWbKZ7heSzZDtzQsZVo6X1v8KdBR3VtWt/Pyliq8P 1RJrYO4OihV/L/BFSP3iD/MxfKX5IaY= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-SH_yfAV9MkGOGoKkK4WoxA-1; Mon, 15 Mar 2021 07:28:34 -0400 X-MC-Unique: SH_yfAV9MkGOGoKkK4WoxA-1 Received: by mail-wr1-f70.google.com with SMTP id y5so14954657wrp.2 for ; Mon, 15 Mar 2021 04:28:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6+Ab4d7pdKrk5yb3Huo0eOHzorz4U2kFO+nloggYgTE=; b=g1QeJNH0F+iSuaYRFaNiw+yirdtz5spUA+AYojvzM5DnYnoeKUMs/6c6k9BWSJAff7 GO2oQUlFqiMbYvebw3wxWRhwCYE4vypCGDKhFEvxG1Fo48znvc2VEwfgLa9UgNxxwTuw RySeqlW2FnLIZVBgfRinrR1/KqMpqNxAsyS7apyuZwSr/mn6yHMh9LGauBbV1Mks+4Wz EEXxXJ9chJiFI0sfzqIDBuxXDZvmS/P8i4ii/O1C5IJkImvhj8QtU9IfxampLnjK5KP1 pG6I8kDTQEeSwlLiI8PCKZht/+yccLEuppguktVGBSUiyaTGpwAx3QQ6uMvwS3Kk2wKL P/jg== X-Gm-Message-State: AOAM533Z5VowKJ//Kj0Ie74MYUvnDBT7F2VRlkS9caeDwnYG/7gpHtWT CvqGnjCc2alY3sJQB2j3HE4UlFVrAbtW5VPTo4JNUWeoq+GF5UjLiYioduqP8pnDowJQffDcmn2 yji5M44tTUEiBEx5MucWcWzCj X-Received: by 2002:a1c:f30a:: with SMTP id q10mr26369014wmq.159.1615807713329; Mon, 15 Mar 2021 04:28:33 -0700 (PDT) X-Received: by 2002:a1c:f30a:: with SMTP id q10mr26368990wmq.159.1615807713161; Mon, 15 Mar 2021 04:28:33 -0700 (PDT) Received: from steredhat (host-79-34-249-199.business.telecomitalia.it. [79.34.249.199]) by smtp.gmail.com with ESMTPSA id 1sm12342744wmj.2.2021.03.15.04.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 04:28:32 -0700 (PDT) Date: Mon, 15 Mar 2021 12:28:30 +0100 From: Stefano Garzarella To: Arseny Krasnov Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Jorgen Hansen , Colin Ian King , Norbert Slusarek , Andra Paraschiv , 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 Message-ID: <20210315112830.3yqqjnqcgym2sdpg@steredhat> References: <20210307175722.3464068-1-arseny.krasnov@kaspersky.com> <20210307180344.3466469-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210307180344.3466469-1-arseny.krasnov@kaspersky.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >--- > 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 >