Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp544622rdb; Sat, 30 Sep 2023 15:40:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUOWPKsohXp8ovHFEH/NVgk7mAbwW+TCwm1Np+P7ZRTF00JLwUjWb903j4brpZgLIPxkAM X-Received: by 2002:a05:6808:1a25:b0:3aa:86e:2c95 with SMTP id bk37-20020a0568081a2500b003aa086e2c95mr10568456oib.6.1696113652425; Sat, 30 Sep 2023 15:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696113652; cv=none; d=google.com; s=arc-20160816; b=p5/frwqzheku6AYeGoKJLVWwvBwgfU85v4KkgoWicYDoCVvvmjLYkrVQaXEsqSRUbn uI9ZcUmbUvgsLZVSvO0g1vB7WJVhW5xmJYPPa1wNVOY0XIOFPu1Qee+djdHjI2CTXgSd PqH0OWsU/YXnsWW02q11s45OduQ06nhET9ZgwjOZM/bgFuRjJmX0DrjHyWkc4uN0flLR fXQZQkUn/iuvW0d6DSMpLcJoCgg/FrDi+C5q1hcMPpCpDekjV+IU//480C0zJP7XiEbB 2VOJT7CnZlU7nJJ0Iy1Eln7RkYZzDEiR239wSCPRWLpQvmvwnYBmw4wv/f3NS/+eufQ0 +eyw== 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=V/aDFv+7GVvw2c9td1TVYW+vl1GRrsF9oUqdM+Q/p8Vm64kfXCSr27fpwcxwJKJ9N8 WDovNhYi3cUE0/5EDDtvILzdseA8NyUo4r2r3XjSt1SzvbDNixqTPVQ+6hYw9InNAtPQ ZPQQkl9yphcct9Cj1hg9756B+GHkqLUim/3fhqrLOfxFfS5FHvlGI3jKSly3cHaiy+AQ jE8t81PIocO1zkfaF/HZKNT30IPx9Nn/ssMzL/1yvIvqU61Zx3JUGKt9sUYhfSpJmMZy gxTftVUVmZ8dtYoCzhnEGik5SfsVmGwKhFSqbgKtJI9HtNPke2tN//58hV1iSTwsFkux kpeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=l94mSLbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id x15-20020a170902ec8f00b001c5eb1706d3si23355415plg.171.2023.09.30.15.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 15:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=l94mSLbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 113F682C5152; Sat, 30 Sep 2023 14:11:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234250AbjI3VK7 (ORCPT + 99 others); Sat, 30 Sep 2023 17:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234026AbjI3VKh (ORCPT ); Sat, 30 Sep 2023 17:10:37 -0400 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 702A0F1; Sat, 30 Sep 2023 14:10:35 -0700 (PDT) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 4F72010000D; Sun, 1 Oct 2023 00:10:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 4F72010000D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1696108229; bh=J3i1MYcws4MuJiaxkgir3Bi2sF6qltBHNjvff033Ybc=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=l94mSLbtyz4beVYYxkA+4upSubjG8CUmmh5+/XSXBO5hXlAt22c7FW4YLZMuRAI7u Hh/z81HO9N2lau4QYt3fakMYo8CPo8hQmZ7x3PLo6yrV6wH8FCA7RzIbaZifNRa0ZJ WFgkeNpQrMxSerawlNOSWLA0X9tzQ26J72MCsVkh2nrcMVbE+KMfzg9P3qx4n2QNSM 11oz3LAqYbh2mhKKe/SzASRkE360T+h2tRe+CjzBaieE+JqHytKu9iGei/orUS7nkr 8y8IOk9gECHPnsQggDpZhupMddUP7ukZZ1o4FAmojjVS4KB58UTXZQUBwW3rYd+c3/ d+fFSGidTuf1Q== 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; Sun, 1 Oct 2023 00:10:29 +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; Sun, 1 Oct 2023 00:10:28 +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 v2 07/12] vsock/loopback: support MSG_ZEROCOPY for transport Date: Sun, 1 Oct 2023 00:03:03 +0300 Message-ID: <20230930210308.2394919-8-avkrasnov@salutedevices.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230930210308.2394919-1-avkrasnov@salutedevices.com> References: <20230930210308.2394919-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: 180254 [Sep 30 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 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}, 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1;100.64.160.123:7.1.2;salutedevices.com: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/09/30 19:49:00 #22015058 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 (howler.vger.email [0.0.0.0]); Sat, 30 Sep 2023 14:11:07 -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