summaryrefslogtreecommitdiffstats
path: root/src/vlib/cli.h
AgeCommit message (Collapse)AuthorFilesLines
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion1-21/+21
Type: refactor Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-02-18vlib: add a "vpplog" debug CLIDave Barach1-0/+5
To add arbitrary text to the vlib log. Combines nicely with comment/uncomment and the macro expander: define MY_FEATURE uncomment # or comment ... $(MY_FEATURE) { vpplog { My feature was enabled } } Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia019f0a8fa670d8593ae01595f5ef410796e5b1c
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg1-1/+7
Callbacks for monitoring and performance measurement: - Add new callback list type, with context - Add callbacks for API, CLI, and barrier sync - Modify node dispatch callback to pass plugin-specific context - Modify perfmon plugin to keep PMC samples local to the plugin - Include process nodes in dispatch callback - Pass dispatch function return value to callback Type: refactor Signed-off-by: Tom Seidenberg <tseidenb@cisco.com> Change-Id: I28b06c58490611e08d76ff5b01b2347ba2109b22
2019-12-09vlib: improve test coverageDave Barach1-9/+0
Add tests. Remove unused rule-based parser code. Type: test Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I3ca3a9dd9da8ee8f3a47004c98f2f5644db10057
2019-11-02vlib: enhance the "show cli" debug CLI commandDave Barach1-0/+6
Dump the entire CLI, mp-safe commands, non-mp-safe commands, commands which have been executed. Optionally, clear the hit counters. Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ie38fc664b7deaabc35ca35be68db7e159272f551
2019-05-10cli: Add return value in cli_inbandOle Troan1-4/+4
Even when a CLI command called through the cli_inband API failed the API would return 0 (SUCCESS). This patch fixes that, but since most CLI handlers return error->code == 0, in most failure cases it will return -1 (UNSPECIFIED ERROR). Type: fix Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-13Multiarch handling in different constructor macrosDamjan Marion1-0/+8
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-09plugins: unload plugin if early init failsDamjan Marion1-0/+9
Change-Id: I32f68e2ee8f5d32962acdefb0193583f71d342b3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-23Add TAB-based auto-completion to the CLIYoann Desmouceaux1-0/+4
Hitting tab: - in the middle of a uniquely defined subcommand will expand the subcommand - in the middle of a non-uniquely defined (or empty) subcommand will display all possible subcommands, and possibly expand to the lowest common prefix Change-Id: Ib858eefdb0353cd2c3aad472799d15cd537455a0 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+192
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>