From: "Peng, ZhihongX" <zhihongx.peng@intel.com>
To: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"ivan.ilchenko@oktetlabs.ru" <ivan.ilchenko@oktetlabs.ru>,
"stable@dpdk.org" <stable@dpdk.org>,
"Xia, Chenbo" <chenbo.xia@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/virtio: fix check scatter on all Rx queues
Date: Mon, 11 Oct 2021 02:22:28 +0000 [thread overview]
Message-ID: <PH0PR11MB55962E46A0BFFEFD5F11CEB6F0B59@PH0PR11MB5596.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211008054945.368548-1-zhihongx.peng@intel.com>
> -----Original Message-----
> From: Peng, ZhihongX <zhihongx.peng@intel.com>
> Sent: Friday, October 8, 2021 1:50 PM
> To: Xia, Chenbo <chenbo.xia@intel.com>; maxime.coquelin@redhat.com
> Cc: dev@dpdk.org; ivan.ilchenko@oktetlabs.ru; Peng, ZhihongX
> <zhihongx.peng@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/virtio: fix check scatter on all Rx queues
>
> 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 | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index b60eeb24ab..213110cff4 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -888,8 +888,11 @@ 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];
> + if (vq == NULL)
> + continue;
> +
> rxvq = &vq->rxq;
> if (rxvq->mpool == NULL)
> continue;
> --
> 2.25.1
Hi Maxime,
Can you give me an ack?
next prev parent reply other threads:[~2021-10-11 2:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 8:31 [dpdk-dev] [DPDK] " 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 [this message]
2021-10-11 2:25 ` Peng, ZhihongX
2021-10-12 7:44 ` Maxime Coquelin
2021-10-21 12:26 ` Maxime Coquelin
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=PH0PR11MB55962E46A0BFFEFD5F11CEB6F0B59@PH0PR11MB5596.namprd11.prod.outlook.com \
--to=zhihongx.peng@intel.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=ivan.ilchenko@oktetlabs.ru \
--cc=maxime.coquelin@redhat.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).