From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Carrillo, Erik G" Subject: Re: [PATCH 06/10] event/octeontx: add single producer timer arm variant Date: Wed, 7 Mar 2018 19:41:44 +0000 Message-ID: References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180216213700.3415-7-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Pavan Nikhilesh , "jerin.jacob@caviumnetworks.com" , "santosh.shukla@caviumnetworks.com" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 457895F29 for ; Wed, 7 Mar 2018 20:41:46 +0100 (CET) In-Reply-To: <20180216213700.3415-7-pbhagavatula@caviumnetworks.com> Content-Language: en-US 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 Pavan, <... snipped ...> > @@ -261,8 +267,12 @@ timvf_ring_create(struct rte_event_timer_adapter > *adptr) > timvf_write64(0x7, (uint8_t *)timr->vbar0 + > TIM_VF_NRSPERR_ENA_W1C); > timvf_write64(0x7, (uint8_t *)timr->vbar0 + > TIM_VF_NRSPERR_ENA_W1S); >=20 > - adptr->arm_burst =3D timvf_timer_reg_burst_mp; > - adptr->arm_tmo_tick_burst =3D NULL; > + if (mp_flags) > + adptr->arm_burst =3D timvf_timer_reg_burst_sp; > + else > + adptr->arm_burst =3D timvf_timer_reg_burst_mp; > + > + adptr->arm_tmo_tick_burst =3D timvf_timer_reg_brst; > adptr->cancel_burst =3D timvf_timer_unreg_burst; >=20 > return 0; The values assigned here to adptr->(arm_burst|arm_tmo_tick_burst|cancel_bur= st) would get overwritten by the caller with the values that are set immedi= ately below. I.e., the below should be sufficient by itself. > @@ -297,11 +307,13 @@ timvf_timer_adapter_caps_get(const struct > rte_eventdev *dev, uint64_t flags, > uint32_t *caps, const struct rte_event_timer_adapter_ops > **ops) { > RTE_SET_USED(dev); > - RTE_SET_USED(flags); >=20 > - timvf_ops.arm_burst =3D timvf_timer_reg_burst_mp; > - timvf_ops.arm_tmo_tick_burst =3D NULL; > + if (flags & RTE_EVENT_TIMER_ADAPTER_F_SP_PUT) > + timvf_ops.arm_burst =3D timvf_timer_reg_burst_sp; > + else > + timvf_ops.arm_burst =3D timvf_timer_reg_burst_mp; >=20 > + timvf_ops.arm_tmo_tick_burst =3D timvf_timer_reg_brst; > timvf_ops.cancel_burst =3D timvf_timer_unreg_burst; > *caps =3D RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT; > *ops =3D &timvf_ops; > diff --git a/drivers/event/octeontx/timvf_evdev.h > b/drivers/event/octeontx/timvf_evdev.h > index c80e147e8..b5db233bb 100644 > --- a/drivers/event/octeontx/timvf_evdev.h > +++ b/drivers/event/octeontx/timvf_evdev.h > @@ -186,8 +186,13 @@ bkt_mod(uint32_t rel_bkt, uint32_t nb_bkts) <... snipped ...> Regards, Gabriel