Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111122389
D12863.id34526.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12863.id34526.diff
View Options
Index: sys/dev/ena/ena.h
===================================================================
--- sys/dev/ena/ena.h
+++ sys/dev/ena/ena.h
@@ -58,7 +58,8 @@
#define ENA_DMA_BIT_MASK(x) ((1ULL << (x)) - 1ULL)
/* 1 for AENQ + ADMIN */
-#define ENA_MAX_MSIX_VEC(io_queues) (1 + (io_queues))
+#define ENA_ADMIN_MSIX_VEC 1
+#define ENA_MAX_MSIX_VEC(io_queues) (ENA_ADMIN_MSIX_VEC + (io_queues))
#define ENA_REG_BAR 0
#define ENA_MEM_BAR 2
Index: sys/dev/ena/ena.c
===================================================================
--- sys/dev/ena/ena.c
+++ sys/dev/ena/ena.c
@@ -1830,7 +1830,8 @@
ena_enable_msix(struct ena_adapter *adapter)
{
device_t dev = adapter->pdev;
- int i, msix_vecs, rc = 0;
+ int msix_vecs, msix_req;
+ int i, rc = 0;
/* Reserved the max msix vectors we might need */
msix_vecs = ENA_MAX_MSIX_VEC(adapter->num_queues);
@@ -1851,6 +1852,7 @@
adapter->msix_entries[i].vector = i + 1;
}
+ msix_req = msix_vecs;
rc = pci_alloc_msix(dev, &msix_vecs);
if (unlikely(rc != 0)) {
device_printf(dev,
@@ -1860,6 +1862,12 @@
goto err_msix_free;
}
+ if (msix_vecs != msix_req) {
+ device_printf(dev, "Enable only %d MSI-x (out of %d), reduce "
+ "the number of queues\n", msix_vecs, msix_vecs);
+ adapter->num_queues = msix_vecs - ENA_ADMIN_MSIX_VEC;
+ }
+
adapter->msix_vecs = msix_vecs;
adapter->msix_enabled = true;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 28, 5:59 PM (15 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16888783
Default Alt Text
D12863.id34526.diff (1 KB)
Attached To
Mode
D12863: Allow partial MSI-x allocation in ENA driver
Attached
Detach File
Event Timeline
Log In to Comment