diff options
author | Eyal Bari <ebari@cisco.com> | 2017-04-27 14:07:55 +0300 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2017-05-08 12:33:17 +0000 |
commit | 7537e717d1ca6de0e33478bc50b9f7125f04c808 (patch) | |
tree | 43006c833fe8caa85231160db94866d348a52cca /src/vnet/l2/l2_learn.c | |
parent | 57d7dbc8bf8a49ee2421fe97bd3ed7099d2384bf (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_learn.c')
-rw-r--r-- | src/vnet/l2/l2_learn.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c index faed0d6609d..adc5e70f493 100644 --- a/src/vnet/l2/l2_learn.c +++ b/src/vnet/l2/l2_learn.c @@ -141,10 +141,8 @@ l2learn_process (vlib_node_runtime_t * node, if (PREDICT_FALSE (result0->fields.timestamp != timestamp)) result0->fields.timestamp = timestamp; if (PREDICT_FALSE - (result0->fields.int_sn != vnet_buffer (b0)->l2.int_sn)) - result0->fields.int_sn = vnet_buffer (b0)->l2.int_sn; - if (PREDICT_FALSE (result0->fields.bd_sn != vnet_buffer (b0)->l2.bd_sn)) - result0->fields.bd_sn = vnet_buffer (b0)->l2.bd_sn; + (result0->fields.sn.as_u16 != vnet_buffer (b0)->l2.l2fib_sn)) + result0->fields.sn.as_u16 = vnet_buffer (b0)->l2.l2fib_sn; } else if (result0->raw == ~0) { @@ -171,8 +169,7 @@ l2learn_process (vlib_node_runtime_t * node, result0->raw = 0; /* clear all fields */ result0->fields.sw_if_index = sw_if_index0; result0->fields.timestamp = timestamp; - result0->fields.bd_sn = vnet_buffer (b0)->l2.bd_sn; - result0->fields.int_sn = vnet_buffer (b0)->l2.int_sn; + result0->fields.sn.as_u16 = vnet_buffer (b0)->l2.l2fib_sn; kv.key = key0->raw; kv.value = result0->raw; @@ -210,8 +207,7 @@ l2learn_process (vlib_node_runtime_t * node, result0->raw = 0; /* clear all fields */ result0->fields.sw_if_index = sw_if_index0; result0->fields.timestamp = timestamp; - result0->fields.bd_sn = vnet_buffer (b0)->l2.bd_sn; - result0->fields.int_sn = vnet_buffer (b0)->l2.int_sn; + result0->fields.sn.as_u16 = vnet_buffer (b0)->l2.l2fib_sn; kv.key = key0->raw; kv.value = result0->raw; |