FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
gbp_endpoint.c File Reference
+ Include dependency graph for gbp_endpoint.c:

Go to the source code of this file.

Macros

#define GBP_EP_HASH_NUM_BUCKETS   (2 * 1024)
 
#define GBP_EP_HASH_MEMORY_SIZE   (1 << 20)
 

Functions

static void gbp_endpoint_mk_key_mac_itf (const mac_address_t *mac, u32 sw_if_index, clib_bihash_kv_16_8_t *key)
 
static void gbp_endpoint_extract_key_mac_itf (const clib_bihash_kv_16_8_t *key, mac_address_t *mac, u32 *sw_if_index)
 
gbp_endpoint_tgbp_endpoint_find_mac_itf (const mac_address_t *mac, u32 sw_if_index)
 
static void gbp_endpoint_mk_key_ip_itf (const ip46_address_t *ip, u32 sw_if_index, clib_bihash_kv_24_8_t *key)
 
static void gbp_endpoint_extract_key_ip_itf (const clib_bihash_kv_24_8_t *key, ip46_address_t *ip, u32 *sw_if_index)
 
gbp_endpoint_tgbp_endpoint_find_ip_itf (const ip46_address_t *ip, u32 sw_if_index)
 
gbp_endpoint_tgbp_endpoint_find_itf (u32 sw_if_index)
 
static bool gbp_endpoint_add_mac_itf (const mac_address_t *mac, u32 sw_if_index, index_t gbpei)
 
static bool gbp_endpoint_add_ip_itf (const ip46_address_t *ip, u32 sw_if_index, index_t gbpei)
 
static void gbp_endpoint_add_itf (u32 sw_if_index, index_t gbpei)
 
static void gbp_endpoint_del_mac_itf (const mac_address_t *mac, u32 sw_if_index)
 
static void gbp_endpoint_del_ip_itf (const ip46_address_t *ip, u32 sw_if_index)
 
static void gbp_endpoint_del_itf (u32 sw_if_index)
 
static index_t gbp_endpoint_index (const gbp_endpoint_t *gbpe)
 
int gbp_endpoint_update (u32 sw_if_index, const ip46_address_t *ips, const mac_address_t *mac, epg_id_t epg_id, u32 *handle)
 
void gbp_endpoint_delete (u32 handle)
 
void gbp_endpoint_walk (gbp_endpoint_cb_t cb, void *ctx)
 
static clib_error_tgbp_endpoint_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_gbp_endpoint (u8 *s, va_list *args)
 
static walk_rc_t gbp_endpoint_show_one (gbp_endpoint_t *gbpe, void *ctx)
 
static void gbp_endpoint_walk_ip_itf (const clib_bihash_kv_24_8_t *kvp, void *arg)
 
static void gbp_endpoint_walk_mac_itf (const clib_bihash_kv_16_8_t *kvp, void *arg)
 
static clib_error_tgbp_endpoint_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tgbp_endpoint_init (vlib_main_t *vm)
 

Variables

gbp_ep_by_itf_db_t gbp_ep_by_itf_db
 DP functions and databases. More...
 
gbp_ep_by_mac_itf_db_t gbp_ep_by_mac_itf_db
 
gbp_ep_by_ip_itf_db_t gbp_ep_by_ip_itf_db
 
gbp_endpoint_tgbp_endpoint_pool
 Pool of GBP endpoints. More...
 
static vlib_cli_command_t gbp_endpoint_cli_node
 (constructor) VLIB_CLI_COMMAND (gbp_endpoint_cli_node) More...
 
static vlib_cli_command_t gbp_endpoint_show_node
 (constructor) VLIB_CLI_COMMAND (gbp_endpoint_show_node) More...
 

Macro Definition Documentation

#define GBP_EP_HASH_MEMORY_SIZE   (1 << 20)

Definition at line 594 of file gbp_endpoint.c.

#define GBP_EP_HASH_NUM_BUCKETS   (2 * 1024)

Definition at line 593 of file gbp_endpoint.c.

Function Documentation

u8* format_gbp_endpoint ( u8 s,
va_list *  args 
)

Definition at line 458 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool gbp_endpoint_add_ip_itf ( const ip46_address_t *  ip,
u32  sw_if_index,
index_t  gbpei 
)
static

Definition at line 166 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_endpoint_add_itf ( u32  sw_if_index,
index_t  gbpei 
)
static

Definition at line 181 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool gbp_endpoint_add_mac_itf ( const mac_address_t mac,
u32  sw_if_index,
index_t  gbpei 
)
static

Definition at line 151 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* gbp_endpoint_cli ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 377 of file gbp_endpoint.c.

+ Here is the call graph for this function:

static void gbp_endpoint_del_ip_itf ( const ip46_address_t *  ip,
u32  sw_if_index 
)
static

Definition at line 207 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_endpoint_del_itf ( u32  sw_if_index)
static

Definition at line 217 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_endpoint_del_mac_itf ( const mac_address_t mac,
u32  sw_if_index 
)
static

Definition at line 197 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_endpoint_delete ( u32  handle)

Definition at line 334 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_endpoint_extract_key_ip_itf ( const clib_bihash_kv_24_8_t key,
ip46_address_t *  ip,
u32 sw_if_index 
)
static

Definition at line 115 of file gbp_endpoint.c.

+ Here is the caller graph for this function:

static void gbp_endpoint_extract_key_mac_itf ( const clib_bihash_kv_16_8_t key,
mac_address_t mac,
u32 sw_if_index 
)
static

Definition at line 81 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

gbp_endpoint_t* gbp_endpoint_find_ip_itf ( const ip46_address_t *  ip,
u32  sw_if_index 
)

Definition at line 124 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

gbp_endpoint_t* gbp_endpoint_find_itf ( u32  sw_if_index)

Definition at line 140 of file gbp_endpoint.c.

+ Here is the caller graph for this function:

gbp_endpoint_t* gbp_endpoint_find_mac_itf ( const mac_address_t mac,
u32  sw_if_index 
)

Definition at line 89 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static index_t gbp_endpoint_index ( const gbp_endpoint_t gbpe)
static

Definition at line 230 of file gbp_endpoint.c.

+ Here is the caller graph for this function:

static clib_error_t* gbp_endpoint_init ( vlib_main_t vm)
static

Definition at line 597 of file gbp_endpoint.c.

static void gbp_endpoint_mk_key_ip_itf ( const ip46_address_t *  ip,
u32  sw_if_index,
clib_bihash_kv_24_8_t key 
)
static

Definition at line 106 of file gbp_endpoint.c.

+ Here is the caller graph for this function:

static void gbp_endpoint_mk_key_mac_itf ( const mac_address_t mac,
u32  sw_if_index,
clib_bihash_kv_16_8_t key 
)
static

Definition at line 73 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* gbp_endpoint_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 530 of file gbp_endpoint.c.

+ Here is the call graph for this function:

static walk_rc_t gbp_endpoint_show_one ( gbp_endpoint_t gbpe,
void *  ctx 
)
static

Definition at line 485 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int gbp_endpoint_update ( u32  sw_if_index,
const ip46_address_t *  ips,
const mac_address_t mac,
epg_id_t  epg_id,
u32 handle 
)

Definition at line 236 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_endpoint_walk ( gbp_endpoint_cb_t  cb,
void *  ctx 
)

Definition at line 363 of file gbp_endpoint.c.

+ Here is the caller graph for this function:

static void gbp_endpoint_walk_ip_itf ( const clib_bihash_kv_24_8_t kvp,
void *  arg 
)
static

Definition at line 496 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_endpoint_walk_mac_itf ( const clib_bihash_kv_16_8_t kvp,
void *  arg 
)
static

Definition at line 513 of file gbp_endpoint.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t gbp_endpoint_cli_node
static
Initial value:
= {
.path = "gbp endpoint",
.short_help = "gbp endpoint [del] <interface> epg <ID> ip <IP> mac <MAC>",
.function = gbp_endpoint_cli,
}
static clib_error_t * gbp_endpoint_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_endpoint.c:377

(constructor) VLIB_CLI_COMMAND (gbp_endpoint_cli_node)

Definition at line 450 of file gbp_endpoint.c.

gbp_endpoint_t* gbp_endpoint_pool

Pool of GBP endpoints.

Definition at line 33 of file gbp_endpoint.c.

vlib_cli_command_t gbp_endpoint_show_node
static
Initial value:
= {
.path = "show gbp endpoint",
.short_help = "show gbp endpoint\n",
.function = gbp_endpoint_show,
}
static clib_error_t * gbp_endpoint_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_endpoint.c:530

(constructor) VLIB_CLI_COMMAND (gbp_endpoint_show_node)

Definition at line 586 of file gbp_endpoint.c.

gbp_ep_by_ip_itf_db_t gbp_ep_by_ip_itf_db

Definition at line 28 of file gbp_endpoint.c.

gbp_ep_by_itf_db_t gbp_ep_by_itf_db

DP functions and databases.

Definition at line 26 of file gbp_endpoint.c.

gbp_ep_by_mac_itf_db_t gbp_ep_by_mac_itf_db

Definition at line 27 of file gbp_endpoint.c.