From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A48BC4320A for ; Tue, 27 Jul 2021 07:59:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21EC8610D0 for ; Tue, 27 Jul 2021 07:59:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235847AbhG0H7y (ORCPT ); Tue, 27 Jul 2021 03:59:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45217 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235746AbhG0H7x (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-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-9N9PUxbBPY-c7qxes-F5iQ-1; Tue, 27 Jul 2021 03:59:52 -0400 X-MC-Unique: 9N9PUxbBPY-c7qxes-F5iQ-1 Received: by mail-ed1-f71.google.com with SMTP id f24-20020a0564021618b02903954c05c938so6180536edv.3 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=YAND/s11q7E8rNTijZ9LOQCTGuokwuw2vIcJJMLZR2nK2NbvlGBxNqI6odpBS797g4 p0DWoYng5gV9gkulYEXMsFrEyxfFBvgRkBAlSGuXxk5lWxCJSAq/6n7U2CB77/IxDpTa APih2GeNBzoaS8S5yvnnrx2cz47WQ4eOZRValJMQYUAbRjz2JKCrG9BIBobLL7ycR8W7 wzQQDt9D/DLDYBpgzRi8uVGXVePylwAl75Eog5iBgNUgCsiYIkDQ+yZfzwLxOaILDVBs vFXdAJq+0W8jrz5E+9O/YPinQiGaIsAoX0EyHu9Z6FdXxNJqgu0EQk9A7NBFfPp4qq08 0I2w== X-Gm-Message-State: AOAM531jF6cQ7oo8iuc+8s4tcdFx5IkU9TcVMPU8TBBB6hroT/9JWSP5 otE2VyhAaUlzQNlen4B88DqwgyZXDBjVZOrKvJzInwjh/U6u90KNY1rThJ1esFI+1MZzrGl0ObZ aJssTTCWl3tOv X-Received: by 2002:a05:6402:12c3:: with SMTP id k3mr11211298edx.11.1627372791441; Tue, 27 Jul 2021 00:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlCvS56tYgLWOzqJ8Wh70Fht2s02iJ7M5DydMmq9uVJaSBBqYQBS2qw7251aRYo+dt+iun8A== 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: kvm@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