aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/vlib_api_cli.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-12api: do not truncate api dump file sizeBenoît Ganne1-1/+1
Type: fix Change-Id: I5c81d2f55057f5fba780cb12154a3fb1aef79f20 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit aba4983ad48374a50cd93ba91f66be241f210279)
2020-01-23api: mark api_trace_command_fn thread-safeDave Barach1-1/+20
Binary API trace replay with multiple worker threads depends in many cases on worker thread graph replica maintenance. If we (implicitly) assert a worker thread barrier at the debug CLI level, all graph replica changes are deferred until the replay operation completes. If an interface is deleted, the wheels may fall off. Type: fix Ticket: VPP-1824 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I9b07d43f8501caa5519e5ff9ae4c19dc2661cc84
2019-08-12api: vppapitrace JSON/API trace converterOle Troan1-28/+33
Usage: vppapitrace.py [-h] [--debug] [--apidir APIDIR] {convert,replay} ... optional arguments: -h, --help show this help message and exit --debug enable debug mode --apidir APIDIR Location of JSON API definitions subcommands: valid subcommands {convert,replay} additional help convert Convert API trace to JSON or Python and back replay Replay messages to running VPP instance To convert an API trace file to JSON: vppapitrace convert /tmp/api.trace trace.json To convert an (edited) JSON file back to API trace for replay: vppapitrace convert trace.json api-edited.trace To generate a Python file that can be replayed: vppapitrace convert /tmp/api.trace trace.py vppapitrace convert trace.json trace.py Replay it to a running VPP instance: vppapitrace replay --socket /tmp/api.trace In VPP that file can be replayed with: vpp# api trace replay api-edited.trace This patch also modifies the API binary trace format, to include the message id to message name table. Ticket: VPP-1733 Change-Id: Ie6441efb53c1c93c9f778f6ae9c1758bccc8dd87 Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit edfe2c0079a756f5fb1108037c39450e3521c8bd) Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-06-12infra: fix minor memory leak in "api trace..."Dave Barach1-5/+8
Build api trace message print fns into the built-in copy of api_format.c Optimize memory allocator behavior when the api trace wraps. Type: Fix Change-Id: If799d8784a459f981fc9ee3a3ca03d3f63b2bcd0 Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-05make the output of "show api dump file <filename> compare-current" ↵Andrew Yourtchenko1-5/+9
doxygen-friendly The current output of the API diff requires some massaging to appear like a table in the docs generated by doxygen. This change eliminates this need. Change-Id: Ic9269a0e5e232e4d01a0695561e4f90eee287327 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-04-05vlib: fix "foo_msg" and "foo_msg_reply" in API message table triggering the ↵Andrew Yourtchenko1-2/+2
"defininion changed" output strncmp() succeeds if the i+1th message is "foo_reply", because the comparison terminates early after "foo" - which triggers the "definition changed" rather than "only in ..." message. Fix also the case where i+1th element does not exist. Change-Id: I127136410491d9dd102e160fd831fcf6f0bd3a9f Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-03-21api trace: cli bug fixezkexma1-2/+2
vpp/src/vlibmemory/vlib_api_cli.c Fixing the help string for the "set api-trace" command. Change-Id: I70f85a4f55466d2cc01018c4ad8cbe8332dbb925 Signed-off-by: ezkexma <maqi.z.ke@ericsson.com>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-26Fix api trace replay of handler to pass vm parameterJohn Lo1-2/+2
I suppose most API handlers do not use vm parameter so it has not been a problem so far. Now vl_api_vnet_set_ip6_ethernet_neighbor() was crashing when called from api trace replay because either of ip_neighbor_add_del_t_handler() vnet_arp_set_ip4_over_ethernet() need vm to be correct when it calls vlin_time_now() to update the neighbor timestamp. Change-Id: Iffb2084a7c90f92c4b86b339ea11800dd41117eb Signed-off-by: John Lo <loj@cisco.com>
2018-04-18typo fix: UNKOWN -> UNKNOWNAndrey "Zed" Zaikin1-1/+1
Change-Id: I008a4d7ad7160d1f07e7ceef712a5318a9368308 Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-01-09api: refactor vlibmemoryFlorin Coras1-0/+1209
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>