Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30776787rwd; Thu, 6 Jul 2023 10:30:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6a8AWeuT+dVk/FR6vslDKoMGFBZVvlCC9MRgyFx3cz+2GZHP53kxHTtLqg3rv7iXLMXIP X-Received: by 2002:a17:902:cec6:b0:1b8:64a9:ea60 with SMTP id d6-20020a170902cec600b001b864a9ea60mr2106455plg.53.1688664634414; Thu, 06 Jul 2023 10:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688664634; cv=none; d=google.com; s=arc-20160816; b=boCAU39CxmGXmzDma9F7dlels4xsk0sBlq+B7WJp0MrK9PlMIWVi9i4xpHHaP6M+Wl JUvsEzCXR9IIdgpTYvPVMRU6EkRU/6rW1xk0zJ+zbzhVZrMFi0AyVrE/aHD9dpAR1CLU 4woQXkgRLXsrxN46eWQAJ+pPyo1LnGxXa3Lz6Zu6zdbHQwAE2apJLBZVY/dne7QEoLL1 9P0OnPH9kgkcXBlBRXcTMoYIaoioHFGFYKDkQzghB7UIqAN93SR90aNKli3wFCPuDL8/ eK4lGmIDkYrQWw3LiWWPCtcOJPwCb8L21J9PgmTFHsfXvk6tQWFVMJjADGtyRoEPaiOG 2Msg== 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=Y7EFslApvIMhSEz1WUIyVbtwIYD8kB8bBcKW8IzvGEk=; fh=LmSvGF8mKyhe+4SfmYOr3uCnhF0XAFkKvuoevTchCp0=; b=M7wm8PD7TY9bJ//kKOsifn65TT/NcVkxL7QXGoPHe6qe9F4jYgvzZgYrSJaqKnzpB8 ojFNtD9eQwFl6029n83uEk+X2FC0Aaefl/EtMqG5mXpyx2RvDyy/QpmqPxtOW7qNV5RB /crqGjoKfl5ZfT5npZA+ap0YwmJIotgSMj/0bxOyQD396zQnkS5VGRj0hVi9ZmisuCMu SQ4fKj2JjhOeUbLArt8MSOcFec44NvOfUYpB+ofhzfQ0Ubh/6I0nXhB5QX9B59cMueiQ 5/zXzn5zViCzgzsnFvMlgIdHva4NolodzmQ85ewlDk43w7z5aF0pbxq/7i8uVp9dPcvF 7XyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IyMu8Csa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a170902e74a00b001a52db202c7si1753484plf.382.2023.07.06.10.30.17; Thu, 06 Jul 2023 10:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IyMu8Csa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232320AbjGFQ4t (ORCPT + 99 others); Thu, 6 Jul 2023 12:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232408AbjGFQ4e (ORCPT ); Thu, 6 Jul 2023 12:56:34 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71DE61FC2 for ; Thu, 6 Jul 2023 09:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688662548; 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=Y7EFslApvIMhSEz1WUIyVbtwIYD8kB8bBcKW8IzvGEk=; b=IyMu8CsaEBttKaaH1CTPXRpPmhR4AiFztvBvNBk15TWXX6wlt7L8D6nd7FYYtBlDN0aL/L r1o1FWvRENQhtbKGMJAoIruAojS8QxnZM8GQSkyPoyMF9YjJVbWVTO0z4b03Rb84FVzJq7 n4Mpp+v2mGskFDchFTiPURYJ4X2VrPA= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-110-p_vo5xJHO3aBzZfji0ja3g-1; Thu, 06 Jul 2023 12:55:47 -0400 X-MC-Unique: p_vo5xJHO3aBzZfji0ja3g-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-98e1085308eso244189766b.0 for ; Thu, 06 Jul 2023 09:55:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688662546; x=1691254546; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Y7EFslApvIMhSEz1WUIyVbtwIYD8kB8bBcKW8IzvGEk=; b=cbHUnHbQeL7aJkzunTT9PhVhg0eeMODMOrXE45Td9wgkcZ+wyMldchPZBMePsX6FV+ IXIMIt8FExlzx+1hzxj5cTbIluKfBc/9jp9SHNKawM/zUJDWi5Fz4DW3v/jMOiDKoXwT 0DO2EMrdcou5fnppEj3doXfQGaqzcDZogDEQXdtmGYBag/gF3Y686j45Os1PgvWu1bPs Xt7dFPNIc5eac8UUgzRHXoiaeU6ndv9sPXLTQ8IbYtrX5qr9QnYcCHIobltMRh0djFbZ k6plraF8hfuOSiSwGTBYxUwZM/j/6h0vIO1Mk+XuLy0MAKVCun+KpNEy2zujzcxc9cAJ hZjA== X-Gm-Message-State: ABy/qLbZ1rqgOgdCKf205QgCFUs8rMWjrh3VyiJPRfjtYeJYHumcxNac w92dn1j8d/nyVN+adPOu+YNPZv5rBsJuXKSaVaKba2POZ1awOh/BolWspScl6jTm3oEDfZ4SRKn d55BnhOLo3AwawUAIlphugIEf X-Received: by 2002:a17:906:2d6:b0:993:b238:314 with SMTP id 22-20020a17090602d600b00993b2380314mr2600094ejk.38.1688662546156; Thu, 06 Jul 2023 09:55:46 -0700 (PDT) X-Received: by 2002:a17:906:2d6:b0:993:b238:314 with SMTP id 22-20020a17090602d600b00993b2380314mr2600069ejk.38.1688662545830; Thu, 06 Jul 2023 09:55:45 -0700 (PDT) Received: from sgarzare-redhat (host-79-46-200-163.retail.telecomitalia.it. [79.46.200.163]) by smtp.gmail.com with ESMTPSA id h20-20020a170906719400b0099290e2c163sm1041264ejk.204.2023.07.06.09.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 09:55:45 -0700 (PDT) Date: Thu, 6 Jul 2023 18:55:43 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: Stefan Hajnoczi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Subject: Re: [RFC PATCH v5 11/17] vsock/virtio: support MSG_ZEROCOPY for transport Message-ID: References: <20230701063947.3422088-1-AVKrasnov@sberdevices.ru> <20230701063947.3422088-12-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230701063947.3422088-12-AVKrasnov@sberdevices.ru> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 01, 2023 at 09:39:41AM +0300, Arseniy Krasnov wrote: >Add 'msgzerocopy_allow()' callback for virtio transport. > >Signed-off-by: Arseniy Krasnov >--- > Changelog: > v4 -> v5: > * Move 'msgzerocopy_allow' right after seqpacket callbacks. > > net/vmw_vsock/virtio_transport.c | 7 +++++++ > 1 file changed, 7 insertions(+) Reviewed-by: Stefano Garzarella > >diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c >index 6cbb45bb12d2..8d3e9f441fa1 100644 >--- a/net/vmw_vsock/virtio_transport.c >+++ b/net/vmw_vsock/virtio_transport.c >@@ -441,6 +441,11 @@ static void virtio_vsock_rx_done(struct virtqueue *vq) > queue_work(virtio_vsock_workqueue, &vsock->rx_work); > } > >+static bool virtio_transport_msgzerocopy_allow(void) >+{ >+ return true; >+} >+ > static bool virtio_transport_seqpacket_allow(u32 remote_cid); > > static struct virtio_transport virtio_transport = { >@@ -474,6 +479,8 @@ static struct virtio_transport virtio_transport = { > .seqpacket_allow = virtio_transport_seqpacket_allow, > .seqpacket_has_data = virtio_transport_seqpacket_has_data, > >+ .msgzerocopy_allow = virtio_transport_msgzerocopy_allow, >+ > .notify_poll_in = virtio_transport_notify_poll_in, > .notify_poll_out = virtio_transport_notify_poll_out, > .notify_recv_init = virtio_transport_notify_recv_init, >-- >2.25.1 >