Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp23371745rwd; Sat, 1 Jul 2023 00:15:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59vAw+lrXmxiLrtjXlzEZoFm/KT3sg5Ic8WVmJCk0FdetTbFyE67kzHw7NAISkq8WQcef5 X-Received: by 2002:a05:6a20:948a:b0:12c:30f4:bd0b with SMTP id hs10-20020a056a20948a00b0012c30f4bd0bmr4749770pzb.11.1688195706107; Sat, 01 Jul 2023 00:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688195706; cv=none; d=google.com; s=arc-20160816; b=AKtpBktgrSqa/P/rWblfZUVa0lCtH90biblII/718fJKlezziziW24X/kLuo1f6E+q 9DlGVn9f9iNB2DZDAfSYqXBQQTOVHR7cpKmCrS0mUzRftaxhX90mpMO7YzVbr+NogUhl E6ZCNFiwkVVmJwexjn1DaLYR06jQKMDDSi/BnMMYW61Mg6HCCubu9cGckrf4eVEs7lIH 4RyS9Sh792O0NOR92v7HWKINbDlSf0JPHrHTzgrY2cGVfuMVg1Sry/2UhqYQLvX1daoh +vj5S2rEbbm0/3Sqd2TV5RuymEbcjnTWcoQSoXg7d1GO3v/dW46HKJHYXERiE7ZHUeXO VIDQ== 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:dkim-filter; bh=/zPSdfUGbdjD3WsNJ+2VRQman2eX/Wi/L4491xiMsn8=; fh=PzWIi6JmlJNekYqVy23433fKO6OE4+V62ucRx731HUI=; b=lSU+pSTTXFpOelhQ9yNUMVremXEaKepPRIaYc5u3yXwitTvjNrtXIzV/clNYYm5e6U FWTE3hhJVm3U22fuVwysdVDyr772E3aAF+k9DAQmJa6G+1XupD2wrpiuk2XaBglmT5V9 3a9jTFT6T5CxdenQzk+JqClZ7wFbPJLt2hDUDVDnRK8rttfxXq9z4Y3jHlANBYScwuwg 7ckeYKUmm2vM50SvUUseO6y2NJeAQQZrcvB5gAgXl+NqcEdShREw95NEj8lXjTUGwV+8 TXH53k4mPWtCrG1iNc1xakwM44fQMYTpFAlpFFp//3LhTSF8pT3NG1dv/cxpl7p8KYW5 5vXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=TZ3gUbCy; 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 n66-20020a634045000000b00543a881db09si13978399pga.402.2023.07.01.00.14.51; Sat, 01 Jul 2023 00:15:06 -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=TZ3gUbCy; 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 S231880AbjGAGx6 (ORCPT + 99 others); Sat, 1 Jul 2023 02:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbjGAGwe (ORCPT ); Sat, 1 Jul 2023 02:52:34 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C954B59D2; Fri, 30 Jun 2023 23:46:05 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 1A16D120014; Sat, 1 Jul 2023 09:45:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 1A16D120014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1688193915; bh=/zPSdfUGbdjD3WsNJ+2VRQman2eX/Wi/L4491xiMsn8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=TZ3gUbCy6dm3Z4NTdcdrw09HZPFDy/Xvy94VvHmgqD5e/SlG+UVZkl0rB/rJbnUro 7yZe7q6pNkMiQr8i9DU7me//8dhrwpba7k5q/EPNSt8IID0zvY5LTGu3banl2VhuPE 1ayYApv9hTrp7o70XoWpdu4h95AbnNsuYSvYHJutLrfKnYZ6SMO2L/CU/5aPFwhMZy 6JX0MRUtdsDmXmWueD009O6vq551AM5FIzrsXXVERoZLgeCWbP1tC454hUpOyKxfgW QthGPu/plirKW2mRruW9OhHQMc8AMWqNZX+yeo4qwpn7SDrRS2abQUnLRcKbIKnor8 C8GqwM0Dm0UHQ== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Sat, 1 Jul 2023 09:45:13 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Sat, 1 Jul 2023 09:44:50 +0300 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 v5 11/17] vsock/virtio: support MSG_ZEROCOPY for transport Date: Sat, 1 Jul 2023 09:39:41 +0300 Message-ID: <20230701063947.3422088-12-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230701063947.3422088-1-AVKrasnov@sberdevices.ru> References: <20230701063947.3422088-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178380 [Jun 30 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: AVKrasnov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 517 517 b0056c19d8e10afbb16cb7aad7258dedb0179a79, {Tracking_from_domain_doesnt_match_to}, sberdevices.ru:7.1.1,5.0.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;100.64.160.123:7.1.2;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/01 04:02:00 #21597763 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,URIBL_BLOCKED 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 --- Changelog: v4 -> v5: * Move 'msgzerocopy_allow' right after seqpacket callbacks. 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 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