From nobody Sat May 11 18:10:33 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 4VcDLx5l0Mz5KXfN; Sat, 11 May 2024 18:10:33 +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 4VcDLx5FKKz4LBJ; Sat, 11 May 2024 18:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715451033; 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=2mouhOZU4R+ValELZ58q3x3tiDm9FfH0WAbqjhC594g=; b=HQpNtvXbhXDQoT2z5neQP+w6/vrADdFONgDEZyqzye7sNaZnd3yGV9MzmibfXBRKqEcq+E 3XSzt+PBjuWQXuM0zzuj9XYPTT74duuEDKWCQyZPOjY3emiSXIXR8DtzuURdulICrDQaDN By6TH0Qu1/aUPnt1fSTa8tS+eGLPkQ108WrR5v9KbS/2EDNeSLaCF/gusGihiVrXUmcknL r0kuP1bnYnbSaUYGPR8bBPvf62A9PqAesom3gPGzs15SGNXKHNPDq/MC3y71W0kc+sFVFG m4Tmz7vOqeEX8uqmGa4SMOxMfEXCs85YN8uwJVeXPJZZ0qgbxOhtdKRjZGcn0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715451033; a=rsa-sha256; cv=none; b=OGFGjkBNsKuZJVPftGAzNplch9jQrbolfoNm6osQSgXyeV+eJ2SqrWejX2q4q9RbpnE70t R+6/GfJDOO1JKnAVUskQORKoWMg+S3fEehfEEtCQIqFCeYOZSDV5dI+XOtb4egRXx0lvwA f0RVd4+iKb0mqSV8AIIUuUt33KSwcIyPY9KHoDBQKrUlA+sP0tGnBaUZ1s7V6H/buBFFGr Ppbg1VZOEzY3bUZOoD0yeeQYrWiUiJmZDMWzfy4Woudjul1UQge8g6UFkAiOKq615Ytdsf FZhROAu+KCIFbr40vhNB0x9noG6qD8Hfvc7KIavisPVE68SgLod/c1ZhIbqlFA== 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=1715451033; 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=2mouhOZU4R+ValELZ58q3x3tiDm9FfH0WAbqjhC594g=; b=mcHuLJuoD1nDUSmam3S2lxSI8kGlUJAjIjXdwQtJ2gJSmFyuXupNXTrc838X45n7wNv36n k6uOWrMGorCXkPCvqpS0f06r5UN1SFnlmf/CxXzFw7f36znJD7aMGrSuCcoBaoFwsewbUT uNWR/RxriMwcDgKah/tBSxXx80vrrhHhMnhugaCtsgrCmBZQapJe3Hs3y7u715/AID9uFm TUEKEtVn36tB9Ke+pISBIzoAz4LVad0BR3+YwikJiDSXAdZgnLthdR50l4RtY2DuEbWvQ+ OUO8VarkDwCzh/5mvl624HVMEQEUN+2B1CstCJkdh+KnZll1cu+QmjMYdL9BtQ== 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 4VcDLx4lKMzXBJ; Sat, 11 May 2024 18:10:33 +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 44BIAXpO001814; Sat, 11 May 2024 18:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44BIAXIF001811; Sat, 11 May 2024 18:10:33 GMT (envelope-from git) Date: Sat, 11 May 2024 18:10:33 GMT Message-Id: <202405111810.44BIAXIF001811@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: e84a75f93602 - main - nvme: Add telemetry page definitions 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: e84a75f936028bf3947f72f11eac4e25baf91b3a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e84a75f936028bf3947f72f11eac4e25baf91b3a commit e84a75f936028bf3947f72f11eac4e25baf91b3a Author: Warner Losh AuthorDate: 2024-04-07 23:48:42 +0000 Commit: Warner Losh CommitDate: 2024-05-11 18:09:50 +0000 nvme: Add telemetry page definitions Add definition for page types 7 and 8 for host initiated telemetry and controller initiated telemetry (they differ by one byte, but that byte that's defined in the host version is reserved in the controller version). Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index bca4df92cb25..a389fc443743 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1652,6 +1652,30 @@ struct nvme_device_self_test_page { _Static_assert(sizeof(struct nvme_device_self_test_page) == 564, "bad size for nvme_device_self_test_page"); +/* + * Header structure for both host initiated telemetry (page 7) and controller + * initiated telemetry (page 8). + */ +struct nvme_telemetry_log_page { + uint8_t identifier; + uint8_t rsvd[4]; + uint8_t oui[3]; + uint16_t da1_last; + uint16_t da2_last; + uint16_t da3_last; + uint8_t rsvd2[2]; + uint32_t da4_last; + uint8_t rsvd3[361]; + uint8_t hi_gen; + uint8_t ci_avail; + uint8_t ci_gen; + uint8_t reason[128]; + /* Blocks of telemetry data follow */ +} __packed __aligned(4); + +_Static_assert(sizeof(struct nvme_telemetry_log_page) == 512, + "bad size for nvme_telemetry_log"); + struct nvme_discovery_log_entry { uint8_t trtype; uint8_t adrfam;