Age | Commit message (Collapse) | Author | Files | Lines |
|
0 is not NULL (at least not in all cases), passing 0 into a variadic
function in a place where the consumer reads it as pointer might
leave parts of the pointer uninitilized and hence filled with random
data.
It seems that this used to work with gcc, but clang seems to treat the
0 in those places as a 32bit integer.
Type: fix
Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: I37d975eef5a1ad98fbfb65ebe47d73458aafea00
|
|
This fixes long standing annoyance that CLIs with optional args cannot
be executed from file, as they cannot distinguish between valid optional
args and next line in the file.
Multiline statements can be provided simply by using backslash before \n.
Also comments are supported - everything after # is ignored up to the
end of the line.
Example:
# multiline cli using backslash
show version \
verbose # end of line comment
packet-generator new { \
name x \
limit 5 \
# comment inside cmultiline cli \
size 128-128 \
interface local0 \
node null-node \
data { \
incrementing 30 \
} \
}
Type: fix
Change-Id: Ia6d588169bae14e6e3f18effe94820d05ace1dbf
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Use of _vec_len() to set vector length breaks address sanitizer.
Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead.
Type: improvement
Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Type: refactor
Change-Id: I449fcea92a1c96dd7dd0bcad893060ad1c614351
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Fixes VPP invocation with relative path, i.e.:
$ bin/vpp unix interactive
Type: improvement
Change-Id: I0278710bb472b92e31389b2d28955c3d33550230
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Currently the last character of the error message string
is temporarily changed to a null byte '\0' before the string
is sent to syslog(3), resulting in confusingly incomplete log
entries.
This patch changes the syslog format to "%.*s" so that the
maximum number of characters to be printed could be controlled.
Type: improvement
Signed-off-by: Jing Peng <pj.hades@gmail.com>
Change-Id: I1bd6295c19b51b962a3d8ee3016cd91ffb2a4eaf
|
|
Systemd always sends SIGCONT after KillSignal, to ensure that even suspended
tasks can be terminated cleanly. However, the default action of SIGCONT
handler in VPP such as unix_signal_handler() is process termination with
coredump, what is not really desired. So, leave it alike SIGSTOP with its
default handler.
Type: feature
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I54c06d21669ec3c709322d746db9e28448c31bb8
|
|
Type: improvement
Change-Id: I53890a13210cfb0d2b2d9d8cfd9b15118d3bb273
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Type: refactor
Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Type: improvement
Change-Id: I73383eb15186021cd6527d112da8443a0082f129
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Type: improvement
Change-Id: If3da7d4338470912f37ff1794620418d928fb77f
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Pretty interesting to see how long plugins take to load.
Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If496eb73b2e1fd9dd714142cd5195fa7ccd93ebd
|
|
If VPP is started in interactive mode, instead of sending logs to syslog
server we print them directly to stderr.
Output is colorized, but that can be turned off with unix { nocolor }
Type: improvement
Change-Id: I9a0f0803e4cba2849a6efa0b6a86b9614ed33ced
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Turns out that clang is a bit too enthusiastic about mapping static
variables to registers, which makes it hard to extract (especially)
the faulting VA from an optimized core file.
Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I836e5d9695aeb4c5ee4a27f9565acf08ee4eaac0
|
|
Heap may use different page sizes so we will not be able to create
stack protection page.
Type: improvement
Change-Id: Ibb35c9f0a151c464ee0167d17f2bd773ef6f530b
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Scenarios where SIGHUP is sent would include the user closing an xterm
while in interactive/nodaemon mode, or similarly when running vpp in the
same mode during testing (e.g., using ssh to run VPP on a DUT). VPP
should exit in these cases; however, generating a core is unwanted.
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: Ibccfe5e676547e913c8a205ff16ab56d9abb1c82
|
|
Type: improvement
Change-Id: I81df4b61d1f0b8c1df77c1ee9bebcb491e155b69
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Identified and removed executable bit from source files in the tree.
find . -perm 755 -name *.[ch] -exec chmod a-x {} \;
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I00710d59fcc46ce5be5233109af4c8077daff74b
|
|
The "nosyslog" option disables syslog just like the "interactive" mode
but can be used together with "nodaemon".
This is useful for when VPP is running under a process supervisor like
runit or daemontools that pipe the stdout/stderr to a dedicated logger
service.
Type: feature
Change-Id: Ic4287338d6836fea9f3eabdcf960dc1f51875dd1
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
|
|
When profiling VPP with MAP (a software profile suite on Arm CPUs, see details in
https://www.arm.com/products/development-tools/server-and-hpc/forge/map) on Arm
servers, VPP will receive SIGPROF signal because MAP uses SIGPROF signal to drive
its sampler to do profiling on VPP. However, the default action of SIGPROF signal
handler in VPP such as unix_signal_handler() is process termination. To profile
VPP with MAP, the SIGPROF handler should be left as default, and MAP sampler will
overwrite it with its own implementation.
Type: feature
Change-Id: Ie14e513d35ec27a66e95067689408bad8ed1ad6b
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
|
|
Allow a plugin to override (suppress loading of) other plugins. This
mechanism allows a developer to prevent specific plugins from being
loaded.
To do so, provide an "overrides" list in the plugin definition:
VLIB_PLUGIN_REGISTER () =
{
<snip>
.overrides = "avf_plugin.so,ioam_plugin.so,dpdk_plugin.so",
};
or some such. Simply list the plugins in question as shown above. The
.overrides structure member is limited to 256 octets. The named .elf
section mechanism used to discover the vlib_plugin_registration_t's
precludes the use of a variable-length array of strings.
Use the vlib log to eliminate plugin and built-in vat plugin loader
console spew.
Added vlib_log_register_class_rate_limit(...) to allow procedural
configuration of the log rate-limit. We *never* want to rate-limit
plugin loader messages.
Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I0a9327b8cf5508482f057342783252112cb44170
|
|
It's not typical for a program to core when it receives a SIGINT, so
keep this from happening.
Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I2c15985a57e6ea898ff05c4001e4b30b41154eba
|
|
Type: fix
Startup config setting an i40e/ice interface
up in Debug VPP consumes more than the currently
available stack space.
Signed-off-by: GordonNoonan <gordon.noonan@intel.com>
Change-Id: I98b52c5596799017b97f802a8661b76cd1bb3245
|
|
seen while reading through the code.
Type: style
Change-Id: I7a2f021b9f06d0eebb2ea3d0cafb6955ccb14781
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Ensure the runtime directory is created at startup.
Default /run/vpp
Type: fix
Fixes: I53d70939c8125d04a365ac51a6cbf8926dc52adf
Change-Id: I6d70364ea756b86768c4dd1f6a9383238ed275c8
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
The vlib init function subsystem now supports a mix of procedural and
formally-specified ordering constraints. We should eliminate procedural
knowledge wherever possible.
The following schemes are *roughly* equivalent:
static clib_error_t *init_runs_first (vlib_main_t *vm)
{
clib_error_t *error;
... do some stuff...
if ((error = vlib_call_init_function (init_runs_next)))
return error;
...
}
VLIB_INIT_FUNCTION (init_runs_first);
and
static clib_error_t *init_runs_first (vlib_main_t *vm)
{
... do some stuff...
}
VLIB_INIT_FUNCTION (init_runs_first) =
{
.runs_before = VLIB_INITS("init_runs_next"),
};
The first form will [most likely] call "init_runs_next" on the
spot. The second form means that "init_runs_first" runs before
"init_runs_next," possibly much earlier in the sequence.
Please DO NOT construct sets of init functions where A before B
actually means A *right before* B. It's not necessary - simply combine
A and B - and it leads to hugely annoying debugging exercises when
trying to switch from ad-hoc procedural ordering constraints to formal
ordering constraints.
Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Fix os_get_nthreads() so that it starts returning the correct answer
as early as possible.
Change-Id: Id5292262f2c3f521b07ffbe6a9f6748dcc4dcb7d
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Otherwise, gcov data vanishes without a trace.
Add a __gcov_flush() call to the unix signal handler, under #ifdef
CLIB_GCOV. Add -DCLIB_GCOV to vpp_gcov_TAG_CFLAGS.
Change-Id: I2726e671b26dfbe7fae88f46a8207bb2b5106884
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I6d7589c967c5801a6a21a213723e2a895269e105
Signed-off-by: Benoît Ganne <bganne@cisco.com>
|
|
Change-Id: I2f7f3898b913c9b1a37b1c8c84a8df3799c49c5d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Call setjmp and mark the setjmp context valid just prior to entering the
vpp main loop.
Change-Id: I26d5cd6a624cb2a497d81eb85a62365621b3b469
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Comes in handy when looking at core files from optimized images.
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I45c8400d15614d5a04a3dcfb9b7daccab47ab446
|
|
Change-Id: I3a33fb81f31ed473811e9e7a6197b81135913865
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I79b213b34c6071d14acf1922f89037a4a5a36c45
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: If88ccd965122b9318a39a8d71b53334cd1fd81e4
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk
src/vppinfra/dlmalloc.[ch] are slightly modified versions of the
well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no
inherent size limit.
Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
crash stack backtrace will be directed to syslog
1. make use of glic backtrace in execinfo.h. the old clib_backtrace is removed
2. install SIGABRT in signal handler, but have to remove it when backtrace is
done. reason is to capture stack trace caused by SIGABRT. vPP ASSERT always
call os_exit then abort(). we definitely want to know the trace of this
situation. It is a little tricky to avoid SIGABRT infinite loop
3. always load symbols by calling clib_elf_main_init () in main(). Otherwise,
PC addresses instead of symbols will be displayed.
Change-Id: I150e15b94a4620b2ea4f08c73dc3e6ad1856de1e
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
|
|
Workaround for lack of driver interrupt support. Also quite handy for
home gateway, laptop/vagrant, other use-cases not requiring maximum
vectors/second for proper operation.
Change-Id: Ifc4b98112450664beef67b89ab8a6940a3bf24b5
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
We don't need per vlib_main physmem_main, so keep it separatelly instead
of trying to keep them in sync.
Change-Id: I0fbeecf4d9672d31af7a43c640a7d8f05dd6e46f
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ie49ee865b197e8fe7bba170c115a4ccbf1013e5f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
|
|
It's way too easy to imagine leaving a mutex or a spin-lock held in
the /vpe-api shared-memory segment, or elsewhere. Set a volatile
variable and check it in a safe place...
Change-Id: I9d91c38cffeb921143c272162d055c9c24a6c312
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
This will allow us to use this code in client libraries without vlib.
Change-Id: I8557b752496841ba588aa36b6082cbe2cd1867fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I25238debb7081b4467aec4620dfdef33fbef3295
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: Ibaa61b624eb6683b1be6901a7b29f5f73aad27b2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
|
|
non-root users should use /run/user/$PID/...
Change-Id: I1ca136df7a339eff193ed9c9a396d6965b192d0e
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
New startup config command:
unix {
runtime-dir /run/vpp
}
Also, adds recursive mkdir funtion for use in deifferent places
like cli-config socket path and dpdk hugepage directory path.
Change-Id: I1446ceab9c220c25804e73a743a3ebb383450124
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Icf9bd4abda058fb380f1a25d5fe3917ffb38b1c4
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Off by default. Enable via cmdline "... vlib { elog-post-mortem-dump }
..."
Change-Id: I2056b9de9b37475f2bfeeb5404da838f1b42645a
Signed-off-by: Dave Barach <dave@barachs.net>
|