aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.h
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-04-27 14:07:55 +0300
committerJohn Lo <loj@cisco.com>2017-05-08 12:33:17 +0000
commit7537e717d1ca6de0e33478bc50b9f7125f04c808 (patch)
tree43006c833fe8caa85231160db94866d348a52cca /src/vnet/l2/l2_fib.h
parent57d7dbc8bf8a49ee2421fe97bd3ed7099d2384bf (diff)
L2FIB:CLI/API to flush all non-static entries
added CLI l2fib flush-mac all added API l2fib_flush_all flushes all non static l2fib entries on all valid BDs Change-Id: Ic963c88f4bed56308c03ab43106033132a0e87be Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_fib.h')
-rw-r--r--src/vnet/l2/l2_fib.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h
index 7e49d74baf8..e571a210975 100644
--- a/src/vnet/l2/l2_fib.h
+++ b/src/vnet/l2/l2_fib.h
@@ -50,6 +50,20 @@ typedef struct
STATIC_ASSERT_SIZEOF (l2fib_entry_key_t, 8);
+
+typedef struct
+{
+ union
+ {
+ struct
+ {
+ u8 swif;
+ u8 bd;
+ };
+ u16 as_u16;
+ };
+} l2fib_seq_num_t;
+
/*
* The l2fib entry results
*/
@@ -66,8 +80,7 @@ typedef struct
u8 filter:1; /* drop packets to/from this mac */
u8 unused1:5;
u8 timestamp; /* timestamp for aging */
- u8 int_sn; /* interface seq num */
- u8 bd_sn; /* bridge domain seq num */
+ l2fib_seq_num_t sn; /* bd/int seq num */
} fields;
u64 raw;
};
@@ -314,7 +327,7 @@ l2fib_lookup_4 (BVT (clib_bihash) * mac_table,
}
}
-void l2fib_clear_table (uint keep_static);
+void l2fib_clear_table (void);
void
l2fib_add_entry (u64 mac,
@@ -329,6 +342,8 @@ 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_flush_all_mac (vlib_main_t * vm);
+
void
l2fib_table_dump (u32 bd_index, l2fib_entry_key_t ** l2fe_key,
l2fib_entry_result_t ** l2fe_res);