Message ID | 20230423192643.1537470-12-AVKrasnov@sberdevices.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2337681vqo; Sun, 23 Apr 2023 12:33:33 -0700 (PDT) X-Google-Smtp-Source: AKy350bEc387kzLe+iSaIetx3JszQAJCYcgHYvX0mtmp5vXd7KEVAlcSSVYyOOdccWHpbGoyeY8f X-Received: by 2002:a17:902:744c:b0:1a2:914e:2d2b with SMTP id e12-20020a170902744c00b001a2914e2d2bmr12085301plt.19.1682278413361; Sun, 23 Apr 2023 12:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682278413; cv=none; d=google.com; s=arc-20160816; b=AbT5cOk3N1xtymx95sR0mKqzei/b7eMrX+uPuOHSY9WDz4AHFErAlDAD//ccIlZJbQ w7X+V5x/PyeTXnISE/HMpAZ8IQrHz07U6mVddqmlrsB1LNLutPF/R43JPpbefy4kXKF/ Dn8BYGckrLrVOJlxF/9CCg4Fj3XxFTbnH4bKSl2ACEcfM7hu9bQF3TGTqCDjzfMJIkbf muC+2/4oolrtmcjZKDsL8fXYadeAXIQAeD8HKlwzwZi/QUWOzM+Z9bEM/LZjpUIfJocc 8edo8wBhUuZSQC3tg4zZCEGbJE1t0bP+In+LDfqRORpFsovie8Zq0Rzm2HfdJ+bVaHbj AeGQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m65-20020a632644000000b0050309caf60esi9561707pgm.750.2023.04.23.12.33.19; Sun, 23 Apr 2023 12:33:33 -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 S230361AbjDWTcC (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Sun, 23 Apr 2023 15:32:02 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <AVKrasnov@sberdevices.ru> To: Stefan Hajnoczi <stefanha@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Bobby Eshleman <bobby.eshleman@bytedance.com> CC: <kvm@vger.kernel.org>, <virtualization@lists.linux-foundation.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <kernel@sberdevices.ru>, <oxffffaa@gmail.com>, <avkrasnov@sberdevices.ru>, Arseniy Krasnov <AVKrasnov@sberdevices.ru> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763996769868988435?= X-GMAIL-MSGID: =?utf-8?q?1763996769868988435?= |
Series |
vsock: MSG_ZEROCOPY flag support
|
|
Commit Message
Arseniy Krasnov
April 23, 2023, 7:26 p.m. UTC
Add 'msgzerocopy_allow()' callback for loopback transport.
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
---
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;