summaryrefslogtreecommitdiffstats
path: root/src/vlib/node_funcs.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-07-31 17:18:03 -0700
committerFlorin Coras <fcoras@cisco.com>2017-08-02 01:49:39 -0700
commit66b11318a1e5f24880e3ec77c95d70647732a4a8 (patch)
tree5711f1b28863d0a2130f6370f39c7777ea34b07e /src/vlib/node_funcs.h
parentfdbc38249a8c672937a74667dcfaafa2cfd292e7 (diff)
Fix tcp tx buffer allocation
- Make tcp output buffer allocation macro an inline function - Use per ip version per thread tx frames for retransmits and timer events - Fix / parameterize tcp data structure preallocation - Add a couple of gdb-callable show commands - Fix local endpoint cleanup Change-Id: I67b47b7570aa14cb4634b6fd93c57cd2eacbfa29 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r--src/vlib/node_funcs.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index c0389b2fab8..c4c06454228 100644
--- 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);
-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 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)
{