Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2472576pxb; Mon, 19 Apr 2021 06:35:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx40GJFOY0kmG0aQciA3Rv5lQkIHx2dKBV3BhOt9aqVpWblb2QPJk7homda+ovPDD3fMYUf X-Received: by 2002:a05:6402:350f:: with SMTP id b15mr25517627edd.6.1618839341209; Mon, 19 Apr 2021 06:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618839341; cv=none; d=google.com; s=arc-20160816; b=bx6G2H5INp9FSGoVwfAAO7uXMM3c/4WQ/yNBrLCh0TGzXMOhg8B7soScDcYCm0t7Pl IStZy6g2WCkB4wooO8d8cUrW9afb7c/uGO+zIMfYP5Gxe9yE9wBzZJjXS3KPGwePYqBQ 4tZjHZxD/iaOZftXhHcLy6HGCvOgK9h1ZFHiF4oVJwysRyPpUMMRjZsu9KDnZO2E84QT Lu0N8Cs08kswgSmtEuO4dkaR2utsoOnAo12U94+hxN70cxwFnwOp2Nq7qQFNhDekLpqV xFlzpKKrj7KC+a1AZdcDkzMJH1kODdiPtchg/GswLk1hsA8B0NlcLOPOZPHdgqhD6sSC UgjA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GJeBeQraNeYZ0fA6iazjr+lSvWMgTv6YVr7dXYndcXA=; b=PKm3Fxh1iCP+l+MtOBdX9Lm6V01qN1suw6yc+AG8X/WdeosS3H53P9AKWBUEXVTQNJ RSIG8abgdPvlzHDH1kDP5nn525/vh4WuobfQ37HurmeuKUnZWwARHtzyX5zve+/7jL5O CWCJCAje8qfpw2sKu35cZ/Ae2IJ+stsV0fLBVFZyoVSiS+RCPRjoSX8YyfLdmtvQSAw2 1ZTRi7Y3auqEDlMZAl3+jHOdZptmr/I7Bz4GKZluLDsxgkcRy3Gzexrfj6a3dC2YPGEc d1cBTWPGdZuWoUbCc4ZPMgkwTbtUT0Xb+DlYZuG9Nj8pips697ISY/w1WEfylLuIVu9I c+eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OCWNxKSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy6si11962528ejc.261.2021.04.19.06.35.01; Mon, 19 Apr 2021 06:35:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OCWNxKSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241275AbhDSNbW (ORCPT + 99 others); Mon, 19 Apr 2021 09:31:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:56252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241363AbhDSNWl (ORCPT ); Mon, 19 Apr 2021 09:22:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AC41261285; Mon, 19 Apr 2021 13:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838286; bh=J9UUaUQJXpc+Wtidh7Auovyz9JrG1MkqCjWCk6hUegc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OCWNxKSkGbcZqU2VBnTYzb0uLyS/Q/8NqSzA8/qYl+UFKQJm42ZXfGGN79g2UKxOz vDAWRLFg/qAAYZHQLbCf2S7YEgCqCal6RljNxO8XtP756YAIErvKFaBISXbSPGar/Z nEmyPdaX0li2Wrfszo9iHSkLWtYm5tsUpIBU4qFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" Subject: [PATCH 5.10 083/103] ch_ktls: tcb close causes tls connection failure Date: Mon, 19 Apr 2021 15:06:34 +0200 Message-Id: <20210419130530.651342324@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinay Kumar Yadav commit 21d8c25e3f4b9052a471ced8f47b531956eb9963 upstream. HW doesn't need marking TCB closed. This TCB state change sometimes causes problem to the new connection which gets the same tid. Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls add and del callback") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Rohit Maheshwari Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 19 ---------- 1 file changed, 19 deletions(-) --- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c @@ -355,18 +355,6 @@ static int chcr_set_tcb_field(struct chc } /* - * chcr_ktls_mark_tcb_close: mark tcb state to CLOSE - * @tx_info - driver specific tls info. - * return: NET_TX_OK/NET_XMIT_DROP. - */ -static int chcr_ktls_mark_tcb_close(struct chcr_ktls_info *tx_info) -{ - return chcr_set_tcb_field(tx_info, TCB_T_STATE_W, - TCB_T_STATE_V(TCB_T_STATE_M), - CHCR_TCB_STATE_CLOSED, 1); -} - -/* * chcr_ktls_dev_del: call back for tls_dev_del. * Remove the tid and l2t entry and close the connection. * it per connection basis. @@ -400,8 +388,6 @@ static void chcr_ktls_dev_del(struct net /* clear tid */ if (tx_info->tid != -1) { - /* clear tcb state and then release tid */ - chcr_ktls_mark_tcb_close(tx_info); cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan, tx_info->tid, tx_info->ip_family); } @@ -579,7 +565,6 @@ static int chcr_ktls_dev_add(struct net_ return 0; free_tid: - chcr_ktls_mark_tcb_close(tx_info); #if IS_ENABLED(CONFIG_IPV6) /* clear clip entry */ if (tx_info->ip_family == AF_INET6) @@ -677,10 +662,6 @@ static int chcr_ktls_cpl_act_open_rpl(st if (tx_info->pending_close) { spin_unlock(&tx_info->lock); if (!status) { - /* it's a late success, tcb status is establised, - * mark it close. - */ - chcr_ktls_mark_tcb_close(tx_info); cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan, tid, tx_info->ip_family); }