Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp728024rwb; Sun, 6 Nov 2022 12:49:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf6SAmeoS1V4QsYrCS0JhFMPoq9paA+JhVyR0EXd5CyhhDsu277j6A2Wn74SOdoiYGLpkaFA X-Received: by 2002:a05:6402:11c7:b0:462:549d:fbbe with SMTP id j7-20020a05640211c700b00462549dfbbemr6210310edw.199.1667767771396; Sun, 06 Nov 2022 12:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667767771; cv=none; d=google.com; s=arc-20160816; b=tYzza6O0ishAvp9bmC8Fwk8tgOxK+8B/M6LvsmXSmFZdrGMGp1rnqRHsXgs8vqDPj6 hSNif58/pWYQqC7GwJBFwWjkVJb07DCX4y4TEYPzBZjtzD89TrISDer2BQULEDCrnXu5 IG/rCZw6dfSPIFDIVEz2B4F20dzNyxVChHZtVWpbjTkgV8AanSOpl8dCop3eQ5z0bpjm 4Sj9D7+3FnXpP+SRYuNJiR1mN1paOZ0F0RORMULiPZ384x9eIumV4/qIBkOvmZtp4dd7 TaaQLhfYIR3AG5+bTKlqgn8NMy8M9nHvB7ZkLUs3oLowJhaG/zdu5RgjHJ56twj/jbFy lFsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=0umJpkLmREN7M8YV0WN1Ff+SQdE0Z+GkV2xpTDm1Q/w=; b=VfJuKI1KRLcrptgGqjfpHNanYu63DN3KgJvUNEqluU/lOJvP0Ur+TKAn7+MdQZVLyx FHJ9KVIygeJ7JX4EPUgt4v49XAfbRMmBhbgXRPQiLwSgMBk1ok4PlWUiqqJ9V8QQCNcw TttMn+73uvOX9uIxxQsTFlMVxcfUgR91/wIbr/O7DvypH0W4iAVicAt1EU19Kc61Lr2P jb63/rA1Lo/xbzPjdXToRJ6DapoLYm6L3+ucIv/3LOA34uGHK6KjpLyqYfDUp+r7F+OZ U4vZR/3/C2P3whOY94ZNUBhZ7+Zk+cdgyEiAcwuIvFSqelvLgRDVOaeRA9R7lh/DBEke 068A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=ZfUXWCHL; 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 r14-20020a05640251ce00b0045154775089si7782027edd.625.2022.11.06.12.49.08; Sun, 06 Nov 2022 12:49:31 -0800 (PST) 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=ZfUXWCHL; 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 S230162AbiKFTkt (ORCPT + 95 others); Sun, 6 Nov 2022 14:40:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbiKFTkr (ORCPT ); Sun, 6 Nov 2022 14:40:47 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1C1FEE2A; Sun, 6 Nov 2022 11:40:45 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 0B4475FD04; Sun, 6 Nov 2022 22:40:44 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1667763644; bh=0umJpkLmREN7M8YV0WN1Ff+SQdE0Z+GkV2xpTDm1Q/w=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ZfUXWCHLIkDt2hwa7b1dUyHFDcmGekjzqmCm175Wv9QrnmKlKbhIO/y3wpC8jnPvv gaosu092pebh6pjUl5kxNR5hIZaQWdrenos0LfY/sYCkIhQK0qaCJPQNd8hm8UI6eH Elw0gqHnb6WDh3aPeTJfyPicD9uffT89wW2NYVEEoJsr5emfPKJvr8AUy5ESgwiFsb B20aH53DP9LkgHJmWzhFL+PkDgsiIldcZJHNKNFd74GrFTb/AA7tixqGw86GP5MSvt 3rfXZAL1mA7nRMEyH9gydMCog2hZQhj0SIrjBL85vl3h0q692f01AycfwwaZtlgZ1J ZcjuHGGi0pZIA== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 6 Nov 2022 22:40:43 +0300 (MSK) From: Arseniy Krasnov To: Stefano Garzarella , Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , "edumazet@google.com" , Jakub Kicinski , Paolo Abeni , Krasnov Arseniy CC: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , kernel Subject: [RFC PATCH v3 03/11] af_vsock: add zerocopy receive logic Thread-Topic: [RFC PATCH v3 03/11] af_vsock: add zerocopy receive logic Thread-Index: AQHY8heWueHDDL4x/0iPxprlEpp8Wg== Date: Sun, 6 Nov 2022 19:40:12 +0000 Message-ID: <7aeba781-db09-9be1-a9a3-a4c16da38fb5@sberdevices.ru> In-Reply-To: Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-Type: text/plain; charset="utf-8" Content-ID: <11A927F904AFCB4D871B16A0244EDE99@sberdevices.ru> Content-Transfer-Encoding: base64 MIME-Version: 1.0 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: 2022/11/06 12:52:00 #20573807 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_PASS 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 VGhpczoNCjEpIEFkZHMgY2FsbGJhY2sgZm9yICdtbWFwKCknIGNhbGwgb24gc29ja2V0LiBJdCBj aGVja3Mgdm0gYXJlYSBmbGFncw0KICAgYW5kIHNldHMgdm0gYXJlYSBvcHMuDQoyKSBBZGRzIHNw ZWNpYWwgJ2dldHNvY2tvcHQoKScgY2FzZSB3aGljaCBjYWxscyB0cmFuc3BvcnQgemVyb2NvcHkN CiAgIGNhbGxiYWNrLiBJbnB1dCBhcmd1bWVudCBpcyB2bSBhcmVhIGFkZHJlc3MuDQozKSBBZGRz ICdnZXRzb2Nrb3B0KCkvc2V0c29ja29wdCgpJyBmb3Igc3dpdGNoaW5nIG9uL29mZiByeCB6ZXJv Y29weQ0KICAgbW9kZS4NCg0KU2lnbmVkLW9mZi1ieTogQXJzZW5peSBLcmFzbm92IDxBVktyYXNu b3ZAc2JlcmRldmljZXMucn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