DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ivan Boule <ivan.boule@6wind.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] igb/ixgbe: fix index overflow when resetting 4096 queue rings
Date: Fri, 15 Nov 2013 14:26:56 +0100	[thread overview]
Message-ID: <52862120.8070604@6wind.com> (raw)
In-Reply-To: <1384521548-7729-1-git-send-email-thomas.monjalon@6wind.com>

On 11/15/2013 02:19 PM, Thomas Monjalon wrote:
> Rings are resetted with a loop because memset cannot be used without
> issuing a warning about volatile casting.
> The index of the loop was a 16-bit variable which is is sufficient for
> ring entries number but not for the byte size of the whole ring.
> The overflow happens when rings are configured for 4096 entries
> (descriptor size is 16 bytes). The result is an endless loop.
>
> It is fixed by indexing ring entries and resetting all bytes of the entry
> with a simple assignment.
> The descriptor initializer is zeroed thanks to its static declaration.
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>   lib/librte_pmd_e1000/igb_rxtx.c   |   14 ++++++--------
>   lib/librte_pmd_ixgbe/ixgbe_rxtx.c |   10 ++++++----
>   2 files changed, 12 insertions(+), 12 deletions(-)
>
>
Acked-by: Ivan Boule <ivan.boule@6wind.com>

-- 
Ivan Boule
6WIND Development Engineer

  reply	other threads:[~2013-11-15 13:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 13:19 Thomas Monjalon
2013-11-15 13:26 ` Ivan Boule [this message]
2013-11-15 15:15   ` Thomas Monjalon

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=52862120.8070604@6wind.com \
    --to=ivan.boule@6wind.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.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).