xref: /dpdk/lib/node/rte_node_udp4_input_api.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2023 Marvell International Ltd.
3  */
4 
5 #ifndef __INCLUDE_RTE_NODE_UDP4_INPUT_API_H__
6 #define __INCLUDE_RTE_NODE_UDP4_INPUT_API_H__
7 
8 /**
9  * @file rte_node_udp4_input_api.h
10  *
11  * @warning
12  * @b EXPERIMENTAL:
13  * All functions in this file may be changed or removed without prior notice.
14  *
15  * This API allows to control path functions of udp4_* nodes
16  * like udp4_input.
17  *
18  */
19 #include <rte_common.h>
20 #include <rte_compat.h>
21 
22 #include "rte_graph.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 /**
28  * UDP4 lookup next nodes.
29  */
30 enum rte_node_udp4_input_next {
31 	RTE_NODE_UDP4_INPUT_NEXT_PKT_DROP,
32 	/**< Packet drop node. */
33 };
34 
35 /**
36  * Add usr node to receive udp4 frames.
37  *
38  * @param usr_node
39  * Node registered by user to receive data.
40  */
41 __rte_experimental
42 int rte_node_udp4_usr_node_add(const char *usr_node);
43 
44 /**
45  * Add udpv4 dst_port to lookup table.
46  *
47  * @param dst_port
48  *   Dst Port of packet to be added for consumption.
49  * @param next_node
50  *   Next node packet to be added for consumption.
51  * @return
52  *   0 on success, negative otherwise.
53  */
54 __rte_experimental
55 int rte_node_udp4_dst_port_add(uint32_t dst_port, rte_edge_t next_node);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* __INCLUDE_RTE_NODE_UDP4_API_H__ */
62