summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSri Mohana Singamsetty <srimohans@gmail.com>2019-06-20 16:19:24 -0700
committerGitHub <noreply@github.com>2019-06-20 16:19:24 -0700
commitfa8b6ca78b36f4014e52280fb13b50ed6ea88f18 (patch)
treedf1958da9837e0f240ed6d5327e77417f9e72047
parentbdacdc92714bc41c24f0cd96a4c5f972c86ec0b4 (diff)
parent503cf3feb343e725ed95607b39acb224dd2b0d3b (diff)
Merge pull request #4545 from nitinsoniism/show_evpn_mac_vni_seq_number
zebra: When displaying `show evpn mac vni XX` add local and remote seq
-rw-r--r--zebra/zebra_vxlan.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 077c1ff8f0..abd076bc82 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -1386,7 +1386,9 @@ static void zvni_print_mac_hash(struct hash_bucket *bucket, void *ctxt)
vty_out(vty, " %-5u", vid);
else
json_object_int_add(json_mac, "vlan", vid);
- }
+ } else /* No vid? fill out the space */
+ vty_out(vty, " %-5s", "");
+ vty_out(vty, " %u/%u", mac->loc_seq, mac->rem_seq);
if (json_mac_hdr == NULL) {
vty_out(vty, "\n");
} else {
@@ -1418,11 +1420,13 @@ static void zvni_print_mac_hash(struct hash_bucket *bucket, void *ctxt)
if ((wctx->flags & SHOW_REMOTE_MAC_FROM_VTEP) &&
(wctx->count == 0)) {
vty_out(vty, "\nVNI %u\n\n", wctx->zvni->vni);
- vty_out(vty, "%-17s %-6s %-21s %-5s\n", "MAC",
- "Type", "Intf/Remote VTEP", "VLAN");
+ vty_out(vty, "%-17s %-6s %-21s %-5s %s\n",
+ "MAC", "Type", "Intf/Remote VTEP",
+ "VLAN", "Seq #'s");
}
- vty_out(vty, "%-17s %-6s %-21s\n", buf1, "remote",
- inet_ntoa(mac->fwd_info.r_vtep_ip));
+ vty_out(vty, "%-17s %-6s %-21s %-5s %u/%u\n", buf1,
+ "remote", inet_ntoa(mac->fwd_info.r_vtep_ip),
+ "", mac->loc_seq, mac->rem_seq);
} else {
json_object_string_add(json_mac, "type", "remote");
json_object_string_add(json_mac, "remoteVtep",
@@ -1536,8 +1540,8 @@ static void zvni_print_mac_hash_all_vni(struct hash_bucket *bucket, void *ctxt)
if (json == NULL) {
vty_out(vty, "\nVNI %u #MACs (local and remote) %u\n\n",
zvni->vni, num_macs);
- vty_out(vty, "%-17s %-6s %-21s %-5s\n", "MAC", "Type",
- "Intf/Remote VTEP", "VLAN");
+ vty_out(vty, "%-17s %-6s %-21s %-5s %s\n", "MAC",
+ "Type", "Intf/Remote VTEP", "VLAN", "Seq #'s");
} else
json_object_int_add(json_vni, "numMacs", num_macs);
}