FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ad-flow.c File Reference
+ Include dependency graph for ad-flow.c:

Go to the source code of this file.

Macros

#define SID_CREATE_IFACE_FEATURE_ERROR   -1
 
#define SID_CREATE_INVALID_IFACE_TYPE   -3
 
#define SID_CREATE_INVALID_IFACE_INDEX   -4
 
#define SID_CREATE_INVALID_ADJ_INDEX   -5
 
#define PARAM_AD_NH   (1 << 0)
 
#define PARAM_AD_OIF   (1 << 1)
 
#define PARAM_AD_IIF   (1 << 2)
 

Functions

static u32 ad_flow_calc_bihash_buckets (u32 n_elts)
 
static u32 ad_flow_calc_bihash_memory (u32 n_buckets, uword kv_size)
 
static int srv6_ad_flow_localsid_creation_fn (ip6_sr_localsid_t *localsid)
 
static int srv6_ad_flow_localsid_removal_fn (ip6_sr_localsid_t *localsid)
 
u8format_srv6_ad_flow_localsid (u8 *s, va_list *args)
 
uword unformat_srv6_ad_flow_localsid (unformat_input_t *input, va_list *args)
 
static u8format_srv6_ad_flow_dpo (u8 *s, va_list *args)
 
void srv6_ad_flow_dpo_lock (dpo_id_t *dpo)
 
void srv6_ad_flow_dpo_unlock (dpo_id_t *dpo)
 
static clib_error_tsrv6_ad_flow_init (vlib_main_t *vm)
 
 VNET_FEATURE_INIT (srv6_ad4_flow_rewrite, static)
 
 VNET_FEATURE_INIT (srv6_ad6_flow_rewrite, static)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

unsigned char function_name [] = "SRv6-AD-Flow-plugin"
 
unsigned char keyword_str [] = "End.AD.Flow"
 
unsigned char def_str []
 
unsigned char params_str [] = "nh <next-hop> oif <iface-out> iif <iface-in>"
 
srv6_ad_flow_main_t srv6_ad_flow_main
 
const static dpo_vft_t srv6_ad_flow_vft
 
const static char *const srv6_ad_flow_ip6_nodes []
 
const static char *const *const srv6_ad_flow_nodes [DPO_PROTO_NUM]
 

Macro Definition Documentation

◆ PARAM_AD_IIF

#define PARAM_AD_IIF   (1 << 2)

◆ PARAM_AD_NH

#define PARAM_AD_NH   (1 << 0)

◆ PARAM_AD_OIF

#define PARAM_AD_OIF   (1 << 1)

◆ SID_CREATE_IFACE_FEATURE_ERROR

#define SID_CREATE_IFACE_FEATURE_ERROR   -1

Definition at line 30 of file ad-flow.c.

◆ SID_CREATE_INVALID_ADJ_INDEX

#define SID_CREATE_INVALID_ADJ_INDEX   -5

Definition at line 33 of file ad-flow.c.

◆ SID_CREATE_INVALID_IFACE_INDEX

#define SID_CREATE_INVALID_IFACE_INDEX   -4

Definition at line 32 of file ad-flow.c.

◆ SID_CREATE_INVALID_IFACE_TYPE

#define SID_CREATE_INVALID_IFACE_TYPE   -3

Definition at line 31 of file ad-flow.c.

Function Documentation

◆ ad_flow_calc_bihash_buckets()

static u32 ad_flow_calc_bihash_buckets ( u32  n_elts)
static

Definition at line 44 of file ad-flow.c.

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

◆ ad_flow_calc_bihash_memory()

static u32 ad_flow_calc_bihash_memory ( u32  n_buckets,
uword  kv_size 
)
static

Definition at line 50 of file ad-flow.c.

+ Here is the caller graph for this function:

◆ format_srv6_ad_flow_dpo()

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

Definition at line 388 of file ad-flow.c.

◆ format_srv6_ad_flow_localsid()

u8* format_srv6_ad_flow_localsid ( u8 s,
va_list *  args 
)

Definition at line 250 of file ad-flow.c.

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

◆ srv6_ad_flow_dpo_lock()

void srv6_ad_flow_dpo_lock ( dpo_id_t dpo)

Definition at line 397 of file ad-flow.c.

◆ srv6_ad_flow_dpo_unlock()

void srv6_ad_flow_dpo_unlock ( dpo_id_t dpo)

Definition at line 402 of file ad-flow.c.

◆ srv6_ad_flow_init()

static clib_error_t* srv6_ad_flow_init ( vlib_main_t vm)
static

Definition at line 423 of file ad-flow.c.

+ Here is the call graph for this function:

◆ srv6_ad_flow_localsid_creation_fn()

static int srv6_ad_flow_localsid_creation_fn ( ip6_sr_localsid_t localsid)
static

Definition at line 58 of file ad-flow.c.

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

◆ srv6_ad_flow_localsid_removal_fn()

static int srv6_ad_flow_localsid_removal_fn ( ip6_sr_localsid_t localsid)
static

Definition at line 193 of file ad-flow.c.

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

◆ unformat_srv6_ad_flow_localsid()

uword unformat_srv6_ad_flow_localsid ( unformat_input_t input,
va_list *  args 
)

Definition at line 309 of file ad-flow.c.

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

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( srv6_ad4_flow_rewrite  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( srv6_ad6_flow_rewrite  ,
static   
)

Variable Documentation

◆ def_str

unsigned char def_str[]
Initial value:
=
"Endpoint with flow-based dynamic proxy to SR-unaware appliance"

Definition at line 37 of file ad-flow.c.

◆ function_name

unsigned char function_name[] = "SRv6-AD-Flow-plugin"

Definition at line 35 of file ad-flow.c.

◆ keyword_str

unsigned char keyword_str[] = "End.AD.Flow"

Definition at line 36 of file ad-flow.c.

◆ params_str

unsigned char params_str[] = "nh <next-hop> oif <iface-out> iif <iface-in>"

Definition at line 39 of file ad-flow.c.

◆ srv6_ad_flow_ip6_nodes

const static char* const srv6_ad_flow_ip6_nodes[]
static
Initial value:
= {
"srv6-ad-flow-localsid",
NULL,
}

Definition at line 412 of file ad-flow.c.

◆ srv6_ad_flow_main

srv6_ad_flow_main_t srv6_ad_flow_main

Definition at line 41 of file ad-flow.c.

◆ srv6_ad_flow_nodes

const static char* const * const srv6_ad_flow_nodes[DPO_PROTO_NUM]
static
Initial value:

Definition at line 417 of file ad-flow.c.

◆ srv6_ad_flow_vft

const static dpo_vft_t srv6_ad_flow_vft
static
Initial value:
= {
}

Definition at line 406 of file ad-flow.c.

srv6_ad_flow_dpo_lock
void srv6_ad_flow_dpo_lock(dpo_id_t *dpo)
Definition: ad-flow.c:397
format_srv6_ad_flow_dpo
static u8 * format_srv6_ad_flow_dpo(u8 *s, va_list *args)
Definition: ad-flow.c:388
DPO_PROTO_IP6
@ DPO_PROTO_IP6
Definition: dpo.h:65
srv6_ad_flow_ip6_nodes
const static char *const srv6_ad_flow_ip6_nodes[]
Definition: ad-flow.c:412
srv6_ad_flow_dpo_unlock
void srv6_ad_flow_dpo_unlock(dpo_id_t *dpo)
Definition: ad-flow.c:402