Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp370165imn; Wed, 3 Aug 2022 07:24:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR5zg2xSqvOe0wAlmOmASdrApfw64V5oOkVB4GrPN5bs2fgyJ55w/6B1Pehgxmr6/VNrczWM X-Received: by 2002:a17:902:d509:b0:16f:1e1:2067 with SMTP id b9-20020a170902d50900b0016f01e12067mr9612099plg.140.1659536649607; Wed, 03 Aug 2022 07:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659536649; cv=none; d=google.com; s=arc-20160816; b=ZcvAgjV2W4zLb6tczLDN201HkE4FhUQKf9YJmjNTDue/fJETkdDBsHp4DiaBmRynQc dvc5I74mhzTD9o1xoKoIcS02Bas+2OecIBW6I2Uv1LPt4fNOKVee+eW7pxh+wRKRMvMG dvwsWfnBBYNhHqcz7ECjul8rRR2KOTKmt7/arpcdqhy6C1s96AbVwoa1NA4qaGqPfxlB XZxM1tGKJ9DylmuxBopc1iz5FFjQ3Ikt++diEQUuOzt3TZr+Rl5zH2f61zHK7D3cDZTH uehNywpoSJQrgZrsh/37cMTH347f37A+3b3CJN1M124XXv+aXB6nYAO2Z4N8vEmuayE2 8N5A== 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=ResIOTy9DtBCfFDcIrfJCTjPADSZ5tQYImGjTsxUyvo=; b=Q0xfmhxGpmaV50VMEo+qD5C3IiMMRI6Rb4HojxkoJzdNc4haUWm7agGKAm3w9L0AQI UUPaTwCGSQAV6haEXJC7eC06KQyoLeyVoE36A5sFIKsRpe52F7fkrjcIdRFKYWxFaRqs meqOL0xoovyFm7sqwnWjyInRM4+8xQNNXxDtMwH8ZTqnLY5Wff8be8SBKSGj0kVt0tUf GAuFfBQFVU5SsqUP4bFYZqfcu0YO0O9lYKSTL4eEISJKwPYcXduRaB00NpiKTWEsgdWt 2mLFv3CZBOBPh2CLT2b6usqnkZPfZpAzjWNTFmC2rNZFLwBG9sBaaIU3XTPhT967WyBB m2gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=E14IoBPL; 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 gv4-20020a17090b11c400b001f20ab3ecadsi1886324pjb.18.2022.08.03.07.23.55; Wed, 03 Aug 2022 07:24:09 -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=E14IoBPL; 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 S238619AbiHCOIR (ORCPT + 99 others); Wed, 3 Aug 2022 10:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235951AbiHCOIP (ORCPT ); Wed, 3 Aug 2022 10:08:15 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A476B1AD87; Wed, 3 Aug 2022 07:08:13 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id 0DDA05FD2E; Wed, 3 Aug 2022 17:08:12 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1659535692; bh=ResIOTy9DtBCfFDcIrfJCTjPADSZ5tQYImGjTsxUyvo=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=E14IoBPL+HkaEvLV8EaXDedB2i5I726FYYid+Dewsx7VGANoqKf1j/gWfgR73hO3p 1YIB+AjmxMDp88L1am8vuBqzP7KAXcDothTpeaR3GfY6dPvSSiPQ2VIEN19LmaSBqs r9FJc7irReqFiJ5CH6u52sryQXCvjaB8vzeitBcaHTh3QPTfMZiMZw4ANHYnSFyw/q qRXrTkyM2u7hKRPmLhZIXJzN+detRadYFg/Ll+9pL/WJQktDcvRdE5EzWs0pVysxjY d0Nmm+BNlwYXtAj1rRa3edIXkm2V9OE+acqtgcrGn8SUs5AtoVlgZE3wkxP02xEIm+ ot3MhHaDIpP7g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mail.sberdevices.ru (Postfix) with ESMTP; Wed, 3 Aug 2022 17:08:11 +0300 (MSK) From: Arseniy Krasnov To: Stefano Garzarella , "David S. Miller" , "edumazet@google.com" , "Jakub Kicinski" , Paolo Abeni , "kys@microsoft.com" , "haiyangz@microsoft.com" , "sthemmin@microsoft.com" , "wei.liu@kernel.org" , Dexuan Cui , Stefan Hajnoczi , Bryan Tan , Vishnu Dasa , VMware PV-Drivers Reviewers , Krasnov Arseniy , "Arseniy Krasnov" CC: "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "kvm@vger.kernel.org" , kernel Subject: [RFC PATCH v3 9/9] vsock_test: POLLIN + SO_RCVLOWAT test Thread-Topic: [RFC PATCH v3 9/9] vsock_test: POLLIN + SO_RCVLOWAT test Thread-Index: AQHYp0JvnFCQDy55x0SevzvDgZBQNA== Date: Wed, 3 Aug 2022 14:07:58 +0000 Message-ID: <1f50d595-cd37-ad61-f165-5632162dc682@sberdevices.ru> In-Reply-To: <2ac35e2c-26a8-6f6d-2236-c4692600db9e@sberdevices.ru> 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: 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/08/03 07:41:00 #20041172 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 VGhpcyBhZGRzIHRlc3QgdG8gY2hlY2ssdGhhdCB3aGVuIHBvbGwoKSByZXR1cm5zIFBPTExJTixQ T0xMUkROT1JNIGJpdHMsDQpuZXh0IHJlYWQgY2FsbCB3b24ndCBibG9jay4NCg0KU2lnbmVkLW9m Zi1ieTogQXJzZW5peSBLcmFzbm92IDxBVktyYXNub3ZAc2JlcmRldmljZXMucnU+DQotLS0NCiB0 b29scy90ZXN0aW5nL3Zzb2NrL3Zzb2NrX3Rlc3QuYyB8IDEwNyArKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrDQogMSBmaWxlIGNoYW5nZWQsIDEwNyBpbnNlcnRpb25zKCspDQo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