diff options
author | Noa Osherovich <noaos@mellanox.com> | 2017-01-18 15:39:58 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-14 11:41:12 -0500 |
commit | 5f23d4265f8ee4d7b76356992931abec7888d372 (patch) | |
tree | 5ea52e6240e4a99d362fd4ed7de46c292e67a353 /drivers/infiniband/core | |
parent | 27b0df1175d543c46f63de6dccba98d0e5cf2276 (diff) | |
download | op-kernel-dev-5f23d4265f8ee4d7b76356992931abec7888d372.zip op-kernel-dev-5f23d4265f8ee4d7b76356992931abec7888d372.tar.gz |
IB/uverbs: Expose vlan offloads capabilities
Expose raw packet capabilities to user space as part of query device.
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 0834dce..e4ae0c6 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -4354,6 +4354,12 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, resp.max_wq_type_rq = attr.max_wq_type_rq; resp.response_length += sizeof(resp.max_wq_type_rq); + + if (ucore->outlen < resp.response_length + sizeof(resp.raw_packet_caps)) + goto end; + + resp.raw_packet_caps = attr.raw_packet_caps; + resp.response_length += sizeof(resp.raw_packet_caps); end: err = ib_copy_to_udata(ucore, &resp, resp.response_length); return err; |