Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ON-15689: use public accessor macros to read ef_vi tx ts data #15

Merged
merged 2 commits into from
May 31, 2024

Conversation

abower-amd
Copy link
Collaborator

Fixes problem whereby TCPDirect treated the bottom two bits of the timestamp nanosecond part as sync flags when these have now moved to a separate field in the event structure.

@abower-amd abower-amd requested a review from a team as a code owner May 25, 2024 15:44
@jfeather-amd
Copy link
Contributor

This looks like a reasonable change, but I wonder if we might want to update the timestamping unit test to also include things like flags and make sure they're set. Perhaps these could be set to i & 3 for the sake of expected_report/check_report?

Copy link
Contributor

@jfeather-amd jfeather-amd left a comment

Choose a reason for hiding this comment

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

Previous comment was supposed to be an approval - forgot to change the selected button! I'm currently looking at the tests that aren't too consistent and found that this patch seems to fix the txtimestamping tests too, although it requires the following (quick fix) to resolve a build error:

diff --git a/src/tests/zf_unit/zftimestamping.c b/src/tests/zf_unit/zftimestamping.c
index fd3bfa22..e7ced36e 100644
--- a/src/tests/zf_unit/zftimestamping.c
+++ b/src/tests/zf_unit/zftimestamping.c
@@ -83,6 +83,7 @@ static void tx_report_batch(struct zf_tx_reports::queue* reports, int capacity,
         ev.tx_timestamp.type = EF_EVENT_TYPE_TX_WITH_TIMESTAMP;
         ev.tx_timestamp.ts_sec = r.timestamp.tv_sec;
         ev.tx_timestamp.ts_nsec = r.timestamp.tv_nsec;
+        ev.tx_timestamp.ts_flags = 0;
         zf_tx_reports::complete(reports, z/2, z%2, &ev);
       }
     }

I imagine this didn't come up in testing as this test is hidden away in make test_jenkins, as I'm in the area I'd be happy to add the suggested testing I mention in my previous comment - although I think it'd be best to make sure this compiles with make test_jenkins too!

Suggested-by: Josh Featherstone <Josh.Featherstone@amd.com>
Fixes problem whereby TCPDirect treated the bottom two bits of the
timestamp nanosecond part as sync flags when these have now moved to
a separate field in the event structure.
@abower-amd abower-amd force-pushed the reviews/abower/ON-15689-fix-tx-event-access branch from 5a5f833 to 52de0c7 Compare May 31, 2024 11:15
@abower-amd abower-amd merged commit 52de0c7 into master May 31, 2024
2 checks passed
@abower-amd abower-amd deleted the reviews/abower/ON-15689-fix-tx-event-access branch May 31, 2024 11:18
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.

2 participants