diff options
author | Matan Barak <matanb@mellanox.com> | 2016-02-29 18:05:29 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-01 11:18:53 -0500 |
commit | b2a239df4e65fe35240ddf3e5f9f31335c90589b (patch) | |
tree | de805a91e124ad7beb7f28d3bbab0f947473c80d /drivers/infiniband/core/uverbs_cmd.c | |
parent | a606b0f6691daf861482f8b77326f672238ffbfd (diff) | |
download | blackbird-obmc-linux-b2a239df4e65fe35240ddf3e5f9f31335c90589b.tar.gz blackbird-obmc-linux-b2a239df4e65fe35240ddf3e5f9f31335c90589b.zip |
IB/core: Add vendor's specific data to alloc mw
Passing udata to the vendor's driver in order to pass data from the
user-space driver to the kernel-space driver. This data will be
used in downstream patches.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 6ffc9c4e93af..2bf751ecad15 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -1174,6 +1174,7 @@ ssize_t ib_uverbs_alloc_mw(struct ib_uverbs_file *file, struct ib_uobject *uobj; struct ib_pd *pd; struct ib_mw *mw; + struct ib_udata udata; int ret; if (out_len < sizeof(resp)) @@ -1195,7 +1196,12 @@ ssize_t ib_uverbs_alloc_mw(struct ib_uverbs_file *file, goto err_free; } - mw = pd->device->alloc_mw(pd, cmd.mw_type); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long)cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); + + mw = pd->device->alloc_mw(pd, cmd.mw_type, &udata); if (IS_ERR(mw)) { ret = PTR_ERR(mw); goto err_put; |