DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: wenzhuo.lu@intel.com, jingjing.wu@intel.com, lei.yao@intel.com,
	dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/iavf: fix endless loop
Date: Thu, 25 Jul 2019 20:47:19 +0800	[thread overview]
Message-ID: <20190725124719.GA57077@intel.com> (raw)
In-Reply-To: <20190725043829.19440-1-qi.z.zhang@intel.com>

On 07/25, Qi Zhang wrote:
>Change loop index from uint16_t to uint32_t since max
>index 65535 could be exceeded when ring size is 2k+.
>
>Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
>Cc: stable@dpdk.org
>
>Reported-by: Lei Yao <lei.yao@intel.com>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
>v2:
>- add missing fix in reset_tx_queue.
>
> drivers/net/iavf/iavf_rxtx.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
>index d8eb6d296..22d7bb612 100644
>--- a/drivers/net/iavf/iavf_rxtx.c
>+++ b/drivers/net/iavf/iavf_rxtx.c
>@@ -144,7 +144,8 @@ check_rx_bulk_allow(struct iavf_rx_queue *rxq)
> static inline void
> reset_rx_queue(struct iavf_rx_queue *rxq)
> {
>-	uint16_t len, i;
>+	uint16_t len;
>+	uint32_t i;
> 
> 	if (!rxq)
> 		return;
>@@ -174,7 +175,8 @@ static inline void
> reset_tx_queue(struct iavf_tx_queue *txq)
> {
> 	struct iavf_tx_entry *txe;
>-	uint16_t i, prev, size;
>+	uint32_t i, size;
>+	uint16_t prev;
> 
> 	if (!txq) {
> 		PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL");
>-- 
>2.13.6
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

  reply	other threads:[~2019-07-25  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25  4:38 Qi Zhang
2019-07-25 12:47 ` Ye Xiaolong [this message]
2019-07-26  4:46   ` 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=20190725124719.GA57077@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=lei.yao@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /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).