aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_bridge_domain.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-04 01:14:24 -0800
committerDamjan Marion <dmarion@me.com>2019-03-04 11:16:23 +0000
commit4689da0c6104435f86fab19e6bb4d1342ce4dcaf (patch)
tree5499b3785d20f85871843c2f009b548d14ffa2aa /src/plugins/gbp/gbp_bridge_domain.c
parent19223e03fe768df3fc995a5d38a5de9f2c5acf27 (diff)
GBP: fix and print GBP BD flags
Change-Id: If3fe2752c9339049123ff4674e3a29449b520374 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_bridge_domain.c')
-rw-r--r--src/plugins/gbp/gbp_bridge_domain.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/plugins/gbp/gbp_bridge_domain.c b/src/plugins/gbp/gbp_bridge_domain.c
index 049c89bebab..261b5683903 100644
--- a/src/plugins/gbp/gbp_bridge_domain.c
+++ b/src/plugins/gbp/gbp_bridge_domain.c
@@ -113,6 +113,23 @@ gbp_bridge_domain_db_remove (gbp_bridge_domain_t * gb)
gbp_bridge_domain_db.gbd_by_bd_index[gb->gb_bd_index] = INDEX_INVALID;
}
+u8 *
+format_gbp_bridge_domain_flags (u8 * s, va_list * args)
+{
+ gbp_bridge_domain_flags_t gf = va_arg (*args, gbp_bridge_domain_flags_t);
+
+ if (gf)
+ {
+ if (gf & GBP_BD_FLAG_DO_NOT_LEARN)
+ s = format (s, "do-not-learn");
+ }
+ else
+ {
+ s = format (s, "noe");
+ }
+ return (s);
+}
+
static u8 *
format_gbp_bridge_domain_ptr (u8 * s, va_list * args)
{
@@ -120,13 +137,13 @@ format_gbp_bridge_domain_ptr (u8 * s, va_list * args)
vnet_main_t *vnm = vnet_get_main ();
if (NULL != gb)
- s = format (s, "[%d] bd:[%d,%d], bvi:%U uu-flood:%U locks:%d",
+ s = format (s, "[%d] bd:[%d,%d], bvi:%U uu-flood:%U flags:%U locks:%d",
gb - gbp_bridge_domain_pool,
gb->gb_bd_id,
gb->gb_bd_index,
format_vnet_sw_if_index_name, vnm, gb->gb_bvi_sw_if_index,
format_vnet_sw_if_index_name, vnm, gb->gb_uu_fwd_sw_if_index,
- gb->gb_locks);
+ format_gbp_bridge_domain_flags, gb->gb_flags, gb->gb_locks);
else
s = format (s, "NULL");