From nobody Fri Apr 29 23:12:24 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B53061ABCA36; Fri, 29 Apr 2022 23:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KqpD931Zqz3w4x; Fri, 29 Apr 2022 23:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BRRTyQFrms3NUx/WgCsmAqWkz1e0Ii/9KiGp40Bf2Hs=; b=l49gTvF8nxGtNBm3UARTqvIANOsL82X3ruguX8KjoHQ4+zjSqpNm0yBCV64eZK3DW8U/1S k94whVCkSIPTFPras8culp+MQBRdTnD6pBJdPtN79kDOkv5Ox6D0j25ZhzIDR8vkERb94L vGh6ZpOyJ7tppukiPYYNFA0oScuXYV0xf/MrjIH8cumdG1P+okFMvx9ctIF69xypU5b7ez +KA8bFYarJ9m4LFIBtMh4ZWGZiuHBEVwo3yrfy+u5Cmq42rxGPIfr8roKDIZr9507Mr83f aRgRdcAxaDG05a6bq/GZL/QGhaiATJDEqy5lYA5NYbzINO1Rn/ZZorBNkqBPxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B18C15FB8; Fri, 29 Apr 2022 23:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23TNCO5b044619; Fri, 29 Apr 2022 23:12:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23TNCONb044618; Fri, 29 Apr 2022 23:12:24 GMT (envelope-from git) Date: Fri, 29 Apr 2022 23:12:24 GMT Message-Id: <202204292312.23TNCONb044618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 745c280c89eb - stable/13 - cxgbei: Don't fail task setup if the socket is disconnected. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 745c280c89eba41dee25a6cdd4ef4258de87dc65 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BRRTyQFrms3NUx/WgCsmAqWkz1e0Ii/9KiGp40Bf2Hs=; b=g9URbbvCU4Mtp56ijxb+V5U/fJoXmENI9BHWJDZVigchXGy1/m87jt0ZcLtw48BP4Ue023 ngXl/fv75rBdrpKAxAuZ9wV4236WO9SQBggCROMHbZlX8p4qWXwjyLVviUFe8xQHG5FnW5 Ogn0r2yCZek+uwB8r2Qg0CVgrtTq5AFmSoije/qCP0k7arFylV9693yybiEPwfK6fiTrz1 l0l/DLDdHl8WmHkfBWNG4b6PyPrmUYtfpmkhexgcVDgP8MjpzD07prFlRMqtR4fhKonosx 5CKRTSkPYHCXDk3wMh+yxdazhFv0HX5EZ90FlitigUsWpA4GOOG3KUTaz94rdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651273945; a=rsa-sha256; cv=none; b=tpBCBVCkRDfdF8iL8maxpjZpOD6sCd+UpDU4iNJ38dS1HFadpvKmiY5SG/n4BRsbjqOgr6 FiWglx2v6dDs77QQQ+kRY4ykN4QO072nS9U0KRjE4mXzLxpf689pa64Tk+cs2R97HdlZZJ +H4/ndW/FFXlZCEoS/FRQYPOislsaX7SQXwrotew6l5QTOaxBq8iDtSGYc1n1DvEx6ham+ FnG5zsE/fS9KlhDIkqeG94ufoqXkNQJ22rFXBKLAzHfXUWioXrEzU9sRzvX84i1xVVERYf L3NQ+AIKrQJz4htrSNhVv90tpK4/s9ky30OPS09IAAisZS6u7cPNXZD1kIJT0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=745c280c89eba41dee25a6cdd4ef4258de87dc65 commit 745c280c89eba41dee25a6cdd4ef4258de87dc65 Author: John Baldwin AuthorDate: 2021-12-22 20:53:58 +0000 Commit: John Baldwin CommitDate: 2022-04-29 21:18:22 +0000 cxgbei: Don't fail task setup if the socket is disconnected. When the initiator is reconnecting to the target, the connection may temporarily be marked disconnected or not have an associated socket. New I/O requests received by the initiator in this state should not fail with ECONNRESET as that results in an I/O error back to userland. Instead, they need to still succeed so that CAM can queue the requests and send them once the connection is re-established. Setting up DDP for zero-copy receive requires a socket, so just punt on using DDP for these transfers. Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications (cherry picked from commit 752e211e64699ff14bb0a66d368cfaec836cfb95) --- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 6ba3a70a543c..04dc3a68e3b8 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -1087,11 +1087,9 @@ icl_cxgbei_conn_task_setup(struct icl_conn *ic, struct icl_pdu *ip, MPASS(arg != NULL); MPASS(*arg == NULL); - if (ic->ic_disconnecting || ic->ic_socket == NULL) - return (ECONNRESET); - if ((csio->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_IN || - csio->dxfer_len < ci->ddp_threshold) { + csio->dxfer_len < ci->ddp_threshold || ic->ic_disconnecting || + ic->ic_socket == NULL) { no_ddp: /* * No DDP for this I/O. Allocate an ITT (based on the one @@ -1149,7 +1147,7 @@ no_ddp: mbufq_drain(&mq); t4_free_page_pods(prsv); free(ddp, M_CXGBEI); - return (ECONNRESET); + goto no_ddp; } mbufq_concat(&toep->ulp_pduq, &mq); INP_WUNLOCK(inp);