1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2020 Intel Corporation 3 */ 4 5 #ifndef _INCLUDE_THREAD_H_ 6 #define _INCLUDE_THREAD_H_ 7 8 #include <stdint.h> 9 10 #include <rte_swx_pipeline.h> 11 12 /** 13 * Control plane (CP) thread. 14 */ 15 int 16 thread_init(void); 17 18 int 19 pipeline_enable(struct rte_swx_pipeline *p, uint32_t thread_id); 20 21 void 22 pipeline_disable(struct rte_swx_pipeline *p); 23 24 typedef void 25 (*block_run_f)(void *block); 26 27 int 28 block_enable(block_run_f block_func, void *block, uint32_t thread_id); 29 30 void 31 block_disable(void *block); 32 33 /** 34 * Data plane (DP) threads. 35 */ 36 int 37 thread_main(void *arg); 38 39 #endif /* _INCLUDE_THREAD_H_ */ 40