History

IB/uverbs: Expose XRQ capabilities

Make XRQ capabilities available via ibv_query_device() verb.

Artemy Kovalyov committed 9 years ago

Commit 8d505051 parent 38eb44f2 files · +25 −0Browse files

Unified · Split

2 files
  1. drivers/infiniband/core/uverbs_cmd.c +10 −0
  2. include/uapi/rdma/ib_user_verbs.h +15 −0
drivers/infiniband/core/uverbs_cmd.c+10−0
@@ -3868,6 +3868,16 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, · 3867 unmodified lines
38683868
38693869 resp.raw_packet_caps = attr.raw_packet_caps;
38703870 resp.response_length += sizeof(resp.raw_packet_caps);
3871+
3872+ if (ucore->outlen < resp.response_length + sizeof(resp.xrq_caps))
3873+ goto end;
3874+
3875+ resp.xrq_caps.max_rndv_hdr_size = attr.xrq_caps.max_rndv_hdr_size;
3876+ resp.xrq_caps.max_num_tags = attr.xrq_caps.max_num_tags;
3877+ resp.xrq_caps.max_ops = attr.xrq_caps.max_ops;
3878+ resp.xrq_caps.max_sge = attr.xrq_caps.max_sge;
3879+ resp.xrq_caps.flags = attr.xrq_caps.flags;
3880+ resp.response_length += sizeof(resp.xrq_caps);
38713881 end:
38723882 err = ib_copy_to_udata(ucore, &resp, resp.response_length);
38733883 return err;
include/uapi/rdma/ib_user_verbs.h+15−0
@@ -236,6 +236,20 @@ struct ib_uverbs_rss_caps { · 235 unmodified lines
236236 __u32 reserved;
237237 };
238238
239+struct ib_uverbs_tm_caps {
240+ /* Max size of rendezvous request message */
241+ __u32 max_rndv_hdr_size;
242+ /* Max number of entries in tag matching list */
243+ __u32 max_num_tags;
244+ /* TM flags */
245+ __u32 flags;
246+ /* Max number of outstanding list operations */
247+ __u32 max_ops;
248+ /* Max number of SGE in tag matching entry */
249+ __u32 max_sge;
250+ __u32 reserved;
251+};
252+
239253 struct ib_uverbs_ex_query_device_resp {
240254 struct ib_uverbs_query_device_resp base;
241255 __u32 comp_mask;
@@ -247,6 +261,7 @@ struct ib_uverbs_ex_query_device_resp { · 5 unmodified lines
247261 struct ib_uverbs_rss_caps rss_caps;
248262 __u32 max_wq_type_rq;
249263 __u32 raw_packet_caps;
264+ struct ib_uverbs_tm_caps xrq_caps;
250265 };
251266
252267 struct ib_uverbs_query_port {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t