Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp570009rdb; Sat, 30 Sep 2023 17:11:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEo5wO74KjaBrTttYONUf3ACb/wcGd+M/ENN4G2u+kSSTB0D4yaYuej/AaPWm2MiI7jZKjM X-Received: by 2002:a05:6808:d4d:b0:3a7:c2e8:5e7c with SMTP id w13-20020a0568080d4d00b003a7c2e85e7cmr10589668oik.43.1696119069752; Sat, 30 Sep 2023 17:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696119069; cv=none; d=google.com; s=arc-20160816; b=ECtYkv3nZQntd781Myt85TzRbxnKf4duSJVhoK6TAKSJ1sD1kcncTEbtXi/VSHf/fS 21YDoO0P6FUDD2Yp+Pg8tCm8hk4psYWO4ySi19zoBqCqRRjkIw+SQADALAYLrPNjOx07 4Amg0fG4sn2aCUi6qT4bVhbIyJTyigqdZkpP/tfl3vyiScjTc0Bxpu0J65EccSo6zj4S rsugIlziwKgFAD8j5/eqGnuwuTTTc3ZpJSkp4qPOP3PdEHHtDst17ZjMjMAcMnK01m58 LIE6NVZWhrD08rlCAkiVJwejMydBIRlrVTbG0mz4CI7hw4Fllka2jUHky1+uYLOTTfAu lQ8w== 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=7O61lqPregE+HlMhdM4ZTCsUGvDnSuOsext9GfPBTSQ=; fh=wIHqZpOIuzcidDZ82yQbOZuyHJty7uvaWDEh/efoVzA=; b=yn4g1EebPq+jqUl5fKMDcBctX/bO6h9UoiebMF9HxwAtis/A0GFGrv5wZY05we/l2B xh9tiCnijXNf7Z2S0QFGol8dHeHoiCC21PgKxVGbZreIjgVtOcgVCg6VhFfLTPdh8ZsW bgaYPdvlO5cM7zx3/BWB0voqiOENaLs4ajCwPyw8y69Ol7T7CFfhAec3FpOIpMYMKzaw 5jZrC3LgC2+DoiwDbLWfWuF6ilQZJwFJSfoUC2Yq1f8FK2H9pDTYIlZcrn+vrA2pJ8p9 jLbPBCYlnVAHVbMhS4S7/K9fgBteZG3smOpW/V6bBToI4IdEGTVMWc8VsujaLNz+IFAC T2IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b="esgv/ZUr"; 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 f20-20020a637554000000b00578daf6f4e2si24841857pgn.191.2023.09.30.17.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 17:11:09 -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="esgv/ZUr"; 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 540C480E659C; Sat, 30 Sep 2023 14:10:56 -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 S234174AbjI3VKx (ORCPT + 99 others); Sat, 30 Sep 2023 17:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234013AbjI3VKg (ORCPT ); Sat, 30 Sep 2023 17:10:36 -0400 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99B1CEE; Sat, 30 Sep 2023 14:10:34 -0700 (PDT) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 1B15610000C; Sun, 1 Oct 2023 00:10:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 1B15610000C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1696108229; bh=7O61lqPregE+HlMhdM4ZTCsUGvDnSuOsext9GfPBTSQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=esgv/ZUriLoMRSxX/yWbxCii4B5IcMIpxMnBBPztWb+U7ld92bKH+ddCG5Wu+rfGm WwSM3+GIICMTcEiweMaYmYmvvdxDI5ak9WJrOQKcLWk+gKR8YELpuKK/zm+WXxOpVk fzjUy1lc+LnfNvgl65mXwMxhSTe9n4mQowE1ksP9cHMS06eyZmsRo0oYOiPhVbb0Rs 0AOkwOhWWam7GWFbUN6Pv/hyvo2ekTqc5J1suzkY+XKOC4tXFuULfeFpOgom3eQOyk O1srhXxdpb6pTtTzd7V1zOi7FTXSLhimiDVgn2U8q7nOlF0B5ZJNMjxvSb8ubKJqoH 46UTE8Cu7MT0Q== 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:28 +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 06/12] vsock/virtio: support MSG_ZEROCOPY for transport Date: Sun, 1 Oct 2023 00:03:02 +0300 Message-ID: <20230930210308.2394919-7-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 (snail.vger.email [0.0.0.0]); Sat, 30 Sep 2023 14:10:56 -0700 (PDT) Add 'msgzerocopy_allow()' callback for virtio transport. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella --- 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 09ba3128e759..d324ae13e2f5 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -486,6 +486,11 @@ static bool virtio_transport_can_msgzerocopy(int bufs_num) return res; } +static bool virtio_transport_msgzerocopy_allow(void) +{ + return true; +} + static bool virtio_transport_seqpacket_allow(u32 remote_cid); static struct virtio_transport virtio_transport = { @@ -519,6 +524,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