mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
zebra: dump label table information
Add the new command "show debugging labeltable" to show allocated label chunks in the label table managed with label_manager.c Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com> Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
3518fe70cb
commit
2b8e22f264
@ -783,6 +783,19 @@ presence of the entry.
|
|||||||
21 Static 10.125.0.2 IPv4 Explicit Null
|
21 Static 10.125.0.2 IPv4 Explicit Null
|
||||||
|
|
||||||
|
|
||||||
|
Allocated label chunks table can be dumped using the command
|
||||||
|
|
||||||
|
.. clicmd:: show debugging label-table
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
zebra# show debugging label-table
|
||||||
|
Proto ospf: [300/350]
|
||||||
|
Proto srte: [500/500]
|
||||||
|
Proto isis: [1200/1300]
|
||||||
|
Proto ospf: [20000/21000]
|
||||||
|
Proto isis: [22000/23000]
|
||||||
|
|
||||||
.. _zebra-srv6:
|
.. _zebra-srv6:
|
||||||
|
|
||||||
Segment-Routing IPv6
|
Segment-Routing IPv6
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#include "zebra/zapi_msg.h"
|
#include "zebra/zapi_msg.h"
|
||||||
#include "zebra/debug.h"
|
#include "zebra/debug.h"
|
||||||
|
|
||||||
|
#include "zebra/label_manager_clippy.c"
|
||||||
|
|
||||||
#define CONNECTION_DELAY 5
|
#define CONNECTION_DELAY 5
|
||||||
|
|
||||||
struct label_manager lbl_mgr;
|
struct label_manager lbl_mgr;
|
||||||
@ -145,6 +147,22 @@ void lm_hooks_unregister(void)
|
|||||||
hook_unregister(lm_release_chunk, label_manager_release_label_chunk);
|
hook_unregister(lm_release_chunk, label_manager_release_label_chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFPY(show_label_table, show_label_table_cmd, "show debugging label-table",
|
||||||
|
SHOW_STR
|
||||||
|
DEBUG_STR
|
||||||
|
"Display allocated label chunks\n")
|
||||||
|
{
|
||||||
|
struct label_manager_chunk *lmc;
|
||||||
|
struct listnode *node;
|
||||||
|
|
||||||
|
for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) {
|
||||||
|
vty_out(vty, "Proto %s: [%u/%u]\n",
|
||||||
|
zebra_route_string(lmc->proto), lmc->start, lmc->end);
|
||||||
|
}
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init label manager (or proxy to an external one)
|
* Init label manager (or proxy to an external one)
|
||||||
*/
|
*/
|
||||||
@ -159,6 +177,8 @@ void label_manager_init(void)
|
|||||||
|
|
||||||
/* notify any external module that we are done */
|
/* notify any external module that we are done */
|
||||||
hook_call(lm_cbs_inited);
|
hook_call(lm_cbs_inited);
|
||||||
|
|
||||||
|
install_element(VIEW_NODE, &show_label_table_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* alloc and fill a label chunk */
|
/* alloc and fill a label chunk */
|
||||||
|
@ -124,6 +124,7 @@ clippy_scan += \
|
|||||||
zebra/zebra_srv6_vty.c \
|
zebra/zebra_srv6_vty.c \
|
||||||
zebra/zebra_vrf.c \
|
zebra/zebra_vrf.c \
|
||||||
zebra/dpdk/zebra_dplane_dpdk_vty.c \
|
zebra/dpdk/zebra_dplane_dpdk_vty.c \
|
||||||
|
zebra/label_manager.c \
|
||||||
# end
|
# end
|
||||||
|
|
||||||
noinst_HEADERS += \
|
noinst_HEADERS += \
|
||||||
|
Loading…
Reference in New Issue
Block a user