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.c | |
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.c')
-rw-r--r-- | src/vnet/l2/l2_fib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c index 2bb6d105335..6f8f6e06330 100644 --- a/src/vnet/l2/l2_fib.c +++ b/src/vnet/l2/l2_fib.c @@ -413,8 +413,10 @@ l2fib_add (vlib_main_t * vm, } } - l2fib_add_entry (mac, bd_index, sw_if_index, static_mac, filter_mac, - bvi_mac); + if (filter_mac) + l2fib_add_filter_entry (mac, bd_index); + else + l2fib_add_fwd_entry (mac, bd_index, sw_if_index, static_mac, bvi_mac); done: return error; @@ -464,7 +466,6 @@ l2fib_test_command_fn (vlib_main_t * vm, u64 mac, save_mac; u32 bd_index = 0; u32 sw_if_index = 8; - u32 filter_mac = 0; u32 bvi_mac = 0; u32 is_add = 0; u32 is_del = 0; @@ -503,8 +504,7 @@ l2fib_test_command_fn (vlib_main_t * vm, for (i = 0; i < count; i++) { u64 tmp; - l2fib_add_entry (mac, bd_index, sw_if_index, mac, - filter_mac, bvi_mac); + l2fib_add_fwd_entry (mac, bd_index, sw_if_index, mac, bvi_mac); tmp = clib_net_to_host_u64 (mac); tmp >>= 16; tmp++; |