FD.io VPP  v21.06
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_flow_localsid_trace_t
 
struct  srv6_ad_flow_rewrite_trace_t
 

Macros

#define foreach_srv6_ad_flow_rewrite_counter
 

Enumerations

enum  srv6_ad_flow_rewrite_counters { SRV6_AD_FLOW_REWRITE_N_COUNTERS }
 
enum  srv6_ad_flow_localsid_next_t {
  SRV6_AD_FLOW_LOCALSID_NEXT_ERROR, SRV6_AD_FLOW_LOCALSID_NEXT_REWRITE4, SRV6_AD_FLOW_LOCALSID_NEXT_REWRITE6, SRV6_AD_FLOW_LOCALSID_NEXT_BYPASS,
  SRV6_AD_FLOW_LOCALSID_NEXT_PUNT, SRV6_AD_FLOW_LOCALSID_N_NEXT
}
 
enum  srv6_ad_flow_rewrite_next_t { SRV6_AD_FLOW_REWRITE_NEXT_ERROR, SRV6_AD_FLOW_REWRITE_NEXT_LOOKUP, SRV6_AD_FLOW_REWRITE_N_NEXT }
 

Functions

static u8format_srv6_ad_flow_localsid_trace (u8 *s, va_list *args)
 
static u8format_srv6_ad_flow_rewrite_trace (u8 *s, va_list *args)
 
static_always_inline int ad_flow_lru_insert (srv6_ad_flow_localsid_t *ls, srv6_ad_flow_entry_t *e, f64 now)
 
static void ad_flow_entry_update_lru (srv6_ad_flow_localsid_t *ls, srv6_ad_flow_entry_t *e)
 
static void ad_flow_entry_delete (srv6_ad_flow_localsid_t *ls, srv6_ad_flow_entry_t *e, int lru_delete)
 
static_always_inline int ad_flow_lru_free_one (srv6_ad_flow_localsid_t *ls, f64 now)
 
static_always_inline srv6_ad_flow_entry_tad_flow_entry_alloc (srv6_ad_flow_localsid_t *ls, f64 now)
 
static u32 ad_flow_value_get_session_index (clib_bihash_kv_40_8_t *value)
 
int ad_flow_is_idle_entry_cb (clib_bihash_kv_40_8_t *kv, void *arg)
 
static_always_inline int end_ad_flow_walk_expect_first_hdr (vlib_main_t *vm, vlib_buffer_t *b, ip6_ext_header_t *first_hdr, u8 first_hdr_type, u8 expected_hdr_type, u32 *encap_length, u8 **found_hdr)
 Function doing SRH processing for AD behavior. More...
 
static_always_inline void end_ad_flow_processing_v6 (vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip, srv6_ad_flow_localsid_t *ls_mem, u32 *next, vlib_combined_counter_main_t **cnt, u32 *cnt_idx, f64 now)
 Function doing SRH processing for per-flow AD behavior (IPv6 inner traffic) More...
 
static_always_inline void end_ad_flow_processing_v4 (vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip, srv6_ad_flow_localsid_t *ls_mem, u32 *next, vlib_combined_counter_main_t **cnt, u32 *cnt_idx, f64 now)
 
static uword srv6_ad_flow_localsid_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 SRv6 AD Localsid graph node. More...
 
static uword srv6_ad4_flow_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_flow_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_flow_rewrite_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad4_flow_rewrite_node) More...
 
vlib_node_registration_t srv6_ad6_flow_rewrite_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad6_flow_rewrite_node) More...
 
static char * srv6_ad_flow_rewrite_counter_strings []
 
vlib_node_registration_t srv6_ad_flow_localsid_node
 (constructor) VLIB_REGISTER_NODE (srv6_ad_flow_localsid_node) More...
 

Macro Definition Documentation

◆ foreach_srv6_ad_flow_rewrite_counter

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

Definition at line 72 of file node.c.

Enumeration Type Documentation

◆ srv6_ad_flow_localsid_next_t

Enumerator
SRV6_AD_FLOW_LOCALSID_NEXT_ERROR 
SRV6_AD_FLOW_LOCALSID_NEXT_REWRITE4 
SRV6_AD_FLOW_LOCALSID_NEXT_REWRITE6 
SRV6_AD_FLOW_LOCALSID_NEXT_BYPASS 
SRV6_AD_FLOW_LOCALSID_NEXT_PUNT 
SRV6_AD_FLOW_LOCALSID_N_NEXT 

Definition at line 92 of file node.c.

◆ srv6_ad_flow_rewrite_counters

Enumerator
SRV6_AD_FLOW_REWRITE_N_COUNTERS 

Definition at line 76 of file node.c.

◆ srv6_ad_flow_rewrite_next_t

Enumerator
SRV6_AD_FLOW_REWRITE_NEXT_ERROR 
SRV6_AD_FLOW_REWRITE_NEXT_LOOKUP 
SRV6_AD_FLOW_REWRITE_N_NEXT 

Definition at line 102 of file node.c.

Function Documentation

◆ ad_flow_entry_alloc()

static_always_inline srv6_ad_flow_entry_t* ad_flow_entry_alloc ( srv6_ad_flow_localsid_t ls,
f64  now 
)

Definition at line 200 of file node.c.

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

◆ ad_flow_entry_delete()

static void ad_flow_entry_delete ( srv6_ad_flow_localsid_t ls,
srv6_ad_flow_entry_t e,
int  lru_delete 
)
inlinestatic

Definition at line 137 of file node.c.

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

◆ ad_flow_entry_update_lru()

static void ad_flow_entry_update_lru ( srv6_ad_flow_localsid_t ls,
srv6_ad_flow_entry_t e 
)
inlinestatic

Definition at line 125 of file node.c.

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

◆ ad_flow_is_idle_entry_cb()

int ad_flow_is_idle_entry_cb ( clib_bihash_kv_40_8_t kv,
void *  arg 
)

Definition at line 221 of file node.c.

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

◆ ad_flow_lru_free_one()

static_always_inline int ad_flow_lru_free_one ( srv6_ad_flow_localsid_t ls,
f64  now 
)

Definition at line 173 of file node.c.

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

◆ ad_flow_lru_insert()

static_always_inline int ad_flow_lru_insert ( srv6_ad_flow_localsid_t ls,
srv6_ad_flow_entry_t e,
f64  now 
)

Definition at line 112 of file node.c.

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

◆ ad_flow_value_get_session_index()

static u32 ad_flow_value_get_session_index ( clib_bihash_kv_40_8_t value)
inlinestatic

Definition at line 215 of file node.c.

+ Here is the caller graph for this function:

◆ end_ad_flow_processing_v4()

static_always_inline void end_ad_flow_processing_v4 ( vlib_main_t vm,
vlib_buffer_t b,
ip6_header_t ip,
srv6_ad_flow_localsid_t ls_mem,
u32 next,
vlib_combined_counter_main_t **  cnt,
u32 cnt_idx,
f64  now 
)

Definition at line 441 of file node.c.

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

◆ end_ad_flow_processing_v6()

static_always_inline void end_ad_flow_processing_v6 ( vlib_main_t vm,
vlib_buffer_t b,
ip6_header_t ip,
srv6_ad_flow_localsid_t ls_mem,
u32 next,
vlib_combined_counter_main_t **  cnt,
u32 cnt_idx,
f64  now 
)

Function doing SRH processing for per-flow AD behavior (IPv6 inner traffic)

Definition at line 303 of file node.c.

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

◆ end_ad_flow_walk_expect_first_hdr()

static_always_inline int end_ad_flow_walk_expect_first_hdr ( vlib_main_t vm,
vlib_buffer_t b,
ip6_ext_header_t *  first_hdr,
u8  first_hdr_type,
u8  expected_hdr_type,
u32 encap_length,
u8 **  found_hdr 
)

Function doing SRH processing for AD behavior.

Definition at line 244 of file node.c.

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

◆ format_srv6_ad_flow_localsid_trace()

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

Definition at line 37 of file node.c.

◆ format_srv6_ad_flow_rewrite_trace()

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

Definition at line 49 of file node.c.

+ Here is the caller graph for this function:

◆ srv6_ad4_flow_rewrite_fn()

static uword srv6_ad4_flow_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 681 of file node.c.

+ Here is the call graph for this function:

◆ srv6_ad6_flow_rewrite_fn()

static uword srv6_ad6_flow_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 855 of file node.c.

+ Here is the call graph for this function:

◆ srv6_ad_flow_localsid_fn()

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

SRv6 AD Localsid graph node.

Definition at line 580 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ srv6_ad4_flow_rewrite_node

vlib_node_registration_t srv6_ad4_flow_rewrite_node
Initial value:
= {
.name = "srv6-ad4-flow-rewrite",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AD_FLOW_REWRITE_N_NEXT,
.next_nodes = {
},
}
static char * srv6_ad_flow_rewrite_counter_strings[]
Definition: node.c:84
unsigned int u32
Definition: types.h:88
static uword srv6_ad4_flow_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:681
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_srv6_ad_flow_rewrite_trace(u8 *s, va_list *args)
Definition: node.c:49

(constructor) VLIB_REGISTER_NODE (srv6_ad4_flow_rewrite_node)

Definition at line 67 of file node.c.

◆ srv6_ad6_flow_rewrite_node

vlib_node_registration_t srv6_ad6_flow_rewrite_node
Initial value:
= {
.name = "srv6-ad6-flow-rewrite",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AD_FLOW_REWRITE_N_NEXT,
.next_nodes = {
},
}
static char * srv6_ad_flow_rewrite_counter_strings[]
Definition: node.c:84
unsigned int u32
Definition: types.h:88
static uword srv6_ad6_flow_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:855
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_srv6_ad_flow_rewrite_trace(u8 *s, va_list *args)
Definition: node.c:49

(constructor) VLIB_REGISTER_NODE (srv6_ad6_flow_rewrite_node)

Definition at line 68 of file node.c.

◆ srv6_ad_flow_localsid_node

vlib_node_registration_t srv6_ad_flow_localsid_node
Initial value:
= {
.name = "srv6-ad-flow-localsid",
.vector_size = sizeof (u32),
.next_nodes = {
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_srv6_ad_flow_localsid_trace(u8 *s, va_list *args)
Definition: node.c:37
static uword srv6_ad_flow_localsid_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
SRv6 AD Localsid graph node.
Definition: node.c:580

(constructor) VLIB_REGISTER_NODE (srv6_ad_flow_localsid_node)

Definition at line 658 of file node.c.

◆ srv6_ad_flow_rewrite_counter_strings

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

Definition at line 84 of file node.c.