diff options
author | Artemy Kovalyov <artemyko@mellanox.com> | 2017-08-17 15:52:08 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-29 15:30:18 +0300 |
commit | 8d50505ada728258fcdce99120b937ce68298c4e (patch) | |
tree | d6adbad9b8a5b3881ff783193033c95df84dcbdb /drivers/infiniband | |
parent | 38eb44fac71729fabdef71166e72bee5964c10d6 (diff) | |
download | linux-8d50505ada728258fcdce99120b937ce68298c4e.tar.xz |
IB/uverbs: Expose XRQ capabilities
Make XRQ capabilities available via ibv_query_device() verb.
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: Yossi Itigin <yosefe@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index e69038a07fa0..e0cb99860934 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -3868,6 +3868,16 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, resp.raw_packet_caps = attr.raw_packet_caps; resp.response_length += sizeof(resp.raw_packet_caps); + + if (ucore->outlen < resp.response_length + sizeof(resp.xrq_caps)) + goto end; + + resp.xrq_caps.max_rndv_hdr_size = attr.xrq_caps.max_rndv_hdr_size; + resp.xrq_caps.max_num_tags = attr.xrq_caps.max_num_tags; + resp.xrq_caps.max_ops = attr.xrq_caps.max_ops; + resp.xrq_caps.max_sge = attr.xrq_caps.max_sge; + resp.xrq_caps.flags = attr.xrq_caps.flags; + resp.response_length += sizeof(resp.xrq_caps); end: err = ib_copy_to_udata(ucore, &resp, resp.response_length); return err; |