All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	RDMA mailing list
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Eitan Rabin <rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH rdma-next 0/2] Expose mlx5 core driver's clock information
Date: Tue, 16 Jan 2018 20:08:39 +0200	[thread overview]
Message-ID: <20180116180841.18976-1-leon@kernel.org> (raw)

>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

             reply	other threads:[~2018-01-16 18:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 18:08 Leon Romanovsky [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180116180841.18976-1-leon@kernel.org \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rabin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.