From: Mao Jiang Date: Thu, 23 Jul 2020 16:11:52 +0000 (+0800) Subject: net/i40e: fix flow director MSI-X resource allocation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8ed3b9e6e4991932ddf0a10dee4ef8ac8f46f741;p=dpdk.git net/i40e: fix flow director MSI-X resource allocation FDIR allocating msix resource is not strictly necessary, if no resource left, jump the error. Fixes: 4861cde46116 ("i40e: new poll mode driver") Cc: stable@dpdk.org Signed-off-by: Mao Jiang Acked-by: Qi Zhang --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 0c32e451c5..f9a8e7132f 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5839,10 +5839,14 @@ i40e_vsi_setup(struct i40e_pf *pf, ret = i40e_res_pool_alloc(&pf->msix_pool, 1); if (ret < 0) { PMD_DRV_LOG(ERR, "VSI %d get heap failed %d", vsi->seid, ret); - goto fail_queue_alloc; + if (type != I40E_VSI_FDIR) + goto fail_queue_alloc; + vsi->msix_intr = 0; + vsi->nb_msix = 0; + } else { + vsi->msix_intr = ret; + vsi->nb_msix = 1; } - vsi->msix_intr = ret; - vsi->nb_msix = 1; } else { vsi->msix_intr = 0; vsi->nb_msix = 0;