Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp667773rdg; Thu, 12 Oct 2023 18:19:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqRUBjiF/ziDbGHgUG9n8xYraDfctXaPZbPK5vlmaf7/1z5d0jnBT5wJSAa2J2LrgUYSAB X-Received: by 2002:a05:6808:144d:b0:3a7:7bea:d3cc with SMTP id x13-20020a056808144d00b003a77bead3ccmr31673179oiv.0.1697159969777; Thu, 12 Oct 2023 18:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697159969; cv=none; d=google.com; s=arc-20160816; b=PkrxaVLaANiADS2Od99HsXT3ASNrIqXs3IhgrIxNoPVAmI49bjPF0w2HzUkMnkd7UV Iyod1t9tGEXP/NFHySwIMq7g9KU++n85p7CaNXbV8F4r6aJtARt2gx4HSms6+98GVeDZ Uk9e/fyEAT/5WaiN4YyEA7Gby1Rm7AJRIaaXNpR4bsW5eG0zT6pl3cnr3zV0udx6wUTE TBA+XBG5O5ChVBk9FNbSsKffQILDNTDuzPt4UkvxGCH1C7qe+bwH/MW4qdOG7jTt4m+N +mEoAW5rwnWfdZTHJG7bUxGmfcqhrDtd9RvmrviCNuGp0kTtQxkK0dSy5gobe/Df3gFt i9Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=2NPnTQ1zmmFpvb1iSFFFhrcqexxS64y89ejkyrwbm/Y=; fh=LvOteGqngMbQwE+zYSBk0eS611xb3NQLHjramoMGc28=; b=eOKHICFEAb1lZ8v0hCn47/0vZLI7nY+YZE46sGXxeu3936pHfpci1Ak49X/erU80Jp UcfYB5+z63FOmxeUhU3ksv/F/7N1k/wKb5kw5UMHEeppiQnWth08Vtahjf09zFDVy+eK pRMP2pU7XqrBpH0T3JGQ084VU09wANBBM36S5AqrWLRjKAHrs3ZcCwIxNTzbcvds4iXq XizUSuvyeMRml1nH8JugVyghLvVcNR8CZwkNsdxvnv7BoIYkuuJjlFN+1kDfF4HQpgcL ztyT6PWDqYEnTCvtRUFtYd+tk+KM4Ha49Yw7lJp5hV018NnZb+gPf+1jZ2zmzI9xCRUj nozg== 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:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l28-20020a635b5c000000b00564b8e55214si3376985pgm.385.2023.10.12.18.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 18:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 943FE829F660; Thu, 12 Oct 2023 18:19:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbjJMBTU (ORCPT + 99 others); Thu, 12 Oct 2023 21:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjJMBTT (ORCPT ); Thu, 12 Oct 2023 21:19:19 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C4283; Thu, 12 Oct 2023 18:19:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0Vu0C2vA_1697159952; Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0Vu0C2vA_1697159952) by smtp.aliyun-inc.com; Fri, 13 Oct 2023 09:19:13 +0800 Date: Fri, 13 Oct 2023 09:19:12 +0800 From: Dust Li To: Alexandra Winter , Karsten Graul , Wenjia Zhang , Jan Karcher , "D. Wythe" , Tony Lu , Wen Gu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net/smc: return the right falback reason when prefix checks fail Message-ID: <20231013011912.GS92403@linux.alibaba.com> Reply-To: dust.li@linux.alibaba.com References: <20231012123729.29307-1-dust.li@linux.alibaba.com> <5b54a227-2e18-46d5-9b15-aea9709cf2a5@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5b54a227-2e18-46d5-9b15-aea9709cf2a5@linux.ibm.com> X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Thu, 12 Oct 2023 18:19:27 -0700 (PDT) On Thu, Oct 12, 2023 at 03:05:20PM +0200, Alexandra Winter wrote: > > >On 12.10.23 14:37, Dust Li wrote: >> 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 > >As you point out the current code is not really wrong. So I am not sure, >whether this should be a fix for net, or rather a debug improvement for >net-next. To be honest, I was a bit conflicted which branch should this go for. But after checking the code before e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2"), I discovered the previous behavior was to return SMC_CLC_DECL_DIFFPREFIX. Therefor, I have decided it should be considered a fix. I should have memtioned this in the commit message. Best regards, Dust > >> --- >> 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 */ > >For the code change: >Reviewed-by: Alexandra Winter