[dpdk-dev] [PATCH 06/10] event/octeontx: add single producer timer arm variant
Carrillo, Erik G
erik.g.carrillo at intel.com
Wed Mar 7 20:41:44 CET 2018
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);
>
> - adptr->arm_burst = timvf_timer_reg_burst_mp;
> - adptr->arm_tmo_tick_burst = NULL;
> + if (mp_flags)
> + adptr->arm_burst = timvf_timer_reg_burst_sp;
> + else
> + adptr->arm_burst = timvf_timer_reg_burst_mp;
> +
> + adptr->arm_tmo_tick_burst = timvf_timer_reg_brst;
> adptr->cancel_burst = timvf_timer_unreg_burst;
>
> return 0;
The values assigned here to adptr->(arm_burst|arm_tmo_tick_burst|cancel_burst) would get overwritten by the caller with the values that are set immediately 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);
>
> - timvf_ops.arm_burst = timvf_timer_reg_burst_mp;
> - timvf_ops.arm_tmo_tick_burst = NULL;
> + if (flags & RTE_EVENT_TIMER_ADAPTER_F_SP_PUT)
> + timvf_ops.arm_burst = timvf_timer_reg_burst_sp;
> + else
> + timvf_ops.arm_burst = timvf_timer_reg_burst_mp;
>
> + timvf_ops.arm_tmo_tick_burst = timvf_timer_reg_brst;
> timvf_ops.cancel_burst = timvf_timer_unreg_burst;
> *caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT;
> *ops = &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
More information about the dev
mailing list