diff options
author | Neale Ranns <nranns@cisco.com> | 2020-09-29 15:38:51 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-10-08 08:51:59 +0000 |
commit | 47a3d9975fa3af7a7537b565d6511dadc0df61fb (patch) | |
tree | fa33e3360af84239615f48b164b239ee3b660ee6 /src/vnet/l2/l2_bd.h | |
parent | 83143710e80c8df703fe1ebc0e513aa37971d295 (diff) |
l2: input performance
Type: improvement
- cache the values form the BD on the input config to avoid loading
- avoid the short write long read on the sequence number
- use vlib_buffer_enqueue_to_next
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I33442b9104b457e4c638d26e9ad3bc965687a0bc
Diffstat (limited to 'src/vnet/l2/l2_bd.h')
-rw-r--r-- | src/vnet/l2/l2_bd.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vnet/l2/l2_bd.h b/src/vnet/l2/l2_bd.h index 35c0e0bf0a1..943358b4e15 100644 --- a/src/vnet/l2/l2_bd.h +++ b/src/vnet/l2/l2_bd.h @@ -139,7 +139,6 @@ bd_is_valid (l2_bridge_domain_t * bd_config) /* Init bridge domain if not done already */ void bd_validate (l2_bridge_domain_t * bd_config); - void bd_add_member (l2_bridge_domain_t * bd_config, l2_flood_member_t * member); @@ -201,6 +200,16 @@ bd_find_or_add_bd_index (bd_main_t * bdm, u32 bd_id) return bd_index; } +/** + * \brief Walk all the input interfaces in the BD + */ +typedef walk_rc_t (*bd_input_walk_fn_t) (u32 bd_index, u32 sw_if_index); + +u32 bd_input_walk (u32 bd_index, bd_input_walk_fn_t fn, void *data); + +l2_bridge_domain_t *bd_get (u32 bd_index); +l2_bridge_domain_t *bd_get_by_table_id (u32 table_id); + u32 bd_add_del_ip_mac (u32 bd_index, ip46_type_t type, const ip46_address_t * ip_addr, |