Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3869639rwd; Sat, 3 Jun 2023 13:56:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5BiVjWJ9i3NVKfnS0j+tarHtwW5rIMwyKa8W4Kp9AlzlDYWiD4JzZOA8QoZQ5nwp3To5lE X-Received: by 2002:a05:6a20:a12c:b0:10b:cb77:5403 with SMTP id q44-20020a056a20a12c00b0010bcb775403mr2834230pzk.52.1685825795056; Sat, 03 Jun 2023 13:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685825795; cv=none; d=google.com; s=arc-20160816; b=BZ4NRVrklZm043g5ZauaI5ZiF3tuoV9LEXG/1Z3EMmg9Hq3HL6iDgQzJbJVB+CUE4i tt2wVHIq+Grs4bDd/KQDlVHIn/OaJ7GZEzcyF15IpYq6cbntYPZHi2079nQMmg4egfNC nsoESaXsv9nEzEKVGzK0AtPgQPn1uh+sC/5tCiCI6LmTD07aXc/AqmNe3sq7nxXIcxNC EjGvnszk8vQK8FYx6hbZWrbi3hbC6vMaCfkHOT4+yjUneR9aL7+8EnA4Vc5PHaYUI3f8 b5Zfdtb9sfZmizD2BWfqltV8VLLnSQnMl+2kuxTrldJbfnX33HCwujcn1FQis0v2U3Jm heUg== 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=s7f/CfLQJryGc9if2/VYU5WFEpGy8lqbWfJnGVRm084=; b=mHrTXaGJoY3ro0S354xvDnFLMXn3iKUBSsrD80O2arIUgUN5DAKiK/s49goWSGaY8W oRhtOnv4QJf0NOOy8D/uSmT8HPzKsasIG+pvnAiyZNSs8Ff4nwa1/YBzKa0p1gyXxn3n 7yNkqNENaBuyxiPMHPXnc9Tc2wlQOWklY7UTuQ0SQlQ/QZkzKZW8cTv7UFAnbno4BE3U +yRkvuynPVnJVhFCPQ75jLuavGIc1otnf3grAEsCgTgSAp4vUmRrMvJ3gHv/2II17Xos DpaPid+5jcKmc/yc1n1jfcWQDAM6AP99sUCBQDVA08tPrVhF1n2xq1G9pgDqY9z1UkRD sCXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=RycjFhVi; 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 f22-20020a633816000000b00543a0bddd71si68817pga.363.2023.06.03.13.56.21; Sat, 03 Jun 2023 13:56:35 -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=RycjFhVi; 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 S233193AbjFCUzb (ORCPT + 99 others); Sat, 3 Jun 2023 16:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232738AbjFCUzF (ORCPT ); Sat, 3 Jun 2023 16:55:05 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52E681B3; Sat, 3 Jun 2023 13:54:56 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id E6C6C5FD3B; Sat, 3 Jun 2023 23:54:48 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1685825688; bh=s7f/CfLQJryGc9if2/VYU5WFEpGy8lqbWfJnGVRm084=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RycjFhViTCCFq7j0f484NCTdGFhR5aOYYJyrnGolcXq19hWg1MDLtcNa2f5NNUGEu cBqptqlP4FZzR9rZubfb8PhQCA30pChiPty3bxB+/nELqpRVsf6LKsSnvUMUhlsM+e skJ5TVarQ7GGpNbj0ppLHcCgMa/C8GVPg578oXNlkxkTrnYoxiYPadHsrJAz8tNu1D mdwZK62T8RqgAzifwok2MYd5Kyg6nqIDTi1EyCM6wvgotlBj8lmA+L7PfGsYoZXwpW 0RzzQMbi30g0aPKC0JSb2UG0Tmoi5XQlXyyhhUSAnvcXUSxbE7TKgWYjC4OEpdgCs+ 8U1nfszD18U2g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Sat, 3 Jun 2023 23:54:48 +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 v4 11/17] vsock/virtio: support MSG_ZEROCOPY for transport Date: Sat, 3 Jun 2023 23:49:33 +0300 Message-ID: <20230603204939.1598818-12-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230603204939.1598818-1-AVKrasnov@sberdevices.ru> References: <20230603204939.1598818-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/06/03 16:55:00 #21417531 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 --- 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 6053d8341091..d9ffa16dda69 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -438,6 +438,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 = { @@ -484,6 +489,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