From nobody Thu Dec 23 22:14:31 2021 X-Original-To: dev-commits-src-all@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 7B80F1906355; Thu, 23 Dec 2021 22:14:31 +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 4JKkxz1lvvz4rZD; Thu, 23 Dec 2021 22:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1CB8F18966; Thu, 23 Dec 2021 22:14:31 +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 1BNMEVwE091513; Thu, 23 Dec 2021 22:14:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BNMEVS9091512; Thu, 23 Dec 2021 22:14:31 GMT (envelope-from git) Date: Thu, 23 Dec 2021 22:14:31 GMT Message-Id: <202112232214.1BNMEVS9091512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 752e211e6469 - main - cxgbei: Don't fail task setup if the socket is disconnected. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 752e211e64699ff14bb0a66d368cfaec836cfb95 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640297671; 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=cxd5+KuAsafgxduBPQDt3Kz1L1b9g3AsMZ0jWPOG5so=; b=nHu92nxPRBXX1Yc12w4ocOrR2jZpsNng+i0sAdjJ+O9a6EvXgHwSYYQOEjml/YT/bBw7ax Sbr4KmzkeJW3vL1FUWeQ5uQoJcy18EEq0n0+/Rci4vlxKMlj5Mn4b/uDOn84D3uZpXlJHZ aXsXUqBuPOuUM0x5biEFK0VI7L+q663fZOFfUbQSQbElmECkIpDQZr/+fbGWeyz7YzRtnz 1hJXQtsJSCBlSSJWZIOb8CAevapTSIUKkVMJb4BZS4l4hXAIN7Jf+5/N61mCA+d7kEhTHa xmje2g3WAMs9ruEVnHfw/JJRP9LhiDwx65izeOTg55lzmEadVuj/hj7O3CME/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640297671; a=rsa-sha256; cv=none; b=kdkJIa98UjulmzEq/qoJblzghBzZY1cNXVHWzwZ1nWQlPr08+lEUQ4/p6RL43c5ui9mw7v YXKGNC+fM6/Fq/2CZIexp2E8FUCXm8xrAiaTmo1os2Z1/iCvupgg3iwkN0pM1qfHPPwOVq GKf4v3v9ZXHWgc8VoxfKHy4edvZurmrkn4cTnpOEujMef7f6CWkIv4rhUCjqTEYvmur6w4 vr8pGSGKsVUFquoCb+PbSU+hes3O8burENvAV7GdKXny8+x4zhAgPlfbpgNMZUltTjYdcZ L1toiq1R8zIOKq1TWHFv8xNQAN/hPkt5WV9j1rxXyecH/9kn5p8BqyYbabLGqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=752e211e64699ff14bb0a66d368cfaec836cfb95 commit 752e211e64699ff14bb0a66d368cfaec836cfb95 Author: John Baldwin AuthorDate: 2021-12-22 20:53:58 +0000 Commit: John Baldwin CommitDate: 2021-12-23 22:14:07 +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 --- 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 de8f2547f29a..9296488fd793 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -1089,11 +1089,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 @@ -1151,7 +1149,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);