Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5255388imm; Tue, 18 Sep 2018 06:48:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbROQM8QN6GzI7hgBCb8nfXAO0EXD6mHZF9tq58WCjuYg0268ou30bvA9VpZqrD+2pgrL4Q X-Received: by 2002:a62:2285:: with SMTP id p5-v6mr30999769pfj.53.1537278497362; Tue, 18 Sep 2018 06:48:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537278497; cv=none; d=google.com; s=arc-20160816; b=ZCkbXJ56LOCVuzX05R3ZQAi/gRk10RxMSWoL5rs/h5MNjG7H59FlB1cudWKg6V2GiE v5CPC9O/eRERExcm3Esq7b527cpX6Sli/NS0RjdMh1hH3dWc8k+oL1m20jnPgkFUE8Sn FRTzhn3m13Y2ioJXwxJv0C6Or6VkKyjujV9iN1AR1wJMLSm3ZNtFlFrzNyWIubZz3NyB NgMH+/p8lp/9vN+RNofWH3oQY2sE0qyMk9yhUukeTfVRqLqhiD96MeyCqsvqTrKf3B+M 4j5kP2AcxR1YQls1tu5v6WpWt+nfC8T+WYx6xkpk8rb+8LUOAikSd0E3A86nIWD8jrZ8 cu5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=sdXyCqr1a+vpAqKSOjGz0O39vsStMQ+0LWzu2aAoNxQ=; b=logJmMtx6dg/33+xEuI82UHCp7T5woj8iW39nJqJsfE6MoM9N4dhU3MUT1ZBUxoTVM V72tebTgVFW0iUYp47I9Jg4bkZzQCaXwd2/iNprvQvmszuDh/ES5KfQgp4+sU4KXBZ+e VfVcfc4XwC21QOqgKVJk07dn3FYHcJtmY7yN9p+btqsa4eIAjaOQC0MusSHYI4MLa08m ZSWzOEPyZsXsYv3bOOYsCVIc70SCYFKXPoUPXG0AyAXHQvCdk3fpeuTMTuBCGUElp646 j0diCorIr6Ys1Kyf9gH/44cM74p75A7Gw+qeEsEMUqz3uauhSlYqxDryaiuqffx2gZ30 1oBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9-v6si18661794pgs.521.2018.09.18.06.48.02; Tue, 18 Sep 2018 06:48:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730063AbeIRTTv (ORCPT + 99 others); Tue, 18 Sep 2018 15:19:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58900 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729973AbeIRTTd (ORCPT ); Tue, 18 Sep 2018 15:19:33 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8IDdiWL012946 for ; Tue, 18 Sep 2018 09:46:52 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mk1234kf9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Sep 2018 09:46:52 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Sep 2018 14:46:49 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 18 Sep 2018 14:46:46 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8IDki0D59703390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Sep 2018 13:46:44 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1499111C04C; Tue, 18 Sep 2018 16:46:30 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C461711C052; Tue, 18 Sep 2018 16:46:29 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 18 Sep 2018 16:46:29 +0100 (BST) From: Ursula Braun To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, raspl@linux.ibm.com, linux-kernel@vger.kernel.org Subject: [PATCH net 3/5] net/smc: enable fallback for connection abort in state INIT Date: Tue, 18 Sep 2018 15:46:36 +0200 X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180918134638.90271-1-ubraun@linux.ibm.com> References: <20180918134638.90271-1-ubraun@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091813-0008-0000-0000-00000272DBA6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091813-0009-0000-0000-000021DB3090 Message-Id: <20180918134638.90271-4-ubraun@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-18_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809180139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a linkgroup is terminated abnormally already due to failing LLC CONFIRM LINK or LLC ADD LINK, fallback to TCP is still possible. In this case do not switch to state SMC_PEERABORTWAIT and do not set sk_err. Signed-off-by: Ursula Braun --- net/smc/smc_close.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c index ac961dfb1ea1..ea2b87f29469 100644 --- a/net/smc/smc_close.c +++ b/net/smc/smc_close.c @@ -100,15 +100,14 @@ static void smc_close_active_abort(struct smc_sock *smc) struct smc_cdc_conn_state_flags *txflags = &smc->conn.local_tx_ctrl.conn_state_flags; - sk->sk_err = ECONNABORTED; - if (smc->clcsock && smc->clcsock->sk) { - smc->clcsock->sk->sk_err = ECONNABORTED; - smc->clcsock->sk->sk_state_change(smc->clcsock->sk); + if (sk->sk_state != SMC_INIT && smc->clcsock && smc->clcsock->sk) { + sk->sk_err = ECONNABORTED; + if (smc->clcsock && smc->clcsock->sk) { + smc->clcsock->sk->sk_err = ECONNABORTED; + smc->clcsock->sk->sk_state_change(smc->clcsock->sk); + } } switch (sk->sk_state) { - case SMC_INIT: - sk->sk_state = SMC_PEERABORTWAIT; - break; case SMC_ACTIVE: sk->sk_state = SMC_PEERABORTWAIT; release_sock(sk); @@ -143,6 +142,7 @@ static void smc_close_active_abort(struct smc_sock *smc) case SMC_PEERFINCLOSEWAIT: sock_put(sk); /* passive closing */ break; + case SMC_INIT: case SMC_PEERABORTWAIT: case SMC_CLOSED: break; -- 2.16.4