Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2586217rwd; Mon, 22 May 2023 00:47:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58y7q/dIkPcoOJtTqybm3YI1GNy+pBwGmEN61WCRRL+pyu2xf8Ug0AElOdggLUUlz5KgW1 X-Received: by 2002:a17:902:f547:b0:1ac:310d:872d with SMTP id h7-20020a170902f54700b001ac310d872dmr11657466plf.52.1684741650280; Mon, 22 May 2023 00:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684741650; cv=none; d=google.com; s=arc-20160816; b=zVo8bZ+yZJu3CZgCVJF8y8L3jJB6geEkPFH8iB34+b15i9/Sb/MfZUxPVlFbSRmzKj Xa7r64GyYY9n48aBuOxb4vLfWrzsgn56tR5CGgjw+PUnKqkp/CL5GyRICWnDKbHpXVIt NHceun/HKjm4DirrAU+PDcHcoz+hRMjgMn4vH1T8RkrRZWmsup7AuSpnvAW4TzwLNVyt xirukDw3KbO9eahcMD5dnNn+u3hs/gFWyXVXckXb/AvY94f2zOwwFI0HKmnSXy/yBqRc xrdAeJKHZjzezPcrUd8uSl+CJQzOPjSWx9/8BvKgeaCKqRZmZ45bhlTa/oE/oWpOhbR0 Mj3g== 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:date:subject:cc:to:from :dkim-signature; bh=+AZ60y8UsiiQtGZ1nWzLqmHATqRhZ0dBt3UOXPrC2rk=; b=xZJzXG6LBQuF2/Fo1kDxHNhfN8QiyxZoWmTjfdPtRntZ3DhiC5GvMOFnPBUVeRgy/a Mp584oNkU1RkChb9569xi8arauY+NVlWxqTo3zRVtzWRJNVGSn0lSRonBlOh7IXtCRTx yu2mis9QPbVBeQqdzSTDs1ocmZIyBiU5pZIoXWoWVykWhw4XKgtvaALOXIBK+sQGWakD k7dr9pU9qS9ErmOm5wyyb8bHk0fsAmi0jqQhbOuQZ2O/franJr7A4zprJhPGE6wlYfeO 2WNp5BZ2Ukm6swFr5fZEL7S8hmNpIH3D3kEwVCxRf5ubhooaQO+Rg5nNZTHxKDY91IPq 99iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=rEKmGgdq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a170902d39500b001ac84f55591si1015975pld.293.2023.05.22.00.47.18; Mon, 22 May 2023 00:47:30 -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=@sberdevices.ru header.s=mail header.b=rEKmGgdq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232217AbjEVHp4 (ORCPT + 99 others); Mon, 22 May 2023 03:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232565AbjEVHo6 (ORCPT ); Mon, 22 May 2023 03:44:58 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97D80B7; Mon, 22 May 2023 00:44:56 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 9F6975FD55; Mon, 22 May 2023 10:44:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1684741493; bh=+AZ60y8UsiiQtGZ1nWzLqmHATqRhZ0dBt3UOXPrC2rk=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=rEKmGgdqwb4Z1ueHvcBIXZde6vnGrvWQ3pLlxizSLsSVsmNw2P9hqpPblTugkGqwx eoROpeo384Fwmb4/K/WO/Z2sQcmDbjr3cnZQ1M/rXVzfXxdvobmzVrWTI2muyd8ayb EzuUZJ8Bp41DatiR3NQItkAj1gq4d1rImVPz0ZimPhhJSKxPKxio2BTjHlRsvdEtgu 7KBpExh2CTVh2gxjAJXG6KN65kHo1khbgXmR1djf+E/VpZlvU8xjtOzQbZIxlmXHdW YjWzplymI4krnztzgkZ1nUpLfRYQzs6vrK+n+NZehv//SNgt9q5Sz23HtipzCmnl9U k4Fpl0W69fi+Q== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Mon, 22 May 2023 10:44:53 +0300 (MSK) From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , , Arseniy Krasnov Subject: [RFC PATCH v3 11/17] vsock/virtio: support MSG_ZEROCOPY for transport Date: Mon, 22 May 2023 10:39:44 +0300 Message-ID: <20230522073950.3574171-12-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230522073950.3574171-1-AVKrasnov@sberdevices.ru> References: <20230522073950.3574171-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/05/22 04:49:00 #21364689 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Add 'msgzerocopy_allow()' callback for virtio transport. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/virtio_transport.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 1c269c3f010d..ca12db84e053 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -433,6 +433,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 = { @@ -479,6 +484,8 @@ static struct virtio_transport virtio_transport = { .notify_buffer_size = virtio_transport_notify_buffer_size, .read_skb = virtio_transport_read_skb, + + .msgzerocopy_allow = virtio_transport_msgzerocopy_allow, }, .send_pkt = virtio_transport_send_pkt, -- 2.25.1