From: Devesh Sharma <devesh.sharma@broadcom.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
Michael Chan <michael.chan@broadcom.com>,
Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>,
Netdev <netdev@vger.kernel.org>,
Selvin Xavier <selvin.xavier@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Subject: Re: [PATCH rdma-next v2 2/5] RDMA/bnxt_re: Create direct symbolic link between bnxt modules
Date: Wed, 21 Apr 2021 23:21:47 +0530 [thread overview]
Message-ID: <CANjDDBh71JLvt_c=r49_EgGaEsUoFS2Y-6cw1QL3-CN1fJrPZA@mail.gmail.com> (raw)
In-Reply-To: <20210401065715.565226-3-leon@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]
On Thu, Apr 1, 2021 at 12:27 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Convert indirect probe call to its direct equivalent to create
> symbols link between RDMA and netdev modules. This will give
> us an ability to remove custom module reference counting that
> doesn't belong to the driver.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> drivers/infiniband/hw/bnxt_re/main.c | 7 +------
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 --
> drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 -
> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 1 +
> 4 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
> index b30d37f0bad2..140c54ee5916 100644
> --- a/drivers/infiniband/hw/bnxt_re/main.c
> +++ b/drivers/infiniband/hw/bnxt_re/main.c
> @@ -610,15 +610,10 @@ static void bnxt_re_dev_unprobe(struct net_device *netdev,
>
> static struct bnxt_en_dev *bnxt_re_dev_probe(struct net_device *netdev)
> {
> - struct bnxt *bp = netdev_priv(netdev);
> struct bnxt_en_dev *en_dev;
> struct pci_dev *pdev;
>
> - /* Call bnxt_en's RoCE probe via indirect API */
> - if (!bp->ulp_probe)
> - return ERR_PTR(-EINVAL);
> -
> - en_dev = bp->ulp_probe(netdev);
> + en_dev = bnxt_ulp_probe(netdev);
> if (IS_ERR(en_dev))
> return en_dev;
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index a680fd9c68ea..3f0e4bde5dc9 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -12859,8 +12859,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (!BNXT_CHIP_P4_PLUS(bp))
> bp->flags |= BNXT_FLAG_DOUBLE_DB;
>
> - bp->ulp_probe = bnxt_ulp_probe;
> -
> rc = bnxt_init_mac_addr(bp);
> if (rc) {
> dev_err(&pdev->dev, "Unable to initialize mac address.\n");
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> index 1259e68cba2a..eb0314d7a9b1 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> @@ -1745,7 +1745,6 @@ struct bnxt {
> (BNXT_CHIP_P4(bp) || BNXT_CHIP_P5(bp))
>
> struct bnxt_en_dev *edev;
> - struct bnxt_en_dev * (*ulp_probe)(struct net_device *);
>
> struct bnxt_napi **bnapi;
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> index 64dbbb04b043..a918e374f3c5 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> @@ -491,3 +491,4 @@ struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev)
> }
> return bp->edev;
> }
> +EXPORT_SYMBOL(bnxt_ulp_probe);
Acked-By: Devesh Sharma <devesh.sharma@broadcom.com>
> --
> 2.30.2
>
--
-Regards
Devesh
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]
next prev parent reply other threads:[~2021-04-21 17:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 6:57 [PATCH rdma-next v2 0/5] Get rid of custom made module dependency Leon Romanovsky
2021-04-01 6:57 ` [PATCH rdma-next v2 1/5] RDMA/bnxt_re: Depend on bnxt ethernet driver and not blindly select it Leon Romanovsky
2021-04-21 17:50 ` Devesh Sharma
2021-04-01 6:57 ` [PATCH rdma-next v2 2/5] RDMA/bnxt_re: Create direct symbolic link between bnxt modules Leon Romanovsky
2021-04-21 17:51 ` Devesh Sharma [this message]
2021-04-01 6:57 ` [PATCH rdma-next v2 3/5] RDMA/bnxt_re: Get rid of custom module reference counting Leon Romanovsky
2021-04-21 17:52 ` Devesh Sharma
2021-04-01 6:57 ` [PATCH rdma-next v2 4/5] net/bnxt: Remove useless check of non-existent ULP id Leon Romanovsky
2021-04-01 6:57 ` [PATCH rdma-next v2 5/5] net/bnxt: Use direct API instead of useless indirection Leon Romanovsky
2021-04-03 10:22 ` [PATCH rdma-next v2 0/5] Get rid of custom made module dependency Devesh Sharma
2021-04-03 11:42 ` Leon Romanovsky
2021-04-08 11:36 ` Devesh Sharma
2021-04-08 11:44 ` Leon Romanovsky
2021-04-08 11:53 ` Jason Gunthorpe
2021-04-08 12:03 ` Leon Romanovsky
2021-04-08 15:21 ` Devesh Sharma
2021-04-08 15:12 ` Devesh Sharma
2021-04-12 7:40 ` Leon Romanovsky
2021-04-14 13:45 ` Devesh Sharma
2021-04-17 8:14 ` Leon Romanovsky
2021-04-17 18:39 ` Devesh Sharma
2021-04-18 4:18 ` Leon Romanovsky
2021-04-19 17:38 ` Jason Gunthorpe
2021-04-19 19:04 ` Devesh Sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANjDDBh71JLvt_c=r49_EgGaEsUoFS2Y-6cw1QL3-CN1fJrPZA@mail.gmail.com' \
--to=devesh.sharma@broadcom.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=nareshkumar.pbs@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).