port: add ring SWX port
[dpdk.git] / lib / librte_port / rte_swx_port_ring.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2021 Intel Corporation
3  */
4
5 #ifndef __INCLUDE_RTE_SWX_PORT_RING_H__
6 #define __INCLUDE_RTE_SWX_PORT_RING_H__
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 /**
13  * @file
14  * RTE SWX Ring Input and Output Ports
15  ***/
16
17 #include <stdint.h>
18
19 #include <rte_ring.h>
20
21 #include "rte_swx_port.h"
22
23 /** Ring input port (reader) creation parameters. */
24 struct rte_swx_port_ring_reader_params {
25         /** Name of valid RTE ring. */
26         const char *name;
27
28         /** Read burst size. */
29         uint32_t burst_size;
30 };
31
32 /** Ring_reader operations. */
33 extern struct rte_swx_port_in_ops rte_swx_port_ring_reader_ops;
34
35 /** Ring output port (writer) creation parameters. */
36 struct rte_swx_port_ring_writer_params {
37         /** Name of valid RTE ring. */
38         const char *name;
39
40         /** Read burst size. */
41         uint32_t burst_size;
42 };
43
44 /** Ring writer operations. */
45 extern struct rte_swx_port_out_ops rte_swx_port_ring_writer_ops;
46
47 #ifdef __cplusplus
48 }
49 #endif
50
51 #endif /* __INCLUDE_RTE_SWX_PORT_RING_H__ */