aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_endpoint_group.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-06-26 13:58:09 +0200
committerNeale Ranns <nranns@cisco.com>2019-07-02 14:18:59 +0000
commit2ec825937b7ac856f67d086ce6814dd21c5e9bd7 (patch)
treeadd7b051c3ff3f1f4437efbf2f3a3e8279f79b4f /src/plugins/gbp/gbp_endpoint_group.c
parent12df497bb6b7f60513f48c0dacca9ad99d717192 (diff)
gbp: disable L2 BD learning per-interface
Disable L2 BD learning for each GBP interface instead of at the bridge level. This does not change the current behavior (learning is disabled for all GBP interfaces) but enables turning it on selectively for future features such as anonymous l3-out. Type: refactor Change-Id: Id88644277941d703600acf97d49cbc3332ae3f68 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_endpoint_group.c')
-rw-r--r--src/plugins/gbp/gbp_endpoint_group.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/gbp/gbp_endpoint_group.c b/src/plugins/gbp/gbp_endpoint_group.c
index 85afee2da72..bacbb0cfb5e 100644
--- a/src/plugins/gbp/gbp_endpoint_group.c
+++ b/src/plugins/gbp/gbp_endpoint_group.c
@@ -138,9 +138,8 @@ gbp_endpoint_group_add_and_lock (vnid_t vnid,
* Add the uplink to the BD
* packets direct from the uplink have had policy applied
*/
- set_int_l2_mode (vlib_get_main (), vnet_get_main (),
- MODE_L2_BRIDGE, gg->gg_uplink_sw_if_index,
- gg->gg_bd_index, L2_BD_PORT_TYPE_NORMAL, 0, 0);
+ gbp_bridge_domain_itf_add (gg->gg_uplink_sw_if_index,
+ gg->gg_bd_index, L2_BD_PORT_TYPE_NORMAL);
l2input_intf_bitmap_enable (gg->gg_uplink_sw_if_index,
L2INPUT_FEAT_GBP_NULL_CLASSIFY, 1);
}
@@ -179,10 +178,8 @@ gbp_endpoint_group_unlock (index_t ggi)
if (~0 != gg->gg_uplink_sw_if_index)
{
- set_int_l2_mode (vlib_get_main (), vnet_get_main (),
- MODE_L3, gg->gg_uplink_sw_if_index,
- gg->gg_bd_index, L2_BD_PORT_TYPE_NORMAL, 0, 0);
-
+ gbp_bridge_domain_itf_del (gg->gg_uplink_sw_if_index,
+ gg->gg_bd_index, L2_BD_PORT_TYPE_NORMAL);
l2input_intf_bitmap_enable (gg->gg_uplink_sw_if_index,
L2INPUT_FEAT_GBP_NULL_CLASSIFY, 0);
}