From nobody Tue Aug 27 01:06:33 2024 X-Original-To: dev-commits-src-branches@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 4Wt8WZ01csz5TjLL; Tue, 27 Aug 2024 01:06:34 +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 4Wt8WY5TVPz4lQt; Tue, 27 Aug 2024 01:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724720793; 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=YBLaa2ri6t7JtYr9QFwPVzF91q7R4hFRqh35aKCmnos=; b=RfdkaMlGHPV47VFrIuZrMah4zivPVGU9Zyq1tUAh4weeZVeehEnsq7uPO8Mdlwf5Xzu5B+ qlnNZVwiiTNyE7FRZeuQPP8pZYMEr/vEPLcDJp+p/CyFDy4IFmubRZwVpNYkUaC69PmRgr 1oOuf21uMvcmxw9VRvvpzocb9uvobkN5BB10BSX/etzNHnHeqz6Qz3vlnC1wzogYOVt5t2 Sn+mh3+io4VcDVlXGwrWYLha7RmKigE/gkfJeINA8ndr3UqjL5F7EXaCGBFEjKKuO612+k Vfbt54JudzNIxJdJalKgixt8qxraqAu91hCaPorLmJlVejYk11VCPws/46vzqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724720793; a=rsa-sha256; cv=none; b=wZknYmhBbF+maNGouk63liwWzN4K7dDFgHxhT8BAdt06yWKReu4E0xUtvaWTExBQ44c4wC M2j/igtwJRCuYQm/MDRATSqRmYaEKx7Yt+hOPVw0DAdYZCBvGgfmMqHd/tkoYrhAJtIHsX jzhPpCB5BY22UVznahtrZNzuX7U3UR1k3lNOwk2CK0Nz2doAwVaorJQocfWpBaHmr3BbE5 Q34LLnVoPLAQGmnxefBzHZYuC6/qFwH+w3n//PAYqvDBaTPJvy4MBcDgVZeTz9iD3BEYS4 EBzJ4beFqPmrcecR7z33wCDwtHc3J1nr1lP7lPsjKkBP56RFTJT4wNKWWkgm8Q== 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=1724720793; 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=YBLaa2ri6t7JtYr9QFwPVzF91q7R4hFRqh35aKCmnos=; b=t6YP5+F466+wQ5tVQ+b2WHaESYbqgeXYDao9yH+XajWpsVzOj/2nqezH/JNZrh4gVlCeeb l9ZZAlyuEOZRrV43rBlools0/ewhcy9OdcuFmikQpitPvsty70vfXxOtsbPG9BLLVctRuu vYK/zVp6DM0jcbsicPZzv69SD710IPkF7W2kX2U/wJFKi4rFspGHjHACIpq/l4V+cuDa3V AxBUg+zdePS2yeL/OjfOQqe430Gs2/Cd8KXk9Wk/FkI8j8qPena4yJbh1IG/47yjY6ASgC 5SPd6jB7oluCTul3TShl7QIiRPoVfpGM6mqSpQb5iulTNqBmH3r3k6x8RWaUZQ== 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 4Wt8WY3tdKzV3n; Tue, 27 Aug 2024 01:06:33 +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 47R16XPl056826; Tue, 27 Aug 2024 01:06:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47R16Xkh056823; Tue, 27 Aug 2024 01:06:33 GMT (envelope-from git) Date: Tue, 27 Aug 2024 01:06:33 GMT Message-Id: <202408270106.47R16Xkh056823@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: 7e771c225d9c - stable/14 - nvmecontrol: Display additional Fabrics-related fields for cdata List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 7e771c225d9c34e5d57faad99829c0bba41ee897 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7e771c225d9c34e5d57faad99829c0bba41ee897 commit 7e771c225d9c34e5d57faad99829c0bba41ee897 Author: John Baldwin AuthorDate: 2024-03-23 00:25:07 +0000 Commit: John Baldwin CommitDate: 2024-08-26 18:31:02 +0000 nvmecontrol: Display additional Fabrics-related fields for cdata Some of these fields are specific to Fabrics controllers (such as the size of capsules) while other fields are shared with PCI-e controllers, but are more relevant for Fabrics controllers (such as KeepAlive timer properties). Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44449 (cherry picked from commit acbc176c3dfdfebd047507dc7d843f8cc10984a8) --- sbin/nvmecontrol/identify_ext.c | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/sbin/nvmecontrol/identify_ext.c b/sbin/nvmecontrol/identify_ext.c index cc30ba0d6349..1082433d697e 100644 --- a/sbin/nvmecontrol/identify_ext.c +++ b/sbin/nvmecontrol/identify_ext.c @@ -139,6 +139,36 @@ nvme_print_controller(struct nvme_controller_data *cdata) printf("Version: %d.%d.%d\n", (cdata->ver >> 16) & 0xffff, (cdata->ver >> 8) & 0xff, cdata->ver & 0xff); + printf("Traffic Based Keep Alive: %sSupported\n", + NVMEV(NVME_CTRLR_DATA_CTRATT_TBKAS, cdata->ctratt) ? "" : "Not "); + printf("Controller Type: "); + switch (cdata->cntrltype) { + case 0: + printf("Not Reported\n"); + break; + case 1: + printf("I/O Controller\n"); + break; + case 2: + printf("Discovery Controller\n"); + break; + case 3: + printf("Administrative Controller\n"); + break; + default: + printf("%d (Reserved)\n", cdata->cntrltype); + break; + } + printf("Keep Alive Timer "); + if (cdata->kas == 0) + printf("Not Supported\n"); + else + printf("%u ms granularity\n", cdata->kas * 100); + printf("Maximum Outstanding Commands "); + if (cdata->maxcmd == 0) + printf("Not Specified\n"); + else + printf("%u\n", cdata->maxcmd); printf("\n"); printf("Admin Command Set Attributes\n"); @@ -249,4 +279,25 @@ nvme_print_controller(struct nvme_controller_data *cdata) if (cdata->ver >= 0x010201) printf("\nNVM Subsystem Name: %.256s\n", cdata->subnqn); + + if (cdata->ioccsz != 0) { + printf("\n"); + printf("Fabrics Attributes\n"); + printf("==================\n"); + printf("I/O Command Capsule Size: %d bytes\n", + cdata->ioccsz * 16); + printf("I/O Response Capsule Size: %d bytes\n", + cdata->iorcsz * 16); + printf("In Capsule Data Offset: %d bytes\n", + cdata->icdoff * 16); + printf("Controller Model: %s\n", + (cdata->fcatt & 1) == 0 ? "Dynamic" : "Static"); + printf("Max SGL Descriptors: "); + if (cdata->msdbd == 0) + printf("Unlimited\n"); + else + printf("%d\n", cdata->msdbd); + printf("Disconnect of I/O Queues: %sSupported\n", + (cdata->ofcs & 1) == 1 ? "" : "Not "); + } }