Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3622872rwl; Sun, 2 Apr 2023 11:25:40 -0700 (PDT) X-Google-Smtp-Source: AKy350bbTGCuymYIxO7s/VkxUSVXhdo2OlSpvtaIa4iukYC9Pd6Ur2J/gyYhnUd69Ud4x2+E3AhJ X-Received: by 2002:a17:903:41c6:b0:1a1:b137:4975 with SMTP id u6-20020a17090341c600b001a1b1374975mr45313111ple.49.1680459940202; Sun, 02 Apr 2023 11:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680459940; cv=none; d=google.com; s=arc-20160816; b=ovZtKawtK2jPYveXJUjoDQ34hV2lAXOh9X5C/EC8eWlYKnOtrStsdZlQid6UD8kZ5+ elT4IHOV4VvbPkx2ugHr/LyzfUvnmu9OwQP8xC3hSTCXDA2sVS73ClMmZhqo5huu/rnV ts7gLjAn4wY9QdYgOhH3xmbQBAAm7/yG9gHe2m/1ciHtzwPPb7B3drM9ILh+ConcwZgB RDloWbj9aZmfkcaj0sKMckROs78utI6ubhRs/YYknkfdMVSBhc5ZRkRrorptipaU/i++ ltBhKxerDYGVaIES/W0icvPR9DMo2VFyU0BdtTlwzTHQvII3JPM7XLvSV8osdrWP93OK E86w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=s4eKgbhgNv4f1gYW15n6VyDdSflCXwAy8F8mScWFz1Y=; b=U24dSBQTQhErH9w1tvHjOCfMoFvpUmQ7VkxAcAPXdtvYEy24UBKM7J0OSTu7BGWLvn wQYe569tgd5ABkR44HRDEKLKXnWQhTOB3AV38zURNDaVJk2VpTdKWom+bLEqHhkFvrNn bJsJetAeoXdfgBWc5uGNd1fhb68RTfjG/9jIyeNwePY91uhEE9OLHmj2/CORbhg3G8s4 DScPlrMTOfVv2D5A4Ztn2oJrVNJ+WZfPCAJ1ci40QrPRiDsupvJpDFfGh2gb8U1wW78A 0IHRzIShDKYtwGo7kyy3nLWHy+Jo35dSCmyq7vhKG0W5zaU1pvmTOs6UwI42jy5/9lW6 hwTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=kebCLhG8; 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 g4-20020a170902e38400b0019ab692fc96si6396337ple.346.2023.04.02.11.25.25; Sun, 02 Apr 2023 11:25:40 -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=kebCLhG8; 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 S231370AbjDBSST (ORCPT + 99 others); Sun, 2 Apr 2023 14:18:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjDBSSS (ORCPT ); Sun, 2 Apr 2023 14:18:18 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09B138A71; Sun, 2 Apr 2023 11:18:14 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 8D50D5FD04; Sun, 2 Apr 2023 21:18:12 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1680459492; bh=s4eKgbhgNv4f1gYW15n6VyDdSflCXwAy8F8mScWFz1Y=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=kebCLhG8m8b44nPUXgIiLoHlm2div159+gCaxPZlok7PfL1MsDsFZz7JTObR9vHeh RaHgn0m3DSUt2AraE9JbfNEuaT/J5X9lJtnWOCH9INtbfLQHiVIgzbhbcLD6nl1KIE oNnsJ8jlNspkJhTkllNgItCG3s3gG/WuKp9IAGvHNbQYauohrFBuV0Q7+SOLEoqC/e vU2K9Q7GN5MQJA1Ah6WfIlvfUfgeWMoVNJ0R7GEHs9U6joeqT/ht5ATK0qewNvIiCO p8ZcDzfqXIqSJyx+c4MTTTfu7It2vzriaFKU+5p+A0XYcXKnhxVzMlSCef79mQQXpm gjxWCEVSsLQYQ== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 2 Apr 2023 21:18:07 +0300 (MSK) Message-ID: <5440aa51-8a6c-ac9f-9578-5bf9d66217a5@sberdevices.ru> Date: Sun, 2 Apr 2023 21:14:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bobby Eshleman , Bryan Tan , Vishnu Dasa CC: , , , , , , , From: Arseniy Krasnov Subject: [RFC PATCH v4 0/3] vsock: return errors other than -ENOMEM to socket Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) 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/02 13:52:00 #21029650 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hello, this patchset removes behaviour, where error code returned from any transport was always switched to ENOMEM. This works in the same way as patch from Bobby Eshleman: commit c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"), but for receive calls. VMCI transport is also updated (both tx and rx SOCK_STREAM callbacks), because it returns VMCI specific error code to af_vsock.c (like VMCI_ERROR_*). Tx path is already merged to net, so it was excluded from patchset in v4. At the same time, virtio and Hyper-V transports are using general error codes, so there is no need to update them. vsock_test suite is also updated. Link to v1: https://lore.kernel.org/netdev/97f19214-ba04-c47e-7486-72e8aa16c690@sberdevices.ru/ Link to v2: https://lore.kernel.org/netdev/60abc0da-0412-6e25-eeb0-8e32e3ec21e7@sberdevices.ru/ Link to v3: https://lore.kernel.org/netdev/dead4842-333a-015e-028b-302151336ff9@sberdevices.ru/ Changelog: v1 -> v2: - Add patch for VMCI as Vishnu Dasa suggested. v2 -> v3: - Change type of 'err' var in VMCI patches from 'int' to 'ssize_t'. - Split VMCI patch to two patches: for send and for receive cases. - Reorder patches: move VMCI before af_vsock.c. v3 -> v4: - Exclude VMCI patch for send from patchset (merged to 'net'). - Update commit message of VMCI patch for receive. Arseniy Krasnov (3): vsock/vmci: convert VMCI error code to -ENOMEM on receive vsock: return errors other than -ENOMEM to socket vsock/test: update expected return values net/vmw_vsock/af_vsock.c | 4 ++-- net/vmw_vsock/vmci_transport.c | 11 +++++++++-- tools/testing/vsock/vsock_test.c | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) -- 2.25.1