ionic: Add PTP Hardware Clock (PHC) timestamping support#1724
Open
abhijitG-xlnx wants to merge 4 commits intolinux-rdma:masterfrom
Open
ionic: Add PTP Hardware Clock (PHC) timestamping support#1724abhijitG-xlnx wants to merge 4 commits intolinux-rdma:masterfrom
abhijitG-xlnx wants to merge 4 commits intolinux-rdma:masterfrom
Conversation
To commit: ("net: ionic: Add PHC state page for user space access").
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
map the PHC page to allow applications to access hardware timestamp information. Signed-off-by: Allen Hubbe <allen.hubbe@amd.com> Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Support IBV_WC_EX_WITH_COMPLETION_TIMESTAMP and IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK. Modify the polling path to extract timestamps from the CQE. For Send Queue completions, cache the timestamp in the request metadata (`sq_meta`) which allows the driver to propagate the correct hardware timestamp to all Work Completions covered by a coalesced (MSN) completion event. Update `start_poll` to process one completion at a time and store the current timestamp in the `vcq` context. This ensures that the `read_completion_ts` and `read_completion_wallclock_ns` accessors return the correct value for the specific Work Completion currently being inspected. Signed-off-by: Allen Hubbe <allen.hubbe@amd.com> Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Add a test for completion time stamp. Validate the wall clock time by opening the PTP hardware clock device node to read the current time and compare it to the wall clock completion time stamps. Expect that completion time stamps are within the past one second of the current PHC time at the end of the test. Signed-off-by: Allen Hubbe <allen.hubbe@amd.com> Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series adds PTP Hardware Clock (PHC) support to the ionic RDMA provider,
enabling applications to access hardware timestamps for send and receive
completions.
Key features:
IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK work completion flags
to work completions
coalesced completions