summaryrefslogtreecommitdiffstats
path: root/src/vlib
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
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')
-rw-r--r--src/vlib/error.c2
-rw-r--r--src/vlib/node_funcs.h16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/vlib/error.c b/src/vlib/error.c
index e4ed4ee37ee..dec90bbe440 100644
--- a/src/vlib/error.c
+++ b/src/vlib/error.c
@@ -280,7 +280,7 @@ show_errors (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_CLI_COMMAND (cli_show_errors, static) = {
+VLIB_CLI_COMMAND (vlib_cli_show_errors) = {
.path = "show errors",
.short_help = "Show error counts",
.function = show_errors,
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)
{