From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH 07/10] event/octeontx: optimize timer adapter resolution parameters Date: Mon, 19 Feb 2018 15:04:57 +0530 Message-ID: <20180219093456.GA5828@ltp-pvn> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180216213700.3415-8-pbhagavatula@caviumnetworks.com> <20180217050623.GE2941@jerin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Jerin Jacob , santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0040.outbound.protection.outlook.com [104.47.40.40]) by dpdk.org (Postfix) with ESMTP id 0BB86A49F for ; Mon, 19 Feb 2018 10:35:16 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180217050623.GE2941@jerin> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > > erik.g.carrillo@intel.com > > Cc: dev@dpdk.org, Pavan Nikhilesh > > 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 > > --- > > 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.