Re: [PATCH for-next V1 00/11] Add completion timestamping support

Or Gerlitz
2015-05-23T04:23:31Z

On Thu, May 21, 2015 at 5:56 PM, Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
[...]
> In mlx4, allowing the user to read the core clock efficiently involves mapping
> this area of the hardware to user-space (being done by using a mmap command)
> and reading the clock from the correct offset of the page.
>
> This offset is returned in the vendor's specific data from mlx4's kernel driver
> to the mlx4's user-space driver. query_device is modified in order to support
> passing this vendor specific data. A user-space application could use a new
> verb in order to read the hardware's clock.
>
> Translating the hardware's clock into ms could be done by dividing this
> value by hca_core_clock (which is returned by the extended version of
> query_device uverb).
>
> A user-space application could get the current HW's clock by executing
>
> ibv_query_values_ex(struct ibv_context *context, uint32_t q_values,
> struct ibv_values_ex *values)
>
> The function gets a mask of the values to query and return their values.
> Vendors could either implement this as a uverb command or use their
> user-space driver to return those values directly from the HW (the mlx4 way).
>
> Changes from V0:
> (1) Pass ib_cq_init_attr instead of cqe and comp_vector.
> (2) Fix unneeded indentation.
> (3) Change flags to u32.
> (4) Add const to create_cq's ib_cq_init_attr argument in vendor implementation.

Hi Doug,

I believe the V1 post addressed all the reviewer comments on V0 except
for one open issue.

What's still open is the debate on mlx4 using the uverbs builtin udata
mechanism to transfer the clock offset in the mmaped page to user
space. I have replied there and still waiting get a response.

Or.

> Matan Barak (11):
> IB/core: Change provider's API of create_cq to be extendible
> IB/core: Change ib_create_cq to use struct ib_cq_init_attr
> IB/core: Add CQ creation time-stamping flag
> IB/core: Extend ib_uverbs_create_cq
> IB/core: Add timestamp_mask and hca_core_clock to query_device
> IB/core: Pass hardware specific data in query_device
> IB/mlx4: Add mmap call to map the hardware clock
> IB/mlx4: Support extended create_cq and query_device uverbs
> IB/mlx4: Add support for timestamp in cq creation
> IB/mlx4: Add timestamp_mask and hca_core_clock to query_device
> IB/mlx4: Return hca core clock's offset in query_device vendor's data