From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH 08/10] event/octeontx: add option to use fpavf as chunk pool Date: Tue, 27 Feb 2018 00:55:05 +0530 Message-ID: <20180226192504.GA10695@ltp-pvn> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180216213700.3415-9-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: "Carrillo, Erik G" , "jerin.jacob@caviumnetworks.com" , "santosh.shukla@caviumnetworks.com" Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0084.outbound.protection.outlook.com [104.47.41.84]) by dpdk.org (Postfix) with ESMTP id 4E66E126B for ; Mon, 26 Feb 2018 20:25:28 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Gabriel, On Fri, Feb 23, 2018 at 08:17:07PM +0000, Carrillo, Erik G wrote: > Hi Pavan, > > > -----Original Message----- > > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > > Sent: Friday, February 16, 2018 3:37 PM > > To: jerin.jacob@caviumnetworks.com; > > santosh.shukla@caviumnetworks.com; Carrillo, Erik G > > > > Cc: dev@dpdk.org; Pavan Nikhilesh > > Subject: [dpdk-dev] [PATCH 08/10] event/octeontx: add option to use fpavf > > as chunk pool > > > > Add compile-time configurable option to force TIMvf to use Octeontx FPAvf > > pool manager as its chunk pool. > > When FPAvf is used as pool manager the TIMvf automatically frees the > > chunks to FPAvf through gpool-id. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > <...snipped...> > > > @@ -241,7 +243,16 @@ timvf_add_entry_brst(struct timvf_ring *timr, const > > uint16_t rel_bkt, > > bkt->first_chunk = (uint64_t) chunk; > > } > > } else { > > +#ifndef RTE_PMD_OCTEONTX_TIMVF_USE_FPAVF > > chunk = timr_clr_bkt(timr, bkt); > > +#else > > + if (unlikely(rte_mempool_get(timr- > > >meta.chunk_pool, > > + (void **)&chunk))) { > > + timr_bkt_set_rem(bkt, 0); > > + tim[index]->state = > > RTE_EVENT_TIMER_ERROR; > > + return -ENOMEM; > > You return a negative errno value here, but in this case the caller was expecting the number that succeeded. Agreed, will add a check in `timvf_timer_reg_brst`[1] to check if call to timvf_add_entry_brst has failed. [1]http://dpdk.org/dev/patchwork/patch/35206/ > > Regards, > Gabriel Thanks, Pavan. > > > + } > > +#endif > > bkt->first_chunk = (uint64_t) chunk; > > } > > *(uint64_t *)(chunk + nb_chunk_slots) = 0; @@ -355,7 > > +366,18 @@ timvf_add_entry_sp(struct timvf_ring *timr, const uint32_t > > <...snipped...> >