Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1072890rdb; Sat, 7 Oct 2023 10:29:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9OcU74vRGcTKEkzR87ItEv6deTajfkByg504RN+0yp7V5JVO2lO2R355QXPt8n1QC3Dkk X-Received: by 2002:a05:6808:354:b0:3af:d7dc:a47e with SMTP id j20-20020a056808035400b003afd7dca47emr2607330oie.42.1696699769545; Sat, 07 Oct 2023 10:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696699769; cv=none; d=google.com; s=arc-20160816; b=AIBbTvNNwu1Dnm5qDqM5pXWILadmgbRdQR7FCQK/9xc+dci0OL54AcRjSqD6l/O263 0jnVAWdTM0ABfjmDjA8Lcxj3RaC0pK6NylnxUxarowEF9wVtn6Sz0wMfLviDUsoZpNcF fJmbO6LYeaIFFnhYp9hvl9OsOMTjIQRn/XyPBTj2B3TT6VeQfpWx/sTvOuiDpvybLBlM C6hmqVxhKQCZ+3Kyfl6q1MtBqoJpZXcGDWKvDH0LzQBVFK3xwC0OV2uiHM5FOYzg8I5n N9FTvH/b7s6fJ2MUVLfDzftNC5zFORJJU3InHin+qrj6jBxnLT6PyoXpaIZj1Fz23FgU mjzA== 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=J3i1MYcws4MuJiaxkgir3Bi2sF6qltBHNjvff033Ybc=; fh=wIHqZpOIuzcidDZ82yQbOZuyHJty7uvaWDEh/efoVzA=; b=AKV5dZdglJ7K7iAKHplTCNM/+tZijmpNdPp0egdiYD+Dy0iBUVA/3BXyiCHGKK5U91 /wFalzGLukSV9KBScYW/XsNMibWcCAJzgHxyzUyDrlidZ3+QxUSBm5OesPHfz6kFGrwG sBzXYNNKaCjF8AhtwSR/oz9C7+70NdvtIgJ9BeGaRXV1c4stKn8zk930qTqNEG4kLrNp PxH4DfY2ajwmmGYPPTpuDv3SwWmZVP1Y30rA5/cT95yNr9ln9e1WS/LLtCfPsOzwjxK4 4IfCQE7+v5t5nNthna4i3FixfDTGu/ZDkRHRG7TICuxTiZr+71dlbg9KkBuTAYzaLGTQ h2CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b="no5+/QCI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j13-20020a63cf0d000000b00589876a1c18si4364764pgg.209.2023.10.07.10.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 10:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b="no5+/QCI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A793180C2455; Sat, 7 Oct 2023 10:29:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344215AbjJGR3M (ORCPT + 99 others); Sat, 7 Oct 2023 13:29:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344128AbjJGR2x (ORCPT ); Sat, 7 Oct 2023 13:28:53 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C163BC; Sat, 7 Oct 2023 10:28:52 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id E549D12000D; Sat, 7 Oct 2023 20:28:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru E549D12000D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1696699727; bh=J3i1MYcws4MuJiaxkgir3Bi2sF6qltBHNjvff033Ybc=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=no5+/QCIUFhEcaqnGnVzofDIDyDUMUWqdW8Jri11rvX6tyoi4KcfiXhZYFSszXrr3 oVrh4WrKasTkZKBXiGG7+zAjpA2IMCGDfepNfzd5YycqPvJDu5CX/Cr+w9sgEWO4AW BDfJjh2f+vJWlRuVeC8iUPCiTfcFWAu99U5icAtLzHebJllNme55U5txPMTec3EtMD 8BtLIMmOpzt8yfSssHNzeeXTFK6OkHTxrQnLgPte8mUgPh5llg7BzgYCvYYNKMj66P RbdLk1Uu/Wxbn4tqa5X2a192gLD/lUbCD+cYdJapkmBjMpeJ8MGGvHLYiL3oLLrkr0 3uUmNH16Mljbg== 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, 7 Oct 2023 20:28:47 +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, 7 Oct 2023 20:28:47 +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: , , , , , , Subject: [PATCH net-next v3 07/12] vsock/loopback: support MSG_ZEROCOPY for transport Date: Sat, 7 Oct 2023 20:21:34 +0300 Message-ID: <20231007172139.1338644-8-avkrasnov@salutedevices.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20231007172139.1338644-1-avkrasnov@salutedevices.com> References: <20231007172139.1338644-1-avkrasnov@salutedevices.com> 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: 180453 [Oct 07 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: avkrasnov@salutedevices.com 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: 535 535 da804c0ea8918f802fc60e7a20ba49783d957ba2, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;100.64.160.123:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1, FromAlignment: s, 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/10/07 16:48:00 #22085983 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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 07 Oct 2023 10:29:27 -0700 (PDT) Add 'msgzerocopy_allow()' callback for loopback transport. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella --- net/vmw_vsock/vsock_loopback.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c index 5c6360df1f31..048640167411 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -47,6 +47,10 @@ static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk) } static bool vsock_loopback_seqpacket_allow(u32 remote_cid); +static bool vsock_loopback_msgzerocopy_allow(void) +{ + return true; +} static struct virtio_transport loopback_transport = { .transport = { @@ -79,6 +83,8 @@ static struct virtio_transport loopback_transport = { .seqpacket_allow = vsock_loopback_seqpacket_allow, .seqpacket_has_data = virtio_transport_seqpacket_has_data, + .msgzerocopy_allow = vsock_loopback_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