DPDK 21.11.9
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
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include <rte_compat.h>
18#include <rte_service.h>
19
23typedef int32_t (*rte_service_func)(void *args);
24
35 char name[RTE_SERVICE_NAME_MAX];
37 rte_service_func callback;
43 uint32_t capabilities;
46};
47
76int32_t rte_service_component_register(const struct rte_service_spec *spec,
77 uint32_t *service_id);
78
88int32_t rte_service_component_unregister(uint32_t id);
89
103int32_t rte_service_start_with_defaults(void);
104
117int32_t rte_service_component_runstate_set(uint32_t id, uint32_t runstate);
118
128int32_t rte_service_init(void);
129
136void rte_service_finalize(void);
137
138#ifdef __cplusplus
139}
140#endif
141
142#endif /* _SERVICE_PRIVATE_H_ */
rte_service_func callback
char name[RTE_SERVICE_NAME_MAX]