2022-07-25 12:22:22

by Leon Romanovsky

[permalink] [raw]
Subject: Re: [PATCH 2/2] RDMA/bnxt_re: Use auxiliary driver interface

On Sun, Jul 24, 2022 at 04:14:58PM -0700, Ajit Khaparde wrote:
> Use auxiliary driver interface for driver load, unload ROCE driver.
> The driver does not need to register the interface using the netdev
> notifier anymore. Removed the bnxt_re_dev_list which is not needed.
> Currently probe, remove and shutdown ops have been implemented for
> the auxiliary device.
>
> BUG: DCSG01157556
> Change-Id: Ice54f076c1c4fc26d4ee7e77a5dcd1ca21cf4cd0

Please remove the lines above.

> Signed-off-by: Ajit Khaparde <[email protected]>
> ---
> drivers/infiniband/hw/bnxt_re/bnxt_re.h | 9 +-
> drivers/infiniband/hw/bnxt_re/main.c | 405 +++++++-----------
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 64 ---
> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 65 +++
> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 3 +
> 5 files changed, 232 insertions(+), 314 deletions(-)

<...>

> +static DEFINE_IDA(bnxt_aux_dev_ids);
> +
> static int bnxt_register_dev(struct bnxt_en_dev *edev, unsigned int ulp_id,
> struct bnxt_ulp_ops *ulp_ops, void *handle)

I would expect that almost all code in bnxt_ulp.c will go after this change.

Thanks

2022-07-26 05:11:54

by Ajit Khaparde

[permalink] [raw]
Subject: Re: [PATCH 2/2] RDMA/bnxt_re: Use auxiliary driver interface

On Mon, Jul 25, 2022 at 5:15 AM Leon Romanovsky <[email protected]> wrote:
>
> On Sun, Jul 24, 2022 at 04:14:58PM -0700, Ajit Khaparde wrote:
> > Use auxiliary driver interface for driver load, unload ROCE driver.
> > The driver does not need to register the interface using the netdev
> > notifier anymore. Removed the bnxt_re_dev_list which is not needed.
> > Currently probe, remove and shutdown ops have been implemented for
> > the auxiliary device.
> >
> > BUG: DCSG01157556
> > Change-Id: Ice54f076c1c4fc26d4ee7e77a5dcd1ca21cf4cd0
>
> Please remove the lines above.
Apologies for missing that.

>
> > Signed-off-by: Ajit Khaparde <[email protected]>
> > ---
> > drivers/infiniband/hw/bnxt_re/bnxt_re.h | 9 +-
> > drivers/infiniband/hw/bnxt_re/main.c | 405 +++++++-----------
> > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 64 ---
> > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 65 +++
> > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 3 +
> > 5 files changed, 232 insertions(+), 314 deletions(-)
>
> <...>
>
> > +static DEFINE_IDA(bnxt_aux_dev_ids);
> > +
> > static int bnxt_register_dev(struct bnxt_en_dev *edev, unsigned int ulp_id,
> > struct bnxt_ulp_ops *ulp_ops, void *handle)
>
> I would expect that almost all code in bnxt_ulp.c will go after this change.
I agree. My plan was to get these QA tested, initial Aux Bus changes
in this release with a follow on series to clean this up further.
Does that sound reasonable?
Thanks for the feedback.

Thanks
Ajit

>
> Thanks


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature

2022-07-26 06:18:26

by Leon Romanovsky

[permalink] [raw]
Subject: Re: [PATCH 2/2] RDMA/bnxt_re: Use auxiliary driver interface

On Mon, Jul 25, 2022 at 09:58:30PM -0700, Ajit Khaparde wrote:
> On Mon, Jul 25, 2022 at 5:15 AM Leon Romanovsky <[email protected]> wrote:
> >
> > On Sun, Jul 24, 2022 at 04:14:58PM -0700, Ajit Khaparde wrote:
> > > Use auxiliary driver interface for driver load, unload ROCE driver.
> > > The driver does not need to register the interface using the netdev
> > > notifier anymore. Removed the bnxt_re_dev_list which is not needed.
> > > Currently probe, remove and shutdown ops have been implemented for
> > > the auxiliary device.
> > >
> > > BUG: DCSG01157556
> > > Change-Id: Ice54f076c1c4fc26d4ee7e77a5dcd1ca21cf4cd0
> >
> > Please remove the lines above.
> Apologies for missing that.
>
> >
> > > Signed-off-by: Ajit Khaparde <[email protected]>
> > > ---
> > > drivers/infiniband/hw/bnxt_re/bnxt_re.h | 9 +-
> > > drivers/infiniband/hw/bnxt_re/main.c | 405 +++++++-----------
> > > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 64 ---
> > > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 65 +++
> > > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 3 +
> > > 5 files changed, 232 insertions(+), 314 deletions(-)
> >
> > <...>
> >
> > > +static DEFINE_IDA(bnxt_aux_dev_ids);
> > > +
> > > static int bnxt_register_dev(struct bnxt_en_dev *edev, unsigned int ulp_id,
> > > struct bnxt_ulp_ops *ulp_ops, void *handle)
> >
> > I would expect that almost all code in bnxt_ulp.c will go after this change.
> I agree. My plan was to get these QA tested, initial Aux Bus changes
> in this release with a follow on series to clean this up further.
> Does that sound reasonable?

No, please prepare complete series and we will review it.
There is much harder to do it when the change is partial.

Thanks

> Thanks for the feedback.
>
> Thanks
> Ajit
>
> >
> > Thanks


2022-07-26 14:38:48

by Ajit Khaparde

[permalink] [raw]
Subject: Re: [PATCH 2/2] RDMA/bnxt_re: Use auxiliary driver interface

On Mon, Jul 25, 2022 at 10:36 PM Leon Romanovsky <[email protected]> wrote:
>
> On Mon, Jul 25, 2022 at 09:58:30PM -0700, Ajit Khaparde wrote:
> > On Mon, Jul 25, 2022 at 5:15 AM Leon Romanovsky <[email protected]> wrote:
> > >
> > > On Sun, Jul 24, 2022 at 04:14:58PM -0700, Ajit Khaparde wrote:
> > > > Use auxiliary driver interface for driver load, unload ROCE driver.
> > > > The driver does not need to register the interface using the netdev
> > > > notifier anymore. Removed the bnxt_re_dev_list which is not needed.
> > > > Currently probe, remove and shutdown ops have been implemented for
> > > > the auxiliary device.
> > > >
> > > > BUG: DCSG01157556
> > > > Change-Id: Ice54f076c1c4fc26d4ee7e77a5dcd1ca21cf4cd0
> > >
> > > Please remove the lines above.
> > Apologies for missing that.
> >
> > >
> > > > Signed-off-by: Ajit Khaparde <[email protected]>
> > > > ---
> > > > drivers/infiniband/hw/bnxt_re/bnxt_re.h | 9 +-
> > > > drivers/infiniband/hw/bnxt_re/main.c | 405 +++++++-----------
> > > > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 64 ---
> > > > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 65 +++
> > > > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 3 +
> > > > 5 files changed, 232 insertions(+), 314 deletions(-)
> > >
> > > <...>
> > >
> > > > +static DEFINE_IDA(bnxt_aux_dev_ids);
> > > > +
> > > > static int bnxt_register_dev(struct bnxt_en_dev *edev, unsigned int ulp_id,
> > > > struct bnxt_ulp_ops *ulp_ops, void *handle)
> > >
> > > I would expect that almost all code in bnxt_ulp.c will go after this change.
> > I agree. My plan was to get these QA tested, initial Aux Bus changes
> > in this release with a follow on series to clean this up further.
> > Does that sound reasonable?
>
> No, please prepare complete series and we will review it.
> There is much harder to do it when the change is partial.
I am fine with that. Thanks

>
> Thanks
>
> > Thanks for the feedback.
> >
> > Thanks
> > Ajit
> >
> > >
> > > Thanks
>
>


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature

2022-10-25 18:03:54

by Ajit Khaparde

[permalink] [raw]
Subject: [PATCH v2 0/6] Add Auxiliary driver support

Add auxiliary device driver for Broadcom devices.
The bnxt_en driver will register and initialize an aux device
if RDMA is enabled in the underlying device.
The bnxt_re driver will then probe and initialize the
RoCE interfaces with the infiniband stack.

v1->v2:
- Incorporated review comments including usage of ulp_id &
  complex function indirections.
- Used function calls provided by auxiliary bus interface
  instead of proprietary calls.
- Refactor code to remove ROCE driver's access to bnxt structure.

Please apply. Thanks.

Ajit Khaparde (5):
bnxt_en: Add auxiliary driver support
RDMA/bnxt_re: Use auxiliary driver interface
bnxt_en: Remove usage of ulp_id
bnxt_en: Use direct API instead of indirection
bnxt_en: Use auxiliary bus calls over proprietary calls

Hongguang Gao (1):
bnxt_en: Remove struct bnxt access from RoCE driver

drivers/infiniband/hw/bnxt_re/bnxt_re.h | 9 +-
drivers/infiniband/hw/bnxt_re/main.c | 576 +++++++-----------
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 8 +
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 401 ++++++------
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 51 +-
6 files changed, 494 insertions(+), 561 deletions(-)

--
2.37.0 (Apple Git-136)


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature