diff options
author | John Lo <loj@cisco.com> | 2017-07-22 00:21:36 -0400 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-07-23 14:03:41 +0000 |
commit | beb0b2e346c63e21ffe892ae0e04b67bb10fba5e (patch) | |
tree | 09a64e2e8cd9ee4fa0915cb93d9a3a701932e024 /src/vnet/l2/l2_learn.c | |
parent | 858c06fac65e7ad05dc6e739a51e8d87a544e0fe (diff) |
Improve L2 Input/Output Feature Infrastructure and Usage
Simplify L2 output feature infra to unify with L2 input feature
infra using the newly improved feature bitmap mechanism.
Updated all L2 features to use the more efficient infra functions.
Change-Id: If8f463826b0af0717129befe92a27ea8cfc40449
Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_learn.c')
-rw-r--r-- | src/vnet/l2/l2_learn.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c index b9904d3edf5..65406292cc7 100644 --- a/src/vnet/l2/l2_learn.c +++ b/src/vnet/l2/l2_learn.c @@ -116,19 +116,9 @@ l2learn_process (vlib_node_runtime_t * node, u32 * bucket0, l2fib_entry_result_t * result0, u32 * next0, u8 timestamp) { - u32 feature_bitmap; - /* Set up the default next node (typically L2FWD) */ - - /* Remove ourself from the feature bitmap */ - feature_bitmap = vnet_buffer (b0)->l2.feature_bitmap & ~L2INPUT_FEAT_LEARN; - - /* Save for next feature graph nodes */ - vnet_buffer (b0)->l2.feature_bitmap = feature_bitmap; - - /* Determine the next node */ - *next0 = feat_bitmap_get_next_node_index (msm->feat_next_node_index, - feature_bitmap); + *next0 = vnet_l2_feature_next (b0, msm->feat_next_node_index, + L2INPUT_FEAT_LEARN); /* Check mac table lookup result */ if (PREDICT_TRUE (result0->fields.sw_if_index == sw_if_index0)) |