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;
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)
{
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);
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,
typedef struct gbp_policy_dpo_trace_t_
{
- u32 src_epg;
- u32 dst_epg;
+ u32 sclass;
+ u32 dclass;
u32 acl_index;
u32 a_bit;
+ u32 action;
} gbp_policy_dpo_trace_t;
typedef enum
gbp_contract_t *gc0;
vlib_buffer_t *b0;
index_t gci0;
+ u8 action0;
+ action0 = 0;
bi0 = from[0];
to_next[0] = bi0;
from += 1;
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))
{
*/
next0 = gpd0->gpd_dpo.dpoi_next_node;
vnet_buffer2 (b0)->gbp.flags |= VXLAN_GBP_GPFLAGS_A;
+ action0 = 0;
}
else
{
if (INDEX_INVALID != gci0)
{
fa_5tuple_opaque_t pkt_5tuple0;
- u8 action0 = 0;
u32 acl_pos_p0, acl_match_p0;
u32 rule_match_p0, trace_bitmap0;
/*
if (action0 > 0)
{
-
vnet_buffer2 (b0)->gbp.flags |= VXLAN_GBP_GPFLAGS_A;
gu = gbp_rule_get (gc0->gc_rules[rule_match_p0]);
+ action0 = gu->gu_action;
switch (gu->gu_action)
{
gbp_policy_dpo_trace_t *tr;
tr = vlib_add_trace (vm, node, b0, sizeof (*tr));
- tr->src_epg = key0.gck_src;
- tr->dst_epg = key0.gck_dst;
+ tr->sclass = key0.gck_src;
+ tr->dclass = key0.gck_dst;
tr->acl_index = (gc0 ? gc0->gc_acl_index : ~0);
tr->a_bit = vnet_buffer2 (b0)->gbp.flags & VXLAN_GBP_GPFLAGS_A;
+ tr->action = action0;
}
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
gbp_policy_dpo_trace_t *t = va_arg (*args, gbp_policy_dpo_trace_t *);
- s = format (s, " src-epg:%d dst-epg:%d acl-index:%d a-bit:%d",
- t->src_epg, t->dst_epg, t->acl_index, t->a_bit);
+ s = format (s, " sclass:%d dclass:%d acl-index:%d a-bit:%d action:%d",
+ t->sclass, t->dclass, t->acl_index, t->a_bit, t->action);
return s;
}