summaryrefslogtreecommitdiff
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-04-03 16:42:42 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-04-08 13:05:25 -0300
commitd345691471b426e540140a4cc431c69f80abfcb6 (patch)
treedca8646f9894d3e3c0cd443427b5e1a2becd4185 /include/rdma/ib_verbs.h
parentf6316032fd3243d3544603d94f237b976f90bb73 (diff)
RDMA: Handle AH allocations by IB/core
Simplify drivers by ensuring lifetime of ib_ah object. The changes in .create_ah() go hand in hand with relevant update in .destroy_ah(). We will use this opportunity and convert .destroy_ah() to don't fail, as it was suggested a long time ago, because there is nothing to do in case of failure during destroy. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 7e965bc06477..3232a84c4fdb 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2401,12 +2401,11 @@ struct ib_device_ops {
void (*disassociate_ucontext)(struct ib_ucontext *ibcontext);
int (*alloc_pd)(struct ib_pd *pd, struct ib_udata *udata);
void (*dealloc_pd)(struct ib_pd *pd, struct ib_udata *udata);
- struct ib_ah *(*create_ah)(struct ib_pd *pd,
- struct rdma_ah_attr *ah_attr, u32 flags,
- struct ib_udata *udata);
+ int (*create_ah)(struct ib_ah *ah, struct rdma_ah_attr *ah_attr,
+ u32 flags, struct ib_udata *udata);
int (*modify_ah)(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
int (*query_ah)(struct ib_ah *ah, struct rdma_ah_attr *ah_attr);
- int (*destroy_ah)(struct ib_ah *ah, u32 flags, struct ib_udata *udata);
+ void (*destroy_ah)(struct ib_ah *ah, u32 flags);
struct ib_srq *(*create_srq)(struct ib_pd *pd,
struct ib_srq_init_attr *srq_init_attr,
struct ib_udata *udata);
@@ -2552,6 +2551,7 @@ struct ib_device_ops {
*/
void (*dealloc_driver)(struct ib_device *dev);
+ DECLARE_RDMA_OBJ_SIZE(ib_ah);
DECLARE_RDMA_OBJ_SIZE(ib_pd);
DECLARE_RDMA_OBJ_SIZE(ib_ucontext);
};