From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 58DD02C50; Tue, 21 Feb 2017 02:02:43 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 20 Feb 2017 17:02:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,187,1484035200"; d="scan'208";a="60593274" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 20 Feb 2017 17:02:42 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 20 Feb 2017 17:02:42 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 20 Feb 2017 17:02:41 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Tue, 21 Feb 2017 09:02:39 +0800 From: "Zhang, Qi Z" To: "Yigit, Ferruh" , "Wu, Jingjing" , "Zhang, Helin" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-stable] [PATCH v2] net/i40e: fix compile error Thread-Index: AQHSi0jcgJeP8uAES0S+jwzYUTKRkaFxQIWAgAFgPlA= Date: Tue, 21 Feb 2017 01:02:39 +0000 Message-ID: <039ED4275CED7440929022BC67E706115305D3DF@SHSMSX103.ccr.corp.intel.com> References: <1487549305-5301-1-git-send-email-qi.z.zhang@intel.com> <9035b7f4-1bee-75d4-adb6-8a8cbed04c49@intel.com> In-Reply-To: <9035b7f4-1bee-75d4-adb6-8a8cbed04c49@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWM2ZDk4NjktNWQ3MS00YTg1LTg1ZWUtYjg4MWJhYjQwN2M3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ikk2Z0ZjYU1GeW0yeGdnTHA0M1wvb1FUT2JqRE5WcndXUjVqVXlHTHJ1dnJzPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net/i40e: fix compile error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 01:02:45 -0000 Hi Ferruh: > -----Original Message----- > From: Yigit, Ferruh > Sent: Monday, February 20, 2017 7:44 PM > To: Zhang, Qi Z ; Wu, Jingjing ; > Zhang, Helin > Cc: dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-stable] [PATCH v2] net/i40e: fix compile error >=20 > On 2/20/2017 12:08 AM, Qi Zhang wrote: > > This patch fix the compile error when > > RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC > > is disabled. >=20 > Compile error: > CC i40e_rxtx_vec_sse.o > .../drivers/net/i40e/i40e_rxtx_vec_sse.c:72:26: > error: no member named 'fake_mbuf' in 'struct i40e_rx_queue' > rxep[i].mbuf =3D &rxq->fake_mbuf; > ~~~ ^ >=20 > > > > Fixes: 9ed94e5bb04e ("i40e: add vector Rx") > > Cc: stable@dpdk.org > > > > Signed-off-by: Qi Zhang > > --- > > drivers/net/i40e/i40e_rxtx.c | 2 +- > > drivers/net/i40e/i40e_rxtx.h | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_rxtx.c > > b/drivers/net/i40e/i40e_rxtx.c index 48429cc..40f4a45 100644 > > --- a/drivers/net/i40e/i40e_rxtx.c > > +++ b/drivers/net/i40e/i40e_rxtx.c > > @@ -2209,11 +2209,11 @@ i40e_reset_rx_queue(struct i40e_rx_queue > *rxq) > > for (i =3D 0; i < len * sizeof(union i40e_rx_desc); i++) > > ((volatile char *)rxq->rx_ring)[i] =3D 0; > > > > -#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC > > memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf)); > > for (i =3D 0; i < RTE_PMD_I40E_RX_MAX_BURST; ++i) > > rxq->sw_ring[rxq->nb_rx_desc + i].mbuf =3D &rxq->fake_mbuf; > > > > +#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC >=20 > Hi Qi, >=20 > Just to double check, below update in i40e_rxtx.h is enough to fix the bu= ild > error. >=20 > Can you please confirm assigning fake_mbuf to sw_ring[] is required step, > independent from RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC enabled or not? I think it's necessary to assign fake_mbuf for couple additional entries in= sw_ring=20 Because there is no place to initialize these entries (i40e_rxq_rearm only = cover entries round in nb_rx_desc) while _recv_raw_pkts_vec require these e= ntries in some situation.(though only RTE_I40E_DESCS_PER_LOOP-1 entries are= required, but we can reuse the code) > And it can be good to document this in commit log. OK, I will add it in v3 >=20 > Thanks, > ferruh >=20 >=20 > > rxq->rx_nb_avail =3D 0; > > rxq->rx_next_avail =3D 0; > > rxq->rx_free_trigger =3D (uint16_t)(rxq->rx_free_thresh - 1); diff > > --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h > > index 9df8a56..4f7f319 100644 > > --- a/drivers/net/i40e/i40e_rxtx.h > > +++ b/drivers/net/i40e/i40e_rxtx.h > > @@ -119,11 +119,11 @@ struct i40e_rx_queue { > > uint16_t nb_rx_hold; /**< number of held free RX desc */ > > struct rte_mbuf *pkt_first_seg; /**< first segment of current packet = */ > > struct rte_mbuf *pkt_last_seg; /**< last segment of current packet > > */ > > + struct rte_mbuf fake_mbuf; /**< dummy mbuf */ > > #ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC > > uint16_t rx_nb_avail; /**< number of staged packets ready */ > > uint16_t rx_next_avail; /**< index of next staged packets */ > > uint16_t rx_free_trigger; /**< triggers rx buffer allocation */ > > - struct rte_mbuf fake_mbuf; /**< dummy mbuf */ > > struct rte_mbuf *rx_stage[RTE_PMD_I40E_RX_MAX_BURST * 2]; #endif > > > >