From nobody Fri Apr 01 03:17:59 2022 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 A4A641A4CFDE; Fri, 1 Apr 2022 03:18:00 +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 4KV52w12Ltz4gTl; Fri, 1 Apr 2022 03:18:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648783080; 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=fFMqTBDnLlWczQa1iajE9rybfQKHI9BxV7Bq8UImJ7U=; b=DLJsxHnkJpXMUz9bXRjlfQPJ8AjE1khjrwamZ5eo3h25KkR8j/7yWN0b9J0VDBInP7fog7 uh1AWnFDYHpCLcBtkw8nVSLaqLJ2rKB+/dJbbxYu/oo51uWzOOUoE9aOs7ax/4NPoN30Eq z81FKp9nlDPPrUbFSpirwaLBNEHS9qKfJa2Q5lbCAM1IUqb4DUYKhbfE2gITa/WXkmXo4B vDiyJ7a72p3dil6dsdIn68wDEnQrOxv2cm3dKPeLYu9vi4sLP6uQHkN7usTLbglsaZz/06 9maTxHdcfVXGDS2njM18fsVeS6tIeygGfAn+/VerDPZbP3xzK4FKascxrMVQqQ== 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 ED3DF43C9; Fri, 1 Apr 2022 03:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2313HxH3003290; Fri, 1 Apr 2022 03:17:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2313HxLR003289; Fri, 1 Apr 2022 03:17:59 GMT (envelope-from git) Date: Fri, 1 Apr 2022 03:17:59 GMT Message-Id: <202204010317.2313HxLR003289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 161fcf79941b - main - nvme: Publish the drive's capabilities 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 161fcf79941bd219b335b1aef4f8027944320d09 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648783080; 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=fFMqTBDnLlWczQa1iajE9rybfQKHI9BxV7Bq8UImJ7U=; b=aM6FHvyUzkHVhNx/XSiBXZIE0WQerxmUBG9sAetB0XyCNaiMSyHmBbM3OnMBxvCSqFCkfd 64O0c8fXjLyeRrtn2+abMzD517jycZeeozJk9pXw25rXyF8F69ZuluRGjnBlvnN5ubTjza lugFrHKgiJlrp7nxlPagOzPLY3qjoYlUlUI+RX32sxT2J2fuHasmBQslpE1qHt1mUHPwAr NNF0vbVbWNOLZNSM9d+fpHeczLB+bi1D4lHNTx0nNd4b1mOGZpcT4amxuHQGToWxv+Lq/a bXbdDAWu+r3ssgBjevtDIujTf7ZWptLKGLHw0P05bZACF/P3r6ZOhVPdvmwKBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648783080; a=rsa-sha256; cv=none; b=L09BYwtS5kjtt7Ru8c4J48VxcspKIjLTnBggCBfJuD3/cIlfUMbxNa/bhT1bi1ruQRYxqg jsbA03DLHgN6uKEVRuaoK9jMuTNHKApm5xE+MSiGgp+BGLfRD6B1vQwevcdmMORxlcsFIS A7gcGCVl1wqrO5jXOui+pUCrFjfR9cYnNJSYru+gfEg+8OxNMuQkwtSSZQcvZfo7yLu0p/ +zUPVdeG1XY2rVCrJ+fPhdScl782J5iZR4SuDxQqmrdG3sDwoligklAtYFWlZJ+wyASU+d qtd2iY8uahZkdlFX1HUkbpjDcn5JnhoLX4NDK9V16UYbSpkyMPR9Bp2xVEX9zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=161fcf79941bd219b335b1aef4f8027944320d09 commit 161fcf79941bd219b335b1aef4f8027944320d09 Author: Warner Losh AuthorDate: 2022-03-29 23:03:47 +0000 Commit: Warner Losh CommitDate: 2022-04-01 03:13:16 +0000 nvme: Publish the drive's capabilities Add cap_lo and cap_hi sysctl to each nvme drive. This publishes the raw capabilities of the drive. Now we can only discover these with bootverbose. Sponsored by: Netflix --- sys/dev/nvme/nvme_sysctl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index 4367a21861b3..38f0874cc861 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -372,6 +372,14 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) "reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr, 0, nvme_sysctl_reset_stats, "IU", "Reset statistics to zero"); + SYSCTL_ADD_UINT(ctrlr_ctx, ctrlr_list, OID_AUTO, "cap_lo", + CTLFLAG_RD, &ctrlr->cap_lo, 0, + "Low 32-bits of capacities for the drive"); + + SYSCTL_ADD_UINT(ctrlr_ctx, ctrlr_list, OID_AUTO, "cap_hi", + CTLFLAG_RD, &ctrlr->cap_hi, 0, + "Hi 32-bits of capacities for the drive"); + que_tree = SYSCTL_ADD_NODE(ctrlr_ctx, ctrlr_list, OID_AUTO, "adminq", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Admin Queue");