Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4279150pxt; Wed, 11 Aug 2021 02:10:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaPRQxaVp6703UyukAtLJ8Wcf3pFmJ9T+taC22HbBNlRR95724XC0kUbY5WxByu5Upmg0e X-Received: by 2002:a05:6e02:106d:: with SMTP id q13mr29255ilj.164.1628673030817; Wed, 11 Aug 2021 02:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628673030; cv=none; d=google.com; s=arc-20160816; b=bQnXAHjSZvZL2zyMw/RUFLo2iY2hL8Qt5SZQdhkUzJHhlZwSr984wKHeAYB98iOEgX uFBDPRdYrFRFzx4Gp0Bf0aI/r8gqskE1+iCEPzeDuuYDN86rh8El7mHR6sUUKeTXfj9D TBctX+emw6WeguEHivM/z3LIQ2a21TkntNaiNIGW3bRt1+Ibl5npNhoZ5ptgtBpEKbOA svmwHePh/SlfMxDzjzLgQD5Ms2c2yvxthFJnCpGOY/vjEx+jfCNyVy1HgMDrnT0KKUPg YAzGpw2Qq2mim5rWVoTmwFEBJEKylnS/v3Vj5s1+T7dam6EwGoDYD5BpSVyxG+FI5D74 9GxQ== 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=JLjNDQUWebauLItmfnlQ+Tjthn4pJvLabefx75OaW6Y=; b=A2wDccqdGfVm20D/f3KjNMRcDedlhR2ZXCI1tWOgj3cg5LH3m5NXXPENY3tigtrXkJ fzrbAzoljliWaxC+Q6BeJP5FUXx1NL1ODn0VzVsB93KfCeqG+cDUY/cZmkotmQESv2IT 4MWPjGOPX2kkEyJcce+xr8/UWRWd02JOv506fyprphjUVc+ywanRUlSaFZRviOHihZau SttD6N5dn/xxlobYgK+f6/T96f0wI1Y28h1U1fqbm52Eitvk9uzERLPlv1h1vIrNEz39 GGYtcMgpHSU+cC6cPaMIQFL/4PwBVOHIuG5ddBqLwsaQlK5w7JBQUNuJWxHwN0/w6ECg dg+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ifAn6zPP; 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 w24si13044833jal.110.2021.08.11.02.10.18; Wed, 11 Aug 2021 02:10:30 -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=ifAn6zPP; 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 S236447AbhHKJJf (ORCPT + 99 others); Wed, 11 Aug 2021 05:09:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58357 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235282AbhHKJJc (ORCPT ); Wed, 11 Aug 2021 05:09:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628672949; 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=JLjNDQUWebauLItmfnlQ+Tjthn4pJvLabefx75OaW6Y=; b=ifAn6zPP9fHPN+vF34NbZr2ssqZhtOh9c3iQeFI01mP9rnqO89fBtPbrzWzLge9lFxDbDK 8pcuw+U3nwPIhtP++YkHG0y9clo68QZezxjd5gqSN9Efdi/JYu4SseTqIjyTzhnpUc937h Wx8i+jQ9ACs6+Wu3oCaNo4ji+YEEuZ8= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-524-TO-ZYnYBNFaDkQOvRtGlvA-1; Wed, 11 Aug 2021 05:09:07 -0400 X-MC-Unique: TO-ZYnYBNFaDkQOvRtGlvA-1 Received: by mail-ej1-f71.google.com with SMTP id zp23-20020a17090684f7b02905a13980d522so432972ejb.2 for ; Wed, 11 Aug 2021 02:09:07 -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=JLjNDQUWebauLItmfnlQ+Tjthn4pJvLabefx75OaW6Y=; b=uMZvCOGLBiu+kbKYRWSFAWzF1eeoxMwaHyy9w1OoHlCbt5rAK7kGwg2imMlUB+/Tvl mKn/Zp9ZhNARsHgbdRqh8Nh/1Ftc7X/drTl6pRhY+8Zaa245dHPQ7QHJDBVT9SCa82dj TzPJC34OqhAPmzkmYqD7E/8INVLkzAy5lyhHtxuKbeNN7+dyvqVZ2UOHMpx4hVb3t8aC iLiLRMXaf8zZ545vdwniKIMuOY4x94837msvMdWTr6FkY8AThYfVeTBH4pEG9lWbcwCx /Bh8XDkrud2KyRN3qSDOWnRFF6y50awZDZZ+DsmJ2W9vEj7lgS25VkmvDzKCAv1GyxKr bB9w== X-Gm-Message-State: AOAM530TB55aDOHNwmQX+y+4+uhCuT9qNOqTPgw3pORCsBatHjBgIXbK khcU5PTTzPBu4IZIzPKzjVZCQNPafWEUAv51AVxTfxyjXqRw3LBT4Rps0I9ke3HqvS5rW7O4ecj CkONUJWxU3XlvhKf2E18HwOSW X-Received: by 2002:a17:907:35d0:: with SMTP id ap16mr2641391ejc.456.1628672946561; Wed, 11 Aug 2021 02:09:06 -0700 (PDT) X-Received: by 2002:a17:907:35d0:: with SMTP id ap16mr2641373ejc.456.1628672946373; Wed, 11 Aug 2021 02:09:06 -0700 (PDT) Received: from steredhat (a-nu5-14.tin.it. [212.216.181.13]) by smtp.gmail.com with ESMTPSA id p23sm11040297edw.94.2021.08.11.02.09.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 02:09:06 -0700 (PDT) Date: Wed, 11 Aug 2021 11:09:03 +0200 From: Stefano Garzarella To: Arseny Krasnov Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Colin Ian King , Norbert Slusarek , Andra Paraschiv , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stsp2@yandex.ru, oxffffaa@gmail.com Subject: Re: [RFC PATCH v2 3/5] virito/vsock: support MSG_EOR bit processing Message-ID: <20210811090903.27tcokpqofujhhgp@steredhat> References: <20210810113901.1214116-1-arseny.krasnov@kaspersky.com> <20210810114035.1214740-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210810114035.1214740-1-arseny.krasnov@kaspersky.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 02:40:32PM +0300, Arseny Krasnov wrote: >If packet has 'EOR' bit - set MSG_EOR in 'recvmsg()' flags. > >Signed-off-by: Arseny Krasnov >--- > net/vmw_vsock/virtio_transport_common.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c >index 4d5a93beceb0..59ee1be5a6dd 100644 >--- a/net/vmw_vsock/virtio_transport_common.c >+++ b/net/vmw_vsock/virtio_transport_common.c >@@ -76,8 +76,12 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > goto out; > > if (msg_data_left(info->msg) == 0 && >- info->type == VIRTIO_VSOCK_TYPE_SEQPACKET) >+ info->type == VIRTIO_VSOCK_TYPE_SEQPACKET) { > pkt->hdr.flags |= cpu_to_le32(VIRTIO_VSOCK_SEQ_EOM); >+ >+ if (info->msg->msg_flags & MSG_EOR) >+ pkt->hdr.flags |= cpu_to_le32(VIRTIO_VSOCK_SEQ_EOR); >+ } > } > > trace_virtio_transport_alloc_pkt(src_cid, src_port, >@@ -460,6 +464,9 @@ static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, > if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOM) { > msg_ready = true; > vvs->msg_count--; >+ >+ if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOR) >+ msg->msg_flags |= MSG_EOR; > } > > virtio_transport_dec_rx_pkt(vvs, pkt); >-- >2.25.1 > Reviewed-by: Stefano Garzarella