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