git: 745c280c89eb - stable/13 - cxgbei: Don't fail task setup if the socket is disconnected.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Apr 2022 23:12:24 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=745c280c89eba41dee25a6cdd4ef4258de87dc65
commit 745c280c89eba41dee25a6cdd4ef4258de87dc65
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-12-22 20:53:58 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
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);