Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

Jason Gunthorpe
2015-05-28T16:24:16Z

On Thu, May 28, 2015 at 09:13:41AM -0500, Christoph Lameter wrote:
> What we have to do without this is to use RDTSC to get a timestamp but the
> packet reception / sending time then is inaccurate due to the instructions that
> have to be executed before and after. And there is additional overhead due
> to that processing.

After a quick look through, the biggest question in my mind is what
should the timestamp value in the wc be?

Right now it is some coded thing in clock cycles.

Should we require the driver to convert to ns before passing the wc
back to the app? (Looks like the socket implementation uniformly uses
us or ns)

Should the app open code the conversion from clock cycles to ns, or
vfunc down to the driver?

Is the coding going to be OK for multiple HW vendors?

These questions effect what the UAPI should be, if the answer is 'use
ns everwhere' then some of this stuff being added does not belong in
the general API.

Jason