summaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_policy_dpo.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-02-28 11:11:39 +0000
committerNeale Ranns <nranns@cisco.com>2019-03-06 12:15:10 +0000
commit4ba67723d716660c56326ce498b99a060a9471b1 (patch)
tree10f2fc773e660bad99ee6b7ae7845b1f23102bb8 /src/plugins/gbp/gbp_policy_dpo.c
parent6955595a577e1b7d316b5b69267bf1d1d951a4ab (diff)
GBP: use sclass in the DP for policy
Change-Id: I154e18f22ec7708127b8ade98e80546ab1dcd05b Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_policy_dpo.c')
-rw-r--r--src/plugins/gbp/gbp_policy_dpo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/gbp/gbp_policy_dpo.c b/src/plugins/gbp/gbp_policy_dpo.c
index ce628e5c975..c52dcc4dc48 100644
--- a/src/plugins/gbp/gbp_policy_dpo.c
+++ b/src/plugins/gbp/gbp_policy_dpo.c
@@ -92,7 +92,7 @@ gbp_policy_dpo_get_urpf (const dpo_id_t * dpo)
void
gbp_policy_dpo_add_or_lock (dpo_proto_t dproto,
- epg_id_t epg, u32 sw_if_index, dpo_id_t * dpo)
+ sclass_t sclass, u32 sw_if_index, dpo_id_t * dpo)
{
gbp_policy_dpo_t *gpd;
dpo_id_t parent = DPO_INVALID;
@@ -101,7 +101,7 @@ gbp_policy_dpo_add_or_lock (dpo_proto_t dproto,
gpd->gpd_proto = dproto;
gpd->gpd_sw_if_index = sw_if_index;
- gpd->gpd_epg = epg;
+ gpd->gpd_sclass = sclass;
if (~0 != sw_if_index)
{
@@ -127,9 +127,9 @@ format_gbp_policy_dpo (u8 * s, va_list * ap)
gbp_policy_dpo_t *gpd = gbp_policy_dpo_get (index);
vnet_main_t *vnm = vnet_get_main ();
- s = format (s, "gbp-policy-dpo: %U, epg:%d out:%U",
+ s = format (s, "gbp-policy-dpo: %U, sclass:%d out:%U",
format_dpo_proto, gpd->gpd_proto,
- gpd->gpd_epg,
+ (int) gpd->gpd_sclass,
format_vnet_sw_if_index_name, vnm, gpd->gpd_sw_if_index);
s = format (s, "\n%U", format_white_space, indent + 2);
s = format (s, "%U", format_dpo_id, &gpd->gpd_dpo, indent + 4);
@@ -150,7 +150,7 @@ gbp_policy_dpo_interpose (const dpo_id_t * original,
gpd = gbp_policy_dpo_get (original->dpoi_index);
gpd_clone->gpd_proto = gpd->gpd_proto;
- gpd_clone->gpd_epg = gpd->gpd_epg;
+ gpd_clone->gpd_sclass = gpd->gpd_sclass;
gpd_clone->gpd_sw_if_index = gpd->gpd_sw_if_index;
dpo_stack (gbp_policy_dpo_type,
@@ -290,10 +290,10 @@ gbp_policy_dpo_inline (vlib_main_t * vm,
goto trace;
}
- key0.gck_src = vnet_buffer2 (b0)->gbp.src_epg;
- key0.gck_dst = gpd0->gpd_epg;
+ key0.gck_src = vnet_buffer2 (b0)->gbp.sclass;
+ key0.gck_dst = gpd0->gpd_sclass;
- if (EPG_INVALID != key0.gck_src)
+ if (SCLASS_INVALID != key0.gck_src)
{
if (PREDICT_FALSE (key0.gck_src == key0.gck_dst))
{