From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v3 08/12] event/octeontx: add burst mode for timer arm Date: Sun, 8 Apr 2018 13:36:16 +0530 Message-ID: <20180408080615.GE6880@jerin> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180403150514.24201-1-pbhagavatula@caviumnetworks.com> <20180403150514.24201-9-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com, dev@dpdk.org To: Pavan Nikhilesh Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0072.outbound.protection.outlook.com [104.47.41.72]) by dpdk.org (Postfix) with ESMTP id 09B861B693 for ; Sun, 8 Apr 2018 10:06:35 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20180403150514.24201-9-pbhagavatula@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Tue, 3 Apr 2018 20:35:10 +0530 > From: Pavan Nikhilesh > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > erik.g.carrillo@intel.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH v3 08/12] event/octeontx: add burst mode for > timer arm > X-Mailer: git-send-email 2.16.3 > > Signed-off-by: Pavan Nikhilesh > --- > drivers/event/octeontx/timvf_evdev.c | 1 + > drivers/event/octeontx/timvf_evdev.h | 3 ++ > drivers/event/octeontx/timvf_worker.c | 38 ++++++++++++++ > drivers/event/octeontx/timvf_worker.h | 95 +++++++++++++++++++++++++++++++++++ > 4 files changed, 137 insertions(+) > > diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c > index a32892107..b23500e0d 100644 > --- a/drivers/event/octeontx/timvf_evdev.c > +++ b/drivers/event/octeontx/timvf_evdev.c > @@ -333,6 +333,7 @@ timvf_timer_adapter_caps_get(const struct rte_eventdev *dev, uint64_t flags, > else > timvf_ops.arm_burst = timvf_timer_reg_burst_mp; > > + timvf_ops.arm_tmo_tick_burst = timvf_timer_reg_brst; IMO, To inline with spec name, may we could use arm_burst/cancel_burst instead of reg_brst or unreg_burst. > timvf_ops.cancel_burst = timvf_timer_unreg_burst; > > *caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT; > diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h > index ab2de678f..d8a6d111f 100644 > --- a/drivers/event/octeontx/timvf_evdev.h > +++ b/drivers/event/octeontx/timvf_evdev.h > @@ -200,6 +200,9 @@ uint16_t timvf_timer_reg_burst_sp(const struct rte_event_timer_adapter *adptr, > struct rte_event_timer **tim, const uint16_t nb_timers); > uint16_t timvf_timer_reg_burst_mp(const struct rte_event_timer_adapter *adptr, > struct rte_event_timer **tim, const uint16_t nb_timers); > +uint16_t timvf_timer_reg_brst(const struct rte_event_timer_adapter *adptr, > + struct rte_event_timer **tim, const uint64_t timeout_tick, > + const uint16_t nb_timers); > void timvf_set_chunk_refill(struct timvf_ring * const timr); > > #endif /* __TIMVF_EVDEV_H__ */ > diff --git a/drivers/event/octeontx/timvf_worker.c b/drivers/event/octeontx/timvf_worker.c > index 139dfdc07..f4f40d150 100644 > --- a/drivers/event/octeontx/timvf_worker.c > +++ b/drivers/event/octeontx/timvf_worker.c > @@ -113,6 +113,44 @@ timvf_timer_reg_burst_mp(const struct rte_event_timer_adapter *adptr, > return index; > } > > +/* Burst mode functions */ > +static inline int > +timvf_add_entry_brst(struct timvf_ring * const timr, const uint16_t rel_bkt, > + struct rte_event_timer ** const tim, > + const struct tim_mem_entry *ents, > + const uint16_t nb_timers) > +{ > + int16_t rem; > + int16_t crem = 0; > + uint8_t lock_cnt; > + uint16_t index = 0; > + uint16_t chunk_remainder = 0; Looks like above all assignments to 'zero' is unnecessary.