[dpdk-dev] [PATCH v6 01/23] eventtimer: add event timer adapter API

Pavan Nikhilesh pbhagavatula at caviumnetworks.com
Thu Jan 11 12:10:53 CET 2018


On Wed, Jan 10, 2018 at 06:20:52PM -0600, Erik Gabriel Carrillo wrote:
> Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo at intel.com>

Consider giving credit to the original authors.

> ---
>  lib/librte_eventdev/Makefile                  |   1 +
>  lib/librte_eventdev/rte_event_timer_adapter.h | 566 ++++++++++++++++++++++++++
>  lib/librte_eventdev/rte_eventdev.h            |   4 +-
>  3 files changed, 569 insertions(+), 2 deletions(-)
>  create mode 100644 lib/librte_eventdev/rte_event_timer_adapter.h
>
> diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile
> index 7fd78c7..685b474 100644
> --- a/lib/librte_eventdev/Makefile
> +++ b/lib/librte_eventdev/Makefile
> @@ -27,6 +27,7 @@ SYMLINK-y-include += rte_eventdev_pmd_pci.h
>  SYMLINK-y-include += rte_eventdev_pmd_vdev.h
>  SYMLINK-y-include += rte_event_ring.h
>  SYMLINK-y-include += rte_event_eth_rx_adapter.h
> +SYMLINK-y-include += rte_event_timer_adapter.h
>
>  # versioning export map
>  EXPORT_MAP := rte_eventdev_version.map
> diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h
> new file mode 100644
> index 0000000..7d967e6
> --- /dev/null
> +++ b/lib/librte_eventdev/rte_event_timer_adapter.h
> @@ -0,0 +1,566 @@
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright 2017 Cavium, Inc.
> + *   Copyright(c) 2017 Intel Corporation. All rights reserved.
> + *
> + *   Redistribution and use in source and binary forms, with or without
> + *   modification, are permitted provided that the following conditions
> + *   are met:
> + *
> + *     * Redistributions of source code must retain the above copyright
> + *       notice, this list of conditions and the following disclaimer.
> + *     * Redistributions in binary form must reproduce the above copyright
> + *       notice, this list of conditions and the following disclaimer in
> + *       the documentation and/or other materials provided with the
> + *       distribution.
> + *     * Neither the name of Intel Corporation nor the names of its
> + *       contributors may be used to endorse or promote products derived
> + *       from this software without specific prior written permission.
> + *
> + *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */

Use SPDX licence tags

> +#ifndef __RTE_EVENT_TIMER_ADAPTER_H__
> +#define __RTE_EVENT_TIMER_ADAPTER_H__
> +
> +/**
> + * @file
> + *
> + * RTE Event Timer Adapter
<snip>
> + */
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <rte_spinlock.h>
> +#include <rte_memory.h>
> +
> +#include "rte_eventdev.h"
> +
> +#define RTE_EVENT_TIMER_ADAPTER_NUM_MAX 64
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this enum may change without prior notice

Please make sure that Experimental tags usage is inline with the new tool
http://dpdk.org/dev/patchwork/patch/32234.

Cheers,
Pavan

> + *
> + * Timer adapter clock source
> + */
> +enum rte_event_timer_adapter_clk_src {
> +	RTE_EVENT_TIMER_ADAPTER_CPU_CLK,
> +	/**< Use CPU clock as the clock source. */
> +	RTE_EVENT_TIMER_ADAPTER_EXT_CLK0,
> +	/**< Platform dependent external clock source 0. */
> +	RTE_EVENT_TIMER_ADAPTER_EXT_CLK1,
> +	/**< Platform dependent external clock source 1. */
> +	RTE_EVENT_TIMER_ADAPTER_EXT_CLK2,
> +	/**< Platform dependent external clock source 2. */
> +	RTE_EVENT_TIMER_ADAPTER_EXT_CLK3,
> +	/**< Platform dependent external clock source 3. */
> +};
> +
<snip>


More information about the dev mailing list