DPDK  20.05.0
rte_event_timer_adapter_pmd.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017-2018 Intel Corporation.
3  * All rights reserved.
4  */
5 
6 #ifndef __RTE_EVENT_TIMER_ADAPTER_PMD_H__
7 #define __RTE_EVENT_TIMER_ADAPTER_PMD_H__
8 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
25 
26 /*
27  * Definitions of functions exported by an event timer adapter implementation
28  * through *rte_event_timer_adapter_ops* structure supplied in the
29  * *rte_event_timer_adapter* structure associated with an event timer adapter.
30  */
31 
32 typedef int (*rte_event_timer_adapter_init_t)(
33  struct rte_event_timer_adapter *adapter);
35 typedef int (*rte_event_timer_adapter_uninit_t)(
36  struct rte_event_timer_adapter *adapter);
38 typedef int (*rte_event_timer_adapter_start_t)(
39  const struct rte_event_timer_adapter *adapter);
41 typedef int (*rte_event_timer_adapter_stop_t)(
42  const struct rte_event_timer_adapter *adapter);
44 typedef void (*rte_event_timer_adapter_get_info_t)(
45  const struct rte_event_timer_adapter *adapter,
46  struct rte_event_timer_adapter_info *adapter_info);
48 typedef int (*rte_event_timer_adapter_stats_get_t)(
49  const struct rte_event_timer_adapter *adapter,
50  struct rte_event_timer_adapter_stats *stats);
52 typedef int (*rte_event_timer_adapter_stats_reset_t)(
53  const struct rte_event_timer_adapter *adapter);
60 struct rte_event_timer_adapter_ops {
61  rte_event_timer_adapter_init_t init;
62  rte_event_timer_adapter_uninit_t uninit;
63  rte_event_timer_adapter_start_t start;
64  rte_event_timer_adapter_stop_t stop;
65  rte_event_timer_adapter_get_info_t get_info;
67  rte_event_timer_adapter_stats_get_t stats_get;
69  rte_event_timer_adapter_stats_reset_t stats_reset;
71  rte_event_timer_arm_burst_t arm_burst;
73  rte_event_timer_arm_tmo_tick_burst_t arm_tmo_tick_burst;
75  rte_event_timer_cancel_burst_t cancel_burst;
77 };
78 
83 struct rte_event_timer_adapter_data {
84  uint8_t id;
86  uint8_t event_dev_id;
88  uint32_t socket_id;
90  uint8_t event_port_id;
92  const struct rte_memzone *mz;
94  struct rte_event_timer_adapter_conf conf;
96  uint32_t caps;
98  void *adapter_priv;
100  uint8_t service_inited;
102  uint32_t service_id;
106  uint8_t started : 1;
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /* __RTE_EVENT_TIMER_ADAPTER_PMD_H__ */
#define RTE_STD_C11
Definition: rte_common.h:40
#define __rte_cache_aligned
Definition: rte_common.h:367