RE: [PATCH rdma-next 2/3] RDMA: Handle PD allocations by IB/core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Subject: [PATCH rdma-next 2/3] RDMA: Handle PD allocations by IB/core
>
>From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
>
>The PD allocations in IB/core allows us to massively simplify drivers
>and their error flows in their .alloc_pd() paths. The changes in
>.alloc_pd() got 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.
>
>Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
>---

[...]

>-static struct ib_pd *i40iw_alloc_pd(struct ib_device *ibdev,
>-				    struct ib_ucontext *context,
>-				    struct ib_udata *udata)
>+static int i40iw_alloc_pd(struct ib_pd *pd, struct ib_ucontext *context,
>+			  struct ib_udata *udata)
> {
>-	struct i40iw_pd *iwpd;
>-	struct i40iw_device *iwdev = to_iwdev(ibdev);
>+	struct i40iw_pd *iwpd = container_of(pd, struct i40iw_pd, ibpd);

Nit: use to_iwpd(pd);

>+	struct i40iw_device *iwdev = to_iwdev(pd->device);
> 	struct i40iw_sc_dev *dev = &iwdev->sc_dev;
> 	struct i40iw_alloc_pd_resp uresp;
> 	struct i40iw_sc_pd *sc_pd;




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux