Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3805601pxb; Tue, 19 Apr 2022 10:09:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWwvmGsYMunT+Zq6y0OOiTX2ouLAKA64H+3+ZW1Y3xSIQzow/THOYIFDo3pPhILTe+hrX1 X-Received: by 2002:a17:907:62a1:b0:6da:7952:d4d2 with SMTP id nd33-20020a17090762a100b006da7952d4d2mr14229116ejc.260.1650388153918; Tue, 19 Apr 2022 10:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650388153; cv=none; d=google.com; s=arc-20160816; b=kItNXVvGcoojUhZfPwjIaOzpRJrwdQfY1I6WUNWH4+PpUVx8cBEhFIPQGLxT2+jote UIvzHZ4z+qbL05n/9+4ahDD/B8C3ZH0vdrx08/v2lw76BDGwhgjlWXDx1J+WqdF8eJAH GOht6TlFb3DjHXKdLe1/HG6d5ghzH6xiHHzk1+WLTbkVuWNjziQDubb5nZWofdtS33EV RdCkxG/Wxw/veFN/YbDd4IOmocJP3RwCTw48EPhVC7KqL8peNnc7JAWVh36S4EEvxUzQ ahdY1lwJ9ANuSU6nuVDcVOll1tDXGS8zxT5XYfgMDnPt2izpd7unQkEsj60VYU4Gfhmv JxqQ== 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=2PCId70eOvBrFRJWGmzvGtlAFWdk2JnhAnHV3Yj30kg=; b=AUOYmKAJkCdj0VUzYpMP5+25Zv2Ur61aPvVP/ZXj2EGNsQwYLDoZumVgq1fP2/mRAV J9nch/Cxl0KdEx7bTXR/gXoIFE6jSbhDT5n50Yb+GISSCysP+IIkGCC5q2s8aSqbP9AQ KrsaH1mjA0DAQD9c7XeWbuoowvBHBCbWy5QqpKy+F9ztPzoxf0FKmcWc1AVzey9GMPES dcGJh5Pqu9LXV9u+YY1Ec4YJOKWshwLhqhT5GNYdmBngIu99PuZkuFRXWzGqOp5EhfIR fEUZJGW7JI0fMxg9t6X3UY2R1ATq2PGjUL016OQcufSt0r3Y8AIiqjj8gkpiJS4d/2Hr KXfg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a056402520700b00423ed4c5c02si4688964edd.205.2022.04.19.10.08.47; Tue, 19 Apr 2022 10:09:13 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350637AbiDSK0R (ORCPT + 99 others); Tue, 19 Apr 2022 06:26:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234333AbiDSK0O (ORCPT ); Tue, 19 Apr 2022 06:26:14 -0400 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF968237FE; Tue, 19 Apr 2022 03:23:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=tonylu@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VAUn-3l_1650363806; Received: from localhost(mailfrom:tonylu@linux.alibaba.com fp:SMTPD_---0VAUn-3l_1650363806) by smtp.aliyun-inc.com(127.0.0.1); Tue, 19 Apr 2022 18:23:27 +0800 Date: Tue, 19 Apr 2022 18:23:26 +0800 From: Tony Lu To: yacanliu@163.com Cc: kgraul@linux.ibm.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, liuyacan Subject: Re: [PATCH] net/smc: sync err info when TCP connection is refused Message-ID: Reply-To: Tony Lu References: <20220417123307.1094747-1-yacanliu@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220417123307.1094747-1-yacanliu@163.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, 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 On Sun, Apr 17, 2022 at 08:33:07PM +0800, yacanliu@163.com wrote: > From: liuyacan > > In the current implementation, when TCP initiates a connection > to an unavailable [ip,port], ECONNREFUSED will be stored in the > TCP socket, but SMC will not. However, some apps (like curl) use > getsockopt(,,SO_ERROR,,) to get the error information, which makes > them miss the error message and behave strangely. > > Signed-off-by: liuyacan This fix works for me. I have tested it with curl for unavailable address. This patch missed net or net-next tag, I think net is preferred. Reviewed-by: Tony Lu Thank you, Tony Lu