diff options
author | Tom Seidenberg <tseidenb@cisco.com> | 2020-07-10 15:49:03 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-07-16 21:44:42 +0000 |
commit | 6c81f5a2493ff65b4dacfef45db8a1ee459a738f (patch) | |
tree | 24343a92e18599be4e4b4aa360ab7b2c13cdb878 /src/vnet/interface.c | |
parent | bab02f0b184b63c4159ded030cf34044be10da40 (diff) |
misc: add callback hooks and refactor pmc
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
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r-- | src/vnet/interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c index dfefdbac921..6d5b3561f19 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -872,6 +872,8 @@ vnet_register_interface (vnet_main_t * vnm, foreach_vlib_main ({ nrt = vlib_node_get_runtime (this_vlib_main, hw->output_node_index); nrt->function = node->function; + vlib_node_runtime_perf_counter (this_vlib_main, nrt, 0, 0, 0, + VLIB_NODE_RUNTIME_PERF_RESET); }); /* *INDENT-ON* */ @@ -882,6 +884,8 @@ vnet_register_interface (vnet_main_t * vnm, foreach_vlib_main ({ nrt = vlib_node_get_runtime (this_vlib_main, hw->tx_node_index); nrt->function = node->function; + vlib_node_runtime_perf_counter (this_vlib_main, nrt, 0, 0, 0, + VLIB_NODE_RUNTIME_PERF_RESET); }); /* *INDENT-ON* */ |