From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Wodkowski, PawelX" <pawelx.wodkowski@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode setup
Date: Thu, 19 Mar 2015 19:42:20 +0000 [thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258213F78FC@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <1426781356-13999-1-git-send-email-pawelx.wodkowski@intel.com>
> -----Original Message-----
> From: Wodkowski, PawelX
> Sent: Thursday, March 19, 2015 4:09 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Ananyev, Konstantin; Mcnamara, John; Zhang, Helin; Wodkowski, PawelX
> Subject: [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode setup
>
> From: Pawel Wodkowski <pawelx.wdkowski@intel.com>
>
> When bulk alloc is enabled at compile time but preconditions for
> it are not met at runtime the ixgbe_reset_rx_queue() function
> overrides rxq->sw_ring not allocated elements.
>
> Fixes: 01fa1d6 ("ixgbe: unify Rx setup")
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> ---
> lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index 42f0aa5..dddc12f 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -2111,8 +2111,8 @@ ixgbe_reset_rx_queue(struct ixgbe_hw *hw, struct ixgbe_rx_queue *rxq)
> * entries is always allocated
> */
> memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf));
> - for (i = 0; i < RTE_PMD_IXGBE_RX_MAX_BURST; ++i) {
> - rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;
> + for (i = rxq->nb_rx_desc; i < len; ++i) {
> + rxq->sw_ring[i].mbuf = &rxq->fake_mbuf;
> }
>
> rxq->rx_nb_avail = 0;
> --
> 1.9.1
next prev parent reply other threads:[~2015-03-19 19:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 16:09 Pawel Wodkowski
2015-03-19 17:02 ` De Lara Guarch, Pablo
2015-03-19 19:42 ` Ananyev, Konstantin [this message]
2015-03-20 21:46 ` Thomas Monjalon
2015-03-20 6:50 ` Jiajia, SunX
2015-03-20 21:45 ` Thomas Monjalon
2015-03-23 2:10 ` Jiajia, SunX
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=2601191342CEEE43887BDE71AB977258213F78FC@irsmsx105.ger.corp.intel.com \
--to=konstantin.ananyev@intel.com \
--cc=dev@dpdk.org \
--cc=pawelx.wodkowski@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).