From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Ivan Boule <ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] igb/ixgbe: fix index overflow when resetting 4096 queue rings
Date: Fri, 15 Nov 2013 16:15:48 +0100 [thread overview]
Message-ID: <201311151615.48422.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <52862120.8070604-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
15/11/2013 14:26, Ivan Boule :
> 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
> > ---
> >
> > 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
pushed
--
Thomas
prev parent reply other threads:[~2013-11-15 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 13:19 [PATCH] igb/ixgbe: fix index overflow when resetting 4096 queue rings Thomas Monjalon
[not found] ` <1384521548-7729-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-11-15 13:26 ` Ivan Boule
[not found] ` <52862120.8070604-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-11-15 15:15 ` Thomas Monjalon [this message]
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=201311151615.48422.thomas.monjalon@6wind.com \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=ivan.boule-pdR9zngts4EAvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.