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.bo...@amd.com> --- drivers/net/ionic/ionic_ethdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 637553716d..cabdfa1f21 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -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, -- 2.17.1