git: 75e47e1ae33b - stable/15 - ena: Limit IO IRQ setup loop to active queues only
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Nov 2026 21:15:15 UTC
The branch stable/15 has been updated by akiyano:
URL: https://cgit.FreeBSD.org/src/commit/?id=75e47e1ae33be043997bc90e044cbb0ce5667eaf
commit 75e47e1ae33be043997bc90e044cbb0ce5667eaf
Author: Gilad Ben Yakov <giladben@amazon.com>
AuthorDate: 2026-04-29 12:10:38 +0000
Commit: Arthur Kiyanovski <akiyano@FreeBSD.org>
CommitDate: 2026-11-04 20:52:56 +0000
ena: Limit IO IRQ setup loop to active queues only
The loop in ena_request_io_irq() iterated over adapter->msix_vecs,
which reflects the maximum number of MSI-X vectors allocated at
init time. When the number of IO queues is reduced at runtime via
the io_queues_nb sysctl, msix_vecs is not updated, causing the
driver to bind interrupts and log CPU affinity for queues that no
longer exist.
Replace the loop bound with ENA_IO_IRQ_IDX(adapter->num_io_queues)
to iterate only over the currently active IO queues.
Also replace the loop in ena_free_io_irq() the same.
Reviewed by: cperciva
Fixes: 56d41ad5fe9c ("Add sysctl node for ENA IO queues number adjustment")
MFC after: 3 days
Sponsored by: Amazon, Inc.
(cherry picked from commit 32c301922dc1e6f52bdd043046661ac1e2b462d8)
---
sys/dev/ena/ena.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c
index 8a3bb8f7960e..a8af69e94093 100644
--- a/sys/dev/ena/ena.c
+++ b/sys/dev/ena/ena.c
@@ -1939,7 +1939,7 @@ ena_request_io_irq(struct ena_adapter *adapter)
flags = RF_ACTIVE | RF_SHAREABLE;
}
- for (i = ENA_IO_IRQ_FIRST_IDX; i < adapter->msix_vecs; i++) {
+ for (i = ENA_IO_IRQ_FIRST_IDX; i < ENA_IO_IRQ_IDX(adapter->num_io_queues); i++) {
irq = &adapter->irq_tbl[i];
if (unlikely(irq->requested))
@@ -2053,7 +2053,7 @@ ena_free_io_irq(struct ena_adapter *adapter)
struct ena_irq *irq;
int rc;
- for (int i = ENA_IO_IRQ_FIRST_IDX; i < adapter->msix_vecs; i++) {
+ for (int i = ENA_IO_IRQ_FIRST_IDX; i < ENA_IO_IRQ_IDX(adapter->num_io_queues); i++) {
irq = &adapter->irq_tbl[i];
if (irq->requested) {
ena_log(pdev, DBG, "tear down irq: %d\n", irq->vector);