Make XRQ capabilities available via ibv_query_device() verb.
Unified · Split
| @@ -3868,6 +3868,16 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, · 3867 unmodified lines | ||
| 3868 | 3868 | |
| 3869 | 3869 | resp.raw_packet_caps = attr.raw_packet_caps; |
| 3870 | 3870 | 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); | |
| 3871 | 3881 | end: |
| 3872 | 3882 | err = ib_copy_to_udata(ucore, &resp, resp.response_length); |
| 3873 | 3883 | return err; |
| @@ -236,6 +236,20 @@ struct ib_uverbs_rss_caps { · 235 unmodified lines | ||
| 236 | 236 | __u32 reserved; |
| 237 | 237 | }; |
| 238 | 238 | |
| 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 | + | |
| 239 | 253 | struct ib_uverbs_ex_query_device_resp { |
| 240 | 254 | struct ib_uverbs_query_device_resp base; |
| 241 | 255 | __u32 comp_mask; |
| @@ -247,6 +261,7 @@ struct ib_uverbs_ex_query_device_resp { · 5 unmodified lines | ||
| 247 | 261 | struct ib_uverbs_rss_caps rss_caps; |
| 248 | 262 | __u32 max_wq_type_rq; |
| 249 | 263 | __u32 raw_packet_caps; |
| 264 | + struct ib_uverbs_tm_caps xrq_caps; | |
| 250 | 265 | }; |
| 251 | 266 | |
| 252 | 267 | struct ib_uverbs_query_port { |