From nobody Mon Apr 29 20:49:02 2024 X-Original-To: dev-commits-src-all@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 4VSy1N66ygz5Jvyc; Mon, 29 Apr 2024 22:00:08 +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 4VSy1N4RnJz4ncK; Mon, 29 Apr 2024 22:00:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714428008; 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=jSQZc/ipKUCioWHpGhCkfYRjDkp7pjXqU06ghhx0jo0=; b=RR6UISY6v2riLrAua7KcpNXVHGRHk/04DcvSKEyw2kZkNOdeagjZN37tXq87fN8RjBS6re ksA6QXmOhUZCXBq2kINE/0ct/yHRXgs+LXym2hWKMrGIvF0gj8IHkuPf1A4ZkGyvxnVofX 7NnwagIjeP/pGaBtkE3UBAYv7gBrXUsRUglvcBlRTNYlZClNbgG91zzZbaPYU4oegIgDCM CZrm9Ygyo2aXxaVkjMHYxThm74WwriJAnt0vxBAGVoZQBFePcU8cLXo3Jse4A7uc3UVam8 huOsVIri0rMqHsZly6L0YpSXQ/Ibx65jMM7tE9sZqbOZe8Kkd1ElhHbX4vu6oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714428008; a=rsa-sha256; cv=none; b=jn9GEzZVPwo5JlNZ3ReVQwQLKKeqjYKsLNBBpzv1ZiMAFkGVqcL65TLOD9YV8Lc+YhG2Xx diS4sfFtSzXCS6ysgKr+mYOq3+diA3a7cqSUk7zL2wZosPKkEKI+RAmQ0MmCDehKjBTlq3 XSw2axryB5+Y+mKCCY/1MK29MVfu6VZzHqUItORtHBQrHEEMUMXzQro/Y36HmBic9lQpex CIL9mnSxjS9uj800bEe+1c/QKvGuV4qWPWQRY7t7H6uk1sk3dcGFwemTLt5BpVoZiuCeBL xoGgnkVitlzlhZEnp6Z6wkpakgj95AbHZxFAvoJVmPxfXx2cL9mOHAlxVL4MJQ== 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=1714428008; 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=jSQZc/ipKUCioWHpGhCkfYRjDkp7pjXqU06ghhx0jo0=; b=fxCP4de8mBw0FJkzqncGmKzuU0bMEu59qUT6OMGLm6ASi28COIptYRh+A0JUChMj1+x+Vg +hJBYSW/QzSpo1yy4x0j61lqc4BeJ7d1eqQ8FwxrEBl2Xx736G9nXffcRIzTSbUQCxoyvx KtabdpHPVEfV/+JlQRo8ikjoEPbqged6I4BGBCDJ3GgAZhgFp/WhCo2Qq2MNTXCGRIxeuF KkTe8/IYQi9gQKgiG+GeQ3Ye0bm/7Owv/k2I1RQBkWvuB5Q5ruuYK8ocasSbsUUZptm9Om Tf9xdmj9s12dFrsvIvn6ZCndlErwdiFNzQkFTBHWI/0IUJh9+PZoI/zRHEApCQ== Received: from gitrepo.freebsd.org (unknown [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 4VSxgf1CBCz1KGF; Mon, 29 Apr 2024 21:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43TKn2KD008026; Mon, 29 Apr 2024 20:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43TKn2QW008023; Mon, 29 Apr 2024 20:49:02 GMT (envelope-from git) Date: Mon, 29 Apr 2024 20:49:02 GMT Message-Id: <202404292049.43TKn2QW008023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 43f6f0848804 - main - cxgbe(4): Reword the comment explaining the atid/cookie split. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 43f6f08488046788b0ad66e9a5119f36e5de71ab Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=43f6f08488046788b0ad66e9a5119f36e5de71ab commit 43f6f08488046788b0ad66e9a5119f36e5de71ab Author: Navdeep Parhar AuthorDate: 2023-04-01 23:07:36 +0000 Commit: Navdeep Parhar CommitDate: 2024-04-29 20:40:40 +0000 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 --- 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 7bdce5faf7af..16b3ac7dd6ff 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -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) {