DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiang Mao <maox.jiang@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, stable@dpdk.org, Jiang Mao <maox.jiang@intel.com>
Subject: [dpdk-dev] [PATCH v4 2/2] net/i40e: fix fdir allocating msix resource error
Date: Fri, 24 Jul 2020 00:11:52 +0800	[thread overview]
Message-ID: <20200723161152.7791-1-maox.jiang@intel.com> (raw)
In-Reply-To: <20200722175738.32490-2-maox.jiang@intel.com>

Fdir allocating msix resource is not strictly necessary, if no
resource left, jump the error.

Fixes: 4861cde461 (i40e: new poll mode driver)
Cc: stable@dpdk.org

Signed-off-by: Jiang Mao <maox.jiang@intel.com>
---
V3: Move type I40E_VSI_FDIR branch into !I40E_VSI_SRIOV branch.
V4: Rebase this patch.
---
 drivers/net/i40e/i40e_ethdev.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

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;
-- 
2.17.1


  reply	other threads:[~2020-07-23  4:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09  2:25 [dpdk-dev] [PATCH 1/2] net/i40e: fix binding interrupt without msix vectors Jiang Mao
2020-06-09  2:25 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix fdir allocating msix resource error Jiang Mao
2020-06-17  5:43   ` Huang, ZhiminX
2020-07-08 19:52   ` Jiang Mao
2020-07-20 10:31     ` Zhang, Qi Z
2020-07-21 19:51     ` [dpdk-dev] [PATCH] " Jiang Mao
2020-06-17  5:42 ` [dpdk-dev] [PATCH 1/2] net/i40e: fix binding interrupt without msix vectors Huang, ZhiminX
2020-07-08 19:50 ` Jiang Mao
2020-07-21  3:57   ` Jeff Guo
2020-07-21  6:50     ` Jiang, MaoX
2020-07-22 17:57   ` [dpdk-dev] [PATCH v3 " Jiang Mao
2020-07-22 17:57     ` [dpdk-dev] [PATCH v3 2/2] net/i40e: fix fdir allocating msix resource error Jiang Mao
2020-07-23 16:11       ` Jiang Mao [this message]
2020-07-23 12:40         ` [dpdk-dev] [PATCH v4 " Zhang, Qi Z
2020-07-23 15:27     ` [dpdk-dev] [PATCH v4 1/2] net/i40e: fix binding interrupt without msix vectors Jiang Mao
2020-07-23 12:40       ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200723161152.7791-1-maox.jiang@intel.com \
    --to=maox.jiang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).