Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4756810rwr; Sun, 23 Apr 2023 12:33:09 -0700 (PDT) X-Google-Smtp-Source: AKy350apIOg41WgcXjvCRbsWZ88oaez7OaWWNndAToYljgERlgOjOaCZPkjK4/bDTThh27CY/jEs X-Received: by 2002:a05:6a21:380e:b0:ef:7dcc:69d3 with SMTP id yi14-20020a056a21380e00b000ef7dcc69d3mr10302030pzb.27.1682278388739; Sun, 23 Apr 2023 12:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682278388; cv=none; d=google.com; s=arc-20160816; b=lZPH7gCGWLlD+T9bnzlFucSnnt4gac0YRhxgLv2pXUawzWsw+DUehwPX+nbO5BoNkc mZXV2ffDzzopt/7GAuq9dWib/omh8H4HvHc+/J7XYXtIN9lw1AGSLShoXwrofF3c2U4L KqEFE4iIXbKnFmgBTr2Y9MicB/WYTLTf97uP7dn9xuQFwu/tgUX/xwvAqFRt3iZskA1V OHfl+LdHS0irGvB/KFDePCo0kz31yuRCZ+aaBxPgUTfjENGM93hv6XwXpM5DQekk9TkQ 06E0q8wTapVKcP9OHgUaHTnW5txUEh8QdSseb7uI2QAt/IBk212GpVvprJiIWxdaWzlO bAXw== 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=qGsMRA60tSQDR+BPleHY9nYAYvbNU1tckKrhNTP0SDo=; b=PWG7hG1iTg8H5bcCztJF9NClVTKuK2dZGq66Mh9ZHdHqsjGhV6IhiHM9Uz/rNRX3+P O7VFKRyrfBbVEhBQzAbwfpr46pBneipJrjcRR7ZuHKTWCe17fEUtaFQhLPjW9CGthKcR R0HKNqFcyId7qTCbmWLzwhgDpLKQ5LOYGmt3uBCxbsxOCg8I9cc7WKg+gCYQUGq18jLa oVm3Yj9kzl8kLToD7+J1NfZJYHZbHTwNsB6JcG14eCuONBTv6hsmlQVC18KCB5qHlSQk 9+x5GcS6SBFyoFu5rGiJdzozipsow0HYEchhS+BQT3kAnYT6kdGVeZCHzMKfVCIL1s/H sezQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=hTeHw7Gy; 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 u22-20020a632356000000b004fbba9a8f99si5227705pgm.856.2023.04.23.12.32.56; Sun, 23 Apr 2023 12:33:08 -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=hTeHw7Gy; 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 S229727AbjDWTcB (ORCPT + 99 others); Sun, 23 Apr 2023 15:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbjDWTb3 (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 A7DC9E52; Sun, 23 Apr 2023 12:31:28 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 9D4F95FD16; Sun, 23 Apr 2023 22:31:26 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1682278286; bh=qGsMRA60tSQDR+BPleHY9nYAYvbNU1tckKrhNTP0SDo=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=hTeHw7Gyig17Rh0mpISZGE99kkYSORIyjUQU/oxAJL+ZMm2iUbWYadLUbtgblaGD2 iW2oxzo1xGBN6GvcHN8vyMaHyhd2GEtUbLbiNTo4hKxAavjPDrs+6R1scaGhA88ytf /wUrqdztc9E2Y09icc80u1iO6H5DdE2NhkJs5U8p425iDkIJRVhBuBOcMqceo/OkUW K+pRiQZEzMVe1Lrgo93JKhs28D/DjqpXnywFXHIXnvurDDr1i0dz0hSoAtXRqETxmS 7ChMq2g2217N58ROTQ8IGbVFamr9bXsGkwUkavSg+p24hou/6HC64ePqZzaUPoUn4R lTdysUiI2h2Tw== 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:26 +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 11/15] vsock/loopback: support MSG_ZEROCOPY for transport Date: Sun, 23 Apr 2023 22:26:39 +0300 Message-ID: <20230423192643.1537470-12-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 loopback transport. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/vsock_loopback.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c index e3afc0c866f5..0de1436c7d4f 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -48,6 +48,7 @@ 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); static struct virtio_transport loopback_transport = { .transport = { @@ -93,11 +94,18 @@ static struct virtio_transport loopback_transport = { .notify_buffer_size = virtio_transport_notify_buffer_size, .read_skb = virtio_transport_read_skb, + + .msgzerocopy_allow = vsock_loopback_msgzerocopy_allow, }, .send_pkt = vsock_loopback_send_pkt, }; +static bool vsock_loopback_msgzerocopy_allow(void) +{ + return true; +} + static bool vsock_loopback_seqpacket_allow(u32 remote_cid) { return true; -- 2.25.1