]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: add bits length params to the SRv6 details
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 23 Jul 2022 10:23:16 +0000 (12:23 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 18 Oct 2022 14:08:23 +0000 (16:08 +0200)
This commit adds "block-length", "node-length", "func-length" and
"arg-length" to the output of "show bgp segment-routing srv6".

Output example:

rose-srv6# show bgp segment-routing srv6
locator_name: loc1
locator_chunks:
- 2001:db8:1:1::/64
  block-length: 40
  node-length: 24
  func-length: 16
  arg-length: 0
[...]

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
bgpd/bgp_vty.c

index 187e29f0c565bd2efa770bf841a2f0ba97c9822f..4e2ae414f577b5f029ffa2699783bf1035b0adcb 100644 (file)
@@ -9845,8 +9845,14 @@ DEFPY (show_bgp_srv6,
 
        vty_out(vty, "locator_name: %s\n", bgp->srv6_locator_name);
        vty_out(vty, "locator_chunks:\n");
-       for (ALL_LIST_ELEMENTS_RO(bgp->srv6_locator_chunks, node, chunk))
+       for (ALL_LIST_ELEMENTS_RO(bgp->srv6_locator_chunks, node, chunk)) {
                vty_out(vty, "- %pFX\n", &chunk->prefix);
+               vty_out(vty, "  block-length: %d\n", chunk->block_bits_length);
+               vty_out(vty, "  node-length: %d\n", chunk->node_bits_length);
+               vty_out(vty, "  func-length: %d\n",
+                       chunk->function_bits_length);
+               vty_out(vty, "  arg-length: %d\n", chunk->argument_bits_length);
+       }
 
        vty_out(vty, "functions:\n");
        for (ALL_LIST_ELEMENTS_RO(bgp->srv6_functions, node, func)) {