Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp384541pxj; Thu, 13 May 2021 07:12:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0XW56WmvCSpAZKLNjRcFXeOlbHsE2vyxtZbF5XEV+hP93q7C3tBQ1Vgpqq6sNeCtUSUf7 X-Received: by 2002:a2e:9648:: with SMTP id z8mr33549033ljh.328.1620915139471; Thu, 13 May 2021 07:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620915139; cv=none; d=google.com; s=arc-20160816; b=HeMYchimRm5b/LXgrM6HXGzAbDXmJKMFcC2T9tH/XRI7ueQHt6AR6fG9u5bNoPJBQ7 NIsS4THVziVPix5SXYAYSfajMAgGHG9bFKzQnMUVnUkar+N2Zo/nKkvLY6mYx5yhptQQ OwE+Opu+ugMyVfzuXUdc++MyqsOPORhiWpX7wM2EIrPoUSUJRy8oqSzFb4yTaYuNZ4ko puyFIaj64sar2OPEX6eJveUl365NpuJ/rvSwbtsNJ9iFss2xt20Iy40Tl3y9DQvxaisW u4tqMcg73cWUqlCUBVzzmxrn8xb0aZ+l0HlHNMQQRCHbFPfISUFpvOugJbhvVhMhhJS1 xO8g== 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=cUgVX0TtQOw33OQHk7jduOTQRZ441iaMNO9LgK0Gtaw=; b=GqyuJQ9UQjaLZfeFvQJkSnCMhjGr3tBD3SzHGjwRLbc/kHBf1mhJ987q4lNVcijZ4l ldfMA8RtFTqTrCNgF/dEFJo7LkUuWtwB91JWXbta8+XWFSzYqCVPNEeh6OaGv9iHi0+a 6UtRaZbwiWTKiGmIPjStYaofxvCHzy5igv6z64mD1t4pWqyC4hWLpdgv3cumQIHlsMqm fIUnF4h/0KxcKbUtgM+elbditNGkDxRyOuv59MjtWyA2RBYErstZgEPstqLoldGuYt6a +a8J1Sr/3KpshUlkMFxTpCIpkeGLvzSmiXtC2ndBNMa4wbx0qpWq1Bbb2rngmr2MEIf5 pzMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AHZx9IYh; 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 9si3813923lfy.485.2021.05.13.07.11.48; Thu, 13 May 2021 07:12:19 -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=AHZx9IYh; 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 S234331AbhEMOLg (ORCPT + 99 others); Thu, 13 May 2021 10:11:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35815 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234292AbhEMOLe (ORCPT ); Thu, 13 May 2021 10:11:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620915024; 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=cUgVX0TtQOw33OQHk7jduOTQRZ441iaMNO9LgK0Gtaw=; b=AHZx9IYhxb+Eoaxu8GKScAthgEP6V1hHaCuO72a+Y1SCfKBuKqtNG4usH2B1FRw9jl/qGb DdlXp3R6PXFZRxJdeLzv1oeff88go7L53Ok9umG2PDvAz7cW7mhJ3OUdQeozJO0LEoB7XH /37WToMzkH+8L4hcRCB+FY8NZTQoctA= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-222-ozzgUXLaM_2Xcaa9WdpwxQ-1; Thu, 13 May 2021 10:10:23 -0400 X-MC-Unique: ozzgUXLaM_2Xcaa9WdpwxQ-1 Received: by mail-ej1-f70.google.com with SMTP id qk30-20020a170906d9deb02903916754e1b6so8391710ejb.2 for ; Thu, 13 May 2021 07:10:22 -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=cUgVX0TtQOw33OQHk7jduOTQRZ441iaMNO9LgK0Gtaw=; b=e2KANjqP1fH1IHVPUirB4O3KPfwu2VwtYs6ygP0LVAUxcpqG7opK1mnoro6v1Eh30F 7QZVaPjkn12w67SHyOI5MbKkOvOtaROHiiHHkpNoxodd5SULsgn38xuKZQT8O5PtVcHB wsnJwy3ue031rtzk/VlH2faTiuoB3PViqhjWiyzD3sYC+IsME59DB3IWiFBj11jp19gM CHYAoB5KHLMUiztIHkSISnjnNmeQHVvUZqcu1sDPv/vOdoAsn7GgNd0i7P/tevonKK+U Avq7RYdFL53TDBfKgU49bp+UghEuDUF5RZm2LqQZaOdwf8o0/JLbc9ngoJZjJz36Ed5A wq5Q== X-Gm-Message-State: AOAM531aix8phOw1jCVkNHtuFl6pz01vLEMnFxY7XA6Tj0HFQ1heLCP7 AEhRsbDLc3590kY+L8wOInC9VbLbkWYkVg0CIphaZqQ6LECPn1QzjtNzkCIOeoOpEmgB7bgRe96 S21O5OWhheu2PnfKNtXSyWysZ X-Received: by 2002:a05:6402:2753:: with SMTP id z19mr50413597edd.158.1620915021933; Thu, 13 May 2021 07:10:21 -0700 (PDT) X-Received: by 2002:a05:6402:2753:: with SMTP id z19mr50413547edd.158.1620915021631; Thu, 13 May 2021 07:10:21 -0700 (PDT) Received: from steredhat (host-79-18-148-79.retail.telecomitalia.it. [79.18.148.79]) by smtp.gmail.com with ESMTPSA id z4sm2390717edc.1.2021.05.13.07.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 07:10:20 -0700 (PDT) Date: Thu, 13 May 2021 16:10:18 +0200 From: Stefano Garzarella To: Arseny Krasnov Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Jorgen Hansen , Andra Paraschiv , Norbert Slusarek , Colin Ian King , 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 v9 00/19] virtio/vsock: introduce SOCK_SEQPACKET support Message-ID: <20210513141018.pqsmb5wqbjrbwwho@steredhat> References: <20210508163027.3430238-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210508163027.3430238-1-arseny.krasnov@kaspersky.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arseny, On Sat, May 08, 2021 at 07:30:23PM +0300, Arseny Krasnov wrote: > This patchset implements support of SOCK_SEQPACKET for virtio >transport. > As SOCK_SEQPACKET guarantees to save record boundaries, so to >do it, new bit for field 'flags' was added: SEQ_EOR. This bit is >set to 1 in last RW packet of message. > Now as packets of one socket are not reordered neither on vsock >nor on vhost transport layers, such bit allows to restore original >message on receiver's side. If user's buffer is smaller than message >length, when all out of size data is dropped. > Maximum length of datagram is not limited as in stream socket, >because same credit logic is used. Difference with stream socket is >that user is not woken up until whole record is received or error >occurred. Implementation also supports 'MSG_TRUNC' flags. > Tests also implemented. > > Thanks to stsp2@yandex.ru for encouragements and initial design >recommendations. > > Arseny Krasnov (19): > af_vsock: update functions for connectible socket > af_vsock: separate wait data loop > af_vsock: separate receive data loop > af_vsock: implement SEQPACKET receive loop > af_vsock: implement send logic for SEQPACKET > af_vsock: rest of SEQPACKET support > af_vsock: update comments for stream sockets > virtio/vsock: set packet's type in virtio_transport_send_pkt_info() > virtio/vsock: simplify credit update function API > virtio/vsock: defines and constants for SEQPACKET > virtio/vsock: dequeue callback for SOCK_SEQPACKET > virtio/vsock: add SEQPACKET receive logic > virtio/vsock: rest of SOCK_SEQPACKET support > virtio/vsock: enable SEQPACKET for transport > vhost/vsock: enable SEQPACKET for transport > vsock/loopback: enable SEQPACKET for transport > vsock_test: add SOCK_SEQPACKET tests > virtio/vsock: update trace event for SEQPACKET > af_vsock: serialize writes to shared socket > > drivers/vhost/vsock.c | 42 +- > include/linux/virtio_vsock.h | 9 + > include/net/af_vsock.h | 8 + > .../events/vsock_virtio_transport_common.h | 5 +- > include/uapi/linux/virtio_vsock.h | 9 + > net/vmw_vsock/af_vsock.c | 417 +++++++++++------ > net/vmw_vsock/virtio_transport.c | 25 + > net/vmw_vsock/virtio_transport_common.c | 129 ++++- > net/vmw_vsock/vsock_loopback.c | 11 + > tools/testing/vsock/util.c | 32 +- > tools/testing/vsock/util.h | 3 + > tools/testing/vsock/vsock_test.c | 63 +++ > 12 files changed, 594 insertions(+), 159 deletions(-) > > v8 -> v9: > General changelog: > - see per patch change log. > I reviewed this series and left some comments. Before remove the RFC tag, please check that all the commit messages contains the right information. Also, I recommend you take a look on how the other commits in the Linux tree are written because the commits in this series look like todo lists. For RFC could be fine, but for the final version it would be better to rewrite them following the advice written here: Documentation/process/submitting-patches.rst Thanks, Stefano