From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7054037A6 for ; Thu, 19 Mar 2015 20:42:23 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 19 Mar 2015 12:42:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,431,1422950400"; d="scan'208";a="701237611" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga002.jf.intel.com with ESMTP; 19 Mar 2015 12:42:22 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.117]) by IRSMSX152.ger.corp.intel.com ([169.254.6.205]) with mapi id 14.03.0195.001; Thu, 19 Mar 2015 19:42:21 +0000 From: "Ananyev, Konstantin" To: "Wodkowski, PawelX" , "dev@dpdk.org" Thread-Topic: [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode setup Thread-Index: AQHQYl9nrs8Iu0uIOka/r+G8t/aCop0kNJxw Date: Thu, 19 Mar 2015 19:42:20 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213F78FC@irsmsx105.ger.corp.intel.com> References: <1426781356-13999-1-git-send-email-pawelx.wodkowski@intel.com> In-Reply-To: <1426781356-13999-1-git-send-email-pawelx.wodkowski@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 19:42:23 -0000 > -----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, He= lin; Wodkowski, PawelX > Subject: [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode set= up >=20 > From: Pawel Wodkowski >=20 > 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. >=20 > Fixes: 01fa1d6 ("ixgbe: unify Rx setup") > Signed-off-by: Pawel Wodkowski Acked-by: Konstantin Ananyev > --- > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixg= be_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 ix= gbe_rx_queue *rxq) > * entries is always allocated > */ > memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf)); > - for (i =3D 0; i < RTE_PMD_IXGBE_RX_MAX_BURST; ++i) { > - rxq->sw_ring[rxq->nb_rx_desc + i].mbuf =3D &rxq->fake_mbuf; > + for (i =3D rxq->nb_rx_desc; i < len; ++i) { > + rxq->sw_ring[i].mbuf =3D &rxq->fake_mbuf; > } >=20 > rxq->rx_nb_avail =3D 0; > -- > 1.9.1