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
33 /** ring_reader port parameters */
34 struct rte_port_ring_reader_params {
35 /** Underlying consumer ring that has to be pre-initialized */
36 struct rte_ring *ring;
39 /** ring_reader port operations */
40 extern struct rte_port_in_ops rte_port_ring_reader_ops;
42 /** ring_writer port parameters */
43 struct rte_port_ring_writer_params {
44 /** Underlying producer ring that has to be pre-initialized */
45 struct rte_ring *ring;
47 /** Recommended burst size to ring. The actual burst size can be
48 bigger or smaller than this value. */
52 /** ring_writer port operations */
53 extern struct rte_port_out_ops rte_port_ring_writer_ops;
55 /** ring_writer_nodrop port parameters */
56 struct rte_port_ring_writer_nodrop_params {
57 /** Underlying producer ring that has to be pre-initialized */
58 struct rte_ring *ring;
60 /** Recommended burst size to ring. The actual burst size can be
61 bigger or smaller than this value. */
64 /** Maximum number of retries, 0 for no limit */
68 /** ring_writer_nodrop port operations */
69 extern struct rte_port_out_ops rte_port_ring_writer_nodrop_ops;
71 /** ring_multi_reader port parameters */
72 #define rte_port_ring_multi_reader_params rte_port_ring_reader_params
74 /** ring_multi_reader port operations */
75 extern struct rte_port_in_ops rte_port_ring_multi_reader_ops;
77 /** ring_multi_writer port parameters */
78 #define rte_port_ring_multi_writer_params rte_port_ring_writer_params
80 /** ring_multi_writer port operations */
81 extern struct rte_port_out_ops rte_port_ring_multi_writer_ops;
83 /** ring_multi_writer_nodrop port parameters */
84 #define rte_port_ring_multi_writer_nodrop_params \
85 rte_port_ring_writer_nodrop_params
87 /** ring_multi_writer_nodrop port operations */
88 extern struct rte_port_out_ops rte_port_ring_multi_writer_nodrop_ops;