IB/core: Add timestamp_mask and hca_core_clock to query_device
authorMatan Barak <matanb@mellanox.com>
Thu, 11 Jun 2015 13:35:24 +0000 (16:35 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 12 Jun 2015 18:49:10 +0000 (14:49 -0400)
commit24306dc66149020c59a07b64e2a325af59ee7d10
tree64674f4a705bddddf4902f10381eaf5817caa825
parent565197dd8fb1354509fa983658b54d63a2ecc5d6
IB/core: Add timestamp_mask and hca_core_clock to query_device

In order to expose timestamp we need to expose two new attributes in
query_device to be used for CQ completion time-stamping:

timestamp_mask - how many bits are valid in the timestamp, where timestamp
values could be 64bits the most.

hca_core_clock - timestamp is given in HW cycles, the frequency in KHZ units
of the HCA, necessary in order to convert cycles to seconds.

This is added both to ib_query_device and its respective uverbs counterpart.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/device.c
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h
include/uapi/rdma/ib_user_verbs.h