From: Justin Tee <justintee8345@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: jsmart833426@gmail.com, justin.tee@broadcom.com,
Justin Tee <justintee8345@gmail.com>
Subject: [PATCH 01/10] lpfc: Break out of IRQ affinity assignment when mask reaches nr_cpu_ids
Date: Tue, 31 Mar 2026 13:59:19 -0700 [thread overview]
Message-ID: <20260331205928.119833-2-justintee8345@gmail.com> (raw)
In-Reply-To: <20260331205928.119833-1-justintee8345@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1708 bytes --]
The purpose of the lpfc_next_online_cpu() call is to save the cpu index for
the next iteration of the for (index = 0; index < vectors; index++) loop.
Because we’ve reached the last iteration of the loop, cpumask_next(cpu,
aff_mask) returns nr_cpu_ids. Thus, if we already know we've reached the
last iteration of the IRQ affinity assignment loop, then we can just break
and exit.
Signed-off-by: Justin Tee <justintee8345@gmail.com>
---
drivers/scsi/lpfc/lpfc_init.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 3bf522c7f099..cc2ecfe1c907 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2,7 +2,7 @@
* This file is part of the Emulex Linux Device Driver for *
* Fibre Channel Host Bus Adapters. *
* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term *
- * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
+ * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
* EMULEX and SLI are trademarks of Emulex. *
* www.broadcom.com *
@@ -13039,6 +13039,10 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
/* Iterate to next offline or online cpu in aff_mask */
cpu = cpumask_next(cpu, aff_mask);
+ /* Reached the end of the aff_mask */
+ if (cpu >= nr_cpu_ids)
+ break;
+
/* Find next online cpu in aff_mask to set affinity */
cpu_select = lpfc_next_online_cpu(aff_mask, cpu);
} else if (vectors == 1) {
--
2.38.0
next prev parent reply other threads:[~2026-03-31 20:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 20:59 [PATCH 00/10] Update lpfc to revision 15.0.0.0 Justin Tee
2026-03-31 20:59 ` Justin Tee [this message]
2026-03-31 20:59 ` [PATCH 02/10] lpfc: Select mailbox rq_create cmd version based on sli4 if_type Justin Tee
2026-03-31 20:59 ` [PATCH 03/10] lpfc: Log mcqe contents for mbox commands with no context Justin Tee
2026-03-31 20:59 ` [PATCH 04/10] lpfc: Add REG_VFI mailbox cmd error handling Justin Tee
2026-03-31 20:59 ` [PATCH 05/10] lpfc: Remove deprecated PBDE feature Justin Tee
2026-03-31 20:59 ` [PATCH 06/10] lpfc: Update construction of SGL when XPSGL is enabled Justin Tee
2026-03-31 20:59 ` [PATCH 07/10] lpfc: Check ASIC_ID register to aid diagnostics during failed fw updates Justin Tee
2026-03-31 20:59 ` [PATCH 08/10] lpfc: Introduce 128G link speed selection and support Justin Tee
2026-03-31 20:59 ` [PATCH 09/10] lpfc: Add PCI ID support for LPe42100 series adapters Justin Tee
2026-03-31 20:59 ` [PATCH 10/10] lpfc: Update lpfc version to 15.0.0.0 Justin Tee
2026-04-03 1:37 ` [PATCH 00/10] Update lpfc to revision 15.0.0.0 Martin K. Petersen
2026-04-09 2:43 ` Martin K. Petersen
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=20260331205928.119833-2-justintee8345@gmail.com \
--to=justintee8345@gmail.com \
--cc=jsmart833426@gmail.com \
--cc=justin.tee@broadcom.com \
--cc=linux-scsi@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