[v1,11/35] net/ionic: only allocate interrupts if required
Checks
Commit Message
There is no need to allocate the interrupt vector list if
datapath packet interrupts are not enabled.
This conserves resources.
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
drivers/net/ionic/ionic_ethdev.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
@@ -1082,14 +1082,16 @@ ionic_configure_intr(struct ionic_adapter *adapter)
return -1;
}
- if (rte_intr_dp_is_en(intr_handle))
+ if (rte_intr_dp_is_en(intr_handle)) {
IONIC_PRINT(DEBUG,
"Packet I/O interrupt on datapath is enabled");
- if (rte_intr_vec_list_alloc(intr_handle, "intr_vec", adapter->nintrs)) {
- IONIC_PRINT(ERR, "Failed to allocate %u vectors",
- adapter->nintrs);
- return -ENOMEM;
+ if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
+ adapter->nintrs)) {
+ IONIC_PRINT(ERR, "Failed to allocate %u vectors",
+ adapter->nintrs);
+ return -ENOMEM;
+ }
}
err = rte_intr_callback_register(intr_handle,