Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1845843rdb; Sun, 19 Nov 2023 12:57:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPBWi0ZCKYS+GGj43iJqO+bawf8MCkk9GR1YnO5VXbb/xDjgxvDgWSFqLuIz5J5813KdAO X-Received: by 2002:a05:6830:10d0:b0:6d6:9ecf:8d8c with SMTP id z16-20020a05683010d000b006d69ecf8d8cmr7246371oto.3.1700427473299; Sun, 19 Nov 2023 12:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700427473; cv=none; d=google.com; s=arc-20160816; b=rvmSKzrQCAOOTD+teJcJIU41A3TwaGguHRD1Z4Y185ZGar/G9A5URQG67F5rYbY8rI lsvqrIlIQ2eajvY72FDIdofKmsKbPisdGltJ+w1h+4FeDIwpVJhSRYAYXtUYyD0UhkcM PPQZ7LJAtUhdcJE0IYPmVXS0JCQH+OQNkmYlTk1F3WpFNQqVa4no9DMk8ex50z3a3IeW t/He5YHlVNhlRUFzmEGYOkmF5hU0r6x8iZeegSn7ICWFeFGkdw9u+MoOvezwpjqbMztb wYPxVUYxBcw8YenX/rulKeIwLAZfRLEwBCWipzXakmmJ92jXQSA0WMYIMVlbZ4BfsM51 WCbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=vL+qQ9rhbaR3YIaKSe6iD2hKBiaKdxLdqmIkkNYOJUg=; fh=wIHqZpOIuzcidDZ82yQbOZuyHJty7uvaWDEh/efoVzA=; b=W2gmdMAuCWoRYzUQJ/C2GpvIgjGzcg/FLu19k9DmHkplLzH9YGse4E0++noKeAuTUH mGL3sDdn8o14LhakJqpkFO/Ly46sztQuUClRD01Q8qSpPpAtTFdfeNNBO1UAv+eiFrst iNzUJEhPk6fFDMK56KMUbX8L0OrsX3wy7BO0uNNRsy0zfRYJ5Ct/znp/LH1AJy3g8ikM chzQAjYAXJvu/25UjWs7EjJ5UocdJRwaHEQLc2zsjdx5GUNCr/2uydpjU9yV5S3h9gIN NluhGsJm8EpE2PTZsjNQn8hfNndGUDzskzV54NMADMD896jr6zFfEvI5QETmolpTsJfM 4v6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=vgwwcdmb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h24-20020a170902ac9800b001ce5b6e5168si6366642plr.130.2023.11.19.12.57.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 12:57:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=vgwwcdmb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2B3CC80A58E3; Sun, 19 Nov 2023 12:57:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbjKSU52 (ORCPT + 99 others); Sun, 19 Nov 2023 15:57:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbjKSU51 (ORCPT ); Sun, 19 Nov 2023 15:57:27 -0500 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04034E0; Sun, 19 Nov 2023 12:57:20 -0800 (PST) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 93455120007; Sun, 19 Nov 2023 23:57:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 93455120007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1700427438; bh=vL+qQ9rhbaR3YIaKSe6iD2hKBiaKdxLdqmIkkNYOJUg=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=vgwwcdmbfmsShWynIaCY9yTWWjJ9WDGhvgA4NxraFj7m6XA/+PWspRUCaX/IVBlHJ rBDGxi9ZmW6I/QdN7mey552dfJFQA6ZD4HGtPeCQ6AyOVM8a5Gvoi4lPJhhRUxeDCk VvDog1qVP24WTpFar6vJSlhrVZXC6kAwcPij64PkDGhXuykEUD4DfaYDGQTa9RIrVD BjoKCRMs4kvyYwN7zSjDzYAGvRpRsIQ9Eq4jQ/wv54ThYF8PierThYAZRyjaeLUgqs Zuu5VbK3UN5HUop6EnE5wWSdGQMh+VOEjQAUZoj6xUUKjCMqM3q1c6AiHt2hDbCYEa dqX5BOF/DnSXg== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Sun, 19 Nov 2023 23:57:18 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sun, 19 Nov 2023 23:57:18 +0300 From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , Subject: [RFC PATCH v2 1/3] vsock: update SO_RCVLOWAT setting callback Date: Sun, 19 Nov 2023 23:49:20 +0300 Message-ID: <20231119204922.2251912-2-avkrasnov@salutedevices.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20231119204922.2251912-1-avkrasnov@salutedevices.com> References: <20231119204922.2251912-1-avkrasnov@salutedevices.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 181465 [Nov 19 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: avkrasnov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 543 543 1e3516af5cdd92079dfeb0e292c8747a62cb1ee4, {Tracking_from_domain_doesnt_match_to}, 100.64.160.123:7.1.2;salutedevices.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1;127.0.0.199:7.1.2, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/11/19 19:33:00 #22482963 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 19 Nov 2023 12:57:46 -0800 (PST) Do not return if transport callback for SO_RCVLOWAT is set (only in error case). In this case we don't need to set 'sk_rcvlowat' field in each transport - only in 'vsock_set_rcvlowat()'. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/af_vsock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 816725af281f..af0058037f72 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -2264,8 +2264,13 @@ static int vsock_set_rcvlowat(struct sock *sk, int val) transport = vsk->transport; - if (transport && transport->set_rcvlowat) - return transport->set_rcvlowat(vsk, val); + if (transport && transport->set_rcvlowat) { + int err; + + err = transport->set_rcvlowat(vsk, val); + if (err) + return err; + } WRITE_ONCE(sk->sk_rcvlowat, val ? : 1); return 0; -- 2.25.1