From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Lukasz Czapnik <lukasz.czapnik@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, pmenzel@molgen.mpg.de,
wojciech.drewek@intel.com, marcin.szycik@intel.com,
netdev@vger.kernel.org, konrad.knitter@intel.com,
pawel.chmielewski@intel.com, horms@kernel.org,
David.Laight@aculab.com, nex.sw.ncis.nat.hpm.dev@intel.com,
pio.raczynski@gmail.com, sridhar.samudrala@intel.com,
jacob.e.keller@intel.com, jiri@resnulli.us,
przemyslaw.kitszel@intel.com
Subject: Re: [Intel-wired-lan] [iwl-next v7 5/9] ice, irdma: move interrupts code to irdma
Date: Thu, 14 Nov 2024 07:05:39 +0100 [thread overview]
Message-ID: <ZzWTMwo7hx8qRLnt@mev-dev.igk.intel.com> (raw)
In-Reply-To: <5eca295e-1675-4779-b0d6-ec8a7550516f@intel.com>
On Wed, Nov 13, 2024 at 05:21:20PM +0100, Lukasz Czapnik wrote:
>
>
> On 11/4/2024 1:13 PM, Michal Swiatkowski wrote:
> > Move responsibility of MSI-X requesting for RDMA feature from ice driver
> > to irdma driver. It is done to allow simple fallback when there is not
> > enough MSI-X available.
> >
> > Change amount of MSI-X used for control from 4 to 1, as it isn't needed
> > to have more than one MSI-X for this purpose.
> >
> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > ---
> > drivers/infiniband/hw/irdma/hw.c | 2 -
> > drivers/infiniband/hw/irdma/main.c | 46 ++++++++++++++++-
> > drivers/infiniband/hw/irdma/main.h | 3 ++
> > drivers/net/ethernet/intel/ice/ice.h | 1 -
> > drivers/net/ethernet/intel/ice/ice_idc.c | 64 ++++++------------------
> > drivers/net/ethernet/intel/ice/ice_irq.c | 3 +-
> > include/linux/net/intel/iidc.h | 2 +
> > 7 files changed, 65 insertions(+), 56 deletions(-)
> >
> > diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
> > index ad50b77282f8..69ce1862eabe 100644
> > --- a/drivers/infiniband/hw/irdma/hw.c
> > +++ b/drivers/infiniband/hw/irdma/hw.c
> > @@ -498,8 +498,6 @@ static int irdma_save_msix_info(struct irdma_pci_f *rf)
> > iw_qvlist->num_vectors = rf->msix_count;
> > if (rf->msix_count <= num_online_cpus())
> > rf->msix_shared = true;
> > - else if (rf->msix_count > num_online_cpus() + 1)
> > - rf->msix_count = num_online_cpus() + 1;
> > pmsix = rf->msix_entries;
> > for (i = 0, ceq_idx = 0; i < rf->msix_count; i++, iw_qvinfo++) {
> > diff --git a/drivers/infiniband/hw/irdma/main.c b/drivers/infiniband/hw/irdma/main.c
> > index 3f13200ff71b..1ee8969595d3 100644
> > --- a/drivers/infiniband/hw/irdma/main.c
> > +++ b/drivers/infiniband/hw/irdma/main.c
> > @@ -206,6 +206,43 @@ static void irdma_lan_unregister_qset(struct irdma_sc_vsi *vsi,
> > ibdev_dbg(&iwdev->ibdev, "WS: LAN free_res for rdma qset failed.\n");
> > }
> > +static int irdma_init_interrupts(struct irdma_pci_f *rf, struct ice_pf *pf)
> > +{
> > + int i;
> > +
> > + rf->msix_count = num_online_cpus() + IRDMA_NUM_AEQ_MSIX;
>
> I think we can default RDMA MSI-X to 64 instead of num_online_cpus(). It
> would play better on platforms with high core count (200+ cores). There
> are very little benefits for having more than 64 queues.
>
Sure,I can do that. Do we have some numbers to put it into commit
message?
> In those special cases, when more queues are needed, user should be able
> to manually assign more resources to RDMA.
Do we have a way to do that? I mean, currently AFAIK this is the only place
where RDMA is requesting MSI-X from ice. Driver can be reloaded to do it
again (if didn't receive enough MSI-X and user change other config to
free it for RDMA use case), but the max value is fixed here (to
num_online_cpus() here, and to 64 after your suggestion).
RDMA driver should be able to reinit MSI-X during working exactly the
same way as eth is changing MSI-X amount when queues number is changing.
This should be done in irdma driver. Hope someone will take care of that
(if this is really needed, becase if 64 is always enough we are fine).
In summary I will add:
#define IRDMA_NUM_OPTIMAL_MSIX 64
min(IRDMA_NUM_OPTIMAL_MSIX, num_online_cpus()) + IRDMA_NUM_AEQ_MSIX;
Thanks,
Michal
>
> Regards,
> Lukasz
>
next prev parent reply other threads:[~2024-11-14 6:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 12:13 [Intel-wired-lan] [iwl-next v7 0/9] ice: managing MSI-X in driver Michal Swiatkowski
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 1/9] ice: count combined queues using Rx/Tx count Michal Swiatkowski
2024-11-14 14:03 ` Pucha, HimasekharX Reddy
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 2/9] ice: devlink PF MSI-X max and min parameter Michal Swiatkowski
2024-11-11 11:44 ` Michal Schmidt
2024-11-12 8:58 ` Michal Swiatkowski
2024-11-14 14:04 ` Pucha, HimasekharX Reddy
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 3/9] ice: remove splitting MSI-X between features Michal Swiatkowski
2024-11-14 14:06 ` Pucha, HimasekharX Reddy
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 4/9] ice: get rid of num_lan_msix field Michal Swiatkowski
2024-11-14 14:08 ` Pucha, HimasekharX Reddy
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 5/9] ice, irdma: move interrupts code to irdma Michal Swiatkowski
2024-11-13 16:21 ` Lukasz Czapnik
2024-11-14 6:05 ` Michal Swiatkowski [this message]
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 6/9] ice: treat dyn_allowed only as suggestion Michal Swiatkowski
2024-11-14 14:09 ` Pucha, HimasekharX Reddy
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 7/9] ice: enable_rdma devlink param Michal Swiatkowski
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 8/9] ice: simplify VF MSI-X managing Michal Swiatkowski
2024-11-13 9:20 ` Romanowski, Rafal
2024-11-04 12:13 ` [Intel-wired-lan] [iwl-next v7 9/9] ice: init flow director before RDMA Michal Swiatkowski
2024-11-14 14:11 ` Pucha, HimasekharX Reddy
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=ZzWTMwo7hx8qRLnt@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=David.Laight@aculab.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=konrad.knitter@intel.com \
--cc=lukasz.czapnik@intel.com \
--cc=marcin.szycik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nex.sw.ncis.nat.hpm.dev@intel.com \
--cc=pawel.chmielewski@intel.com \
--cc=pio.raczynski@gmail.com \
--cc=pmenzel@molgen.mpg.de \
--cc=przemyslaw.kitszel@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=wojciech.drewek@intel.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