Date: Wed, 17 Jul 2024 14:21:40 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b67afd194ce9 - stable/14 - cxgbe(4): Reword the comment explaining the atid/cookie split. Message-ID: <202407171421.46HELeEE026974@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b67afd194ce964309d1033650424a9aeea2acd32 commit b67afd194ce964309d1033650424a9aeea2acd32 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2023-04-01 23:07:36 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407171421.46HELeEE026974>