diff mbox series

[v2] net/iavf: fix vector mapping with queue

Message ID 20210128150021.784-1-jingjing.wu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series [v2] net/iavf: fix vector mapping with queue | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-testing fail Testing issues
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Wu, Jingjing Jan. 28, 2021, 3 p.m. UTC
Fix the vector mapping with queue by changing the recircle when
exceeds RX_VEC_START + nb_msix;

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
v2:
 - fix compile warning.

 drivers/net/iavf/iavf_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Zhang, Qi Z Jan. 29, 2021, 2:24 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Jingjing Wu
> Sent: Thursday, January 28, 2021 11:00 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] net/iavf: fix vector mapping with queue
> 
> Fix the vector mapping with queue by changing the recircle when exceeds
> RX_VEC_START + nb_msix;
> 
> Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> v2:
>  - fix compile warning.
> 
>  drivers/net/iavf/iavf_ethdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index
> cf6ea0b15..744904e6e 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -612,15 +612,15 @@ static int iavf_config_rx_queues_irqs(struct
> rte_eth_dev *dev,
>  			/* If Rx interrupt is reuquired, and we can use
>  			 * multi interrupts, then the vec is from 1
>  			 */
> -			vf->nb_msix = RTE_MIN(vf->vf_res->max_vectors,
> -					      intr_handle->nb_efd);
> +			vf->nb_msix = RTE_MIN(intr_handle->nb_efd,
> +				 (uint16_t)(vf->vf_res->max_vectors - 1));
>  			vf->msix_base = IAVF_RX_VEC_START;
>  			vec = IAVF_RX_VEC_START;
>  			for (i = 0; i < dev->data->nb_rx_queues; i++) {
>  				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 + IAVF_RX_VEC_START)
>  					vec = IAVF_RX_VEC_START;
>  			}
>  			vf->qv_map = qv_map;
> --
> 2.21.1

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index cf6ea0b15..744904e6e 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -612,15 +612,15 @@  static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 			/* If Rx interrupt is reuquired, and we can use
 			 * multi interrupts, then the vec is from 1
 			 */
-			vf->nb_msix = RTE_MIN(vf->vf_res->max_vectors,
-					      intr_handle->nb_efd);
+			vf->nb_msix = RTE_MIN(intr_handle->nb_efd,
+				 (uint16_t)(vf->vf_res->max_vectors - 1));
 			vf->msix_base = IAVF_RX_VEC_START;
 			vec = IAVF_RX_VEC_START;
 			for (i = 0; i < dev->data->nb_rx_queues; i++) {
 				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 + IAVF_RX_VEC_START)
 					vec = IAVF_RX_VEC_START;
 			}
 			vf->qv_map = qv_map;