Skip to content

Commit

Permalink
net/iavf: fix vector mapping with queue
Browse files Browse the repository at this point in the history
[ upstream commit b08728b ]

Fix the vector mapping with queue by changing the recircle when
exceeds RX_VEC_START + nb_msix;

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

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
  • Loading branch information
wujingji authored and cpaelzer committed Feb 3, 2021
1 parent 5d475f9 commit 4ebd01e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/iavf/iavf_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,14 @@ 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++) {
vf->rxq_map[vec] |= 1 << i;
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;
}
PMD_DRV_LOG(DEBUG,
Expand Down

0 comments on commit 4ebd01e

Please sign in to comment.