From nobody Tue Aug 27 01:06:44 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 4Wt8Wn3KVpz5TjTT; Tue, 27 Aug 2024 01:06:45 +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 4Wt8Wn139zz4ly7; Tue, 27 Aug 2024 01:06:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724720805; 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=smNXzD78gP1njYMMXZAcqaLdd4Wai832Cz9S76mp8hE=; b=EiW1zf5QI6WOKKYcfUx6tpHkOg6hGyGSNmCzJkTrj+pue9rHerdX2F5UmyKOzeQltmXppL m6XvyxE9pD2lyrY4dOZ2nLHM8EgiFtGJvm/U6SmbUelT3w/x8M09gX5J3ehdvegnPYZu8p f/8H9P/wl8y1ZEb09NeS9nMEykyhr7XRnI2YD7iE33zF8Wet0Cm2nWgpkJ2/WxHcklf/bf eh6K7lDkVJeKyeGHHjMiwa1GcMQjveyNCZDYtkBsrK3oVahIHx4W2aIr2N1btSOMJF4Toz gNMvgVzbvCgQRtOVrDDgNYi+BpfgG1C0ivttP654Wu5Wc5R/aBPdDCa+exrr4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724720805; a=rsa-sha256; cv=none; b=YIRBlElDr4vhglh/OIOPRJFlNPnYlrSJcjdgKnYd23F2jN3i1nWJRWltnDfho29TGejRR6 lUylEbhV1jHuZuf7UM06JcQvFr2qCkmkgA3shNc4e4OjFFXYlfhoapmiC/ek4CXFTUoSyY k70mm+XVlzz3YwREQNhw4B/wBz8hkUaiEFkqYos1eWgf0rDmicsGs8uapyVFac3PCLPtUo i4ZRIYJVJqbFXDoDv7AGAgP/HhPA46uvABaTxwZPuWhbZGxdFdCFY1sj7qp1N6I2mBT7ST a2kkn6UXS+nDKQmFwxLWtdKND6AOipkAzawM5C0FNdkJk/ob7HTomE/npivsMQ== 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=1724720805; 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=smNXzD78gP1njYMMXZAcqaLdd4Wai832Cz9S76mp8hE=; b=MNZZ2tbcFvjImBzbgDlc8WnV9YBX3PfPqZNEJ2SsPTEGkWSlnicTYsZtrxFM9HkowOU1eL PjJb4vc/p6riEBkEWFR/VHrdO3LRjyRQB6xcMHr8+Lk+108OBv+DwdZzQgPi302YxpgN8C T8iYfE+ObhiCF9+MA2vGCxPJWXux8ynLa+lL1nr4rAz16GxQ0zNJdOhdxaCG7PvWJPF9Jy 6QtOdr3s/9d+74bWOny4wy+fj0SN5iCRdwnXCFQJuL1eR10ZJu2TOrB4twjKTknLD+5PmK 17KWKvxlJp1+JZxT45V7g5JapPgYJGaoBc5TvDpVkagqAP5if4k0LI3KKPQDmg== 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 4Wt8Wm6nlpzT9X; Tue, 27 Aug 2024 01:06:44 +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 47R16iMq057380; Tue, 27 Aug 2024 01:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47R16iJI057377; Tue, 27 Aug 2024 01:06:44 GMT (envelope-from git) Date: Tue, 27 Aug 2024 01:06:44 GMT Message-Id: <202408270106.47R16iJI057377@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: 36269290fcad - stable/14 - nvmecontrol: Move reservation notifcation page printing to little endian orderinng 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: 36269290fcadcb617c5f02348bc056b3084d8311 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=36269290fcadcb617c5f02348bc056b3084d8311 commit 36269290fcadcb617c5f02348bc056b3084d8311 Author: Warner Losh AuthorDate: 2024-04-16 22:36:31 +0000 Commit: John Baldwin CommitDate: 2024-08-26 18:31:03 +0000 nvmecontrol: Move reservation notifcation page printing to little endian orderinng Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44656 (cherry picked from commit 3d28a9c608a382af669e22e9e8eda7fd0bc02cad) --- sbin/nvmecontrol/logpage.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index 67d296df6afb..b4f9996b10c2 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -220,10 +220,6 @@ read_logpage(int fd, uint8_t log_page, uint32_t nsid, uint8_t lsp, /* Convert data to host endian */ switch (log_page) { - case NVME_LOG_RES_NOTIFICATION: - nvme_res_notification_page_swapbytes( - (struct nvme_res_notification_page *)payload); - break; case NVME_LOG_SANITIZE_STATUS: nvme_sanitize_status_page_swapbytes( (struct nvme_sanitize_status_page *)payload); @@ -473,9 +469,10 @@ print_log_res_notification(const struct nvme_controller_data *cdata __unused, printf("Reservation Notification\n"); printf("========================\n"); - printf("Log Page Count: %ju\n", rn->log_page_count); + printf("Log Page Count: %ju\n", + (uintmax_t)letoh(rn->log_page_count)); printf("Log Page Type: "); - switch (rn->log_page_type) { + switch (letoh(rn->log_page_type)) { case 0: printf("Empty Log Page\n"); break; @@ -489,11 +486,11 @@ print_log_res_notification(const struct nvme_controller_data *cdata __unused, printf("Reservation Preempted\n"); break; default: - printf("Unknown %x\n", rn->log_page_type); + printf("Unknown %x\n", letoh(rn->log_page_type)); break; }; - printf("Number of Available Log Pages: %d\n", rn->available_log_pages); - printf("Namespace ID: 0x%x\n", rn->nsid); + printf("Number of Available Log Pages: %d\n", letoh(rn->available_log_pages)); + printf("Namespace ID: 0x%x\n", letoh(rn->nsid)); } static void