f-stack/dpdk/examples/pipeline/thread.h

40 lines
626 B
C
Raw Normal View History

2021-02-05 08:48:47 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2020 Intel Corporation
*/
#ifndef _INCLUDE_THREAD_H_
#define _INCLUDE_THREAD_H_
#include <stdint.h>
2023-09-13 12:21:49 +00:00
#include <rte_swx_pipeline.h>
2021-02-05 08:48:47 +00:00
2025-01-10 11:50:43 +00:00
/**
* Control plane (CP) thread.
*/
2021-02-05 08:48:47 +00:00
int
2025-01-10 11:50:43 +00:00
thread_init(void);
2021-02-05 08:48:47 +00:00
int
2025-01-10 11:50:43 +00:00
pipeline_enable(struct rte_swx_pipeline *p, uint32_t thread_id);
void
pipeline_disable(struct rte_swx_pipeline *p);
typedef void
(*block_run_f)(void *block);
2021-02-05 08:48:47 +00:00
int
2025-01-10 11:50:43 +00:00
block_enable(block_run_f block_func, void *block, uint32_t thread_id);
void
block_disable(void *block);
2021-02-05 08:48:47 +00:00
2025-01-10 11:50:43 +00:00
/**
* Data plane (DP) threads.
*/
2021-02-05 08:48:47 +00:00
int
thread_main(void *arg);
#endif /* _INCLUDE_THREAD_H_ */