[dpdk-dev] [RFC PATCH v4 1/4] eventtimer: introduce event timer adapter

Pavan Nikhilesh Bhagavatula pbhagavatula at caviumnetworks.com
Wed Nov 29 11:29:01 CET 2017


On Tue, Nov 28, 2017 at 11:40:05AM -0600, Erik Gabriel Carrillo wrote:
>  # 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..14661b5
> --- /dev/null
> +++ b/lib/librte_eventdev/rte_event_timer_adapter.h
> @@ -0,0 +1,427 @@
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright(c) 2017 Intel Corporation. All rights reserved.
Please add dual licensing here with reference to [1]

> + *
> + *   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.
> + */
> +#ifndef __RTE_EVENT_TIMER_ADAPTER_H__
> +#define __RTE_EVENT_TIMER_ADAPTER_H__
> +
> +/**
> + * @file
> + *
> + * RTE Event Timer Adapter
> + *
> + * TODO: description
Addin the description from the proposed RFC[1]


<snip>
> +/**
> + * Event timer state.
> + */
> +enum rte_event_timer_state {
> +	RTE_EVENT_TIMER_NOT_ARMED = 0,
> +	/**< Event timer is in not armed state.*/
> +	RTE_EVENT_TIMER_ARMED = 1,
Add a state to indicate TIMER_CANCELLED as per [1]
> +	/**< Event timer successfully armed.*/
> +	RTE_EVENT_TIMER_ERROR = -1,
> +	/**< Generic event timer error.*/
> +	RTE_EVENT_TIMER_ERROR_TOOEARLY = -2,
> +	/**< Event timer timeout tick is too little to add to the adapter. */
> +	RTE_EVENT_TIMER_ERROR_TOOLATE = -3,
> +	/**< Event timer timeout tick is greater than the maximum timeout.*/
> +};
> +

[1] http://dpdk.org/ml/archives/dev/2017-August/072981.html

-Pavan


More information about the dev mailing list