xref: /dpdk/lib/port/rte_port_ras.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4 
5 #ifndef __INCLUDE_RTE_PORT_RAS_H__
6 #define __INCLUDE_RTE_PORT_RAS_H__
7 
8 /**
9  * @file
10  * RTE Port for IPv4 Reassembly
11  *
12  * This port is built on top of pre-initialized single producer rte_ring. In
13  * order to minimize the amount of packets stored in the ring at any given
14  * time, the IP reassembly functionality is executed on ring write operation,
15  * hence this port is implemented as an output port. A regular ring_reader port
16  * can be created to read from the same ring.
17  *
18  * The packets written to the ring are either complete IP datagrams or IP
19  * fragments. The packets read from the ring are all complete IP datagrams,
20  * either jumbo frames (i.e. IP packets with length bigger than MTU) or not.
21  * The complete IP datagrams written to the ring are not changed. The IP
22  * fragments written to the ring are first reassembled and into complete IP
23  * datagrams or dropped on error or IP reassembly time-out.
24  */
25 
26 #include <stdint.h>
27 
28 #include "rte_port.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /** ring_writer_ipv4_ras port parameters */
35 struct rte_port_ring_writer_ras_params {
36 	/** Underlying single consumer ring that has to be pre-initialized. */
37 	struct rte_ring *ring;
38 
39 	/** Recommended burst size to ring. The actual burst size can be bigger
40 	or smaller than this value. */
41 	uint32_t tx_burst_sz;
42 };
43 
44 #define rte_port_ring_writer_ipv4_ras_params rte_port_ring_writer_ras_params
45 
46 #define rte_port_ring_writer_ipv6_ras_params rte_port_ring_writer_ras_params
47 
48 /** ring_writer_ipv4_ras port operations */
49 extern struct rte_port_out_ops rte_port_ring_writer_ipv4_ras_ops;
50 
51 /** ring_writer_ipv6_ras port operations */
52 extern struct rte_port_out_ops rte_port_ring_writer_ipv6_ras_ops;
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif
59