From 415363e2fc58ad89caf65d3d170b004751376f1a Mon Sep 17 00:00:00 2001 From: Jie Wang Date: Tue, 24 Aug 2021 15:13:17 +0000 Subject: [PATCH] net/ice: fix queue config in DCF When DCF configures rx_queues, it may cause the pointer of rx_queues to go out of bounds. This patch expands the scope of the judgment condition to fix this issue. Fixes: 4b0d391f0eab ("net/ice: add queue config in DCF") Cc: stable@dpdk.org Signed-off-by: Jie Wang Acked-by: Qi Zhang --- drivers/net/ice/ice_dcf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 5b23cc90e0..ee3c85b90d 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -882,11 +882,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw) } vc_qp->rxq.vsi_id = hw->vsi_res->vsi_id; vc_qp->rxq.queue_id = i; - vc_qp->rxq.max_pkt_size = rxq[i]->max_pkt_len; if (i >= hw->eth_dev->data->nb_rx_queues) continue; + vc_qp->rxq.max_pkt_size = rxq[i]->max_pkt_len; vc_qp->rxq.ring_len = rxq[i]->nb_rx_desc; vc_qp->rxq.dma_ring_addr = rxq[i]->rx_ring_dma; vc_qp->rxq.databuffer_size = rxq[i]->rx_buf_len; -- 2.20.1