git: 4c07c994d4ef - stable/13 - cxgbe(4): Reword the comment explaining the atid/cookie split.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Jul 2024 14:24:35 UTC
The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=4c07c994d4ef65c83ccf257207873a3925a8c089 commit 4c07c994d4ef65c83ccf257207873a3925a8c089 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2023-04-01 23:07:36 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2024-07-17 07:14:00 +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 04bf3995a7b8..e600314ea503 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 b9b9b3150caf..dd7552a50e4f 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -3984,6 +3984,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) {