diff options
author | Majd Dibbiny <majd@mellanox.com> | 2016-04-17 16:19:34 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-05-14 01:40:27 +0200 |
commit | 0b24e5ac93c2d0792ba8604e9f64e0b564d5f23e (patch) | |
tree | 0e793fd248056bf1b2038ad63da2b775f03f1136 /drivers/infiniband | |
parent | i40iw: pass hw_stats by reference rather than by value (diff) | |
download | linux-0b24e5ac93c2d0792ba8604e9f64e0b564d5f23e.tar.xz linux-0b24e5ac93c2d0792ba8604e9f64e0b564d5f23e.zip |
IB/core: Add extended device capability flags
Since all the uverbs device_cap_flags are occupied, we need a place to
expose more device capabilities.
This patch adds a new 64 bit device_cap_flags_ex to expose new
device capabilities.
The lower 32 bits will be identical to the original device_cap_flags,
The upper 32 bits will be new capabilities.
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 6fdc7ecdaca0..9acb84983bd9 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -3655,6 +3655,11 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file, resp.hca_core_clock = attr.hca_core_clock; resp.response_length += sizeof(resp.hca_core_clock); + if (ucore->outlen < resp.response_length + sizeof(resp.device_cap_flags_ex)) + goto end; + + resp.device_cap_flags_ex = attr.device_cap_flags; + resp.response_length += sizeof(resp.device_cap_flags_ex); end: err = ib_copy_to_udata(ucore, &resp, resp.response_length); return err; |