X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_timer%2Frte_timer.h;h=c6b3d450df1f9b74adab5723028b8e5f81cf094a;hb=bde43e8a775c483d133ff11ba1692ecd9d96e4c2;hp=05d287d8f25af750363b820680e38b9cc89d3f99;hpb=f9d6cd8bfe9e1183209098bb82542b34d23dc0ed;p=dpdk.git diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h index 05d287d8f2..c6b3d450df 100644 --- a/lib/librte_timer/rte_timer.h +++ b/lib/librte_timer/rte_timer.h @@ -181,8 +181,6 @@ int rte_timer_data_dealloc(uint32_t id); * subsystem */ int rte_timer_subsystem_init(void); -int rte_timer_subsystem_init_v1905(void); -void rte_timer_subsystem_init_v20(void); /** * @warning @@ -250,13 +248,6 @@ void rte_timer_init(struct rte_timer *tim); int rte_timer_reset(struct rte_timer *tim, uint64_t ticks, enum rte_timer_type type, unsigned tim_lcore, rte_timer_cb_t fct, void *arg); -int rte_timer_reset_v1905(struct rte_timer *tim, uint64_t ticks, - enum rte_timer_type type, unsigned int tim_lcore, - rte_timer_cb_t fct, void *arg); -int rte_timer_reset_v20(struct rte_timer *tim, uint64_t ticks, - enum rte_timer_type type, unsigned int tim_lcore, - rte_timer_cb_t fct, void *arg); - /** * Loop until rte_timer_reset() succeeds. @@ -313,8 +304,6 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks, * - (-1): The timer is in the RUNNING or CONFIG state. */ int rte_timer_stop(struct rte_timer *tim); -int rte_timer_stop_v1905(struct rte_timer *tim); -int rte_timer_stop_v20(struct rte_timer *tim); /** * Loop until rte_timer_stop() succeeds. @@ -342,6 +331,22 @@ void rte_timer_stop_sync(struct rte_timer *tim); */ int rte_timer_pending(struct rte_timer *tim); +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice + * + * Time until the next timer on the current lcore + * This function gives the ticks until the next timer will be active. + * + * @return + * - -EINVAL: invalid timer data instance identifier + * - -ENOENT: no timer pending + * - 0: a timer is pending and will run at next rte_timer_manage() + * - >0: ticks until the next timer is ready + */ +__rte_experimental +int64_t rte_timer_next_ticks(void); + /** * Manage the timer list and execute callback functions. * @@ -358,8 +363,6 @@ int rte_timer_pending(struct rte_timer *tim); * - -EINVAL: timer subsystem not yet initialized */ int rte_timer_manage(void); -int rte_timer_manage_v1905(void); -void rte_timer_manage_v20(void); /** * Dump statistics about timers. @@ -371,8 +374,6 @@ void rte_timer_manage_v20(void); * - -EINVAL: timer subsystem not yet initialized */ int rte_timer_dump_stats(FILE *f); -int rte_timer_dump_stats_v1905(FILE *f); -void rte_timer_dump_stats_v20(FILE *f); /** * @warning