[dpdk-dev] [PATCH 07/10] event/octeontx: optimize timer adapter resolution parameters
Jerin Jacob
jerin.jacob at caviumnetworks.com
Sat Feb 17 06:06:24 CET 2018
-----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?
More information about the dev
mailing list