diff options
author | Damjan Marion <damarion@cisco.com> | 2020-09-11 14:11:11 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-09-11 13:56:10 +0000 |
commit | 698eeb126d01427313949241b961c27347db8c72 (patch) | |
tree | 08ce4ba63d11737874d43b47df8a70a0e5aba9ed /src/vlib/node_funcs.h | |
parent | 160a2a9a8c5c4e054dcc0e8ebeb3de7654718582 (diff) |
avf: add assert to ensure that adminq is used only from avf process
Type: improvement
Change-Id: Ib64c9b8207776986656e5a26c13a221edc6cc950
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r-- | src/vlib/node_funcs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h index dfeba17ab09..33bdc795816 100644 --- a/src/vlib/node_funcs.h +++ b/src/vlib/node_funcs.h @@ -455,6 +455,13 @@ vlib_current_process (vlib_main_t * vm) return vlib_get_current_process (vm)->node_runtime.node_index; } +always_inline u32 +vlib_get_current_process_node_index (vlib_main_t * vm) +{ + vlib_process_t *process = vlib_get_current_process (vm); + return process->node_runtime.node_index; +} + /** Returns TRUE if a process suspend time is less than 10us @param dt - remaining poll time in seconds @returns 1 if dt < 10e-6, 0 otherwise |