From nobody Sat Mar 23 00:25:32 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 4V1g2h517bz5Fl4C; Sat, 23 Mar 2024 00:25:32 +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 4V1g2h4GR3z4YlC; Sat, 23 Mar 2024 00:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711153532; 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=28xryVPAdn8EOn+2IPPEEsPxv4IMjKy6ufiDnESZ8Zg=; b=aboN6lIo8z+EJf3O0pC1RIRMxLjwT5I7qz+IsD9oKHASbJjOdQTQEBmUlH3F4a/5I6oSzz 0ZKvP2FAgLXdIgUWZnfOjcYPsy1NawNgAf9zy/RukIG9l36dB6SlREbYatOSmlj3w2ts+D xFx/0Y78wf7Kd758cTqG2PehfOU+A1xOm4VkJsEn4daCoDcJGi2DcHjKKfyUw1mFmcXMH0 8WtYfXsXlZtd2o4PjMRsD2H1NUUmgzFPn8HbfNhJA/Gz/nyKIOJjyHbQ821/rcPoES4qK5 DFXNuJjMMVPwnK5bWVXObiu7jbUJ/E7OKPd8G0g0EuM7M9fOJ2hr4qDNaywvyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711153532; a=rsa-sha256; cv=none; b=hsGVZ3VDNK7sXy6ukrwzFfzSmpRtnYAjBp3bsi5TxdKkpbUn+4/j9wgFklrw7HGGPXVzGa YPmm1G3n2UJn37u+5L32FeB1bofLvSMxUMdTI/mLWWov/m4Q2xYlP/z2N0a2IzmXipHMI5 5iNSR/kK+FnAzBKFJQQ8E0p/brs9pJq8FbJFSx37mp/tAHU6sZ9sD1++bsqBPBZt/AFJTK PXaHPeZXwvjFpzFuhh2udIzs69f87LJGcykH9cjoTLAdf2GUgBhdIn5dbMYBwmV0m8DDyi Q/iU1pWEaHF2r9mnAHsNoSBEfNpAf/EfR75eB+zmWNxhGY7qIny6OBgeaEkEYQ== 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=1711153532; 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=28xryVPAdn8EOn+2IPPEEsPxv4IMjKy6ufiDnESZ8Zg=; b=QioQtGiEC53n+iX7Su15V6QPo70wErw/XIKfGEpJtcU6huenPeB1pGqPwRNVdXMnQ3FxjW /PqtZ+AatcnBsQ0bSitvqDGFiJrIz3AIoybGtwJmOGeYWjJDwaa8WiHhWQ+MqVfg+6wtxO p+j5glKDPuTgX6UNgR1tH8lX7izHXVic+yazFTGkZKfQJQ14VT3p+jJa8wwuodzHiqYoKx +hNrRYzutUf69wpz1OWBL3nr2wf46qkk+8rhP+zLBxpFY+nft7Uk9cugBZvucoIJFddFWS uOJBdjST9lXDLdMZz0kmOUIq8hmT/OBGeLp/IN/9xBAZq9KiaCfJ2LLxGIRBWA== 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 4V1g2h3Wm2zQPR; Sat, 23 Mar 2024 00:25:32 +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 42N0PWWu005629; Sat, 23 Mar 2024 00:25:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42N0PWBp005626; Sat, 23 Mar 2024 00:25:32 GMT (envelope-from git) Date: Sat, 23 Mar 2024 00:25:32 GMT Message-Id: <202403230025.42N0PWBp005626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1931b75e004f - main - nvme: Export constants for min and max queue sizes 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1931b75e004f25cf1d2db809bfd9baba40c04521 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1931b75e004f25cf1d2db809bfd9baba40c04521 commit 1931b75e004f25cf1d2db809bfd9baba40c04521 Author: John Baldwin AuthorDate: 2024-03-23 00:21:20 +0000 Commit: John Baldwin CommitDate: 2024-03-23 00:23:02 +0000 nvme: Export constants for min and max queue sizes These are useful for NVMe over Fabrics. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44441 --- sys/dev/nvme/nvme.h | 7 +++++++ sys/dev/nvme/nvme_private.h | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 9013e79b8882..fd27e9b318e7 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -63,6 +63,13 @@ /* Many items are expressed in terms of power of two times MPS */ #define NVME_MPS_SHIFT 12 +/* Limits on queue sizes: See 4.1.3 Queue Size in NVMe 1.4b. */ +#define NVME_MIN_ADMIN_ENTRIES 2 +#define NVME_MAX_ADMIN_ENTRIES 4096 + +#define NVME_MIN_IO_ENTRIES 2 +#define NVME_MAX_IO_ENTRIES 65536 + /* Register field definitions */ #define NVME_CAP_LO_REG_MQES_SHIFT (0) #define NVME_CAP_LO_REG_MQES_MASK (0xFFFF) diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 1b6ea03c909a..69141add4e48 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -57,9 +57,6 @@ MALLOC_DECLARE(M_NVME); #define NVME_ADMIN_TRACKERS (16) #define NVME_ADMIN_ENTRIES (128) -/* min and max are defined in admin queue attributes section of spec */ -#define NVME_MIN_ADMIN_ENTRIES (2) -#define NVME_MAX_ADMIN_ENTRIES (4096) /* * NVME_IO_ENTRIES defines the size of an I/O qpair's submission and completion @@ -74,11 +71,6 @@ MALLOC_DECLARE(M_NVME); #define NVME_MIN_IO_TRACKERS (4) #define NVME_MAX_IO_TRACKERS (1024) -/* - * NVME_MAX_IO_ENTRIES is not defined, since it is specified in CC.MQES - * for each controller. - */ - #define NVME_INT_COAL_TIME (0) /* disabled */ #define NVME_INT_COAL_THRESHOLD (0) /* 0-based */