From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
"jgg@nvidia.com" <jgg@nvidia.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>
Subject: RE: [PATCH v5 04/22] ice: Register auxiliary device to provide RDMA
Date: Wed, 19 May 2021 16:51:06 +0000 [thread overview]
Message-ID: <27f0949d3dd64443bc992d433612b6c7@intel.com> (raw)
In-Reply-To: <YKT292HPpKRmzDC4@unreal>
> Subject: Re: [PATCH v5 04/22] ice: Register auxiliary device to provide RDMA
>
> On Fri, May 14, 2021 at 09:11:56AM -0500, Shiraz Saleem wrote:
> > From: Dave Ertman <david.m.ertman@intel.com>
> >
> > Register ice client auxiliary RDMA device on the auxiliary bus per
> > PCIe device function for the auxiliary driver (irdma) to attach to.
> > It allows to realize a single RDMA driver (irdma) capable of working
> > with multiple netdev drivers over multi-generation Intel HW supporting RDMA.
> > There is no load ordering dependencies between ice and irdma.
> >
> > Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> > Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> > ---
> > drivers/net/ethernet/intel/Kconfig | 1 +
> > drivers/net/ethernet/intel/ice/ice.h | 8 +++-
> > drivers/net/ethernet/intel/ice/ice_idc.c | 71
> > ++++++++++++++++++++++++++++++-
> > drivers/net/ethernet/intel/ice/ice_main.c | 11 ++++-
> > 4 files changed, 87 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/Kconfig
> > b/drivers/net/ethernet/intel/Kconfig
> > index c1d1556..d8a12da 100644
> > --- a/drivers/net/ethernet/intel/Kconfig
> > +++ b/drivers/net/ethernet/intel/Kconfig
> > @@ -294,6 +294,7 @@ config ICE
> > tristate "Intel(R) Ethernet Connection E800 Series Support"
> > default n
> > depends on PCI_MSI
> > + select AUXILIARY_BUS
> > select DIMLIB
> > select NET_DEVLINK
> > select PLDMFW
> > diff --git a/drivers/net/ethernet/intel/ice/ice.h
> > b/drivers/net/ethernet/intel/ice/ice.h
> > index 225f8a5..228055e 100644
> > --- a/drivers/net/ethernet/intel/ice/ice.h
> > +++ b/drivers/net/ethernet/intel/ice/ice.h
> > @@ -34,6 +34,7 @@
> > #include <linux/if_bridge.h>
> > #include <linux/ctype.h>
> > #include <linux/bpf.h>
> > +#include <linux/auxiliary_bus.h>
> > #include <linux/avf/virtchnl.h>
> > #include <linux/cpu_rmap.h>
> > #include <linux/dim.h>
> > @@ -647,6 +648,8 @@ static inline void ice_clear_sriov_cap(struct
> > ice_pf *pf) void ice_fill_rss_lut(u8 *lut, u16 rss_table_size, u16
> > rss_size); int ice_schedule_reset(struct ice_pf *pf, enum
> > ice_reset_req reset); void ice_print_link_msg(struct ice_vsi *vsi,
> > bool isup);
> > +int ice_plug_aux_dev(struct ice_pf *pf); void
> > +ice_unplug_aux_dev(struct ice_pf *pf);
> > int ice_init_rdma(struct ice_pf *pf); const char *ice_stat_str(enum
> > ice_status stat_err); const char *ice_aq_str(enum ice_aq_err aq_err);
> > @@ -678,8 +681,10 @@ int ice_aq_wait_for_event(struct ice_pf *pf, u16
> opcode, unsigned long timeout,
> > */
> > static inline void ice_set_rdma_cap(struct ice_pf *pf) {
> > - if (pf->hw.func_caps.common_cap.rdma && pf->num_rdma_msix)
> > + if (pf->hw.func_caps.common_cap.rdma && pf->num_rdma_msix) {
> > set_bit(ICE_FLAG_RDMA_ENA, pf->flags);
> > + ice_plug_aux_dev(pf);
> > + }
> > }
> >
> > /**
> > @@ -688,6 +693,7 @@ static inline void ice_set_rdma_cap(struct ice_pf *pf)
> > */
> > static inline void ice_clear_rdma_cap(struct ice_pf *pf) {
> > + ice_unplug_aux_dev(pf);
> > clear_bit(ICE_FLAG_RDMA_ENA, pf->flags); } #endif /* _ICE_H_ */
> > diff --git a/drivers/net/ethernet/intel/ice/ice_idc.c
> > b/drivers/net/ethernet/intel/ice/ice_idc.c
> > index ffca0d5..e7bb8f6 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_idc.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_idc.c
> > @@ -255,6 +255,71 @@ static int ice_reserve_rdma_qvector(struct ice_pf
> > *pf) }
> >
> > /**
> > + * ice_adev_release - function to be mapped to AUX dev's release op
> > + * @dev: pointer to device to free
> > + */
> > +static void ice_adev_release(struct device *dev) {
> > + struct iidc_auxiliary_dev *iadev;
> > +
> > + iadev = container_of(dev, struct iidc_auxiliary_dev, adev.dev);
> > + kfree(iadev);
> > +}
> > +
> > +/**
> > + * ice_plug_aux_dev - allocate and register AUX device
> > + * @pf: pointer to pf struct
> > + */
> > +int ice_plug_aux_dev(struct ice_pf *pf) {
> > + struct iidc_auxiliary_dev *iadev;
> > + struct auxiliary_device *adev;
> > + int ret;
> > +
> > + iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
> > + if (!iadev)
> > + return -ENOMEM;
> > +
> > + adev = &iadev->adev;
> > + pf->adev = adev;
> > + iadev->pf = pf;
> > +
> > + adev->id = pf->aux_idx;
> > + adev->dev.release = ice_adev_release;
> > + adev->dev.parent = &pf->pdev->dev;
> > + adev->name = IIDC_RDMA_ROCE_NAME;
>
> You declared IIDC_RDMA_ROCE_NAME as intel_rdma_roce, so it will create
> extremely awful device name, something like irdma.intel_rdma_roce.0
It is i40e.intel_rdma_iwarp.0 and ice.intel_rdma_roce.0.
>
> I would say that "intel" and "rdma" can be probably dropped.
>
I do not feel strongly about this and am ok with your request.
Shiraz
next prev parent reply other threads:[~2021-05-19 16:51 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 14:11 [PATCH v5 00/22] Add Intel Ethernet Protocol Driver for RDMA (irdma) Shiraz Saleem
2021-05-14 14:11 ` [PATCH v5 01/22] iidc: Introduce iidc.h Shiraz Saleem
2021-05-14 14:11 ` [PATCH v5 02/22] ice: Initialize RDMA support Shiraz Saleem
2021-05-14 14:11 ` [PATCH v5 03/22] ice: Implement iidc operations Shiraz Saleem
2021-05-14 14:11 ` [PATCH v5 04/22] ice: Register auxiliary device to provide RDMA Shiraz Saleem
2021-05-19 11:31 ` Leon Romanovsky
2021-05-19 16:51 ` Saleem, Shiraz [this message]
2021-05-14 14:11 ` [PATCH v5 05/22] i40e: Prep i40e header for aux bus conversion Shiraz Saleem
2021-05-14 14:11 ` [PATCH v5 06/22] i40e: Register auxiliary devices to provide RDMA Shiraz Saleem
2021-05-19 12:51 ` Leon Romanovsky
2021-05-19 13:43 ` Jason Gunthorpe
2021-05-19 15:43 ` Leon Romanovsky
2021-05-19 16:51 ` Saleem, Shiraz
2021-05-14 14:11 ` [PATCH v5 07/22] RDMA/irdma: Register auxiliary driver and implement private channel OPs Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 08/22] RDMA/irdma: Implement device initialization definitions Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 09/22] RDMA/irdma: Implement HW Admin Queue OPs Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 10/22] RDMA/irdma: Add HMC backing store setup functions Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 11/22] RDMA/irdma: Add privileged UDA queue implementation Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 12/22] RDMA/irdma: Add QoS definitions Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 13/22] RDMA/irdma: Add connection manager Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 14/22] RDMA/irdma: Add PBLE resource manager Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 15/22] RDMA/irdma: Implement device supported verb APIs Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 16/22] RDMA/irdma: Add RoCEv2 UD OP support Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 17/22] RDMA/irdma: Add user/kernel shared libraries Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 18/22] RDMA/irdma: Add miscellaneous utility definitions Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 19/22] RDMA/irdma: Add dynamic tracing for CM Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 20/22] RDMA/irdma: Add ABI definitions Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 21/22] RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw Shiraz Saleem
2021-05-14 14:12 ` [PATCH v5 22/22] 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=27f0949d3dd64443bc992d433612b6c7@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=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).