DPDK 25.07.0
Data Structures | Macros | Enumerations | Functions
rte_node_ip4_api.h File Reference
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_fib.h>
#include <rte_graph.h>

Go to the source code of this file.

Data Structures

struct  rte_node_ip4_reassembly_cfg
 

Macros

#define RTE_IP4_OUTPUT_FEATURE_ARC_NAME   "rte_ip4_output_arc"
 

Enumerations

enum  rte_node_ip4_lookup_next { RTE_NODE_IP4_LOOKUP_NEXT_REWRITE , RTE_NODE_IP4_LOOKUP_NEXT_IP4_LOCAL , RTE_NODE_IP4_LOOKUP_NEXT_PKT_DROP }
 
enum  rte_node_ip4_local_next { RTE_NODE_IP4_LOCAL_NEXT_UDP4_INPUT , RTE_NODE_IP4_LOCAL_NEXT_PKT_DROP }
 
enum  rte_node_ip4_reassembly_next { RTE_NODE_IP4_REASSEMBLY_NEXT_PKT_DROP }
 

Functions

int rte_node_ip4_route_add (uint32_t ip, uint8_t depth, uint16_t next_hop, enum rte_node_ip4_lookup_next next_node)
 
int rte_node_ip4_rewrite_add (uint16_t next_hop, uint8_t *rewrite_data, uint8_t rewrite_len, uint16_t dst_port)
 
__rte_experimental int rte_node_ip4_reassembly_configure (struct rte_node_ip4_reassembly_cfg *cfg, uint16_t cnt)
 
__rte_experimental int rte_node_ip4_fib_create (int socket, struct rte_fib_conf *conf)
 
__rte_experimental int rte_node_ip4_fib_route_add (uint32_t ip, uint8_t depth, uint16_t next_hop, enum rte_node_ip4_lookup_next next_node)
 

Detailed Description

Warning
EXPERIMENTAL: All functions in this file may be changed or removed without prior notice.

This API allows to do control path functions of ip4_* nodes like ip4_lookup, ip4_rewrite.

Definition in file rte_node_ip4_api.h.

Macro Definition Documentation

◆ RTE_IP4_OUTPUT_FEATURE_ARC_NAME

#define RTE_IP4_OUTPUT_FEATURE_ARC_NAME   "rte_ip4_output_arc"

IP4 output arc

Definition at line 29 of file rte_node_ip4_api.h.

Enumeration Type Documentation

◆ rte_node_ip4_lookup_next

IP4 lookup next nodes.

Enumerator
RTE_NODE_IP4_LOOKUP_NEXT_REWRITE 

Rewrite node.

RTE_NODE_IP4_LOOKUP_NEXT_PKT_DROP 

IP Local node. Number of next nodes of lookup node.

Definition at line 35 of file rte_node_ip4_api.h.

◆ rte_node_ip4_local_next

IP4 Local next nodes.

Enumerator
RTE_NODE_IP4_LOCAL_NEXT_UDP4_INPUT 

ip4 Local node.

RTE_NODE_IP4_LOCAL_NEXT_PKT_DROP 

Packet drop node.

Definition at line 47 of file rte_node_ip4_api.h.

◆ rte_node_ip4_reassembly_next

IP4 reassembly next nodes.

Enumerator
RTE_NODE_IP4_REASSEMBLY_NEXT_PKT_DROP 

Packet drop node.

Definition at line 57 of file rte_node_ip4_api.h.

Function Documentation

◆ rte_node_ip4_route_add()

int rte_node_ip4_route_add ( uint32_t  ip,
uint8_t  depth,
uint16_t  next_hop,
enum rte_node_ip4_lookup_next  next_node 
)

Add ipv4 route to lookup table.

Parameters
ipIP address of route to be added.
depthDepth of the rule to be added.
next_hopNext hop id of the rule result to be added.
next_nodeNext node to redirect traffic to.
Returns
0 on success, negative otherwise.
Examples
examples/l3fwd-graph/main.c.

◆ rte_node_ip4_rewrite_add()

int rte_node_ip4_rewrite_add ( uint16_t  next_hop,
uint8_t *  rewrite_data,
uint8_t  rewrite_len,
uint16_t  dst_port 
)

Add a next hop's rewrite data.

Parameters
next_hopNext hop id to add rewrite data to.
rewrite_dataRewrite data.
rewrite_lenLength of rewrite data.
dst_portDestination port to redirect traffic to.
Returns
0 on success, negative otherwise.
Examples
examples/l3fwd-graph/main.c.

◆ rte_node_ip4_reassembly_configure()

__rte_experimental int rte_node_ip4_reassembly_configure ( struct rte_node_ip4_reassembly_cfg cfg,
uint16_t  cnt 
)

Add reassembly node configuration data.

Parameters
cfgPointer to the configuration structure.
cntNumber of configuration structures passed.
Returns
0 on success, negative otherwise.

◆ rte_node_ip4_fib_create()

__rte_experimental int rte_node_ip4_fib_create ( int  socket,
struct rte_fib_conf conf 
)

Create ipv4 FIB.

Parameters
socketNUMA socket for FIB memory allocation.
confStructure containing FIB configuration.
Returns
0 on success, negative otherwise.

◆ rte_node_ip4_fib_route_add()

__rte_experimental int rte_node_ip4_fib_route_add ( uint32_t  ip,
uint8_t  depth,
uint16_t  next_hop,
enum rte_node_ip4_lookup_next  next_node 
)

Add ipv4 route to FIB.

Parameters
ipIP address of route to be added.
depthDepth of the rule to be added.
next_hopNext hop id of the rule result to be added.
next_nodeNext node to redirect traffic to.
Returns
0 on success, negative otherwise.