From: Jie Wang <jie1x.wang@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, Jie Wang <jie1x.wang@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/ice: fix queue config in DCF
Date: Fri, 20 Aug 2021 13:54:58 +0000 [thread overview]
Message-ID: <20210820135458.317056-1-jie1x.wang@intel.com> (raw)
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
next reply other threads:[~2021-08-20 5:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 13:54 Jie Wang [this message]
2021-08-24 15:13 ` [dpdk-stable] [PATCH v2] " Jie Wang
2021-08-29 13:13 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210820135458.317056-1-jie1x.wang@intel.com \
--to=jie1x.wang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).