]> err.no Git - linux-2.6/commitdiff
IB/uverbs: Return actual capacity from create SRQ operation
authorDotan Barak <dotanb@mellanox.co.il>
Thu, 23 Feb 2006 20:36:18 +0000 (12:36 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 20 Mar 2006 18:08:16 +0000 (10:08 -0800)
Pass actual capacity of created SRQ back to userspace, so that
userspace can report accurate capacities.  This requires an ABI bump,
to change struct ib_uverbs_create_srq_resp.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_user_verbs.h

index 38a66fbef36db593b4fc8161de42f9ed2c933b81..b157e5ff7dad216f98c0e50d3488bf4fffa3be1f 100644 (file)
@@ -1864,6 +1864,8 @@ retry:
                goto err_destroy;
 
        resp.srq_handle = uobj->uobject.id;
+       resp.max_wr     = attr.attr.max_wr;
+       resp.max_sge    = attr.attr.max_sge;
 
        if (copy_to_user((void __user *) (unsigned long) cmd.response,
                         &resp, sizeof resp)) {
index 3bf4402f466ac32dc4e1efb991bbed62abe14a80..338ed433306381c543aa963058804caddb48d7ed 100644 (file)
@@ -44,7 +44,7 @@
  * Increment this value if any changes that break userspace ABI
  * compatibility are made.
  */
-#define IB_USER_VERBS_ABI_VERSION      5
+#define IB_USER_VERBS_ABI_VERSION      6
 
 enum {
        IB_USER_VERBS_CMD_GET_CONTEXT,
@@ -605,6 +605,9 @@ struct ib_uverbs_create_srq {
 
 struct ib_uverbs_create_srq_resp {
        __u32 srq_handle;
+       __u32 max_wr;
+       __u32 max_sge;
+       __u32 reserved;
 };
 
 struct ib_uverbs_modify_srq {