Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix tcp tx buffer allocation
[vpp.git]
/
src
/
vlib
/
node_funcs.h
diff --git
a/src/vlib/node_funcs.h
b/src/vlib/node_funcs.h
index
d6588a7
..
c4c0645
100644
(file)
--- a/
src/vlib/node_funcs.h
+++ b/
src/vlib/node_funcs.h
@@
-410,19
+410,21
@@
vlib_frame_t *vlib_get_frame_to_node (vlib_main_t * vm, u32 to_node_index);
void vlib_put_frame_to_node (vlib_main_t * vm, u32 to_node_index,
vlib_frame_t * f);
void vlib_put_frame_to_node (vlib_main_t * vm, u32 to_node_index,
vlib_frame_t * f);
-always_inline vlib_process_t *
-vlib_get_current_process (vlib_main_t * vm)
-{
- vlib_node_main_t *nm = &vm->node_main;
- return vec_elt (nm->processes, nm->current_process_index);
-}
-
always_inline uword
vlib_in_process_context (vlib_main_t * vm)
{
return vm->node_main.current_process_index != ~0;
}
always_inline uword
vlib_in_process_context (vlib_main_t * vm)
{
return vm->node_main.current_process_index != ~0;
}
+always_inline vlib_process_t *
+vlib_get_current_process (vlib_main_t * vm)
+{
+ vlib_node_main_t *nm = &vm->node_main;
+ if (vlib_in_process_context (vm))
+ return vec_elt (nm->processes, nm->current_process_index);
+ return 0;
+}
+
always_inline uword
vlib_current_process (vlib_main_t * vm)
{
always_inline uword
vlib_current_process (vlib_main_t * vm)
{
@@
-1070,6
+1072,9
@@
vlib_node_vectors_per_main_loop_as_integer (vlib_main_t * vm, u32 node_index)
void
vlib_frame_free (vlib_main_t * vm, vlib_node_runtime_t * r, vlib_frame_t * f);
void
vlib_frame_free (vlib_main_t * vm, vlib_node_runtime_t * r, vlib_frame_t * f);
+/* Return the edge index if present, ~0 otherwise */
+uword vlib_node_get_next (vlib_main_t * vm, uword node, uword next_node);
+
/* Add next node to given node in given slot. */
uword
vlib_node_add_next_with_slot (vlib_main_t * vm,
/* Add next node to given node in given slot. */
uword
vlib_node_add_next_with_slot (vlib_main_t * vm,