* [dpdk-dev] [PATCH] net/ice: fix queue config in DCF
@ 2021-08-20 13:54 Jie Wang
2021-08-24 15:13 ` [dpdk-dev] [PATCH v2] " Jie Wang
0 siblings, 1 reply; 3+ messages in thread
From: Jie Wang @ 2021-08-20 13:54 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, Jie Wang, stable
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 <jie1x.wang@intel.com>
---
drivers/net/ice/ice_dcf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 4c2e0c7216..45820a0a82 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -880,13 +880,13 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
vc_qp->txq.ring_len = txq[i]->nb_tx_desc;
vc_qp->txq.dma_ring_addr = txq[i]->tx_ring_dma;
}
- 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.vsi_id = hw->vsi_res->vsi_id;
+ vc_qp->rxq.queue_id = i;
+ 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.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH v2] net/ice: fix queue config in DCF
2021-08-20 13:54 [dpdk-dev] [PATCH] net/ice: fix queue config in DCF Jie Wang
@ 2021-08-24 15:13 ` Jie Wang
2021-08-29 13:13 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Jie Wang @ 2021-08-24 15:13 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, Jie Wang, stable
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 <jie1x.wang@intel.com>
---
v2: assign values to rxq.vsi_id and rxq.queue_id, ensure rxq.vsi_id
is equal to txq.vsi_id and rxq.queue_id is equal to txq.queue_id.
---
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 4c2e0c7216..a68b355cb8 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.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ice: fix queue config in DCF
2021-08-24 15:13 ` [dpdk-dev] [PATCH v2] " Jie Wang
@ 2021-08-29 13:13 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-08-29 13:13 UTC (permalink / raw)
To: Wang, Jie1X, dev; +Cc: stable
> -----Original Message-----
> From: Wang, Jie1X <jie1x.wang@intel.com>
> Sent: Tuesday, August 24, 2021 11:13 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Jie1X <jie1x.wang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v2] 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 <jie1x.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-29 13:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 13:54 [dpdk-dev] [PATCH] net/ice: fix queue config in DCF Jie Wang
2021-08-24 15:13 ` [dpdk-dev] [PATCH v2] " Jie Wang
2021-08-29 13:13 ` Zhang, Qi Z
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).