1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef __INCLUDE_RTE_PORT_RING_H__
6 #define __INCLUDE_RTE_PORT_RING_H__
17 * input port built on top of pre-initialized single consumer ring
19 * output port built on top of pre-initialized single producer ring
21 * input port built on top of pre-initialized multi consumers ring
23 * output port built on top of pre-initialized multi producers ring
32 /** ring_reader port parameters */
33 struct rte_port_ring_reader_params {
34 /** Underlying consumer ring that has to be pre-initialized */
35 struct rte_ring *ring;
38 /** ring_reader port operations */
39 extern struct rte_port_in_ops rte_port_ring_reader_ops;
41 /** ring_writer port parameters */
42 struct rte_port_ring_writer_params {
43 /** Underlying producer ring that has to be pre-initialized */
44 struct rte_ring *ring;
46 /** Recommended burst size to ring. The actual burst size can be
47 bigger or smaller than this value. */
51 /** ring_writer port operations */
52 extern struct rte_port_out_ops rte_port_ring_writer_ops;
54 /** ring_writer_nodrop port parameters */
55 struct rte_port_ring_writer_nodrop_params {
56 /** Underlying producer ring that has to be pre-initialized */
57 struct rte_ring *ring;
59 /** Recommended burst size to ring. The actual burst size can be
60 bigger or smaller than this value. */
63 /** Maximum number of retries, 0 for no limit */
67 /** ring_writer_nodrop port operations */
68 extern struct rte_port_out_ops rte_port_ring_writer_nodrop_ops;
70 /** ring_multi_reader port parameters */
71 #define rte_port_ring_multi_reader_params rte_port_ring_reader_params
73 /** ring_multi_reader port operations */
74 extern struct rte_port_in_ops rte_port_ring_multi_reader_ops;
76 /** ring_multi_writer port parameters */
77 #define rte_port_ring_multi_writer_params rte_port_ring_writer_params
79 /** ring_multi_writer port operations */
80 extern struct rte_port_out_ops rte_port_ring_multi_writer_ops;
82 /** ring_multi_writer_nodrop port parameters */
83 #define rte_port_ring_multi_writer_nodrop_params \
84 rte_port_ring_writer_nodrop_params
86 /** ring_multi_writer_nodrop port operations */
87 extern struct rte_port_out_ops rte_port_ring_multi_writer_nodrop_ops;