Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4757113rwr; Sun, 23 Apr 2023 12:33:33 -0700 (PDT) X-Google-Smtp-Source: AKy350Yt0eLgCdWGRHCFdyds2c4+rOuhe0xR5H/j6/M3xqonUVX10un8vDTsqwo3Y9CQY77aklbx X-Received: by 2002:a05:6a00:2d1d:b0:63d:3411:f9ec with SMTP id fa29-20020a056a002d1d00b0063d3411f9ecmr15523897pfb.20.1682278413008; Sun, 23 Apr 2023 12:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682278412; cv=none; d=google.com; s=arc-20160816; b=LaUTjTJiDbpJDuIG84yweeb9hlOtGlgnlyuwGGqL5MBSW3qu6PzhlXn/+ubK97o1Tx YFHCgJqZJbwV1k5Rr8CEjQ+v4wqeAI1eOx3tIVgWnZvQ0fML2AtMAH/c3Qt/yU6R2JDx dg3407NBEJtT0ccOkjRNpKjkAfDxyoh0GhJqvz3t4/lpdvH2Q4z78XC9PdjIz7u0PPcG MdcU768t591zgDe8fAtsYLERjO6lIfIcCyDDsYwzx1xJTxC0If9UJYdFt5yWWGqOPnB7 NzO+5ZZCRJ3bRfYON4pAoCwv5Ri82OsVEIlzswzqA6sq5VCGf3PqHoYXXz0BSFjI9Brc u/Lw== 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=+AZ60y8UsiiQtGZ1nWzLqmHATqRhZ0dBt3UOXPrC2rk=; b=qwjzPjv1zwoLYkGEicfORoNKpvEW53qmciGHD/Rqv7OcxZ/rw43k1KnFyYdtT8kVkj 1j4dQO+dXMSmN7dhgJkm32ChmHnhqdz1ie5XhlKcYmy5e7hwmDzdngIIEGctb70SrI5k OWQuxo9azfuP6D32ZmcRn8XoIAX4CzH51TsUIuGUbdeVEqkGhW62txRxGOZbVcCEsC2F Dnizsi1p7Qq1H16tvf+Oc4XN+kEZHvyx0rFfdv/RToQ++QFopTMxy4EICOf8ld6f/5Zy ZVSzvnB27kHOxTepzixxtBmgzQakD2uAMlZAJAJtt0hga2+Tq9PY/pkHlkoDh04N1AGa b5Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b="d/VPhNtA"; 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 k4-20020aa79984000000b0063b8982c669si9355387pfh.317.2023.04.23.12.33.20; Sun, 23 Apr 2023 12:33:32 -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="d/VPhNtA"; 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 S230299AbjDWTbt (ORCPT + 99 others); Sun, 23 Apr 2023 15:31:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbjDWTb3 (ORCPT ); Sun, 23 Apr 2023 15:31:29 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E98E68; Sun, 23 Apr 2023 12:31:27 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 13D5A5FD15; Sun, 23 Apr 2023 22:31:24 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1682278284; bh=+AZ60y8UsiiQtGZ1nWzLqmHATqRhZ0dBt3UOXPrC2rk=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=d/VPhNtAMtBpRA5MucHR3KjV+GUgJtfr0fqhy6CWt6Dk7XdFQs/G4sYxX0BCr1gTn hfxr6H53MR/toifCGYbnDaaWJPBtEk0QQENh1AIoHHY/PfIw93//F3/cTrVb7OywEd F98c+EduzDEKhUj97YHSauFsP9xKHZa/LgvH0auExDoiPLZ8sOuCQqVkKfXjl5aZhi 8wvYA9Ss0uHNzv+d0pI1f0Nu7B+wRQ41lQ1HBCwfs7X2oHYxG2rUdozDG23kE6lw4y IPdu7gqwQpXXMl8oJTalIAzOnaxttJK431jOEjEG9VebsbiCkGaosoCts+7XTcn+Kq YT1/Iy2FQLNbQ== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 23 Apr 2023 22:31:24 +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 v2 10/15] vsock/virtio: support MSG_ZEROCOPY for transport Date: Sun, 23 Apr 2023 22:26:38 +0300 Message-ID: <20230423192643.1537470-11-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230423192643.1537470-1-AVKrasnov@sberdevices.ru> References: <20230423192643.1537470-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-EXCH01.sberdevices.ru (172.16.1.4) 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/04/23 16:01:00 #21150277 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 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 1c269c3f010d..ca12db84e053 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -433,6 +433,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 = { @@ -479,6 +484,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