[dpdk-stable] patch 'net/i40e: fix binding interrupt without MSI-X vector' has been queued to LTS release 18.11.10

Kevin Traynor ktraynor at redhat.com
Fri Aug 28 12:12:56 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 09/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/75d6efa0b1a246989bfa5e62cac477d70cfc93e6

Thanks.

Kevin.

---
>From 75d6efa0b1a246989bfa5e62cac477d70cfc93e6 Mon Sep 17 00:00:00 2001
From: Mao Jiang <maox.jiang at intel.com>
Date: Thu, 23 Jul 2020 23:27:10 +0800
Subject: [PATCH] net/i40e: fix binding interrupt without MSI-X vector

[ upstream commit 6f1998a4f0411ea3b2bed7c05faa81243917a76e ]

The value of vsi->nb_msix shouldn't`t be zero, otherwise, all of
interrupts will be bind to vector 0.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Mao Jiang <maox.jiang at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 25 +++++++++++++++++++------
 drivers/net/i40e/i40e_ethdev.h |  2 +-
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 759fc76c85..80410e89ea 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1979,5 +1979,5 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
 }
 
-void
+int
 i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 {
@@ -1999,8 +1999,12 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 	/* VF bind interrupt */
 	if (vsi->type == I40E_VSI_SRIOV) {
+		if (vsi->nb_msix == 0) {
+			PMD_DRV_LOG(ERR, "No msix resource");
+			return -EINVAL;
+		}
 		__vsi_queues_bind_intr(vsi, msix_vect,
 				       vsi->base_queue, vsi->nb_qps,
 				       itr_idx);
-		return;
+		return 0;
 	}
 
@@ -2019,5 +2023,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 
 	for (i = 0; i < vsi->nb_used_qps; i++) {
-		if (nb_msix <= 1) {
+		if (vsi->nb_msix == 0) {
+			PMD_DRV_LOG(ERR, "No msix resource");
+			return -EINVAL;
+		} else if (nb_msix <= 1) {
 			if (!rte_intr_allow_others(intr_handle))
 				/* allow to share MISC_VEC_ID */
@@ -2044,4 +2051,6 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 		nb_msix--;
 	}
+
+	return 0;
 }
 
@@ -2287,5 +2296,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	main_vsi->nb_used_qps = dev->data->nb_rx_queues -
 		pf->nb_cfg_vmdq_vsi * RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
-	i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);
+	ret = i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);
+	if (ret < 0)
+		return ret;
 	i40e_vsi_enable_queues_intr(main_vsi);
 
@@ -2293,6 +2304,8 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	for (i = 0; i < pf->nb_cfg_vmdq_vsi; i++) {
 		pf->vmdq[i].vsi->nb_used_qps = RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
-		i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,
-					  I40E_ITR_INDEX_DEFAULT);
+		ret = i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,
+						I40E_ITR_INDEX_DEFAULT);
+		if (ret < 0)
+			return ret;
 		i40e_vsi_enable_queues_intr(pf->vmdq[i].vsi);
 	}
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 2ebbe84782..d224a35020 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1138,5 +1138,5 @@ void i40e_pf_disable_irq0(struct i40e_hw *hw);
 void i40e_pf_enable_irq0(struct i40e_hw *hw);
 int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
-void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
+int i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
 void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);
 void i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-28 11:03:26.639284081 +0100
+++ 0030-net-i40e-fix-binding-interrupt-without-MSI-X-vector.patch	2020-08-28 11:03:25.970955814 +0100
@@ -1 +1 @@
-From 6f1998a4f0411ea3b2bed7c05faa81243917a76e Mon Sep 17 00:00:00 2001
+From 75d6efa0b1a246989bfa5e62cac477d70cfc93e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f1998a4f0411ea3b2bed7c05faa81243917a76e ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 05d5f28615..0c32e451c5 100644
+index 759fc76c85..80410e89ea 100644
@@ -23 +24 @@
-@@ -2118,5 +2118,5 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
+@@ -1979,5 +1979,5 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
@@ -30 +31 @@
-@@ -2138,8 +2138,12 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -1999,8 +1999,12 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
@@ -44 +45 @@
-@@ -2158,5 +2162,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2019,5 +2023,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
@@ -54 +55 @@
-@@ -2183,4 +2190,6 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2044,4 +2051,6 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
@@ -61 +62 @@
-@@ -2423,5 +2432,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2287,5 +2296,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
@@ -70 +71 @@
-@@ -2429,6 +2440,8 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2293,6 +2304,8 @@ i40e_dev_start(struct rte_eth_dev *dev)
@@ -82 +83 @@
-index aef88abed0..19f821829a 100644
+index 2ebbe84782..d224a35020 100644
@@ -85 +86 @@
-@@ -1320,5 +1320,5 @@ void i40e_pf_disable_irq0(struct i40e_hw *hw);
+@@ -1138,5 +1138,5 @@ void i40e_pf_disable_irq0(struct i40e_hw *hw);



More information about the stable mailing list