Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
GBP: use sclass in the DP for policy
[vpp.git]
/
src
/
plugins
/
gbp
/
gbp_policy_node.c
diff --git
a/src/plugins/gbp/gbp_policy_node.c
b/src/plugins/gbp/gbp_policy_node.c
index
aaf362d
..
ff21e7d
100644
(file)
--- a/
src/plugins/gbp/gbp_policy_node.c
+++ b/
src/plugins/gbp/gbp_policy_node.c
@@
-49,7
+49,7
@@
typedef enum
typedef struct gbp_policy_trace_t_
{
/* per-pkt trace data */
typedef struct gbp_policy_trace_t_
{
/* per-pkt trace data */
- u32 s
rc_epg
;
+ u32 s
class
;
u32 dst_epg;
u32 acl_index;
u32 allowed;
u32 dst_epg;
u32 acl_index;
u32 allowed;
@@
-175,14
+175,14
@@
gbp_policy_inline (vlib_main_t * vm,
vnet_buffer (b0)->l2.bd_index);
if (NULL != ge0)
vnet_buffer (b0)->l2.bd_index);
if (NULL != ge0)
- key0.gck_dst = ge0->ge_fwd.gef_
epg_id
;
+ key0.gck_dst = ge0->ge_fwd.gef_
sclass
;
else
/* If you cannot determine the destination EP then drop */
goto trace;
else
/* If you cannot determine the destination EP then drop */
goto trace;
- key0.gck_src = vnet_buffer2 (b0)->gbp.s
rc_epg
;
+ key0.gck_src = vnet_buffer2 (b0)->gbp.s
class
;
- if (
EPG
_INVALID != key0.gck_src)
+ if (
SCLASS
_INVALID != key0.gck_src)
{
if (PREDICT_FALSE (key0.gck_src == key0.gck_dst))
{
{
if (PREDICT_FALSE (key0.gck_src == key0.gck_dst))
{
@@
-305,7
+305,7
@@
gbp_policy_inline (vlib_main_t * vm,
{
gbp_policy_trace_t *t =
vlib_add_trace (vm, node, b0, sizeof (*t));
{
gbp_policy_trace_t *t =
vlib_add_trace (vm, node, b0, sizeof (*t));
- t->s
rc_epg
= key0.gck_src;
+ t->s
class
= key0.gck_src;
t->dst_epg = key0.gck_dst;
t->acl_index = (gc0 ? gc0->gc_acl_index : ~0),
t->allowed = (next0 != GBP_POLICY_NEXT_DENY);
t->dst_epg = key0.gck_dst;
t->acl_index = (gc0 ? gc0->gc_acl_index : ~0),
t->allowed = (next0 != GBP_POLICY_NEXT_DENY);
@@
-346,8
+346,8
@@
format_gbp_policy_trace (u8 * s, va_list * args)
gbp_policy_trace_t *t = va_arg (*args, gbp_policy_trace_t *);
s =
gbp_policy_trace_t *t = va_arg (*args, gbp_policy_trace_t *);
s =
- format (s, "s
rc
:%d, dst:%d, acl:%d allowed:%d",
- t->s
rc_epg
, t->dst_epg, t->acl_index, t->allowed);
+ format (s, "s
class
:%d, dst:%d, acl:%d allowed:%d",
+ t->s
class
, t->dst_epg, t->acl_index, t->allowed);
return s;
}
return s;
}