FD.io VPP
v20.09-rc2-28-g3c5414029
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | l2fib_main_t |
struct | l2fib_entry_key_t |
struct | l2fib_seq_num_t |
struct | l2fib_entry_result_t_ |
Macros | |
#define | L2FIB_NUM_BUCKETS (64 * 1024) |
#define | L2FIB_MEMORY_SIZE (512<<20) |
#define | L2FIB_AGE_SCAN_INTERVAL (60.0) |
#define | L2FIB_EVENT_SCAN_DELAY_DEFAULT (0.1) |
#define | L2FIB_EVENT_MAX_MACS_DEFAULT (100) |
#define | L2FIB_EVENT_LEARN_LIMIT_DEFAULT (1000) |
#define | foreach_l2fib_entry_result_attr |
Flags associated with an L2 Fib Entry. More... | |
Typedefs | |
typedef enum l2fib_entry_result_flags_t_ | l2fib_entry_result_flags_t |
typedef struct l2fib_entry_result_t_ | l2fib_entry_result_t |
Enumerations | |
enum | l2fib_entry_result_flags_t_ { L2FIB_ENTRY_RESULT_FLAG_NONE = 0, foreach_l2fib_entry_result_attr } |
enum | l2_mac_event_action_t { MAC_EVENT_ACTION_ADD = 0, MAC_EVENT_ACTION_DELETE = 1, MAC_EVENT_ACTION_MOVE = 2 } |
Variables | |
l2fib_main_t | l2fib_main |
#define foreach_l2fib_entry_result_attr |
Flags associated with an L2 Fib Entry.
typedef enum l2fib_entry_result_flags_t_ l2fib_entry_result_flags_t |
typedef struct l2fib_entry_result_t_ l2fib_entry_result_t |
BVT | ( | clib_bihash | ) |
void l2fib_add_entry | ( | const u8 * | mac, |
u32 | bd_index, | ||
u32 | sw_if_index, | ||
l2fib_entry_result_flags_t | flags | ||
) |
void l2fib_clear_table | ( | void | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void l2fib_flush_all_mac | ( | vlib_main_t * | vm | ) |
void l2fib_flush_bd_mac | ( | vlib_main_t * | vm, |
u32 | bd_index | ||
) |
void l2fib_flush_int_mac | ( | vlib_main_t * | vm, |
u32 | sw_if_index | ||
) |
static_always_inline void l2fib_lookup_1 | ( | BVT(clib_bihash) * | mac_table, |
l2fib_entry_key_t * | cached_key, | ||
l2fib_entry_result_t * | cached_result, | ||
u8 * | mac0, | ||
u16 | bd_index0, | ||
l2fib_entry_key_t * | key0, | ||
l2fib_entry_result_t * | result0 | ||
) |
Lookup the entry for mac and bd_index in the mac table for 1 packet.
Cached_key and cached_result are used as a one-entry cache. The function reads and updates them as needed.
mac0 and bd_index0 are the keys. The entry is written to result0. If the entry was not found, result0 is set to ~0.
key0 return with the computed key, convenient if the entry needs, to be updated afterward.
Definition at line 260 of file l2_fib.h.
static_always_inline void l2fib_lookup_2 | ( | BVT(clib_bihash) * | mac_table, |
l2fib_entry_key_t * | cached_key, | ||
l2fib_entry_result_t * | cached_result, | ||
u8 * | mac0, | ||
u8 * | mac1, | ||
u16 | bd_index0, | ||
u16 | bd_index1, | ||
l2fib_entry_key_t * | key0, | ||
l2fib_entry_key_t * | key1, | ||
l2fib_entry_result_t * | result0, | ||
l2fib_entry_result_t * | result1 | ||
) |
Lookup the entry for mac and bd_index in the mac table for 2 packets.
The lookups for the two packets are interleaved.
Cached_key and cached_result are used as a one-entry cache. The function reads and updates them as needed.
mac0 and bd_index0 are the keys. The entry is written to result0. If the entry was not found, result0 is set to ~0. The same holds for mac1/bd_index1/result1.
Definition at line 304 of file l2_fib.h.
static_always_inline void l2fib_lookup_4 | ( | BVT(clib_bihash) * | mac_table, |
l2fib_entry_key_t * | cached_key, | ||
l2fib_entry_result_t * | cached_result, | ||
const u8 * | mac0, | ||
const u8 * | mac1, | ||
const u8 * | mac2, | ||
const u8 * | mac3, | ||
u16 | bd_index0, | ||
u16 | bd_index1, | ||
u16 | bd_index2, | ||
u16 | bd_index3, | ||
l2fib_entry_key_t * | key0, | ||
l2fib_entry_key_t * | key1, | ||
l2fib_entry_key_t * | key2, | ||
l2fib_entry_key_t * | key3, | ||
l2fib_entry_result_t * | result0, | ||
l2fib_entry_result_t * | result1, | ||
l2fib_entry_result_t * | result2, | ||
l2fib_entry_result_t * | result3 | ||
) |
void l2fib_start_ager_scan | ( | vlib_main_t * | vm | ) |
static_always_inline u8* l2fib_swif_seq_num | ( | u32 | sw_if_index | ) |
void l2fib_table_dump | ( | u32 | bd_index, |
l2fib_entry_key_t ** | l2fe_key, | ||
l2fib_entry_result_t ** | l2fe_res | ||
) |
static_always_inline u8* l2fib_valid_swif_seq_num | ( | u32 | sw_if_index | ) |
STATIC_ASSERT_SIZEOF | ( | l2fib_entry_key_t | , |
8 | |||
) |
STATIC_ASSERT_SIZEOF | ( | l2fib_entry_result_flags_t | , |
1 | |||
) |
STATIC_ASSERT_SIZEOF | ( | l2fib_entry_result_t | , |
8 | |||
) |
l2fib_main_t l2fib_main |