netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Leon Romanovsky <leon@kernel.org>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Ertman, David M" <david.m.ertman@intel.com>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"Ismail, Mustafa" <mustafa.ismail@intel.com>
Subject: RE: [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and implement private channel OPs
Date: Wed, 24 Mar 2021 23:46:42 +0000	[thread overview]
Message-ID: <cc3dfb411c2248fdb3a5adc042d22893@intel.com> (raw)
In-Reply-To: <20210324143509.GB481507@nvidia.com>

> Subject: Re: [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and
> implement private channel OPs
> 
> On Wed, Mar 24, 2021 at 04:17:20PM +0200, Leon Romanovsky wrote:
> > On Wed, Mar 24, 2021 at 11:00:46AM -0300, Jason Gunthorpe wrote:
> > > On Wed, Mar 24, 2021 at 03:47:34PM +0200, Leon Romanovsky wrote:
> > > > On Tue, Mar 23, 2021 at 06:59:52PM -0500, Shiraz Saleem wrote:
> > > > > From: Mustafa Ismail <mustafa.ismail@intel.com>
> > > > >
> > > > > Register auxiliary drivers which can attach to auxiliary RDMA
> > > > > devices from Intel PCI netdev drivers i40e and ice. Implement
> > > > > the private channel ops, and register net notifiers.
> > > > >
> > > > > Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
> > > > > Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> > > > > drivers/infiniband/hw/irdma/i40iw_if.c | 229 +++++++++++++
> > > > >  drivers/infiniband/hw/irdma/main.c     | 382 ++++++++++++++++++++++
> > > > >  drivers/infiniband/hw/irdma/main.h     | 565
> +++++++++++++++++++++++++++++++++
> > > > >  3 files changed, 1176 insertions(+)  create mode 100644
> > > > > drivers/infiniband/hw/irdma/i40iw_if.c
> > > > >  create mode 100644 drivers/infiniband/hw/irdma/main.c
> > > > >  create mode 100644 drivers/infiniband/hw/irdma/main.h
> > > >
> > > > <...>
> > > >
> > > > > +/* client interface functions */ static const struct
> > > > > +i40e_client_ops i40e_ops = {
> > > > > +	.open = i40iw_open,
> > > > > +	.close = i40iw_close,
> > > > > +	.l2_param_change = i40iw_l2param_change };
> > > > > +
> > > > > +static struct i40e_client i40iw_client = {
> > > > > +	.ops = &i40e_ops,
> > > > > +	.type = I40E_CLIENT_IWARP,
> > > > > +};
> > > > > +
> > > > > +static int i40iw_probe(struct auxiliary_device *aux_dev, const
> > > > > +struct auxiliary_device_id *id) {
> > > > > +	struct i40e_auxiliary_device *i40e_adev = container_of(aux_dev,
> > > > > +							       struct
> i40e_auxiliary_device,
> > > > > +							       aux_dev);
> > > > > +	struct i40e_info *cdev_info = i40e_adev->ldev;
> > > > > +
> > > > > +	strncpy(i40iw_client.name, "irdma", I40E_CLIENT_STR_LENGTH);
> > > > > +	cdev_info->client = &i40iw_client;
> > > > > +	cdev_info->aux_dev = aux_dev;
> > > > > +
> > > > > +	return cdev_info->ops->client_device_register(cdev_info);
> > > >
> > > > Why do we need all this indirection? I see it as leftover from
> > > > previous version where you mixed auxdev with your peer registration logic.
> > >
> > > I think I said the new stuff has to be done sanely, but the i40iw
> > > stuff is old and already like this.
> >
> > They declared this specific "ops" a couple of lines above and all the
> > functions are static. At least for the new code, in the irdma, this "ops"
> > thing is not needed.
> 
> It is the code in the 'core' i40iw driver that requries this, AFAICT
> 
 Yes.

  reply	other threads:[~2021-03-24 23:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 23:59 [PATCH v2 00/23] Add Intel Ethernet Protocol Driver for RDMA (irdma) Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 01/23] iidc: Introduce iidc.h Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 02/23] ice: Initialize RDMA support Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 03/23] ice: Implement iidc operations Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 04/23] ice: Register auxiliary device to provide RDMA Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 05/23] ice: Add devlink params support Shiraz Saleem
2021-03-24  4:50   ` Parav Pandit
2021-03-25 20:10     ` Saleem, Shiraz
2021-03-26  5:42       ` Parav Pandit
2021-03-29 16:07       ` Jason Gunthorpe
2021-03-29 16:25         ` Saleem, Shiraz
2021-03-23 23:59 ` [PATCH v2 06/23] i40e: Prep i40e header for aux bus conversion Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 07/23] i40e: Register auxiliary devices to provide RDMA Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and implement private channel OPs Shiraz Saleem
2021-03-24 13:47   ` Leon Romanovsky
2021-03-24 14:00     ` Jason Gunthorpe
2021-03-24 14:17       ` Leon Romanovsky
2021-03-24 14:35         ` Jason Gunthorpe
2021-03-24 23:46           ` Saleem, Shiraz [this message]
2021-03-25  8:45             ` Leon Romanovsky
2021-03-23 23:59 ` [PATCH v2 09/23] RDMA/irdma: Implement device initialization definitions Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 10/23] RDMA/irdma: Implement HW Admin Queue OPs Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 11/23] RDMA/irdma: Add HMC backing store setup functions Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 12/23] RDMA/irdma: Add privileged UDA queue implementation Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 13/23] RDMA/irdma: Add QoS definitions Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 14/23] RDMA/irdma: Add connection manager Shiraz Saleem
2021-03-23 23:59 ` [PATCH v2 15/23] RDMA/irdma: Add PBLE resource manager Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 16/23] RDMA/irdma: Implement device supported verb APIs Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 17/23] RDMA/irdma: Add RoCEv2 UD OP support Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 18/23] RDMA/irdma: Add user/kernel shared libraries Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 19/23] RDMA/irdma: Add miscellaneous utility definitions Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 20/23] RDMA/irdma: Add dynamic tracing for CM Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 21/23] RDMA/irdma: Add ABI definitions Shiraz Saleem
2021-03-24  0:00 ` [PATCH v2 22/23] RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw Shiraz Saleem
2021-03-24 18:54   ` Randy Dunlap
2021-03-24 23:47     ` Saleem, Shiraz
2021-03-24  0:00 ` [PATCH v2 23/23] RDMA/irdma: Update MAINTAINERS file Shiraz Saleem

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=cc3dfb411c2248fdb3a5adc042d22893@intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=david.m.ertman@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=netdev@vger.kernel.org \
    /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).