From nobody Fri Sep 08 23:34:34 2023 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 4RjCBM0P3Nz4sblc; Fri, 8 Sep 2023 23:34:35 +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 4RjCBL6z2bz4X5V; Fri, 8 Sep 2023 23:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694216075; 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=LE80OsH6G0cg9u1RE4f885NPOatmo9jcwxeSSzV2lEM=; b=Ov0Xl924pjhdn2PSDU9WTl6UIVpL6+M7NVaiMkBJ55oPFM6OIP2mp8TiiSs9eoNDmCLVBu ecbEdpG6rKpVAuyU+xyqQDLmJI24S+SOodpGIQQrt2bH/jiJpvIMUPl5VIv0tdNfy14fP/ D7+GsuAUWTY04LUJaL/99GzrwDORmP7mtlykz/7spD6Tw2wUGcpKy6FGZ1oyGbWpvqUw5J ZMjfU6qQluXjoRa9dIvfVzbwXsEbmMjcZ4sf4JjJqqOUaN7f2V+/JwlTGOBs4ca9CYf+hn c+P+eCzpELU7QOzGxsl4WrLH2pGwo9ez4NYc1Dez9heRerqVZZbwS6C9tIHQGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694216075; a=rsa-sha256; cv=none; b=Z0sGt+SUD0135iOHwb6+K4hTkPlophS9RfnrDyjPt5aLl/e+AFbhH37WtOsCrKclW7Hw80 Kc6NBMsVkgBnE2SiX23d7dHxjE2JpPR0YHcvfUUwXlavoKXjEBSyAToYKBbJn6nPR7b05w MzfNZFadwP1GBBx7zSSSAGV11XZBBJXv6j4LpwF2Ts6Kmlkt8td5h13hR+AaPnBVu4Ee/G jWJTf9IK3PFBnm7udZ2f5UJYzKdqHmOIAWMo6N9MdsxpwYEwM3zEhiFQAkPRyqua91owpA 6b3ygIlac2GgtRweAfOfMIHf0BdTsptluaIWM+Y+aDdZHb2/pK5UkUPprYtUdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694216075; 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=LE80OsH6G0cg9u1RE4f885NPOatmo9jcwxeSSzV2lEM=; b=dolQzPEboQF+VJIGMngZllvnmso8eSdZzCZIrIxObU5xtdDN1d8YuWxJBbVFA3DfiJJTrS F/8jFxbSd/RSTECjj7R47uFGV+DQysXJf+ddPlWbyj4i3D+J+idR1Pgo/uL4KngYIdZD+f iCJLvHjccbV6j7IxQ3+7xiFPIVnNssrrZDcmvqmFcxVZ5mXLUcoG5FRS7OnL000i5praIr LwtntjhVXA+nYJmzbFbhnDkhjD9tC4vYeoHgUkasE4jeIN8/CKi/+pgbEBG1aGwGaGWzEP pkOzVx4OD1149KIBkTj/qM2bP8Amnt11hnXVAwe4lwXU6sLneDl3na1yfKgnqA== 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 4RjCBL5wzCz11xs; Fri, 8 Sep 2023 23:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 388NYYlR072485; Fri, 8 Sep 2023 23:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 388NYYVi072482; Fri, 8 Sep 2023 23:34:34 GMT (envelope-from git) Date: Fri, 8 Sep 2023 23:34:34 GMT Message-Id: <202309082334.388NYYVi072482@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: dcfddc8dc091 - main - cxgbe tom: Call t4_rcvd_locked from do_rx_data to return RX credits 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: dcfddc8dc091e7688abc8488a0307eba425fa7a2 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dcfddc8dc091e7688abc8488a0307eba425fa7a2 commit dcfddc8dc091e7688abc8488a0307eba425fa7a2 Author: John Baldwin AuthorDate: 2023-09-08 23:30:35 +0000 Commit: John Baldwin CommitDate: 2023-09-08 23:31:21 +0000 cxgbe tom: Call t4_rcvd_locked from do_rx_data to return RX credits In particular, the kernel RPC layer used by the NFS client never invokes pru_rcvd since it always reads data from the socket upcall via MSG_SOCALLBCK which avoids calling pru_rcvd. As a result, on an NFS client connection managed by t4_tom, RX credits were never returned to the TOE connection to open the TCP window resulting in connection hangs. To fix, expand the set of conditions in do_rx_data where RX credits are returned to match those in t4_rcvd_locked by calling the function directly. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41688 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 9b48b2891f64..235d4196226d 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1647,7 +1647,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) struct socket *so; struct sockbuf *sb; struct epoch_tracker et; - int len, rx_credits; + int len; uint32_t ddp_placed = 0; if (__predict_false(toep->flags & TPF_SYNQE)) { @@ -1779,12 +1779,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) } sbappendstream_locked(sb, m, 0); - rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; - if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) { - rx_credits = send_rx_credits(sc, toep, rx_credits); - tp->rcv_wnd += rx_credits; - tp->rcv_adv += rx_credits; - } + t4_rcvd_locked(&toep->td->tod, tp); if (ulp_mode(toep) == ULP_MODE_TCPDDP && toep->ddp.waiting_count > 0 && sbavail(sb) != 0) {