xref: /dpdk/examples/ip_pipeline/swq.h (revision 8245472c58c898f1bc2b30058b0f159e9ab2bb3f)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2018 Intel Corporation
3  */
4 
5 #ifndef _INCLUDE_SWQ_H_
6 #define _INCLUDE_SWQ_H_
7 
8 #include <stdint.h>
9 #include <sys/queue.h>
10 
11 #include <rte_ring.h>
12 
13 #include "common.h"
14 
15 struct swq {
16 	TAILQ_ENTRY(swq) node;
17 	char name[NAME_SIZE];
18 	struct rte_ring *r;
19 };
20 
21 TAILQ_HEAD(swq_list, swq);
22 
23 int
24 swq_init(void);
25 
26 struct swq *
27 swq_find(const char *name);
28 
29 struct swq_params {
30 	uint32_t size;
31 	uint32_t cpu_id;
32 };
33 
34 struct swq *
35 swq_create(const char *name, struct swq_params *params);
36 
37 #endif /* _INCLUDE_SWQ_H_ */
38