Skip to content

ionic: Add PTP Hardware Clock (PHC) timestamping support#1724

Open
abhijitG-xlnx wants to merge 4 commits intolinux-rdma:masterfrom
abhijitG-xlnx:phc
Open

ionic: Add PTP Hardware Clock (PHC) timestamping support#1724
abhijitG-xlnx wants to merge 4 commits intolinux-rdma:masterfrom
abhijitG-xlnx:phc

Conversation

@abhijitG-xlnx
Copy link
Copy Markdown
Contributor

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:

  • Maps the PHC state page to user space for hardware timestamp access
  • Reserves CQE bytes to accommodate timestamp data in the completion queue entry
  • Implements IBV_WC_EX_WITH_COMPLETION_TIMESTAMP and
    IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK work completion flags
  • Extends the polling path to extract and propagate timestamps from CQEs
    to work completions
  • Caches SQ completion timestamps in request metadata (sq_meta) to support
    coalesced completions
  • Includes comprehensive test coverage for PHC timestamp validation

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>
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.

1 participant