Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4199828pxv; Tue, 27 Jul 2021 01:00:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQx82R3H24vIg3bRJy+prQYEtP/yMUx3WRxc9j/ypTaj/Fh+eIB6hgbJIu8G44mxBy7kL+ X-Received: by 2002:a05:6e02:15c8:: with SMTP id q8mr1851026ilu.285.1627372855447; Tue, 27 Jul 2021 01:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627372855; cv=none; d=google.com; s=arc-20160816; b=bp3dpwhO7SY9tahGH0ZeJA6O+IVc1WdiPP6DcNUdoDiUU6sK3XXJ3JwxnHmD67Z4L3 nGhVtCQ20yFqVjNXk8YEqhM+EDgRUarEYUIPSv+1FTEkgsxNr++edOZ7wwVtyncOy8zR JwDMI1zAGqFc2JoTPbLOZdruCi1YB7RKhj23aI0OpzW/fSDqHjyY/kLSb+Ebcf918I0k I+JJ+RwcBk0queqti6wdBdYTsfb+y1UQ8pY4jNRQe1goxjXtpzcEiX6i9zwLZbXKB2aY qftlvgM2TGxTEH/f0xbN1ew6P1GbFmH0nZj4zZ22/OFmWTKAaj4Swg5KAO51z1XA9s0P AfDQ== 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=/EIq4hrAP0Ac0pX1HeyNfiwT/0BIOEO0auXFwtqoKwk=; b=NGgcjK1JtZkLClZC332XQ4qKBIwFfIITlJYkYLr75DVHXQUe9oOmGZHcUqZy4hEPne a+vdZIHrrZEDTGfSJVx8a/hngb5g6XkCrnGGEBBy58KflzmGmScMzXaqYgnmGfXnbNXN IP4SmFZfcNaUqYUQcGeLkDChh8lTXq3LBCd4RVsZk5XOb2RolkpwvwqlXI3q4aGK3dmn vlRk2qbRJrPGUZwB9zVuC1ZhENA6rFGxyowISvOB71G+9Rn8L/XuSMqKp4E4+Dpr0/cx ZI1Xz4y0jgDAogP6Jmb4nwTd+UgMEL6Ifv5Peb8BTiskTNiTR7lkFh8Lo8pkbtE1g1ay K5iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RzWYwwJW; 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 q5si2637520jaj.40.2021.07.27.01.00.43; Tue, 27 Jul 2021 01:00:55 -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=RzWYwwJW; 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 S235852AbhG0H7z (ORCPT + 99 others); Tue, 27 Jul 2021 03:59:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46016 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235675AbhG0H7x (ORCPT ); Tue, 27 Jul 2021 03:59:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627372793; 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=/EIq4hrAP0Ac0pX1HeyNfiwT/0BIOEO0auXFwtqoKwk=; b=RzWYwwJW0HI5LovkIL/n3eKTaJxruFQFZsnR+6nAOLc2j7Rglx9g3B3OO8/iwDMO3JJluO bF9JqQ1V+P0JXy/QYLC698r4I7KJ8h8D419mWyLo6CPGB4Ma8XiPupjqQ/cqL7TbSRhrfT 0m1snXyA+r3o2E6pOolbXbCf7ywX2q0= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-VtHXY_ebMMGZG17Ja4wxjQ-1; Tue, 27 Jul 2021 03:59:52 -0400 X-MC-Unique: VtHXY_ebMMGZG17Ja4wxjQ-1 Received: by mail-ed1-f72.google.com with SMTP id u25-20020aa7d8990000b02903bb6a903d90so3382675edq.17 for ; Tue, 27 Jul 2021 00:59:52 -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=/EIq4hrAP0Ac0pX1HeyNfiwT/0BIOEO0auXFwtqoKwk=; b=VVvmfyiDQT0kd+WduwZfVNz5CZds9/EJfQ22/Iq0349XsOJQfbDvNpAP0atgbQOIu9 UpQ3VDrguo2ND7hYXwllRg5BiepxOBWQDMBxQ4yGvJIs2pTdQls7/BSqAdZZ2CqhOfZI 0DD/qV1MrPEuujprngrIGX+QZ/i7Akgf0uwgBfKUWcnBps+iY9IofN6/MoPZCtZv4XLZ Wqa88R5siEAC8Dt6Tq2l2tqmPElatDMduMsC/mj1lZBaABaClLFcWmZ72F3Q8T4B0HQI gLcGrGDNXeU56mGOvPUPnRBbrRoSAPUu4Br5QCh/pSjjGng9Ivw9LGzUdvVtTwFSZI8j SUbg== X-Gm-Message-State: AOAM531nfiOLNrSDR5UhivdU4KT2PoRnaXkWCBQkmq+4fUgKFYNRg++0 wP9hK9REJMXnHhqRLyq1lWFqXfJ4eUWJrLW6aN6/ruZA2ce3Qt6N8LNCr5qrV/PsiT7n+WpeYju S8Xy4vwXk8qrI0jGgV/ZFGWG0 X-Received: by 2002:a05:6402:12c3:: with SMTP id k3mr11211306edx.11.1627372791441; Tue, 27 Jul 2021 00:59:51 -0700 (PDT) X-Received: by 2002:a05:6402:12c3:: with SMTP id k3mr11211285edx.11.1627372791319; Tue, 27 Jul 2021 00:59:51 -0700 (PDT) Received: from steredhat (host-79-18-148-79.retail.telecomitalia.it. [79.18.148.79]) by smtp.gmail.com with ESMTPSA id i14sm613214eja.91.2021.07.27.00.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 00:59:50 -0700 (PDT) Date: Tue, 27 Jul 2021 09:59:48 +0200 From: Stefano Garzarella To: Arseny Krasnov Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Colin Ian King , Andra Paraschiv , Norbert Slusarek , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, oxffffaa@gmail.com Subject: Re: [RFC PATCH v1 0/7] virtio/vsock: introduce MSG_EOR flag for SEQPACKET Message-ID: <20210727075948.yl4w3foqa6rp4obg@steredhat> References: <20210726163137.2589102-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210726163137.2589102-1-arseny.krasnov@kaspersky.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 26, 2021 at 07:31:33PM +0300, Arseny Krasnov wrote: > This patchset implements support of MSG_EOR bit for SEQPACKET >AF_VSOCK sockets over virtio transport. > Idea is to distinguish concepts of 'messages' and 'records'. >Message is result of sending calls: 'write()', 'send()', 'sendmsg()' >etc. It has fixed maximum length, and it bounds are visible using >return from receive calls: 'read()', 'recv()', 'recvmsg()' etc. >Current implementation based on message definition above. > Record has unlimited length, it consists of multiple message, >and bounds of record are visible via MSG_EOR flag returned from >'recvmsg()' call. Sender passes MSG_EOR to sending system call and >receiver will see MSG_EOR when corresponding message will be processed. > To support MSG_EOR new bit was added along with existing >'VIRTIO_VSOCK_SEQ_EOR': 'VIRTIO_VSOCK_SEQ_EOM'(end-of-message) - now it >works in the same way as 'VIRTIO_VSOCK_SEQ_EOR'. But 'VIRTIO_VSOCK_SEQ_EOR' >is used to mark 'MSG_EOR' bit passed from userspace. At this point it's probably better to rename the old flag, so we stay compatible. What happens if one of the two peers does not support MSG_EOR handling, while the other does? I'll do a closer review in the next few days. Thanks, Stefano