diff options
author | Eyal Bari <ebari@cisco.com> | 2017-06-25 14:42:33 +0300 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2017-06-27 12:41:56 +0000 |
commit | 25ff2ea3a31e422094f6d91eab46222a29a77c4b (patch) | |
tree | a8249ce452d6af4daa66e09851ae689612286e71 /src/vnet/l2/l2_fib.h | |
parent | e2547ab574a82c69482704ef27375f1391deb9af (diff) |
L2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888)
fixed instability in l2bd_multi_instnce test - sometimes failing with extra
packets captured
it appears l2-learn was not updating hit entries but rather a copy of them.
if the ager did not have a chance to run before the test was running the
learning cycle - entries were not updated with the packet's seq num - causing
packets to flood when hitting the stale seq_num in l2-fwd - hence the extra
packets
fixed handling of filter entries
revert workaround for instability in test
Change-Id: I16d918e6310a5bf40bad5b7335b2140c2867cb71
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.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h index 031845029ac..21dcc4513e0 100644 --- a/src/vnet/l2/l2_fib.h +++ b/src/vnet/l2/l2_fib.h @@ -350,6 +350,19 @@ l2fib_add_entry (u64 mac, u32 bd_index, u32 sw_if_index, u32 static_mac, u32 drop_mac, u32 bvi_mac); +static inline void +l2fib_add_fwd_entry (u64 mac, u32 bd_index, u32 sw_if_index, u32 static_mac, + u32 bvi_mac) +{ + l2fib_add_entry (mac, bd_index, sw_if_index, static_mac, 0, bvi_mac); +} + +static inline void +l2fib_add_filter_entry (u64 mac, u32 bd_index) +{ + l2fib_add_entry (mac, bd_index, ~0, 1, 1, 0); +} + u32 l2fib_del_entry (u64 mac, u32 bd_index); void l2fib_start_ager_scan (vlib_main_t * vm); |