[dpdk-dev] [PATCH 07/10] event/octeontx: optimize timer adapter resolution parameters

Pavan Nikhilesh pbhagavatula at caviumnetworks.com
Mon Feb 19 10:34:57 CET 2018


On Sat, Feb 17, 2018 at 10:36:24AM +0530, Jerin Jacob wrote:
> -----Original Message-----
> > Date: Sat, 17 Feb 2018 03:06:57 +0530
> > From: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> > To: jerin.jacob at caviumnetworks.com, santosh.shukla at caviumnetworks.com,
> >  erik.g.carrillo at intel.com
> > Cc: dev at dpdk.org, Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH 07/10] event/octeontx: optimize timer adapter
> >  resolution parameters
> > X-Mailer: git-send-email 2.16.1
> >
> > When application sets `RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES` flag
> > while creating adapter underlying driver is free to optimize the
> > resolution for best possible configuration.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> > ---
> >  drivers/event/octeontx/timvf_evdev.c | 51 +++++++++++++++++++++++++++++++++++-
> >  drivers/event/octeontx/timvf_evdev.h |  6 +++++
> >  2 files changed, 56 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
> > index 6cf5d4846..ffdfbb387 100644
> > --- a/drivers/event/octeontx/timvf_evdev.c
> > +++ b/drivers/event/octeontx/timvf_evdev.c
> > @@ -82,6 +82,48 @@ timvf_get_start_cyc(uint64_t *now, uint8_t ring_id)
> >  	return octeontx_ssovf_mbox_send(&hdr, NULL, 0, now, sizeof(uint64_t));
> >  }
> >
> > +#define ALIGN_CEIL(a, b) \
> > +		(((a + (typeof(a)) b - 1) / ((typeof(a)) b)) * (typeof(a))b)
> > +
>
> Can this moved to common code if this not already available?
>
Currently, align macros support aligning given value to a power of 2 and not
to a given multiple.
Will move this to common code and send a seperate patch.



More information about the dev mailing list