RE: [RFC PATCH v5 01/16] RDMA/irdma: Add driver framework definitions

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

 



> Subject: Re: [RFC PATCH v5 01/16] RDMA/irdma: Add driver framework
> definitions
> 
> On Tue, Apr 21, 2020 at 06:19:07PM +0000, Saleem, Shiraz wrote:
> > > Subject: Re: [RFC PATCH v5 01/16] RDMA/irdma: Add driver framework
> > > definitions
> > >
> > > On Tue, Apr 21, 2020 at 12:23:45AM +0000, Saleem, Shiraz wrote:
> > > > > Subject: Re: [RFC PATCH v5 01/16] RDMA/irdma: Add driver
> > > > > framework definitions
> > > > >
> > > > > On Fri, Apr 17, 2020 at 10:12:36AM -0700, Jeff Kirsher wrote:
> > > > > > From: Mustafa Ismail <mustafa.ismail@xxxxxxxxx>
> > > > > >
> > > > > > Register irdma as a virtbus driver capable of supporting
> > > > > > virtbus devices from multi-generation RDMA capable Intel HW.
> > > > > > Establish the interface with all supported netdev peer drivers and
> initialize HW.
> > > > > >
> > > > > > Signed-off-by: Mustafa Ismail <mustafa.ismail@xxxxxxxxx>
> > > > > > Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
> > > > > > drivers/infiniband/hw/irdma/i40iw_if.c | 228 ++++++++++
> > > > > > drivers/infiniband/hw/irdma/irdma_if.c | 449 ++++++++++++++++++
> > > > > >  drivers/infiniband/hw/irdma/main.c     | 573
> +++++++++++++++++++++++
> > > > > >  drivers/infiniband/hw/irdma/main.h     | 599
> > > +++++++++++++++++++++++++
> > > > > >  4 files changed, 1849 insertions(+)  create mode 100644
> > > > > > drivers/infiniband/hw/irdma/i40iw_if.c
> > > > > >  create mode 100644 drivers/infiniband/hw/irdma/irdma_if.c
> > > > > >  create mode 100644 drivers/infiniband/hw/irdma/main.c
> > > > > >  create mode 100644 drivers/infiniband/hw/irdma/main.h
> > > > > >
> > > > >
> > > > > I didn't look in too much details, but three things caught my
> > > > > attention
> > > immediately:
> > > > > 1. Existence of ARP cache management logic in RDMA driver.
> > > >
> > > > Our HW has an independent ARP table for the rdma block.
> > > > driver needs to add an ARP table entry via an rdma admin queue
> > > > command before QP transitions to RTS.
> > > >
> > > > > 2. Extensive use of dev_*() prints while we have ibdev_*()
> > > > > prints
> > > > The ib device object is not available till the end of the device
> > > > init similarly its unavailable early on in device deinit flows. So
> > > > dev_* is all we can use in those places.
> > >
> > > hns guys were thinking about changing this. It looks fine to just
> > > move the name assignment to the device allocation, then we don't
> > > have this weirdness
> >
> > Did you mean moving name setting from ib_register_device to ib_device_alloc?
> > Will that work ok for how rvt is handling the names in
> > rvt_set_ibdev_name and its register?
> 
> I don't see why not? rvt_set_ibdev_name is always directly after rvt_alloc_device,
> which is the thing that calls ib_alloc_device
> 
> > This could migrate a lot of the dev_* to ibdev_* but there is still
> > going to be a handful of dev_* usages from our HW initialization in
> > irdma_prob_dev since ib device allocation is done in irdma_open.
> 
> Don't do that?

we have a split initialization design for gen2 and future products.
phase1 is control path resource initialization in irdma_probe_dev
and phase-2 is the rest of the resources with the ib registration
at the end of irdma_open. irdma_close must de-register the ib device
which will take care of ibdev free too. So it makes sense to keep
allocation of the ib device in irdma_open.

Is it so bad to use dev_* prints for a few of those init stuff in
irdma_probe_dev when ib device is unavailable? Isnt that what all drivers
are expected to do? similar to the rule of using dev_* when struct device
object is available, otherwise pr_*

> 
> > > Alternatively, you could do as netdev does and have a special name
> > > string when the name is NULL
> >
> > Not sure I found what your referring to.
> > Did you mean similar to use of netdev_name in __netdev_printk?
> 
> Yes
 
OK. Thanks!



[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