aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-01-12 17:15:25 -0500
committerDave Barach <openvpp@barachs.net>2018-01-13 15:24:15 +0000
commit4478d8edc35757c1da66e1c3c108af24940fbdd3 (patch)
tree52386c505384f9f3ee1a4de1dd224dcbf5459465 /src/plugins
parentaf0ff5af0cd471033169e63c6111d23cd801928c (diff)
Improve "show xxx tunnel" and "show int addr" output
Improve "show xxx tunnel" output functions format_xxx_tunnel() for GRE, VXLAN, VXLAN-GPE, GENEVE and GTPU tunnels to make their output more consistent and provide better information. Improved the output of "show int addr" to make its info more consistent with tunnels and provide fib-index info. Change-Id: Icd4b5b85a5bec417f8ee19afea336c770ad3b4c5 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/plugins')
-rwxr-xr-xsrc/plugins/gtpu/gtpu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/gtpu/gtpu.c b/src/plugins/gtpu/gtpu.c
index 80069a77b09..96399f38579 100755
--- a/src/plugins/gtpu/gtpu.c
+++ b/src/plugins/gtpu/gtpu.c
@@ -75,18 +75,18 @@ format_gtpu_tunnel (u8 * s, va_list * args)
gtpu_tunnel_t *t = va_arg (*args, gtpu_tunnel_t *);
gtpu_main_t *ngm = &gtpu_main;
- s = format (s, "[%d] src %U dst %U teid %d sw_if_index %d ",
+ s = format (s, "[%d] src %U dst %U teid %d fib-idx %d sw-if-idx %d ",
t - ngm->tunnels,
format_ip46_address, &t->src, IP46_TYPE_ANY,
format_ip46_address, &t->dst, IP46_TYPE_ANY,
- t->teid, t->sw_if_index);
+ t->teid, t->encap_fib_index, t->sw_if_index);
- if (ip46_address_is_multicast (&t->dst))
- s = format (s, "mcast_sw_if_index %d ", t->mcast_sw_if_index);
+ s = format (s, "encap-dpo-idx %d ", t->next_dpo.dpoi_index);
+ s = format (s, "decap-next-%U ", format_decap_next, t->decap_next_index);
+
+ if (PREDICT_FALSE (ip46_address_is_multicast (&t->dst)))
+ s = format (s, "mcast-sw-if-idx %d ", t->mcast_sw_if_index);
- s = format (s, "encap_fib_index %d fib_entry_index %d decap_next %U\n",
- t->encap_fib_index, t->fib_entry_index,
- format_decap_next, t->decap_next_index);
return s;
}