DPDK  20.05.0
rte_service_component.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4 
5 #ifndef _SERVICE_PRIVATE_H_
6 #define _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 
18 typedef int32_t (*rte_service_func)(void *args);
19 
30  char name[RTE_SERVICE_NAME_MAX];
32  rte_service_func callback;
38  uint32_t capabilities;
40  int socket_id;
41 };
42 
71 int32_t rte_service_component_register(const struct rte_service_spec *spec,
72  uint32_t *service_id);
73 
83 int32_t rte_service_component_unregister(uint32_t id);
84 
98 int32_t rte_service_start_with_defaults(void);
99 
112 int32_t rte_service_component_runstate_set(uint32_t id, uint32_t runstate);
113 
123 int32_t rte_service_init(void);
124 
131 void rte_service_finalize(void);
132 
133 #endif /* _SERVICE_PRIVATE_H_ */
char name[RTE_SERVICE_NAME_MAX]
rte_service_func callback