patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Mao Jiang <maox.jiang@intel.com>
Cc: Qi Zhang <qi.z.zhang@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/i40e: fix binding interrupt without MSI-X vector' has been queued to LTS release 18.11.10
Date: Fri, 28 Aug 2020 11:12:56 +0100	[thread overview]
Message-ID: <20200828101308.223767-30-ktraynor@redhat.com> (raw)
In-Reply-To: <20200828101308.223767-1-ktraynor@redhat.com>

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@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@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@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@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);


  parent reply	other threads:[~2020-08-28 10:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 10:12 [dpdk-stable] patch 'net/bonding: fix error code on device creation' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/af_packet: fix check of file descriptors' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/af_packet: fix memory leak on init failure' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/af_packet: fix munmap " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/bonding: fix MAC address when switching active port' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/bonding: fix MAC address when one port resets' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx writeback packet' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/ixgbe: fix MAC control frame forward' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/ixgbe: fix flow control status' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/bonding: delete redundant code' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/i40e: report VLAN filter capability' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/e1000: report VLAN extend " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/e1000: fix crash on Tx done clean up' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'vhost: fix double-free with zero-copy' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net: fix pedantic build' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'doc: fix some typos in Linux guide' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'doc: fix typo in bbdev test " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'bus/vdev: fix a typo in doxygen comment' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'test/cycles: restore default delay callback' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'event/dpaa: remove dead code' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'app/eventdev: fix capability check in pipeline ATQ test' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'event/dpaa2: add all-types queue capability flag' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'common/qat: fix uninitialized variable' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'crypto/armv8: remove debug option' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'crypto/armv8: use dedicated log type' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/mlx5: fix crash in NVGRE item translation' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/mlx4: optimize stack memory size in probe' " Kevin Traynor
2020-08-28 10:12 ` Kevin Traynor [this message]
2020-08-28 10:12 ` [dpdk-stable] patch 'net/i40e: fix flow director MSI-X resource allocation' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/qede: remove dead code' " Kevin Traynor
2020-08-28 10:12 ` [dpdk-stable] patch 'net/virtio-user: fix status management' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'net/virtio-user: check tap system call setting' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'net/kni: set packet input port in Rx' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'examples/packet_ordering: use proper exit method' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'net/netvsc: fix crash during Tx' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'doc: fix ethtool app path' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'net/bonding: fix dead loop on RSS RETA update' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'net/i40e: remove duplicate tunnel type check' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'kni: fix reference to master/slave process' " Kevin Traynor
2020-08-28 10:13 ` [dpdk-stable] patch 'doc: fix reference to master " Kevin Traynor

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=20200828101308.223767-30-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=maox.jiang@intel.com \
    --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).