Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp851236pxb; Fri, 3 Sep 2021 15:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiLRzHtQEwZ9T155gEYlhzJOsstv+KU9kQ1PisetUssKczb107m1N2p8//BK7RieD33DdK X-Received: by 2002:a17:906:781:: with SMTP id l1mr1105160ejc.289.1630707766888; Fri, 03 Sep 2021 15:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630707766; cv=none; d=google.com; s=arc-20160816; b=RP7Rx1Db2a50GEKBXjRMLZ/9Xi5PeSkLSFUgWnyph6XXt7KHxqFo6FxVIu6bS8OtjQ awqoneoxiXgsdmAl2gmlrnyqHDYE7IDge819wm/35PngNzXo/ZHOhRXtQlQQKTQEE6WR AyDgLSKAmqJiaIZIlB4d4VSWhhf2XoCiVxzHy6mkZTxoAAhGoHsocvQq9gkWLKLvu1Ry T2ge6DHdPOitD77kw+die58bq6Pr/Ef53bFcbKYQac45obkM1KcuYi+fplqE5PF4wWem Kw86/n5n1TmamBGPd/mQ/9tFDOAwh/bjZEdu02cxIRRpOkhgxyX5fQX8EWrSjlBLIvhT hVZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6YGzWgQji2OIQImAK8YVDqBS47U4YgEvr7DXPb2W6sM=; b=DdeLKubhE3liSOe922AfA8VYmNFZXaU6QcAV0FTMY4DsRpFZqP7d93ajkzHPQIGwbD AP5SoT8hukUX0Oz8MRhewht9eOroJ1W15qT0QF1hkCxrbgF9gYhTE53s3krRZWxP6u05 RM0FVJZin+xZVL1msRd59t12nJAJDFlUvtluTTYeMC1hAKeF258TVsKFXmPnbe7NzKKo JMXaPj0Wk0YvvW8EEZhUmMfF6T1ob6HEDUWxzL1yjzbehN95u1ZRJbRi0NklpAieuA8R /bVfEvP6fxcAWEU7cvQdd1QPKBExlMTrQHWzPj/fG/5zWrD9k/r4NyyKM9Bn5WKZgPNq FJyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Du+WrwD5; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si738274edq.258.2021.09.03.15.22.22; Fri, 03 Sep 2021 15:22:46 -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=@kernel.org header.s=k20201202 header.b=Du+WrwD5; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350253AbhICWSg (ORCPT + 99 others); Fri, 3 Sep 2021 18:18:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:45014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234285AbhICWSd (ORCPT ); Fri, 3 Sep 2021 18:18:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 20E7D61056; Fri, 3 Sep 2021 22:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630707452; bh=X4y0f2yJvHJHj3wVFotoUayliSDgcX5Ub4uOXuNYiDs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Du+WrwD5eMYuCCEYYiFWHngZxZmpTA7kmKZtOb4LZ7FeGjI3pmz3Rr2EOh4hPcMW7 AdmEqGwe9KfyXPwtPYsQDEeTMnLEnI2y0wO/+utnk6HrWYUugDG1Xf7qu5xxAnR+Wd aEPjA5RYD3I1cKkj+7nQ+nUgxuXkhM5vRkGHuAu8KHvvwG3ppXlsF++/hbBAZSG2cX TP6HP/9KBvUEsOq00Ottgf9OIcJi22UQYt92TYo2jpPC67hXoTkQe+5g4mqumxS8lT OHeru3PQ1+yDzfAlQFkZv5diCXpzTozy1zuUxp3oFJLxzrzmKunschhzdpLItLfcVR rgIzoto6AXE6Q== Date: Fri, 3 Sep 2021 15:17:31 -0700 From: Jakub Kicinski To: Arseny Krasnov Cc: Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Colin Ian King , Norbert Slusarek , Andra Paraschiv , , , , , , Subject: Re: [PATCH net-next v5 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET Message-ID: <20210903151731.427ce359@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210903123016.3272800-1-arseny.krasnov@kaspersky.com> References: <20210903123016.3272800-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 3 Sep 2021 15:30:13 +0300 Arseny Krasnov wrote: > This patchset implements support of MSG_EOR bit for SEQPACKET > AF_VSOCK sockets over virtio transport. > First we need to define 'messages' and 'records' like this: > 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. > Idea of patchset comes from POSIX: it says that SEQPACKET > supports record boundaries which are visible for receiver using > MSG_EOR bit. So, it looks like MSG_EOR is enough thing for SEQPACKET > and we don't need to maintain boundaries of corresponding send - > receive system calls. But, for 'sendXXX()' and 'recXXX()' POSIX says, > that all these calls operates with messages, e.g. 'sendXXX()' sends > message, while 'recXXX()' reads messages and for SEQPACKET, 'recXXX()' > must read one entire message from socket, dropping all out of size > bytes. Thus, both message boundaries and MSG_EOR bit must be supported > to follow POSIX rules. > 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. > This patchset includes simple test for MSG_EOR. Assuming you want this merged to net-next: # Form letter - net-next is closed We have already sent the networking pull request for 5.15 and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only. Please repost when net-next reopens after 5.15-rc1 is cut. Look out for the announcement on the mailing list or check: http://vger.kernel.org/~davem/net-next.html RFC patches sent for review only are obviously welcome at any time.