X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fgbp%2Fgbp_learn.c;h=af3a6fb52acb0cb4702bf57a0e3a6ebc49f352b7;hb=59f71132e;hp=612af9812481f45ebfa2cbc639ab739f124526f7;hpb=f90bcee0944064fbe99571b772eef4baba32152e;p=vpp.git diff --git a/src/plugins/gbp/gbp_learn.c b/src/plugins/gbp/gbp_learn.c index 612af981248..af3a6fb52ac 100644 --- a/src/plugins/gbp/gbp_learn.c +++ b/src/plugins/gbp/gbp_learn.c @@ -22,35 +22,21 @@ gbp_learn_main_t gbp_learn_main; void -gbp_learn_enable (u32 sw_if_index, gbb_learn_mode_t mode) +gbp_learn_enable (u32 sw_if_index) { - if (GBP_LEARN_MODE_L2 == mode) - { - l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_GBP_LEARN, 1); - } - else - { - vnet_feature_enable_disable ("ip4-unicast", - "gbp-learn-ip4", sw_if_index, 1, 0, 0); - vnet_feature_enable_disable ("ip6-unicast", - "gbp-learn-ip6", sw_if_index, 1, 0, 0); - } + vnet_feature_enable_disable ("ip4-unicast", + "gbp-learn-ip4", sw_if_index, 1, 0, 0); + vnet_feature_enable_disable ("ip6-unicast", + "gbp-learn-ip6", sw_if_index, 1, 0, 0); } void -gbp_learn_disable (u32 sw_if_index, gbb_learn_mode_t mode) +gbp_learn_disable (u32 sw_if_index) { - if (GBP_LEARN_MODE_L2 == mode) - { - l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_GBP_LEARN, 0); - } - else - { - vnet_feature_enable_disable ("ip4-unicast", - "gbp-learn-ip4", sw_if_index, 0, 0, 0); - vnet_feature_enable_disable ("ip6-unicast", - "gbp-learn-ip6", sw_if_index, 0, 0, 0); - } + vnet_feature_enable_disable ("ip4-unicast", + "gbp-learn-ip4", sw_if_index, 0, 0, 0); + vnet_feature_enable_disable ("ip6-unicast", + "gbp-learn-ip6", sw_if_index, 0, 0, 0); } static clib_error_t *