summaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_fwd_node.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_fwd_node.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_fwd_node.c')
-rw-r--r--src/plugins/gbp/gbp_fwd_node.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/gbp/gbp_fwd_node.c b/src/plugins/gbp/gbp_fwd_node.c
index eff4aeb1880..6ea56fd8074 100644
--- a/src/plugins/gbp/gbp_fwd_node.c
+++ b/src/plugins/gbp/gbp_fwd_node.c
@@ -48,7 +48,7 @@ typedef enum
typedef struct gbp_fwd_trace_t_
{
/* per-pkt trace data */
- epg_id_t src_epg;
+ sclass_t sclass;
u32 sw_if_index;
} gbp_fwd_trace_t;
@@ -70,9 +70,10 @@ VLIB_NODE_FN (gbp_fwd_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
while (n_left_from > 0 && n_left_to_next > 0)
{
- u32 bi0, sw_if_index0, src_epg;
+ u32 bi0, sw_if_index0;
gbp_fwd_next_t next0;
vlib_buffer_t *b0;
+ sclass_t sclass0;
next0 = GBP_FWD_NEXT_DROP;
bi0 = from[0];
@@ -87,9 +88,9 @@ VLIB_NODE_FN (gbp_fwd_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
/*
* lookup the uplink based on src EPG
*/
- src_epg = vnet_buffer2 (b0)->gbp.src_epg;
+ sclass0 = vnet_buffer2 (b0)->gbp.sclass;
- sw_if_index0 = gbp_epg_itf_lookup (src_epg);
+ sw_if_index0 = gbp_epg_itf_lookup_sclass (sclass0);
if (~0 != sw_if_index0)
{
@@ -105,7 +106,7 @@ VLIB_NODE_FN (gbp_fwd_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
if (PREDICT_FALSE ((b0->flags & VLIB_BUFFER_IS_TRACED)))
{
gbp_fwd_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t));
- t->src_epg = src_epg;
+ t->sclass = sclass0;
t->sw_if_index = sw_if_index0;
}
@@ -129,7 +130,7 @@ format_gbp_fwd_trace (u8 * s, va_list * args)
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
gbp_fwd_trace_t *t = va_arg (*args, gbp_fwd_trace_t *);
- s = format (s, "src-epg:%d", t->src_epg);
+ s = format (s, "sclass:%d", t->sclass);
return s;
}