Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp277221rdg; Thu, 12 Oct 2023 05:37:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKo4jjAFyn0IkLQso5O4yxILVmgHMAOsh6PyijS8HwH7j3CLtD6g1uXtQTu6QXSNt+UCYD X-Received: by 2002:a17:903:2445:b0:1c3:83e2:d0a9 with SMTP id l5-20020a170903244500b001c383e2d0a9mr26412215pls.58.1697114271742; Thu, 12 Oct 2023 05:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697114271; cv=none; d=google.com; s=arc-20160816; b=fvQLjayY237omAF62pwXSE10jcp0EwK8Dr4/rdp770mxWiyPcmt0FGRtLs0wxy0fUh y5Bf3KbQXnUBgb+hHxlS39PcGKONdNgV5BVwOckihY15D4WiE6hnYLxuiPNjBYUrSsmf bAiS1saCGniYyucEG0IVTCe9A28jCftWGHSrfszudQ/8t7RkbKGBdYyU3TiSWpLi/qwP CefODSR7YyT9Anb3377KfJjio13enRtxCmNR45B/E8WiHx5ttVj2jSwgoIthMkIfEvk3 p/C0po2/cywPu7iYZIwBaDOfpQ+12pyde2OL5lONweF5Ta15XPnMhIZ44SR/lgzVTzhf KlQw== 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 :message-id:date:subject:cc:to:from; bh=qvB5ND+lpz1m5+Rj/QlaCJ1X+QIxsvsQ7/U1IIupFVw=; fh=OWtzD8CGYWaSUjT07M9C8Fu4CGgflNs5FHGqi8OARKk=; b=SfJXUZ91vpy+lm3ZhAbcEpZ1HodpdEviQKz3NkOBJO9hHqiulk4sqRbx0Uv/tkk7el QmHvhTTID4d6OycuLxRjA1j9VvWkxWvyU0o9ykm6gH9inM2jC8vAHFV8fitzZM4Jvd9N B0NSe2DacDFnx3eCGXAzK8oPuFBQj0i1LtJJnwzkA6IHrXpmpUTMOpl69YM7UfKxsyr4 R/1PYL2zRLE7074BD4xuMlqz2rK7nwBGLi/K7bg4KcXmikcop2DVAahHOi7XXZnnIht+ v7PhjMH591SGBqIYMAP7FCX3e4RR9+RnrWXYIw4xUb0+VYGga1H5S2xKcXSCW4ZCbB1l uWAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x8-20020a170902ec8800b001bb9533b968si2290434plg.408.2023.10.12.05.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 05:37:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A557D822CFA1; Thu, 12 Oct 2023 05:37:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378659AbjJLMhp (ORCPT + 99 others); Thu, 12 Oct 2023 08:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235745AbjJLMhk (ORCPT ); Thu, 12 Oct 2023 08:37:40 -0400 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D81DC4; Thu, 12 Oct 2023 05:37:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0Vu-nLib_1697114249; Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0Vu-nLib_1697114249) by smtp.aliyun-inc.com; Thu, 12 Oct 2023 20:37:30 +0800 From: Dust Li To: Karsten Graul , Wenjia Zhang , Jan Karcher , "D. Wythe" , Tony Lu , Wen Gu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Dust Li , linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net] net/smc: return the right falback reason when prefix checks fail Date: Thu, 12 Oct 2023 20:37:29 +0800 Message-Id: <20231012123729.29307-1-dust.li@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 05:37:50 -0700 (PDT) In the smc_listen_work(), if smc_listen_prfx_check() failed, the real reason: SMC_CLC_DECL_DIFFPREFIX was dropped, and SMC_CLC_DECL_NOSMCDEV was returned. Althrough this is also kind of SMC_CLC_DECL_NOSMCDEV, but return the real reason is much friendly for debugging. Fixes: e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2") Signed-off-by: Dust Li --- net/smc/af_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index bacdd971615e..21d4476b937b 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -2361,7 +2361,7 @@ static int smc_listen_find_device(struct smc_sock *new_smc, smc_find_ism_store_rc(rc, ini); return (!rc) ? 0 : ini->rc; } - return SMC_CLC_DECL_NOSMCDEV; + return prfx_rc; } /* listen worker: finish RDMA setup */ -- 2.19.1.6.gb485710b