Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1071179pxu; Wed, 6 Jan 2021 11:26:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHRNdPYsgjttOQ4gkgMK7MHc/wM06cx9KcIbKad5v3I/Vk0EY4xMA3f0CT+h+RkoUwlS2c X-Received: by 2002:a50:c053:: with SMTP id u19mr4958782edd.109.1609961201308; Wed, 06 Jan 2021 11:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609961201; cv=none; d=google.com; s=arc-20160816; b=IGDz5zqHdf8HFLbyYBBTNBOzIA0hboBohTlVeBYAXCzPCZ1IPYQiSu1SImX0E2JVHB CKDt5xeGvUvRQM+hWT5l7LyU9lhbyC99jY2va14fcpF1QoAYc/JRAu8r8B6tp4dF/Wow njFAIsOXSnTCRCIrtmUJCady51uiuAHZyyWfNczCPBHNuwQLZUuC1060ZiyxCwsZDwHe fazoomwr6R/RH/TyGfYeYb/orlPkkMK0KCTUzoBZ8Np6HOj/ttk/GPpHVpWxAokqvXlZ 6P8Tl+W4aI/x2RRul/0UUpLVVYaxR4gJ3KX/5JgjdBn5xnAQGzYxheaFKRVwqoT2ZNp/ EsxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=x595Db5O/MSS4l4gdpgq+prE4rsfDZ9RcSXgGF9ARMw=; b=qNFIX5IK8suc5Az21o7JqTreCiHCkx2jk1Gin4aJMy17K5wO2C78Q+zTZeQXsI17ZB dtDYMjI77pLOtslhOXoI74sgbdFJkvuH2GlLSmn+bGwQ7bkAvMVVwtyjN40K4mx+z0AA PpinZXyzGub3icnIv/EcDVIxQy/tTaa19y8OOysWHRQK6xPKoYvP/IYDjBE7vqQB9ymp k/9sEWAlyborLoPdP8lhAbIw7De5BTSw4GpJFkPFdIg8GfgvygdQBWH/JQqeeI9udRqZ b3U2P5EBeto9OWBRifJwcuLLZXYLnGQ42eCghmCrbG2J67iuzsqqTQlOKTd4sow3CwKX Y2IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kaspersky.com header.s=mail header.b=VQlHRhwv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kaspersky.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw3si1184376ejb.186.2021.01.06.11.26.17; Wed, 06 Jan 2021 11:26:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kaspersky.com header.s=mail header.b=VQlHRhwv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kaspersky.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbhAFTZM (ORCPT + 99 others); Wed, 6 Jan 2021 14:25:12 -0500 Received: from mx12.kaspersky-labs.com ([91.103.66.155]:26641 "EHLO mx12.kaspersky-labs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726662AbhAFTZJ (ORCPT ); Wed, 6 Jan 2021 14:25:09 -0500 Received: from relay12.kaspersky-labs.com (unknown [127.0.0.10]) by relay12.kaspersky-labs.com (Postfix) with ESMTP id 4A38178B57; Wed, 6 Jan 2021 22:24:25 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaspersky.com; s=mail; t=1609961065; bh=x595Db5O/MSS4l4gdpgq+prE4rsfDZ9RcSXgGF9ARMw=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type; b=VQlHRhwvG0A30MkGI7svObnYYwkslmXrzvV1cUJIPEwwSAIWMyzsMhOf/58ky17rP G8o8rqojo+SLHj45kE/GfIdVTGVvIqdCrFUqLKeU+KysftO82sTsAG+f+asZcMmBrF zvUOJZOjlX1IV2w0twLfAdJ2GsNeGhTVcHYTJhSI= Received: from mail-hq2.kaspersky.com (unknown [91.103.66.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client CN "mail-hq2.kaspersky.com", Issuer "Kaspersky MailRelays CA G3" (verified OK)) by mailhub12.kaspersky-labs.com (Postfix) with ESMTPS id 7906F78B45; Wed, 6 Jan 2021 22:24:24 +0300 (MSK) Received: from [10.16.171.77] (10.64.68.128) by hqmailmbx3.avp.ru (10.64.67.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2044.4; Wed, 6 Jan 2021 22:24:23 +0300 Subject: Re: [PATCH 1/5] vsock/virtio: support for SOCK_SEQPACKET socket. To: stsp , Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Jorgen Hansen , Colin Ian King , Arseniy Krasnov , Andra Paraschiv , Jeff Vander Stoep CC: "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20210103195454.1954169-1-arseny.krasnov@kaspersky.com> <20210103195752.1954958-1-arseny.krasnov@kaspersky.com> <4ef8fa37-df76-e3bc-3f5c-ed4392f509ad@yandex.ru> From: Arseny Krasnov Message-ID: Date: Wed, 6 Jan 2021 22:24:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <4ef8fa37-df76-e3bc-3f5c-ed4392f509ad@yandex.ru> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.64.68.128] X-ClientProxiedBy: hqmailmbx2.avp.ru (10.64.67.242) To hqmailmbx3.avp.ru (10.64.67.243) X-KSE-ServerInfo: hqmailmbx3.avp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.16, Database issued on: 01/06/2021 19:07:02 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 160996 [Jan 06 2021] X-KSE-AntiSpam-Info: LuaCore: 419 419 70b0c720f8ddd656e5f4eb4a4449cf8ce400df94 X-KSE-AntiSpam-Info: Version: 5.9.16.0 X-KSE-AntiSpam-Info: Envelope from: arseny.krasnov@kaspersky.com X-KSE-AntiSpam-Info: {Tracking_content_type, plain} X-KSE-AntiSpam-Info: {Tracking_date, moscow} X-KSE-AntiSpam-Info: {Tracking_c_tr_enc, eight_bit} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;kaspersky.com:7.1.1 X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 01/06/2021 19:10:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 06.01.2021 15:19:00 X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-KLMS-Rule-ID: 52 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Status: not scanned, disabled by settings X-KLMS-AntiSpam-Interceptor-Info: not scanned X-KLMS-AntiPhishing: Clean, bases: 2021/01/06 17:58:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2021/01/06 15:19:00 #16022888 X-KLMS-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > IMHO you can avoid this special-casing > by introducing yet another outer loop just > for draining the extra data from buffer. > Admittedly that may also require an extra > transport op. I'm not sure that extra tranport op is needed, may be i'll try to put drain code inside copy loop, because only difference is that copy length is 0. > Why do you need this change? > (maybe its ok, just wondering) > No need to reset here, like a few lines > above in a seemingly similar condition? Yes, i think you are right.