aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gbp/gbp_policy.c')
-rw-r--r--src/plugins/gbp/gbp_policy.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/gbp/gbp_policy.c b/src/plugins/gbp/gbp_policy.c
index 0f26701bd19..21e4bdba064 100644
--- a/src/plugins/gbp/gbp_policy.c
+++ b/src/plugins/gbp/gbp_policy.c
@@ -14,10 +14,27 @@
*/
#include <plugins/gbp/gbp.h>
-#include <plugins/gbp/gbp_policy_dpo.h>
+#include <plugins/gbp/gbp_policy.h>
+#include <vnet/vxlan-gbp/vxlan_gbp_packet.h>
gbp_policy_main_t gbp_policy_main;
+/* packet trace format function */
+u8 *
+format_gbp_policy_trace (u8 * s, va_list * args)
+{
+ CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
+ CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
+ gbp_policy_trace_t *t = va_arg (*args, gbp_policy_trace_t *);
+
+ s =
+ format (s, "scope:%d sclass:%d, dclass:%d, allowed:%d flags:%U", t->scope,
+ t->sclass, t->dclass, t->allowed, format_vxlan_gbp_header_gpflags,
+ t->flags);
+
+ return s;
+}
+
static clib_error_t *
gbp_policy_init (vlib_main_t * vm)
{