All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: andrew.gospodarek@broadcom.com, davem@davemloft.net,
	edumazet@google.com, jgg@ziepe.ca, kuba@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	michael.chan@broadcom.com, netdev@vger.kernel.org,
	pabeni@redhat.com, selvin.xavier@broadcom.com
Subject: Re: [PATCH v4 0/6] Add Auxiliary driver support
Date: Thu, 10 Nov 2022 12:53:48 +0200	[thread overview]
Message-ID: <Y2zYPOUKgoArq7mM@unreal> (raw)
In-Reply-To: <20221109184244.7032-1-ajit.khaparde@broadcom.com>

On Wed, Nov 09, 2022 at 10:42:38AM -0800, Ajit Khaparde wrote:
> 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.
> 
> We got rid of the bnxt_en_ops which the bnxt_re driver used to
> communicate with bnxt_en.
> Similarly  We have tried to clean up most of the bnxt_ulp_ops.
> In most of the cases we used the functions and entry points provided
> by the auxiliary bus driver framework.
> And now these are the minimal functions needed to support the functionality.
> 
> We will try to work on getting rid of the remaining if we find any
> other viable option in future.

I still see extra checks for something that was already checked in upper
functions, for example in bnxt_re_register_netdev() you check rdev, which
you already checked before.

However, the most important part is still existence of bnxt_ulp_ops,
which shows completely no-go thing - SR-IOV config in RDMA code.

   302 static struct bnxt_ulp_ops bnxt_re_ulp_ops = {
   303         .ulp_sriov_config = bnxt_re_sriov_config,
   304         .ulp_irq_stop = bnxt_re_stop_irq,
   305         .ulp_irq_restart = bnxt_re_start_irq
   306 };

All PCI management logic and interfaces are needed to be inside eth part
of your driver and only that part should implement SR-IOV config. Once
user enabled SR-IOV, the PCI driver should create auxiliary devices for
each VF. These device will have RDMA capabilities and it will trigger RDMA
driver to bind to them.

Thanks

  parent reply	other threads:[~2022-11-10 10:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 18:42 [PATCH v4 0/6] Add Auxiliary driver support Ajit Khaparde
2022-11-09 18:42 ` [PATCH v4 1/6] bnxt_en: Add auxiliary " Ajit Khaparde
2022-11-09 18:42 ` [PATCH v4 2/6] RDMA/bnxt_re: Use auxiliary driver interface Ajit Khaparde
2022-11-09 18:42 ` [PATCH v4 3/6] bnxt_en: Remove usage of ulp_id Ajit Khaparde
2022-11-09 18:42 ` [PATCH v4 4/6] bnxt_en: Use direct API instead of indirection Ajit Khaparde
2022-11-09 18:42 ` [PATCH v4 5/6] bnxt_en: Use auxiliary bus calls over proprietary calls Ajit Khaparde
2022-11-09 18:42 ` [PATCH v4 6/6] bnxt_en: Remove struct bnxt access from RoCE driver Ajit Khaparde
2022-11-10 10:53 ` Leon Romanovsky [this message]
2022-11-15  0:47   ` [PATCH v4 0/6] Add Auxiliary driver support Ajit Khaparde
2022-11-16 13:22     ` Leon Romanovsky
2022-11-22 15:02       ` Ajit Khaparde
2022-11-23  6:58         ` Leon Romanovsky
2022-11-29  2:01           ` Ajit Khaparde
2022-11-29  9:13             ` Leon Romanovsky
2022-12-07 17:49               ` Ajit Khaparde

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=Y2zYPOUKgoArq7mM@unreal \
    --to=leon@kernel.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=selvin.xavier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.