mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
RDMA: Handle PD allocations by IB/core
The PD allocations in IB/core allows us to simplify drivers and their error flows in their .alloc_pd() paths. The changes in .alloc_pd() go hand in had with relevant update in .dealloc_pd(). We will use this opportunity and convert .dealloc_pd() to don't fail, as it was suggested a long time ago, failures are not happening as we have never seen a WARN_ON print. Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
This commit is contained in:
parent
30471d4b20
commit
21a428a019
39 changed files with 325 additions and 409 deletions
|
|
@ -2385,10 +2385,9 @@ struct ib_device_ops {
|
|||
int (*dealloc_ucontext)(struct ib_ucontext *context);
|
||||
int (*mmap)(struct ib_ucontext *context, struct vm_area_struct *vma);
|
||||
void (*disassociate_ucontext)(struct ib_ucontext *ibcontext);
|
||||
struct ib_pd *(*alloc_pd)(struct ib_device *device,
|
||||
struct ib_ucontext *context,
|
||||
struct ib_udata *udata);
|
||||
int (*dealloc_pd)(struct ib_pd *pd);
|
||||
int (*alloc_pd)(struct ib_pd *pd, struct ib_ucontext *context,
|
||||
struct ib_udata *udata);
|
||||
void (*dealloc_pd)(struct ib_pd *pd);
|
||||
struct ib_ah *(*create_ah)(struct ib_pd *pd,
|
||||
struct rdma_ah_attr *ah_attr, u32 flags,
|
||||
struct ib_udata *udata);
|
||||
|
|
@ -2530,6 +2529,8 @@ struct ib_device_ops {
|
|||
*/
|
||||
int (*fill_res_entry)(struct sk_buff *msg,
|
||||
struct rdma_restrack_entry *entry);
|
||||
|
||||
DECLARE_RDMA_OBJ_SIZE(ib_pd);
|
||||
};
|
||||
|
||||
struct ib_device {
|
||||
|
|
|
|||
Loading…
Reference in a new issue