summaryrefslogtreecommitdiffstats
path: root/src/vat/main.c
AgeCommit message (Collapse)AuthorFilesLines
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion1-1/+1
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>
2022-03-23vlib: leave SIGCONT signal with its default handlerVladislav Grishenko1-0/+1
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
2021-10-18interface: add api test fileFilip Tehlar1-4/+31
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
2021-10-05build: don't hardcode triplet, allow specifying custom lib dirDamjan Marion1-2/+1
Type: fix Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion1-31/+23
Type: refactor Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-06feature: Add packet trace APIJon Loeliger1-2/+75
Also spiffed up the vpp_api_test plugin loader so it executes VLIB_INIT_FUNCTIONs and VLIB_API_INIT_FUNCTIONs. Type: feature Change-Id: Id9a4f455d73738c41bcfea220df2112bb9679681 Signed-off-by: Jon Loeliger <jdl@netgate.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2020-09-18vat: add infrastructure to align vnet test code and plugin test codeOle Troan1-0/+22
Split vat/api_format.c also for VNET features. Use auto-generated VAT test code and support dynamic message ID allocation as for plugins. The arp and geneve features as Guinea pigs. Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I461591496766bdf10c5f950fd30f1a0ae05909da Signed-off-by: Ole Troan <ot@cisco.com>
2020-06-23vlib: debug CLI macro expander, part deuxDave Barach1-1/+3
Deal with circular macro definitions instead of crashing due to stack overflow. Separate macro tables, per CLI session Add documentation to the Sphinx docs Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I55fc9152bd37ad0c15fa3959f38b07b63100e634
2020-06-19vlib: add recursive macro expander to debug cliDave Barach1-2/+2
All of the pieces have been sitting around for years. Added several debug CLI commands: "define <variable-name> <value>" "undefine <variable-name>" "show macro [noeval]" "echo <whatever>" Macros may refer to other macros. To defer evaluation: "define foo \$(bar)" or some such. The macro evaluator is not smart about "define foo \$(foo)" or more complicated circular definitions, so don't do that. Environment variables are available, simply use $<name-of-environment-vbl> The macro expander has a table of (overrideable) builtin names, which are evaluated by calling functions. Simple example: echo $USER define ip1 192.168.1.1/24 define ip2 192.168.2.1/24 loop create loop create set int ip address loop0 $ip1 set int ip address loop1 $ip2 show int addr show macro undefine ip1 undefine ip2 Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I08a800647bac573d8ae3cfd75c40061d41c5f976
2020-03-21vlib: leave SIGPROF signal with its default handlerJieqiang Wang1-0/+1
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>
2019-12-10api: multiple connections per processDave Barach1-2/+2
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoît Ganne1-1/+0
Type: refactor Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2 Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28vat:ignore SIGWINCH signalezkexma1-0/+1
vpp/src/vat/main.c When change the window size,the vat will get the SIGWINCH signal and then exit. It is not a exit action,so we can ignore it. Change-Id: If796762216910e23cace09406d413331f505d990 Signed-off-by: ezkexma <maqi.z.ke@ericsson.com>
2019-01-20Rework of debian packagingDamjan Marion1-0/+34
Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-31Fix undefined symbol: fformat_append_cr in vat plugins loadingYi He1-11/+0
Several test plugins report undefined symbol while being loaded by load_one_vat_plugin. Fix this by adding VPP_API_TEST_BUILTIN into CFLAGS for building these plugins. Change-Id: I908720fd0d01da1ead30ba17027ba10358f6bdf1 Signed-off-by: Yi He <yi.he@arm.com>
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach1-9/+1
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>
2018-05-30vppinfra: explicitely state for signed types that they are signedDamjan Marion1-1/+1
This fixes some compilation warnings with clang on AArch64. Change-Id: Idb941944e3f199f483c80e143a9e5163a031c4aa Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-05sock api: add infra for bootstrapping shm clientsFlorin Coras1-1/+1
- add function to sock client that bootstraps shm api - allow sock clients to request custom shm ring configs Change-Id: Iabc1dd4f0dc8bbf8ba24de37f4966339fcf86107 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-18CSIT-844: fix binary api rx pthread heap push/popDave Barach1-0/+13
We need to push/pop the rx pthread's heap without affecting other thread(s). Search clib_per_cpu_mheaps, locate an unused slot. Duplicate the main thread heap pointer in that slot, and set __os_thread_index appropriately. Miscellaneous cleanups. Print exec_inband results as a vector, instead of as a format string. Don't bail out of vpp_api_test with results pending, e.g. at the end of a vpp_api_test script. Even though vpp will eventuallly garbage-collect them, We don't want to leave allocated reply messages lurking in the api message allocation rings... Change-Id: I0e8a25d1ff0d3700249dc330d079db16c2fcbc55 Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-03Repair vlib API socket serverDave Barach1-7/+31
- Teach vpp_api_test to send/receive API messages over sockets - Add memfd-based shared memory - Add api messages to create memfd-based shared memory segments - vpp_api_test supports both socket and shared memory segment connections - vpp_api_test pivot from socket to shared memory API messaging - add socket client support to libvlibclient.so - dead client reaper sends ping messages, container-friendly - dead client reaper falls back to kill (<pid>, 0) live checking if e.g. a python app goes silent for tens of seconds - handle ping messages in python client support code - teach show api ring about pairwise shared-memory segments - fix ip probing of already resolved destinations (VPP-998) We'll need this work to implement proper host-stack client isolation Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-25Fix usage string for vatJerome Tollet1-1/+2
Change-Id: Idad65cbb3765500a66f1097126076a2c5fdb4f1b Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2017-03-30Fix more "symbol XXX found in none of the libs" warningsDave Barach1-1/+0
Change-Id: I4467f26da5bdcfd76e5914e0124a83b659757947 Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+421
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>