RE: [PATCH rdma-next 1/7] RDMA: Rename port_callback to port_init

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

 




> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxx>
> Sent: Friday, January 11, 2019 5:45 PM
> To: Leon Romanovsky <leon@xxxxxxxxxx>
> Cc: Doug Ledford <dledford@xxxxxxxxxx>; Leon Romanovsky
> <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-rdma@xxxxxxxxxxxxxxx>;
> Parav Pandit <parav@xxxxxxxxxxxx>
> Subject: Re: [PATCH rdma-next 1/7] RDMA: Rename port_callback to
> port_init
> 
> On Tue, Dec 18, 2018 at 02:28:30PM +0200, Leon Romanovsky wrote:
> > From: Parav Pandit <parav@xxxxxxxxxxxx>
> >
> > Most provider routines are callback routines which ib core invokes.
> > _callback suffix doesn't convey information about when such callback
> > is invoked. Therefore, rename port_callback to port_init.
> >
> > Additionally, store the port_init function pointer to ib_device, so
> > that it can be checked in subsequent patch when binding rdma device to
> > net namespace. Currently devices which exposes their own port specific
> > files cannot be bind to net namespace. Once infrastructure is built to
> > init and uninit the ports, this limitation will be removed.
> >
> > Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> > ---
> 
> I've been meaning to do this for a while, applied to for-next thanks
> 
> > diff --git a/drivers/infiniband/hw/qib/qib_verbs.c
> > b/drivers/infiniband/hw/qib/qib_verbs.c
> > index 611a6b5ef83f..669b25496a9f 100644
> > --- a/drivers/infiniband/hw/qib/qib_verbs.c
> > +++ b/drivers/infiniband/hw/qib/qib_verbs.c
> > @@ -1496,6 +1496,7 @@ static void qib_fill_device_attr(struct
> > qib_devdata *dd)  static const struct ib_device_ops qib_dev_ops = {
> >  	.modify_device = qib_modify_device,
> >  	.process_mad = qib_process_mad,
> > +	.port_init = qib_create_port_files,
> 
> These lists should be kept sorted, I fixed it
> 
I noticed that I did this method as object_method(); while rest of the function pointers are method_object().
So it should be dev ops name should be init_port() to be consistent with rest of them.

Please let me know if I should send the patch or you are changing it since you already applied this patch.

> Jason




[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