From nobody Tue Aug 27 01:06:24 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 4Wt8WN5fLFz5TjL6; Tue, 27 Aug 2024 01:06:24 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wt8WN3fQfz4lMy; Tue, 27 Aug 2024 01:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724720784; 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=HHtnu0K9GXwPyZjeMKDVyMcntGniA1884Jh7Y34JJew=; b=M50SSE8RvmxGo+W2Sr7SoDabCuXIdUj4aUIy56UFbvDkh2V/Ab5DhSr4u29wFwBCWeXoky V/Z0FohRyJpIM0oTSiafaHWsdtoS4IrEmb2nvHklvnPEwUXYQmX4kC9ktRFszlJEy/AAdQ IMG+jkNzsgcDJc7dWVWw4EJcCvjW7uAYad4YV6s7cOFW+Q8tzK/e/YgmnlVSnOevO3NVug IqshpHy7g13tJzfEl1IT7vC5puYaU7m7s82a5HCb0ayeuTuIcZESZLkDJKwwS/5YFdt0+h wTYUuOOfRFqk17M3JyE7y4Ip1B9qInwd7zy6xnWvdQyMvBfGn13WpAtUvkajwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724720784; a=rsa-sha256; cv=none; b=tj6mJPDmgReOb1QAygR5J8Ofpo3OM4aMAAgaV0LdF9z0hA3PZbbhGBEDuz2z4NHYA4m1w8 18xRZeQawMpDq8DmZpnYLYsH179WUWOfPZ2d2OfdZ+ZdB3JPwsb+w0+nq5eBbDp0hO909A 0mMy4/fms9oyUwU3YDfs71cMFILsyWooiMCDHQyHwzkVLJzajqCvvr//cRKyChJrishk5z LeFE/jfxerBWlClCqL3zqXHkL52rFx7zZV8TTSx03WqPLcRADEL9wMVjvFZ18rcHKZiAB7 iQqHIaFwvYne3oFBj+FI+UsV0C5x/DiIF/94nFeTSUuDLfpJqVIrCmkf5BupxA== 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=1724720784; 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=HHtnu0K9GXwPyZjeMKDVyMcntGniA1884Jh7Y34JJew=; b=NDWbvF4IwQdN6FSV66O+BEf6AYqUP/UHoGWeNrCsQkfdU1XMHrLGjXEwvHnR4RYcnhSqRd 3GvpVu6K+H/5eXmN/h2Q4tB4miOivOUzha6KfoXDPzASc4GfdyjpPtRfFcy8LNn+kzAUJo ZqRthla8floK7AWldQTOVt+4g2AbYnhD56BKBnRyD47OvqTR4VVxd1elu9rzMGTRuSnwYH DbmVrGu8uKm4mTVf9PwdMxxXviu6TyM8TSKf7ahUlq5PykjGT5zU7cuYBPMamzbADYZXlT ngdqmU5qPejGT9U+RB7loBLR8KI8AjueReqHonDuvviyo947YJtymZuv+Q9yjA== 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 4Wt8WN32qYzT9S; Tue, 27 Aug 2024 01:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47R16ORZ056366; Tue, 27 Aug 2024 01:06:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47R16OiM056363; Tue, 27 Aug 2024 01:06:24 GMT (envelope-from git) Date: Tue, 27 Aug 2024 01:06:24 GMT Message-Id: <202408270106.47R16OiM056363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 94feb210599a - stable/14 - 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: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94feb210599a358462ad48ccc792ec4d78e03ee3 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=94feb210599a358462ad48ccc792ec4d78e03ee3 commit 94feb210599a358462ad48ccc792ec4d78e03ee3 Author: John Baldwin AuthorDate: 2024-03-23 00:21:20 +0000 Commit: John Baldwin CommitDate: 2024-08-26 18:27:21 +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 (cherry picked from commit 1931b75e004f25cf1d2db809bfd9baba40c04521) --- 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 137aff792868..ee387d54985e 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 72797d30a3bf..26dc75ba4141 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 */