cxgbe(4): Reword the comment explaining the atid/cookie split.

Avoid a magic constant while here.  No functional change intended.

MFC after:	1 week
Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2023-04-01 16:07:36 -07:00
parent f0ee6112eb
commit 43f6f08488
2 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -3905,6 +3905,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)
{