DPDK  18.02.2
rte_service_component.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4 
5 #ifndef _RTE_SERVICE_PRIVATE_H_
6 #define _RTE_SERVICE_PRIVATE_H_
7 
8 /* This file specifies the internal service specification.
9  * Include this file if you are writing a component that requires CPU cycles to
10  * operate, and you wish to run the component using service cores
11  */
12 #include <rte_compat.h>
13 #include <rte_service.h>
14 
21 typedef int32_t (*rte_service_func)(void *args);
22 
36  char name[RTE_SERVICE_NAME_MAX];
38  rte_service_func callback;
44  uint32_t capabilities;
46  int socket_id;
47 };
48 
76 int32_t __rte_experimental
77 rte_service_component_register(const struct rte_service_spec *spec,
78  uint32_t *service_id);
79 
92 int32_t __rte_experimental rte_service_component_unregister(uint32_t id);
93 
110 int32_t __rte_experimental rte_service_start_with_defaults(void);
111 
127 int32_t __rte_experimental rte_service_component_runstate_set(uint32_t id,
128  uint32_t runstate);
129 
142 int32_t rte_service_init(void);
143 
153 void __rte_experimental rte_service_finalize(void);
154 
155 #endif /* _RTE_SERVICE_PRIVATE_H_ */