On Fri, May 29, Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx> wrote: > On 5/21/2015 9:56 AM, Or Gerlitz wrote: >> 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). > I'm just reviewing this now, and I haven't looked at the user side, but it > appears the CQE timestamp is available for all devices to support or not in > a generic manner. IE it is part of the extended CQ UAPI. But the task of > fetching the current timestamp value/mask seems to be device-specific. Steve, Since there are no kernel consumers at this point, the series only implemented the IB core kernel parts which are needed for proper usage @ user-space, namely: CQ creation with a time-stamping flag, and extension of the query device verb which returns the clock mask and frequency, etc. In user-space, applications would work against libibverbs, all standard. They would query the device, create their CQs, get the completion time-stamp from the CQE (ibv_wc) and the current clock sample from a new verb ibv_query_values_ex which was mentioned above, the user-space code is still in internal review, but here's a ref to early drop I posted here couple of days ago https://github.com/matanb10/libibverbs timestamp-v0 https://github.com/matanb10/libmlx4 timestamp-v0 > Shouldn't that also be a standard operation that devices can choose to > support or not? IE an application can generically setup a CQ and get > timestamps on CQEs, but it seems the application would have to have > device-specific code to get the current timestamp/mask. Perhaps I'm not > understanding the design? No, nothing device specific from the application POV see the ibv_query_values_ex introduction https://github.com/matanb10/libibverbs/commit/89c439e34ab234d5d58bd92804829a0aa6efb3ca -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html