mirror of
https://github.com/torvalds/linux
synced 2024-09-20 19:17:24 +00:00
IB/uverbs: Allow resize CQ operation to return driver-specific data
Add a ib_uverbs_resize_cq_resp.driver_data field so that low-level drivers can return data from a resize CQ operation to userspace. Have ib_uverbs_resize_cq() only copy the cqe field, to avoid having to bump the userspace ABI. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
fab97220c9
commit
64f817ba98
|
@ -879,11 +879,10 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
memset(&resp, 0, sizeof resp);
|
|
||||||
resp.cqe = cq->cqe;
|
resp.cqe = cq->cqe;
|
||||||
|
|
||||||
if (copy_to_user((void __user *) (unsigned long) cmd.response,
|
if (copy_to_user((void __user *) (unsigned long) cmd.response,
|
||||||
&resp, sizeof resp))
|
&resp, sizeof resp.cqe))
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
|
@ -275,6 +275,8 @@ struct ib_uverbs_resize_cq {
|
||||||
|
|
||||||
struct ib_uverbs_resize_cq_resp {
|
struct ib_uverbs_resize_cq_resp {
|
||||||
__u32 cqe;
|
__u32 cqe;
|
||||||
|
__u32 reserved;
|
||||||
|
__u64 driver_data[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ib_uverbs_poll_cq {
|
struct ib_uverbs_poll_cq {
|
||||||
|
|
Loading…
Reference in a new issue