public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Sindhu Devale <sindhu.devale@intel.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org,
	shiraz.saleem@intel.com, mustafa.ismail@intel.com
Subject: Re: [PATCH for-rc] RDMA/irdma: Cap MSIX used to online CPUs + 1
Date: Mon, 6 Feb 2023 15:52:35 +0200	[thread overview]
Message-ID: <Y+EGI0Z9wnXlkWGv@unreal> (raw)
In-Reply-To: <20230202181211.1123-1-sindhu.devale@intel.com>

On Thu, Feb 02, 2023 at 12:12:11PM -0600, Sindhu Devale wrote:
> From: Mustafa Ismail <mustafa.ismail@intel.com>
> 
> The irdma driver can use a maximum number of msix
> vectors equal to num_online_cpus() + 1 and the Kernel

kernel

> warning stack below is shown if that number is exceeded.
> The kernel throws a warning as the driver tries to update
> the affinity hint with a CPU mask greater than the max CPU IDs.
> Fix this by capping the MSIX vectors to num_online_cpus() + 1.

You shouldn't squeeze your commit message to 60 chars, please don't break
lines like this.

> 
> kernel: WARNING: CPU: 7 PID: 23655 at include/linux/cpumask.h:106 irdma_cfg_ceq_vector+0x34c/0x3f0 [irdma]
> kernel: RIP: 0010:irdma_cfg_ceq_vector+0x34c/0x3f0 [irdma]
> kernel: Call Trace:
> kernel: irdma_rt_init_hw+0xa62/0x1290 [irdma]

Please provide full kernel splat and not truncated version.

> 
> Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions")
> Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
> ---
>  drivers/infiniband/hw/irdma/hw.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
> index ab246447520b..2e1e2bad0401 100644
> --- a/drivers/infiniband/hw/irdma/hw.c
> +++ b/drivers/infiniband/hw/irdma/hw.c
> @@ -483,6 +483,8 @@ 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++) {
> -- 
> 2.27.0
> 

      reply	other threads:[~2023-02-06 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 18:12 [PATCH for-rc] RDMA/irdma: Cap MSIX used to online CPUs + 1 Sindhu Devale
2023-02-06 13:52 ` Leon Romanovsky [this message]

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=Y+EGI0Z9wnXlkWGv@unreal \
    --to=leon@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=shiraz.saleem@intel.com \
    --cc=sindhu.devale@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