Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp509270rwb; Thu, 10 Nov 2022 04:04:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM4OmUCfR1DJm4OeTl1pJtSB7pF4iQ4Eg6qsODpWYfOw6WxnE6z/lS9oYgDqRqGHhauOQKWj X-Received: by 2002:a05:6a00:1309:b0:535:d421:1347 with SMTP id j9-20020a056a00130900b00535d4211347mr64847561pfu.5.1668081863102; Thu, 10 Nov 2022 04:04:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668081863; cv=none; d=google.com; s=arc-20160816; b=wnZbJiXLkJi+2ZI0rL7VkDuLB7b0K71/kRLVs6GBvwOzVxaLfxQQ/DSi1vwrFsnTPw Yh6HpMJxcsMZnWL40pXKfs5BR1MRqup8+Jklfa475ugI0SZznt9Rdz+8OxsHT+dmggRw TX9ilJids030OsfU6Q7jE9s9g5yq3tvtVRvn6k8heF4L1jVZRJzbbq4WdoHSRvzxlSDn 2BCrcdPS6aj9xgToqLaJRYvgKitHMUAOG1r/cAL3cxsv4ifOy1ueLnSGX+aQ3xCz56aq DNxm/ye29+VusYEYrq2FrphQu0BKNOufHBT2diR3nMmNWuGDfpmR6Mlvoz+G/hmIOus2 eh4g== 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:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=JE1NASC2dC7it/SBUq6Eja4WTSqUt0YnZ0+wYFox/CQ=; b=0yb530b9wpsPuUVKBY9F8ZlZ8lQXDiMoe45wOH3kXHYDl2VHRo+haVrCvMhfD29EtD iMFRfaAfsVM5/Mad/3zHBFG74VL/BQlbjN0WF5aTfYwwdxqeKhpJNgLXAHhNqzyv4/8d PJdBXJPOBHMYz0jW9gNR6WALjHz+TqeK/uIdHcE3xyBiUkJ5rfTOm0W27IF77mxlj/xa RcicwgHsrdOrQcsqXchATrzHQ7gvwciIbI6a7DrvCJVrfgWqpFIQiUdO89WdG1mSCI1k 1Ol2Uya9Mjw86oaXcpAGq1mjq6LcJf09vCXqyDDCDkFbwuMPDkJKE7Bh6PnniJcN64DS vKYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=pPu9bj05; 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 q2-20020a056a00084200b0056e3400fddfsi22310703pfk.195.2022.11.10.04.04.07; Thu, 10 Nov 2022 04:04:23 -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=pPu9bj05; 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 S229888AbiKJLQL (ORCPT + 92 others); Thu, 10 Nov 2022 06:16:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbiKJLPz (ORCPT ); Thu, 10 Nov 2022 06:15:55 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C023DFAF6; Thu, 10 Nov 2022 03:15:51 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id B582F5FD03; Thu, 10 Nov 2022 14:15:48 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1668078948; bh=JE1NASC2dC7it/SBUq6Eja4WTSqUt0YnZ0+wYFox/CQ=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=pPu9bj054qaCFOTWf+AvO7Nq212WVle84rZlT21psyzm2xaSHMilzZJMXgREfEQ/4 PaOiWabeEVnRv6kEtVgatSWOXoGuv0by8/s5pljUbmzD2XCf8iPRklXVHxRyCuu2/b kkP/fYsuZg7k5/YpS8ac8FhGoRR84bvE7W7cKjB3ZRIdyKvazhsNohONzVIBzSpzso +phRnrNg64svBqDYh0oQFSIRgNtOAr5Mr+rsMVlHtWQpXWKWo+zakK3FX0O0+Dd6en eo3k+fUYiHm3JUOkYg6dt4DtShnHp6lpELKXlxHrdeXtkgz+0M0ul3WSOqHVE5d3IP GayhFI2T8XgOg== Received: from S-MS-EXCH02.sberdevices.ru (S-MS-EXCH02.sberdevices.ru [172.16.1.5]) by mx.sberdevices.ru (Postfix) with ESMTP; Thu, 10 Nov 2022 14:15:46 +0300 (MSK) From: Arseniy Krasnov To: Stefano Garzarella , Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , "edumazet@google.com" , Paolo Abeni , Jakub Kicinski , Krasnov Arseniy CC: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , kernel Subject: Re: [RFC PATCH v3 04/11] virtio/vsock: add transport zerocopy callback Thread-Topic: [RFC PATCH v3 04/11] virtio/vsock: add transport zerocopy callback Thread-Index: AQHY8hfQ+kdlJNbB20agFKggEXiUi6431M6A Date: Thu, 10 Nov 2022 11:15:44 +0000 Message-ID: <502bcae3-0b92-3052-7631-b8c7c2e1d031@sberdevices.ru> References: 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: <1B004ED84BDA604FADCC460C8DB46194@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/10 08:05:00 #20590187 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 T24gMDYuMTEuMjAyMiAyMjo0MSwgQXJzZW5peSBLcmFzbm92IHdyb3RlOg0KPiBUaGlzIGFkZHMg dHJhbnNwb3J0IGNhbGxiYWNrIHdoaWNoIHByb2Nlc3NlcyByeCBxdWV1ZSBvZiBzb2NrZXQgYW5k DQo+IGluc3RlYWQgb2YgY29weWluZyBkYXRhIHRvIHVzZXIgcHJvdmlkZWQgYnVmZmVyLCBpdCBp bnNlcnRzIGRhdGEgcGFnZXMNCj4gb2YgZWFjaCBwYWNrZXQgdG8gdXNlcidzIHZtIGFyZWEuDQo+ IA0KPiBTaWduZWQtb2ZmLWJ5OiBBcnNlbml5IEtyYXNub3YgPEFWS3Jhc25vdkBzYmVyZGV2aWNl cy5ydT4NCj4gLS0tDQo+ICBpbmNsdWRlL2xpbnV4L3ZpcnRpb192c29jay5oICAgICAgICAgICAg fCAgIDcgK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