From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: "Nemeth, Balazs" <balazs.nemeth-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] ixgbe: fix crash caused by bulk allocation failure in vector pmd
Date: Mon, 29 Sep 2014 13:00:57 +0200 [thread overview]
Message-ID: <3180739.dqlX9CSYNs@xps13> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772582137C148-kPTMFJFq+rGvNW/NfzhIbrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
> > Since the introduction of vector PMD, a bug in ixgbe_rxq_rearm could
> > cause a crash. As long as the memory pool allocated to the RX queue
> > has mbufs available, there is no problem. After allocation of _all_
> > mbufs from the memory pool, previously returned mbufs by
> > rte_eth_rx_burst could be accessed by subsequent calls to the PMD and
> > could be returned by subsequent calls to rte_eth_rx_burst. From the
> > perspective of the application, the means that fields within the mbuf
> > could change and that previously allocated mbufs could appear multiple
> > times.
> >
> > After failure of mbuf allocation, the dd bits should indicate that the
> > packets are not ready. For this, this patch adds code to reset the dd
> > bits in the first RTE_IXGBE_DESCS_PER_LOOP packets of the next
> > RTE_IXGBE_RXQ_REARM_THRESH packets only if the next
> > RTE_IXGBE_RXQ_REARM_THRESH packets that will be accessed contain
> > previously allocated packets.
> >
> > Setting the bits is not enough. The bits are checked _after_ setting
> > the mbuf fields, thus a mechanism is needed to prevent the previously
> > used mbuf pointers from being accessed during the speculative load of
> > the mbuf fields. For this reason, not only the dd bits are reset, but
> > also the mbufs associated to those descriptors are set to point to a
> > "fake" mbuf.
> >
> > Signed-off-by: Balazs Nemeth <balazs.nemeth-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied
Thanks
--
Thomas
prev parent reply other threads:[~2014-09-29 11:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 9:57 [PATCH] ixgbe: fix crash caused by bulk allocation failure in vector pmd Balazs Nemeth
[not found] ` <1411725440-4520-1-git-send-email-balazs.nemeth-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-09-26 10:34 ` Ananyev, Konstantin
[not found] ` <2601191342CEEE43887BDE71AB9772582137C148-kPTMFJFq+rGvNW/NfzhIbrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-09-29 11:00 ` 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=3180739.dqlX9CSYNs@xps13 \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=balazs.nemeth-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@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.