From nobody Sat Mar 23 00:25:41 2024 X-Original-To: dev-commits-src-main@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 4V1g2t0snpz5Fl1q; Sat, 23 Mar 2024 00:25:42 +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 4V1g2s4z8vz4YpP; Sat, 23 Mar 2024 00:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711153541; 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=LYcqKdXl8KAxh9yyJZVL7wDaU+feQ0pH29lbIYve9NI=; b=yKVASZOWnUsIKcZajJl9yD2hSuDyoXfIjrWyb/tk5YR1uk8wrJ1obXJPI1sQgPNTMm1FLA 34PBctlYkqvDGau7MP96BX8t+J4Lwq0U/UZ2b0osj4Zz8avXmE9c+yF+txhYvdaCjLCO8q iov5Z4BajAxkIpCtv4c0fwEFXQYYGxTkcF0TxmtLeiUmtsBn5WMwgietoJp6khyRdJAh5v 0jKXIjMgwkxbUkrbuwJ1nEJT7MhD5blk9Lbu9ZaACPvS9SurnaUM0c8rZrrpHM6rXljXJs QLMPYK9TJFtBUgIRWsC0AGYceylixt6tDQtbqAB2HqVu13PN8Q+1Wu/KP+HNnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711153541; a=rsa-sha256; cv=none; b=JOl8XKfdc7FPYTgVePlyXqrYcgUChR7GXe6/sV9FLCPOP6qDtnIazq3k28IqqhAwyaOTT4 XzWCTxqea1cTDv5I0x9b9C0OfHn6ILhNWr2xIS6NnygZtZo7U10/9YFz/gHn8uKwiLixTR /qyOcqWeSrILTJsvLQk86Kb0uCYhzougYrcb8+LHD5fsjl40r9TzKiRkcTc/aTQlGepUYp pzpyaQCnwXqWW4GTHNH2hGJiXIVU3mU4bTz80NyK0t37yhIG3DXNQt+qtgFeiAaB+frcJk sSpg/WZmmmNhb8NTjlTD0ho+NrCl9PDISIpy9XTEsVRhvflOUhuG3kZK1TqfIQ== 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=1711153541; 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=LYcqKdXl8KAxh9yyJZVL7wDaU+feQ0pH29lbIYve9NI=; b=L9VMMLdsSROQrNBphhLfInj7hU9zZtiufdOQB+2XX0HT9gbMSBBsM8onODirp2cdjz/L65 KbEPxQxnjZ3+NLnIjiWn0hx65GTHE9YMEk0R8PF8oaPQFycmhgtpjbizNIipAz5dD6ILR/ FKVk+zdsvNXVkbXrQqkx3pv0sZb7Rimu/cHRVhdBTiTn3/69DdwP/nBdY2SWf5mSuoPmsF bv4CeudRAoN6PqFnUkXK0X7idzNQHpU6eUdm0oElUqx32KBofGq/FCft++bhxgRA2nJiEh KcWP4Hcd5X3igm24fs1A9hi9OqilQVOEJXLXCncMGwk93ih0lsJWQPZ3FE1UYQ== 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 4V1g2s4GwdzQRn; Sat, 23 Mar 2024 00:25:41 +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 42N0PfFM006112; Sat, 23 Mar 2024 00:25:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42N0Pf3X006109; Sat, 23 Mar 2024 00:25:41 GMT (envelope-from git) Date: Sat, 23 Mar 2024 00:25:41 GMT Message-Id: <202403230025.42N0Pf3X006109@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: acbc176c3dfd - main - nvmecontrol: Display additional Fabrics-related fields for cdata List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: acbc176c3dfdfebd047507dc7d843f8cc10984a8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=acbc176c3dfdfebd047507dc7d843f8cc10984a8 commit acbc176c3dfdfebd047507dc7d843f8cc10984a8 Author: John Baldwin AuthorDate: 2024-03-23 00:25:07 +0000 Commit: John Baldwin CommitDate: 2024-03-23 00:25:07 +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 --- 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 e4126da2d685..95ca4b5187d4 100644 --- a/sbin/nvmecontrol/identify_ext.c +++ b/sbin/nvmecontrol/identify_ext.c @@ -138,6 +138,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"); @@ -248,4 +278,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 "); + } }