aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@mellanox.com>2016-08-28 04:28:44 -0400
committerDoug Ledford <dledford@redhat.com>2016-10-07 16:54:12 -0400
commit47adf2f4f5805d075359fe6cbe3437612f7d4a34 (patch)
tree71b115d2db3866eb8f708d77c14abc61c6a19fc2 /drivers/infiniband/core
parentccf20562601d2b911787ffa730ad96bb78269a9c (diff)
IB/uverbs: Expose RSS related capabilities
Query RSS related attributes and return them to user-space via the extended query device uverbs command. It includes both direct ones (i.e. struct ib_uverbs_rss_caps) and max_wq_type_rq which may be used in both RSS and non RSS flows. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index fe784a908817..19c1ebf596ad 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -4173,6 +4173,23 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
4173 4173
4174 resp.device_cap_flags_ex = attr.device_cap_flags; 4174 resp.device_cap_flags_ex = attr.device_cap_flags;
4175 resp.response_length += sizeof(resp.device_cap_flags_ex); 4175 resp.response_length += sizeof(resp.device_cap_flags_ex);
4176
4177 if (ucore->outlen < resp.response_length + sizeof(resp.rss_caps))
4178 goto end;
4179
4180 resp.rss_caps.supported_qpts = attr.rss_caps.supported_qpts;
4181 resp.rss_caps.max_rwq_indirection_tables =
4182 attr.rss_caps.max_rwq_indirection_tables;
4183 resp.rss_caps.max_rwq_indirection_table_size =
4184 attr.rss_caps.max_rwq_indirection_table_size;
4185
4186 resp.response_length += sizeof(resp.rss_caps);
4187
4188 if (ucore->outlen < resp.response_length + sizeof(resp.max_wq_type_rq))
4189 goto end;
4190
4191 resp.max_wq_type_rq = attr.max_wq_type_rq;
4192 resp.response_length += sizeof(resp.max_wq_type_rq);
4176end: 4193end:
4177 err = ib_copy_to_udata(ucore, &resp, resp.response_length); 4194 err = ib_copy_to_udata(ucore, &resp, resp.response_length);
4178 return err; 4195 return err;