From nobody Wed Oct 11 15:44:33 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 4S5HBn2gwhz4wK3P; Wed, 11 Oct 2023 15:44:33 +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 4S5HBn2DxQz3dnZ; Wed, 11 Oct 2023 15:44:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697039073; 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=GVqCn6R09BUo/PsTfckXZavsVJy5KcyvKJ1TO6nW5n8=; b=evQE6fG4It4WWQBzS1SfXBfh8KV8FeiHrT288eR0jqopXSbKWDCxN0OLspvvUyDu3F448g d06+AashTLXmQ7kJrEqN5O0fmOjP82tlVNFG2PmOE/6KHP0defkEr5EWRoxLRZhgZvFV7H bv5Yu6JurG7/botIRdFD0l8Rr1v1g8fMN9DxnshG7OdQmWHyNcNUsmvZ2dTRchqkKfeh3b 6GsD0uOTBLRo0DPWNk8aQ3Tn2gjBlFJKSXnCYC4kNa3ii4HsVcJSO3ye2bDKmpfdqE4P+I 6+4s6+T5XPwsCDLFjguGkyQK5gqF6NSRcmIFagY9CnzaUqlN2Bdk3wlsmVaoeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697039073; a=rsa-sha256; cv=none; b=wMgX21AjV++4FBGlpZlIyDLaIXWh+ifDRCU9nS0AT/9iaiwIoe0Xj4dexmSh8ue6wU2WaO yvGTKi5pmfy/jLFc5rdulDFbLu9tNSx7yLmPZp1fU5+t150Kw/X0DmRRDds5xg4WZyhEhd gJDBbbk5Cb7Qfki/NDhgT2jh7u7p1B3zU5lzfUqkTZQZkvnWYMw4+viW6xU3FGMHREjHvr krCNzJA4YMqYX83V9Ili6LYzUifwegZ4Mu/gYX4TDb9V33+meariXZ1Mmgsa/U4SPweGdJ zJfxKiYNRxcPoNK/L30UfKwTAR4wGx8jfhba77s6AU8aGn7Db6paZcsc3lCoEg== 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=1697039073; 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=GVqCn6R09BUo/PsTfckXZavsVJy5KcyvKJ1TO6nW5n8=; b=S3o73cE4eAMO2gWm/iMoJZ5w9akECHQwpO7nHhVF6Vw5I8J8AAZb2fUD4Xx2YPvqibPu7A Uvzm7ynwrVOwdpomASB5IgK0E1q4IUxa5OoHqnIj01QKUNIs5f926HIkvH7xw9IM0UfNSf lDBj1rO1+6ZkAjvkiIA7cqNxzzDk1Ua2lBco7YRsesOT3iZkczHWnKoJddg6FvTDkvi+7R wJEkG9SVpYiOTshRLEQHZOUPHROb8SwvHrSa6+VXypHPw0tZQmv1p6pOoiVn0w0/vFlqOj vSxepcfuDcFDLBvoH6mPysk5oTXjUZXOyZo2EThvH9drQXLvbj1cdOGVGG4TZg== 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 4S5HBn1KvHzCF0; Wed, 11 Oct 2023 15:44:33 +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 39BFiXIl024241; Wed, 11 Oct 2023 15:44:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BFiXeu024238; Wed, 11 Oct 2023 15:44:33 GMT (envelope-from git) Date: Wed, 11 Oct 2023 15:44:33 GMT Message-Id: <202310111544.39BFiXeu024238@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: bd8cecc466ad - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: bd8cecc466adeca0763cca674f83bfcc3a751356 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bd8cecc466adeca0763cca674f83bfcc3a751356 commit bd8cecc466adeca0763cca674f83bfcc3a751356 Author: John Baldwin AuthorDate: 2023-09-08 23:30:35 +0000 Commit: John Baldwin CommitDate: 2023-10-11 15:10:32 +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 (cherry picked from commit dcfddc8dc091e7688abc8488a0307eba425fa7a2) --- 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) {