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