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