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

Clock info #284

Merged
merged 5 commits into from
Jan 23, 2018
Merged

Clock info #284

merged 5 commits into from
Jan 23, 2018

Conversation

yishaih
Copy link
Member

@yishaih yishaih commented Jan 17, 2018

This series adds the ability to query mlx5 core clock info and translates timestamps from HCA core clock units to nanoseconds using the clock info.

The supplementary kernel part was sent upstream for 4.16.

@jgunthorpe
Copy link
Member

The travis failure is checkpatch and looks ignorable to me

This patch maps the kernel driver's clock info page to userspace.
With this, users will be able to read the clock info directly from
the shared page without any system calls.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Eitan Rabin <rabin@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Allow retrieving the current clock info with a direct verb.
This allows DV consumers to directly cache and control the safely copied
version of the clock data. A C11 atomic is used to ensure the copy of
the kernel data is done atomically.

A new mlx5dv attribute "max_clock_info_update_nsec" was added to
indicate the maximum period that the user can correctly use the cached
clock info, it can be retrieved by using the mlx5dv_query_device API.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Eitan Rabin <rabin@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Add a direct verb that translates device timestamps from HCA
core clock units to nanoseconds using the device clock info.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Eitan Rabin <rabin@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
…econds

Add support to read completion timestamp and convert it from
HCA clock units to wallclock nanoseconds.

This commit revises the documentation for ibv_wc_read_completion_ts
to clarify the return value time units.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Eitan Rabin <rabin@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Implement the read_completion_wallclock_ns CQ reader.
This internally fetches the clock page and converts the device timestamp
using the existing DV api.

The commit also revises mlx5_cq_fill_pfns return value.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Eitan Rabin <rabin@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
@yishaih yishaih merged commit ff575a1 into linux-rdma:master Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants