> -----Original Message-----
> From: Jerin Jacob Kollanukkaran
> Sent: Thursday, March 28, 2019 10:56 AM
> To: Pavan Nikhilesh Bhagavatula <pbhagavat...@marvell.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] app/eventdev: add option to set global
> dequeue tmo
> 
> On Wed, 2019-03-27 at 17:07 +0000, Pavan Nikhilesh Bhagavatula wrote:
> > From: Pavan Nikhilesh <pbhagavat...@marvell.com>
> >
> > Add option to provide a global dequeue timeout that is used to create
> > the eventdev.
> > The dequeue timeout provided will be common across all the worker
> > ports. If the eventdev hardware supports power management through
> > dequeue timeout then this option can be used for verifying power
> > demands at various packet rates.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com>
> > ---
> >
> > +
> > +   rte_event_dev_info_get(opt->dev_id, &info);
> > +   if (opt->deq_tmo_nsec) {
> > +           if (opt->deq_tmo_nsec < info.min_dequeue_timeout_ns) {
> > +                   opt->deq_tmo_nsec =
> > info.min_dequeue_timeout_ns;
> > +                   evt_info("dequeue_timeout_ns too low, using
> > %d",
> > +                                   opt->deq_tmo_nsec);
> > +           }
> > +           if (opt->deq_tmo_nsec > info.max_dequeue_timeout_ns) {
> > +                   opt->deq_tmo_nsec =
> > info.max_dequeue_timeout_ns;
> > +                   evt_info("dequeue_timeout_ns too high, using
> > %d",
> > +                                   opt->deq_tmo_nsec);
> > +           }
> > +   }
> 
> This code is repeating in multiple palaces, Move this as a function as use
> everywhere. Other than this, it looks good to me.

Ack will move it to common file and send the next version.

> 
> 
> 
> 

Reply via email to