linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next 0/2] Expose mlx5 core driver's clock information
@ 2018-01-16 18:08 Leon Romanovsky
       [not found] ` <20180116180841.18976-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2018-01-16 18:08 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Alex Vesker, Eitan Rabin,
	Feras Daoud, Yishai Hadas

>From Feras:

This series adds the ability to query mlx5 core clock info from userspace
applications. This will allow userspace applications to translate timestamps
from HCA core clock units to nanoseconds using the latest clock info.

The first patch creates a new clock info page, which will be updated in
the kernel only, and the second patch maps the page to userspace.

In order to read the clock info correctly, a sequence number is incremented
at the beginning and end of each update. An odd number means the data is
being updated while an even means the access was already done.

To ensure correctness, the user will:

repeat:
        seq1 = <read sequence>
        goto <repeate> while odd
        <read data structure>
        seq2 = <read sequence>
        if seq1 != seq2 goto repeat

Thanks

Feras Daoud (2):
  net/mlx5e: Add clock info page to mlx5 core devices
  IB/mlx5: Mmap the HCA's clock info to user-space

 drivers/infiniband/hw/mlx5/main.c                  | 44 ++++++++++++++++-
 drivers/infiniband/hw/mlx5/mlx5_ib.h               | 10 ----
 .../net/ethernet/mellanox/mlx5/core/lib/clock.c    | 55 ++++++++++++++++++++++
 include/linux/mlx5/driver.h                        |  3 ++
 include/uapi/rdma/mlx5-abi.h                       | 34 ++++++++++++-
 5 files changed, 133 insertions(+), 13 deletions(-)

--
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-17 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 18:08 [PATCH rdma-next 0/2] Expose mlx5 core driver's clock information Leon Romanovsky
     [not found] ` <20180116180841.18976-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2018-01-16 18:08   ` [PATCH rdma-next 1/2] net/mlx5e: Add clock info page to mlx5 core devices Leon Romanovsky
2018-01-16 18:08   ` [PATCH rdma-next 2/2] IB/mlx5: Mmap the HCA's clock info to user-space Leon Romanovsky
2018-01-17 21:16   ` [PATCH rdma-next 0/2] Expose mlx5 core driver's clock information Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).