Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp533106pxj; Fri, 11 Jun 2021 05:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWXJJ6dJd4Gs8nL6OtyOGwTUpo9NrScvb2HBQkjy1Bf0E7sWU1YlykRcE/pmABtmH0TZEn X-Received: by 2002:aa7:ce03:: with SMTP id d3mr3382802edv.360.1623414575141; Fri, 11 Jun 2021 05:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623414575; cv=none; d=google.com; s=arc-20160816; b=NqsMlu8PgOHLUlRPP85ArQLu3OHjILg1MjS7V+JS0aofVanqaRao4ugTSEhiRux5p4 WERrFAnD16odRnIuNj/nW9g1Kk13jwpwTtkTcP5EP6W4a2ANRAq3oIBhb2v/e2CVMWYl gatKiy/8rzjhdVaQv/HBikoTj21mFpuUjs15jDhY8vGQM1jXcvWUsu+cbq/xCMA2+Y1d t4xpPBfctLXThXzul2vkGrDr4JBaO4l8WTGRDtIcYeY/emMTPSW3WnjBMGiiwZ5N34nB x0wAOGLdXeYMnCJhXedoIhfclf0h7KhI1OD9xP6zAbvrWeJMMsCsDMHdtCHO3tIDZ44M WZgw== 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=+saQX1pFifHAMfA75K26b9IDNQxzW3sh1B/T8sEy8xE=; b=cHxlj9r1E29ry87/+FwkpSlT485tLZwcAN71XlPsxGjhbcZyPpjCffTRZ006lUbCGw 3XiSCQoRw7+f3K9NPOcLlinNkPmqePejfTaiTfB8CV1w1B1MLA3HFEaDEjK8IPIhhFnK HGaPkIGrUz3ueqObKLtzDKhEezJXy87gcJIWZAwiTVIye7rVZoN5ch01exyR07NfnzmC I83pwokV/YPEZXsX8i2Nx8REDeT7kim/wGoJSelPsr8z0kFEhHCDBT0raSvFIE1IpSo/ j84qYoBzUDuctuHwenDoSpZ5oXLKaTF6mlqwCci9gU5qcL6FSjXRdENeeVIVk2xN/9sF T+Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P7fQO0LH; 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 u7si4605119eds.594.2021.06.11.05.29.12; Fri, 11 Jun 2021 05:29:35 -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=P7fQO0LH; 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 S231588AbhFKM1h (ORCPT + 99 others); Fri, 11 Jun 2021 08:27:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41751 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbhFKM1g (ORCPT ); Fri, 11 Jun 2021 08:27:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623414338; 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=+saQX1pFifHAMfA75K26b9IDNQxzW3sh1B/T8sEy8xE=; b=P7fQO0LHTp9kcgF1zZ03nFMXrCEGkvVSqBQ2+eQeadktk4YT+AXvOV3Jn0iWv6h0Aq+Fey +czm6UqcoV0B0xZ6fiiq9bW/sq/EUfXyyQKvHS/4djoiJs5vc2PHd0UZ+9reC+weuNF4wm Xaq8QI2ow7pO6ACiZDmJSHCAcCrcaAQ= 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-328-PXS8XQbYOJuJnvX_0sf2SA-1; Fri, 11 Jun 2021 08:25:37 -0400 X-MC-Unique: PXS8XQbYOJuJnvX_0sf2SA-1 Received: by mail-ej1-f70.google.com with SMTP id n19-20020a1709067253b029043b446e4a03so1066903ejk.23 for ; Fri, 11 Jun 2021 05:25:37 -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=+saQX1pFifHAMfA75K26b9IDNQxzW3sh1B/T8sEy8xE=; b=Rn4DmRpV3b85hOJ93LU4NB4ccX+y+l9Z2C+JfHZIG4R1GPFnQ9cbsNQFE3w5cnoUh7 7sp1+cpQsYk8Iek2tu7ajLBRmHaAb13Pnefw5UaTiY5eX1Zqn57Vx0IaSQ8Fbc5mu6zJ GL/eoB++JvGZNospJVzyugj21utus0DgiJL2L3Hq7gz5OJwklHh4p4ZGFpvtlZ3kLQ47 P9PZ3rSzcFUR4npa+FQp/dE6Hgt2/BPSrXEfznyeuty5Z0uV+aczSlJjJTv+uMD8GB32 4oKArfC31R6BDTDde7eWRtvIe6ol2Bdimc4fPCQmHc/zoknGRigOXrbCMs+2mlVlJ50P +wbg== X-Gm-Message-State: AOAM532MGGfO98z4JjeHiNoR9NCfWQWhMuPhz3CusK49g/sSZqs000sH HJ5vFJv27yg6/g98DkKJUwIOAdi7Le6taoe9suduFFz6oYWl3Q4Y3ugDT96k0FNdnWlXr9czJs0 h68xWxNK7O63sNwoT/cNj7nrz X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr3391589ejg.6.1623414336108; Fri, 11 Jun 2021 05:25:36 -0700 (PDT) X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr3391574ejg.6.1623414335924; Fri, 11 Jun 2021 05:25:35 -0700 (PDT) Received: from steredhat (host-79-18-148-79.retail.telecomitalia.it. [79.18.148.79]) by smtp.gmail.com with ESMTPSA id x15sm2111520edd.6.2021.06.11.05.25.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 05:25:35 -0700 (PDT) Date: Fri, 11 Jun 2021 14:25:33 +0200 From: Stefano Garzarella To: Arseny Krasnov Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , 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" , "oxffffaa@gmail.com" Subject: Re: [PATCH v11 00/18] virtio/vsock: introduce SOCK_SEQPACKET support Message-ID: <20210611122533.cy4jce4vxhhou5ms@steredhat> References: <20210611110744.3650456-1-arseny.krasnov@kaspersky.com> <59b720a8-154f-ad29-e7a9-b86b69408078@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <59b720a8-154f-ad29-e7a9-b86b69408078@kaspersky.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arseny, On Fri, Jun 11, 2021 at 02:17:00PM +0300, Arseny Krasnov wrote: > >On 11.06.2021 14:07, 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 limited by 'peer_buf_alloc' value. >> Implementation also supports 'MSG_TRUNC' flags. >> Tests also implemented. >> >> Thanks to stsp2@yandex.ru for encouragements and initial design >> recommendations. >> >> Arseny Krasnov (18): >> 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 >> >> drivers/vhost/vsock.c | 56 ++- >> include/linux/virtio_vsock.h | 10 + >> include/net/af_vsock.h | 8 + >> .../trace/events/vsock_virtio_transport_common.h | 5 +- >> include/uapi/linux/virtio_vsock.h | 9 + >> net/vmw_vsock/af_vsock.c | 464 ++++++++++++------ >> net/vmw_vsock/virtio_transport.c | 26 ++ >> net/vmw_vsock/virtio_transport_common.c | 179 +++++++- >> net/vmw_vsock/vsock_loopback.c | 12 + >> tools/testing/vsock/util.c | 32 +- >> tools/testing/vsock/util.h | 3 + >> tools/testing/vsock/vsock_test.c | 116 ++++++ >> 12 files changed, 730 insertions(+), 190 deletions(-) >> >> v10 -> v11: >> General changelog: >> - now data is copied to user's buffer only when >> whole message is received. >> - reader is woken up when EOR packet is received. >> - if read syscall was interrupted by signal or >> timeout, error is returned(not 0). >> >> Per patch changelog: >> see every patch after '---' line. >So here is new version for review with updates discussed earlier :) Thanks, I'll review next week, but I suggest you again to split in two series, since patchwork (and netdev maintainers) are not happy with a series of 18 patches. If you still prefer to keep them together during development, then please use the RFC tag. Also did you take a look at the FAQ for netdev that I linked last time? I don't see the net-next tag... Thanks, Stefano