aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_endpoint_group.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-05 04:22:08 -0800
committerNeale Ranns <nranns@cisco.com>2019-03-05 13:51:32 +0000
commit32f6d8e0ca39483f706dc3a1c28223e9fe028f06 (patch)
tree4d36a736e12268ca5f4cb937260b3ac037e743c2 /src/plugins/gbp/gbp_endpoint_group.c
parent0fce11f23d64eae2f374435b31a77b872d552298 (diff)
GBP: per-group EP retention policy
Change-Id: I3ed4e2e92f74f15b07fcd3e7fbc3fa8718d5249d Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_endpoint_group.c')
-rw-r--r--src/plugins/gbp/gbp_endpoint_group.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/gbp/gbp_endpoint_group.c b/src/plugins/gbp/gbp_endpoint_group.c
index a2922716e42..dc4440743c7 100644
--- a/src/plugins/gbp/gbp_endpoint_group.c
+++ b/src/plugins/gbp/gbp_endpoint_group.c
@@ -75,7 +75,10 @@ gbp_endpoint_group_find (epg_id_t epg_id)
int
gbp_endpoint_group_add_and_lock (epg_id_t epg_id,
u16 sclass,
- u32 bd_id, u32 rd_id, u32 uplink_sw_if_index)
+ u32 bd_id,
+ u32 rd_id,
+ u32 uplink_sw_if_index,
+ const gbp_endpoint_retention_t * retention)
{
gbp_endpoint_group_t *gg;
index_t ggi;
@@ -113,6 +116,7 @@ gbp_endpoint_group_add_and_lock (epg_id_t epg_id,
gg->gg_uplink_sw_if_index = uplink_sw_if_index;
gg->gg_locks = 1;
gg->gg_sclass = sclass;
+ gg->gg_retention = *retention;
if (SCLASS_INVALID != gg->gg_sclass)
hash_set (gbp_epg_sclass_db, gg->gg_sclass, gg->gg_id);
@@ -256,6 +260,7 @@ static clib_error_t *
gbp_endpoint_group_cli (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
+ gbp_endpoint_retention_t retention = { 0 };
epg_id_t epg_id = EPG_INVALID, sclass;
vnet_main_t *vnm = vnet_get_main ();
u32 uplink_sw_if_index = ~0;
@@ -297,7 +302,7 @@ gbp_endpoint_group_cli (vlib_main_t * vm,
return clib_error_return (0, "route-domain must be specified");
gbp_endpoint_group_add_and_lock (epg_id, sclass, bd_id, rd_id,
- uplink_sw_if_index);
+ uplink_sw_if_index, &retention);
}
else
gbp_endpoint_group_delete (epg_id);