DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [DPDK] net/virtio: fix check scatter on all Rx queues
@ 2021-08-04  8:31 zhihongx.peng
  2021-09-13 15:34 ` Maxime Coquelin
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: zhihongx.peng @ 2021-08-04  8:31 UTC (permalink / raw)
  To: chenbo.xia, maxime.coquelin; +Cc: dev, ivan.ilchenko, Zhihong Peng, stable

From: Zhihong Peng <zhihongx.peng@intel.com>

This patch fixes the wrong way to obtain virtqueue.
The end of virtqueue cannot be judged based on whether
the array is NULL.

Fixes: 4e8169eb0d2d (net/virtio: fix Rx scatter offload)
Cc: stable@dpdk.org

Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e58085a2c9..f2d19dc9d6 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -873,8 +873,8 @@ virtio_check_scatter_on_all_rx_queues(struct rte_eth_dev *dev,
 	if (hw->vqs == NULL)
 		return true;
 
-	for (qidx = 0; (vq = hw->vqs[2 * qidx + VTNET_SQ_RQ_QUEUE_IDX]) != NULL;
-	     qidx++) {
+	for (qidx = 0; qidx < hw->max_queue_pairs; qidx++) {
+		vq = hw->vqs[2 * qidx + VTNET_SQ_RQ_QUEUE_IDX];
 		rxvq = &vq->rxq;
 		if (rxvq->mpool == NULL)
 			continue;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-21 12:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04  8:31 [dpdk-dev] [DPDK] net/virtio: fix check scatter on all Rx queues zhihongx.peng
2021-09-13 15:34 ` Maxime Coquelin
2021-09-15 18:37 ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-09-21 17:45   ` Kevin Traynor
2021-09-22  8:13     ` Peng, ZhihongX
2021-09-30 18:43       ` David Marchand
2021-10-08  5:49 ` [dpdk-dev] [PATCH v2] " zhihongx.peng
2021-10-11  2:22   ` Peng, ZhihongX
2021-10-11  2:25   ` Peng, ZhihongX
2021-10-12  7:44   ` Maxime Coquelin
2021-10-21 12:26   ` Maxime Coquelin

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).