summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.h
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2017-03-24 20:11:15 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-28 12:29:10 +0000
commitda1f2c7cffb0de4ef05a48ffd107214eb11fa45f (patch)
tree56267e11122a2de325d204b8ad5fb49884eec93c /src/vnet/l2/l2_fib.h
parent6792ec059696a358b6c98d8d86e9740b34c01e24 (diff)
Implement MAC Flush for BD or Interface from the L2FIB
Allow non-static MACs in the L2FIB which is associated with an interface or a bridge domain (BD) be flushed. MAC flush are initiated automatically when an interface is removed from a BD or when a BD is deleted. MAC flush can also be invoked manually via the following CLI: l2fib mac-flush interface <if-name> l2fib mac-flush bridge-domain <bd-id> Change-Id: Ie33243622834810a765f48ebcd22bdb8e8fc87a4 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_fib.h')
-rw-r--r--src/vnet/l2/l2_fib.h39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h
index 4a2da59bc01..7e49d74baf8 100644
--- a/src/vnet/l2/l2_fib.h
+++ b/src/vnet/l2/l2_fib.h
@@ -66,7 +66,8 @@ typedef struct
u8 filter:1; /* drop packets to/from this mac */
u8 unused1:5;
u8 timestamp; /* timestamp for aging */
- u16 unused2;
+ u8 int_sn; /* interface seq num */
+ u8 bd_sn; /* bridge domain seq num */
} fields;
u64 raw;
};
@@ -313,22 +314,28 @@ l2fib_lookup_4 (BVT (clib_bihash) * mac_table,
}
}
+void l2fib_clear_table (uint keep_static);
+
+void
+l2fib_add_entry (u64 mac,
+ u32 bd_index,
+ u32 sw_if_index, u32 static_mac, u32 drop_mac, u32 bvi_mac);
+
+u32 l2fib_del_entry (u64 mac, u32 bd_index);
+
+void l2fib_start_ager_scan (vlib_main_t * vm);
+
+void l2fib_flush_int_mac (vlib_main_t * vm, u32 sw_if_index);
+
+void l2fib_flush_bd_mac (vlib_main_t * vm, u32 bd_index);
+
+void
+l2fib_table_dump (u32 bd_index, l2fib_entry_key_t ** l2fe_key,
+ l2fib_entry_result_t ** l2fe_res);
+
+u8 *format_vnet_sw_if_index_name_with_NA (u8 * s, va_list * args);
+
BVT (clib_bihash) * get_mac_table (void);
- void
- l2fib_clear_table (uint keep_static);
- void
- l2fib_add_entry (u64 mac,
- u32 bd_index,
- u32 sw_if_index,
- u32 static_mac, u32 drop_mac, u32 bvi_mac);
-u32
-l2fib_del_entry (u64 mac, u32 bd_index);
-
- void
- l2fib_table_dump (u32 bd_index, l2fib_entry_key_t ** l2fe_key,
- l2fib_entry_result_t ** l2fe_res);
-
- u8 *format_vnet_sw_if_index_name_with_NA (u8 * s, va_list * args);
#endif