Skip to content

ocp: Fix OCP telemetry timestamp field decode - #4226

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
SanDisk-Open-Source:timestamp-decode-fix
Oct 19, 2026
Merged

igaw merged 1 commit into
linux-nvme:masterfrom
SanDisk-Open-Source:timestamp-decode-fix

Conversation

@jeff-lien-sndk

Copy link
Copy Markdown
Contributor

The decoded timestamp value is incorrect because bytes 6 and 7 of the timestamp field used for timestamp attributes are not masked off.

test: cover OCP telemetry timestamp attributes

Added test with non-zero values in timestamp bytes 6 and 7 to verify change.

Reviewed-by: Brandon Paupore brandon.paupore@sandisk.com

The decoded timestamp value is incorrect because bytes 6 and 7
of the timestamp field used for timestamp attributes are not
masked off.

test: cover OCP telemetry timestamp attributes

Added test with non-zero values in timestamp bytes
6 and 7 to verify change.

Signed-off-by: Jeff Lien <jeff.lien@sandisk.com>
Reviewed-by: Brandon Paupore <brandon.paupore@sandisk.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix matches the timestamp layout and includes regression coverage for the reported error.

No open issues 🎉

What changed in this PR

Fixes OCP telemetry timestamp decoding by excluding the two attribute bytes from the timestamp value.

Changes:

  • Decodes the timestamp as a 48-bit value.
  • Adds regression coverage with nonzero attribute bytes and an expected formatted timestamp.
File Description
tests/​cli/​ocp/​ocp_internal_log_mock_test.py Adds timestamp attribute regression coverage.
src/​field-parser.c Extracts the timestamp without attribute bytes.

Review effort: Balanced

@igaw
igaw merged commit 108842e into linux-nvme:master Oct 19, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants