FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  srv6_ad_localsid_trace_t
 
struct  srv6_ad_rewrite_trace_t
 

Macros

#define foreach_srv6_ad_rewrite_counter
 

Enumerations

enum  srv6_ad_rewrite_counters { SRV6_AD_REWRITE_N_COUNTERS }
 
enum  srv6_ad_localsid_next_t {
  SRV6_AD_LOCALSID_NEXT_ERROR, SRV6_AD_LOCALSID_NEXT_REWRITE4, SRV6_AD_LOCALSID_NEXT_REWRITE6, SRV6_AD_LOCALSID_NEXT_INTERFACE,
  SRV6_AD_LOCALSID_N_NEXT
}
 
enum  srv6_ad_rewrite_next_t { SRV6_AD_REWRITE_NEXT_ERROR, SRV6_AD_REWRITE_NEXT_LOOKUP, SRV6_AD_REWRITE_N_NEXT }
 

Functions

static u8format_srv6_ad_localsid_trace (u8 *s, va_list *args)
 
static u8format_srv6_ad_rewrite_trace (u8 *s, va_list *args)
 
static_always_inline void end_ad_processing (vlib_buffer_t *b0, ip6_header_t *ip0, ip6_sr_header_t *sr0, ip6_sr_localsid_t *ls0, u32 *next0)
 Function doing SRH processing for AD behavior. More...
 
static uword srv6_ad_localsid_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 SRv6 AD Localsid graph node. More...
 
static uword srv6_ad2_rewrite_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 Graph node for applying a SR policy into an IPv6 packet. More...
 
static uword srv6_ad4_rewrite_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 Graph node for applying a SR policy into an IPv6 packet. More...
 
static uword srv6_ad6_rewrite_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 Graph node for applying a SR policy into an IPv6 packet. More...
 

Variables

vlib_node_registration_t srv6_ad4_rewrite_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad4_rewrite_node) More...
 
vlib_node_registration_t srv6_ad6_rewrite_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad6_rewrite_node) More...
 
static char * srv6_ad_rewrite_counter_strings []
 
vlib_node_registration_t srv6_ad_localsid_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad_localsid_node) More...
 
vlib_node_registration_t srv6_ad2_rewrite_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad2_rewrite_node) More...
 

Macro Definition Documentation

◆ foreach_srv6_ad_rewrite_counter

#define foreach_srv6_ad_rewrite_counter
Value:
_(PROCESSED, "srv6-ad rewritten packets") \
_(NO_RW, "(Error) No header for rewriting.")

Definition at line 72 of file node.c.

Enumeration Type Documentation

◆ srv6_ad_localsid_next_t

Enumerator
SRV6_AD_LOCALSID_NEXT_ERROR 
SRV6_AD_LOCALSID_NEXT_REWRITE4 
SRV6_AD_LOCALSID_NEXT_REWRITE6 
SRV6_AD_LOCALSID_NEXT_INTERFACE 
SRV6_AD_LOCALSID_N_NEXT 

Definition at line 93 of file node.c.

◆ srv6_ad_rewrite_counters

Enumerator
SRV6_AD_REWRITE_N_COUNTERS 

Definition at line 76 of file node.c.

◆ srv6_ad_rewrite_next_t

Enumerator
SRV6_AD_REWRITE_NEXT_ERROR 
SRV6_AD_REWRITE_NEXT_LOOKUP 
SRV6_AD_REWRITE_N_NEXT 

Definition at line 102 of file node.c.

Function Documentation

◆ end_ad_processing()

static_always_inline void end_ad_processing ( vlib_buffer_t b0,
ip6_header_t ip0,
ip6_sr_header_t sr0,
ip6_sr_localsid_t ls0,
u32 next0 
)

Function doing SRH processing for AD behavior.

Definition at line 116 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_srv6_ad_localsid_trace()

static u8* format_srv6_ad_localsid_trace ( u8 s,
va_list *  args 
)
static

Definition at line 38 of file node.c.

+ Here is the call graph for this function:

◆ format_srv6_ad_rewrite_trace()

static u8* format_srv6_ad_rewrite_trace ( u8 s,
va_list *  args 
)
static

Definition at line 48 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ srv6_ad2_rewrite_fn()

static uword srv6_ad2_rewrite_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Graph node for applying a SR policy into an IPv6 packet.

Encapsulation

Definition at line 300 of file node.c.

+ Here is the call graph for this function:

◆ srv6_ad4_rewrite_fn()

static uword srv6_ad4_rewrite_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Graph node for applying a SR policy into an IPv6 packet.

Encapsulation

Definition at line 434 of file node.c.

+ Here is the call graph for this function:

◆ srv6_ad6_rewrite_fn()

static uword srv6_ad6_rewrite_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Graph node for applying a SR policy into an IPv6 packet.

Encapsulation

Definition at line 577 of file node.c.

+ Here is the call graph for this function:

◆ srv6_ad_localsid_fn()

static uword srv6_ad_localsid_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

SRv6 AD Localsid graph node.

Definition at line 201 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ srv6_ad2_rewrite_node

vlib_node_registration_t srv6_ad2_rewrite_node
Initial value:
= {
.function = srv6_ad2_rewrite_fn,
.name = "srv6-ad2-rewrite",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AD_REWRITE_N_NEXT,
.next_nodes = {
[SRV6_AD_REWRITE_NEXT_LOOKUP] = "ip6-lookup",
[SRV6_AD_REWRITE_NEXT_ERROR] = "error-drop",
},
}
static uword srv6_ad2_rewrite_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying a SR policy into an IPv6 packet.
Definition: node.c:300
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * srv6_ad_rewrite_counter_strings[]
Definition: node.c:84
static u8 * format_srv6_ad_rewrite_trace(u8 *s, va_list *args)
Definition: node.c:48

(constructor) VLIB_REGISTER_NODE (srv6_ad2_rewrite_node)

Definition at line 413 of file node.c.

◆ srv6_ad4_rewrite_node

vlib_node_registration_t srv6_ad4_rewrite_node
Initial value:
= {
.function = srv6_ad4_rewrite_fn,
.name = "srv6-ad4-rewrite",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AD_REWRITE_N_NEXT,
.next_nodes = {
[SRV6_AD_REWRITE_NEXT_LOOKUP] = "ip6-lookup",
[SRV6_AD_REWRITE_NEXT_ERROR] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static uword srv6_ad4_rewrite_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying a SR policy into an IPv6 packet.
Definition: node.c:434
static char * srv6_ad_rewrite_counter_strings[]
Definition: node.c:84
static u8 * format_srv6_ad_rewrite_trace(u8 *s, va_list *args)
Definition: node.c:48

(constructor) VLIB_REGISTER_NODE (srv6_ad4_rewrite_node)

Definition at line 66 of file node.c.

◆ srv6_ad6_rewrite_node

vlib_node_registration_t srv6_ad6_rewrite_node
Initial value:
= {
.function = srv6_ad6_rewrite_fn,
.name = "srv6-ad6-rewrite",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AD_REWRITE_N_NEXT,
.next_nodes = {
[SRV6_AD_REWRITE_NEXT_LOOKUP] = "ip6-lookup",
[SRV6_AD_REWRITE_NEXT_ERROR] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * srv6_ad_rewrite_counter_strings[]
Definition: node.c:84
static uword srv6_ad6_rewrite_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying a SR policy into an IPv6 packet.
Definition: node.c:577
static u8 * format_srv6_ad_rewrite_trace(u8 *s, va_list *args)
Definition: node.c:48

(constructor) VLIB_REGISTER_NODE (srv6_ad6_rewrite_node)

Definition at line 67 of file node.c.

◆ srv6_ad_localsid_node

vlib_node_registration_t srv6_ad_localsid_node
Initial value:
= {
.function = srv6_ad_localsid_fn,
.name = "srv6-ad-localsid",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AD_LOCALSID_N_NEXT,
.next_nodes = {
[SRV6_AD_LOCALSID_NEXT_REWRITE4] = "ip4-rewrite",
[SRV6_AD_LOCALSID_NEXT_REWRITE6] = "ip6-rewrite",
[SRV6_AD_LOCALSID_NEXT_INTERFACE] = "interface-output",
[SRV6_AD_LOCALSID_NEXT_ERROR] = "error-drop",
},
}
static u8 * format_srv6_ad_localsid_trace(u8 *s, va_list *args)
Definition: node.c:38
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static uword srv6_ad_localsid_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
SRv6 AD Localsid graph node.
Definition: node.c:201

(constructor) VLIB_REGISTER_NODE (srv6_ad_localsid_node)

Definition at line 277 of file node.c.

◆ srv6_ad_rewrite_counter_strings

char* srv6_ad_rewrite_counter_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_srv6_ad_rewrite_counter
Definition: node.c:72

Definition at line 84 of file node.c.