patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/iavf: fix vector id assignment
@ 2020-12-30  6:53 dapengx.yu
  2020-12-30  7:31 ` [dpdk-stable] [dpdk-dev] " Xie, WeiX
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: dapengx.yu @ 2020-12-30  6:53 UTC (permalink / raw)
  To: jingjing.wu, beilei.xing; +Cc: dev, YU DAPENG, stable

From: YU DAPENG <dapengx.yu@intel.com>

When the interrupt handle instance allows none packet I/O interrupts,
the max value of vector_id is set to be less than the number of msix
interrupts, but not equal to it. Which may cause same vector_id is sent
to PF with opcode VIRTCHNL_OP_CONFIG_IRQ_MAP to setup the cause of
interrupt mapping in iavf_config_irq_map(), these are invalid
parameters, cause error: VIRTCHNL_STATUS_ERR_PARAM(-5). So add code to
set the max value of vector_id to be equal to the number of msix
interrupts.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: YU DAPENG <dapengx.yu@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 7e3c26a94..54ea3a36c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -578,7 +578,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				qv_map[i].queue_id = i;
 				qv_map[i].vector_id = vec;
 				intr_handle->intr_vec[i] = vec++;
-				if (vec >= vf->nb_msix)
+				if (vec > vf->nb_msix)
 					vec = IAVF_RX_VEC_START;
 			}
 			vf->qv_map = qv_map;
-- 
2.27.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-12  7:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30  6:53 [dpdk-stable] [PATCH] net/iavf: fix vector id assignment dapengx.yu
2020-12-30  7:31 ` [dpdk-stable] [dpdk-dev] " Xie, WeiX
2021-01-04  0:25 ` Zhang, Qi Z
2021-01-04  2:01   ` Yu, DapengX
2021-01-08 10:21 ` [dpdk-stable] " dapengx.yu
2021-01-11  9:06   ` [dpdk-stable] [dpdk-dev] " Xie, WeiX
2021-01-12  6:26   ` [dpdk-stable] " Xu, Ting
2021-01-12  6:44     ` Wu, Jingjing
2021-01-12  7:08       ` Yu, DapengX
2021-01-12  6:46     ` Yu, DapengX

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).