From owner-dev-commits-src-main@freebsd.org Fri May 14 19:21:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45BCD628C66; Fri, 14 May 2021 19:21:52 +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 4Fhdgg6cWzz3GTp; Fri, 14 May 2021 19:21:51 +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 A7D3B17ABC; Fri, 14 May 2021 19:21:51 +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 14EJLpsc058154; Fri, 14 May 2021 19:21:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14EJLpdC058153; Fri, 14 May 2021 19:21:51 GMT (envelope-from git) Date: Fri, 14 May 2021 19:21:51 GMT Message-Id: <202105141921.14EJLpdC058153@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: 87bb5ed606fc - main - cxgbei: Use hardware RX flow control for offloaded iSCSI connections. 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: 87bb5ed606fc02f6520bbb8f9dfe2bc834a50d4d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 19:21:52 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=87bb5ed606fc02f6520bbb8f9dfe2bc834a50d4d commit 87bb5ed606fc02f6520bbb8f9dfe2bc834a50d4d Author: John Baldwin AuthorDate: 2021-05-14 19:16:51 +0000 Commit: John Baldwin CommitDate: 2021-05-14 19:16:51 +0000 cxgbei: Use hardware RX flow control for offloaded iSCSI connections. Forthcoming T6 iSCSI DDP support requires hardware RX flow control. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29905 --- sys/dev/cxgbe/cxgbei/cxgbei.c | 8 ++++---- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 07f704752305..7027e6428515 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -315,13 +315,13 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) tp = intotcpcb(inp); MPASS(icp->icp_seq == tp->rcv_nxt); - MPASS(tp->rcv_wnd >= pdu_len); tp->rcv_nxt += pdu_len; - tp->rcv_wnd -= pdu_len; tp->t_rcvtime = ticks; - /* update rx credits */ - t4_rcvd(&toep->td->tod, tp); /* XXX: sc->tom_softc.tod */ + /* + * Don't update the window size or return credits since RX + * flow control is disabled. + */ so = inp->inp_socket; sb = &so->so_rcv; diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 4e168a33e2ca..9ee31616b873 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -591,6 +591,9 @@ set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *toep, u_int ulp_submode) t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE, V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val, 0, 0); + + val = V_TF_RX_FLOW_CONTROL_DISABLE(1ULL); + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_T_FLAGS, val, val, 0, 0); } /*