Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp243174pxb; Fri, 15 Jan 2021 02:02:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx13ZCnLKBIsK8yywh1Gx5tnVtsPD4LQy1xSQwKQCfMZf61fZxuonle4vy3CkGjYUvVLI9W X-Received: by 2002:a17:906:e958:: with SMTP id jw24mr1166552ejb.355.1610704952895; Fri, 15 Jan 2021 02:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610704952; cv=none; d=google.com; s=arc-20160816; b=xNHoYKK/ud/8HyGldzwWjRBtJQ/xBlp+gZtGkDJM/0rs8GlgUpFxpKMXAl6lAxC4+p NNyYBi4KuzGfKXJ1689Fq+962ViCIRfAQyfskNrxk/XK7MUxcTP3aVlu9BZKMP0ftg5U CGRDh1LlE7t86i8vg9fnqXPK9CSsdbbjB2DrAMZyfg1Wq3MoxaVnTP//p5RINQeB5l7d adc42SiGb2nhtHjJJHfbJctjHt60Ijy8UG1ROkDBmtUlEfj/nZ4L92cUqfGT3hxggqwL roRi1ozEAT4CPdXX9twwn1J7VsI4a3TjbsMqX/9IhUhBnvMqZ/jTjXAAwaVNAxG+AjId VfDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=3nwl8ujtSIs9eCC8kSIL1MZLqNVqrBzoldVBFcpqhp0=; b=W1wuTmkQKUWwedEJ9hYDYjAwCUai4WE2aqDKeoeorFPERHSmcotAWBiUb+f3E7eT6P yHOYt05ECz0JYHPKhrpDeoGllIJtMZS68lS6aMQ6a1m298451NYWM6Kdpk2DFNrHXMCH f9Hb0EiRzJ/hGbAhtzyFzkhtM7xhLvIfKZo/sWXqPsB6wiZ1U5sYMWF7X/CxiGvJkI5r CIbxNHepYFmbGnkHBsq9HAfxVR/9Jt85EYeYHhHoxP6qL+ZXyPCppWn4Rq9/iFxU11/V cyOFQ4cW7I1L3qGqKBh5qw+Eld8XZcVcgL4kDjejcP3A/fTO+9Et2XXE2rQ+hB9LYg6o MAwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=nVmCPkOA; 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=yandex.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p19si135636eji.91.2021.01.15.02.02.08; Fri, 15 Jan 2021 02:02:32 -0800 (PST) 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=@yandex.ru header.s=mail header.b=nVmCPkOA; 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=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731471AbhAOKA0 (ORCPT + 99 others); Fri, 15 Jan 2021 05:00:26 -0500 Received: from forward103p.mail.yandex.net ([77.88.28.106]:43402 "EHLO forward103p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730699AbhAOKAT (ORCPT ); Fri, 15 Jan 2021 05:00:19 -0500 Received: from iva7-b2551a6f14a8.qloud-c.yandex.net (iva7-b2551a6f14a8.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:2f9c:0:640:b255:1a6f]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 08A5518C0FCB; Fri, 15 Jan 2021 12:59:37 +0300 (MSK) Received: from iva3-dd2bb2ff2b5f.qloud-c.yandex.net (iva3-dd2bb2ff2b5f.qloud-c.yandex.net [2a02:6b8:c0c:7611:0:640:dd2b:b2ff]) by iva7-b2551a6f14a8.qloud-c.yandex.net (mxback/Yandex) with ESMTP id C4vTl272uK-xaDuFG0R; Fri, 15 Jan 2021 12:59:36 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1610704776; bh=3nwl8ujtSIs9eCC8kSIL1MZLqNVqrBzoldVBFcpqhp0=; h=In-Reply-To:From:Date:References:To:Subject:Message-ID:Cc; b=nVmCPkOAFYrbTW+xC0K4x/0O+6/NgZ2btTTQVzBwuLuM2Uskw/Vlib78QBjHkon+E 1d5mx5gP218R+7m5IYf41gc1b7WjW86ozI9hLHLayy6mU7gM/rKCL98xuXz0tfYmwQ eOsGMxjAI3/cVxaFil4nz2TDBCfWxLk35UvaP/zQ= Authentication-Results: iva7-b2551a6f14a8.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by iva3-dd2bb2ff2b5f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id mW8S2PjIqj-xZIi97rg; Fri, 15 Jan 2021 12:59:35 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: [RFC PATCH v2 00/13] virtio/vsock: introduce SOCK_SEQPACKET support. To: Arseny Krasnov , Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Colin Ian King , Andra Paraschiv , Jeff Vander Stoep Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, oxffffaa@gmail.com References: <20210115053553.1454517-1-arseny.krasnov@kaspersky.com> From: stsp Message-ID: <2fd6fc75-c534-7f70-c116-50b1c804b594@yandex.ru> Date: Fri, 15 Jan 2021 12:59:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210115053553.1454517-1-arseny.krasnov@kaspersky.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 15.01.2021 08:35, Arseny Krasnov пишет: > This patchset impelements support of SOCK_SEQPACKET for virtio > transport. > As SOCK_SEQPACKET guarantees to save record boundaries, so to > do it, new packet operation was added: it marks start of record (with > record length in header), such packet doesn't carry any data. To send > record, packet with start marker is sent first, then all data is sent > as usual 'RW' packets. On receiver's side, length of record is known > from packet with start record marker. Now as packets of one socket > are not reordered neither on vsock nor on vhost transport layers, such > marker allows to restore original record on receiver's side. If user's > buffer is smaller that than > record length, when then > v1 -> v2: > - patches reordered: af_vsock.c changes now before virtio vsock > - patches reorganized: more small patches, where +/- are not mixed If you did this because I asked, then this is not what I asked. :) You can't just add some static func in a separate patch, as it will just produce the compilation warning of an unused function. I only asked to separate the refactoring from the new code. I.e. if you move some code block to a separate function, you shouldn't split that into 2 patches, one that adds a code block and another one that removes it. It should be in one patch, so that it is clear what was moved, and no new warnings are introduced. What I asked to separate, is the old code moves with the new code additions. Such things can definitely go in a separate patches. NB: just trying to help, as I already played with your code a bit. I am neither a maintainer nor a contributor here, but it would be cool to have the vsock SEQPACKET support.