From nobody Fri Oct 29 23:58:34 2021 X-Original-To: dev-commits-src-branches@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 7AF0B181DD2A; Fri, 29 Oct 2021 23:58:41 +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 4HgzsW33gfz4Vkh; Fri, 29 Oct 2021 23:58:39 +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 CD0D720244; Fri, 29 Oct 2021 23:58:34 +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 19TNwYi2003954; Fri, 29 Oct 2021 23:58:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19TNwYJY003953; Fri, 29 Oct 2021 23:58:34 GMT (envelope-from git) Date: Fri, 29 Oct 2021 23:58:34 GMT Message-Id: <202110292358.19TNwYJY003953@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: da92c273d534 - stable/13 - cxgbei: Only round PDU data segment lengths down by 512 on T5. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: da92c273d534ab8991e43fee88d8ef68d0862295 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=da92c273d534ab8991e43fee88d8ef68d0862295 commit da92c273d534ab8991e43fee88d8ef68d0862295 Author: John Baldwin AuthorDate: 2021-08-17 18:14:29 +0000 Commit: John Baldwin CommitDate: 2021-10-29 23:29:49 +0000 cxgbei: Only round PDU data segment lengths down by 512 on T5. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D31575 (cherry picked from commit f28715fdc1f7e801b260369787e7bcd633a481bb) --- sys/dev/cxgbe/cxgbei/cxgbei.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 24187c862fe6..acf6ee74c94f 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -123,8 +123,13 @@ read_pdu_limits(struct adapter *sc, uint32_t *max_tx_data_len, tx_len -= ISCSI_BHS_SIZE + ISCSI_HEADER_DIGEST_SIZE + ISCSI_DATA_DIGEST_SIZE; - *max_tx_data_len = rounddown2(tx_len, 512); - *max_rx_data_len = rounddown2(rx_len, 512); + if (chip_id(sc) == CHELSIO_T5) { + rx_len = rounddown2(rx_len, 512); + tx_len = rounddown2(tx_len, 512); + } + + *max_tx_data_len = tx_len; + *max_rx_data_len = rx_len; } /*