From nobody Wed Jul 17 14:21:40 2024 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 4WPJ5x09GFz5RPM7; Wed, 17 Jul 2024 14:21: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPJ5w69nmz4t0n; Wed, 17 Jul 2024 14:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721226100; 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=q7MBi6f/qWjltuTw5JDDaP4dH0BpxKwIUV1BW9C1XBY=; b=ganYEUWWmLDRfq6djKKyvvjngNqThrOvb87HAIA4AyK3dLNevqUyvJQ4Bm8te9Ki/clC08 eHxq2iRLtcYZnN0FliP9taqqRw62sWwnl15uGtX7GQPPGNant1bff7LAFiPcRQraC1a4D6 AzoLumekN22ie7oCmnjHq+24CabuGVZrC1qPPP6PZ4NZpOPq1zQ2aLvMOL200jXUbqRBQO casrRxA0n96Ean5Suvsx4jZMYLuUhiTeR1rA3aRUYJRDdi+JrFqkLnzUmLtTbC3ntnrSZq Tm9zwhQpyoK65jhUBcoxc6mxL0LLbG+ndRz5wt+oY1yGPdAbj7xQ6oCFxCqL4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721226100; a=rsa-sha256; cv=none; b=vnQ123S2v/blLPj+MjdMtwZcZH2mrrKrv4Yx6wkVDP1I9T6dBGvvhZZ7dh8iUOM4MmIsaU h4G1IFUtMZ9sQedlXLV2lY/ZzDfYaZFKyf3O+ZVrfg5SZLEcLb3ftsJmsU56fugO339RW6 ULI0PmAekGKOkzw6ZHlxr0MsNZCTl7TOw0axKT1dLRPm5MeakPvaOsoiTjgL8luHARIX98 iq///0yaPpWdgTocm6K/U9XDp8RY74QiiEX2gpThFaNbZNgfqIsrIptkQStHJkN8UI4pb3 Fsm4GWqC/AqxvxwGwmqyz/6ti0vrp8EDF7vj2YaN1ZHOxcOtnhKm9wlippcTZA== 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=1721226100; 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=q7MBi6f/qWjltuTw5JDDaP4dH0BpxKwIUV1BW9C1XBY=; b=PN12S7n3V9pgXbiUC6XfUrL4If7X9zcJmG/jJb43ocNOUv7bxT9NDQppVrbwZXvG0CYJW4 KGP4Ehlb24Svk8sX7dRLl+Ac8pd1m1B+v75LgqkMmuDcDYy6Jm2yXU7SMBxWlv885l/b7y QSvU+ST/Gk+gbL93dGlaPp8pSumkMvxMxxEpGqEEpeHPcYMBGwaGgQZ58w7sztOYhAu1RA B8qzYVpdlUs/qoun4oteF8qWGt2LCm7+TWlPatrU+0Caf0+x6Hb0EJMa8FB4hAg+VazaMV NL4CTh4UX7rlEVx6ESe2jzD+RLSfVW1qSZbeyy4aSPV2KarS0lPO0Msu0/WBNw== 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 4WPJ5w5nlPz1MWv; Wed, 17 Jul 2024 14:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46HELebW026977; Wed, 17 Jul 2024 14:21:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HELeEE026974; Wed, 17 Jul 2024 14:21:40 GMT (envelope-from git) Date: Wed, 17 Jul 2024 14:21:40 GMT Message-Id: <202407171421.46HELeEE026974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: b67afd194ce9 - stable/14 - cxgbe(4): Reword the comment explaining the atid/cookie split. 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b67afd194ce964309d1033650424a9aeea2acd32 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b67afd194ce964309d1033650424a9aeea2acd32 commit b67afd194ce964309d1033650424a9aeea2acd32 Author: Navdeep Parhar AuthorDate: 2023-04-01 23:07:36 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-17 06:36:39 +0000 cxgbe(4): Reword the comment explaining the atid/cookie split. Avoid a magic constant while here. No functional change intended. Sponsored by: Chelsio Communications (cherry picked from commit 43f6f08488046788b0ad66e9a5119f36e5de71ab) --- sys/dev/cxgbe/offload.h | 6 +++--- sys/dev/cxgbe/t4_main.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h index 688c4b592180..a8b243b764c8 100644 --- a/sys/dev/cxgbe/offload.h +++ b/sys/dev/cxgbe/offload.h @@ -67,10 +67,10 @@ struct stid_region { }; /* - * Max # of ATIDs. The absolute HW max is 14b (enough for 16K) but we reserve - * the upper 3b for use as a cookie to demux the reply. + * Max # of ATIDs. The absolute HW max is larger than this but we reserve a few + * of the upper bits for use as a cookie to demux the reply. */ -#define MAX_ATIDS 2048U +#define MAX_ATIDS (M_TID_TID + 1) union aopen_entry { void *data; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 04e4427732ac..2da399839ce5 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -3911,6 +3911,9 @@ rw_via_memwin(struct adapter *sc, int idx, uint32_t addr, uint32_t *val, return (0); } +CTASSERT(M_TID_COOKIE == M_COOKIE); +CTASSERT(MAX_ATIDS <= (M_TID_TID + 1)); + static void t4_init_atid_table(struct adapter *sc) {