summaryrefslogtreecommitdiffstats
path: root/vlib-api
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion23-6876/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-23Build vpp_api_test binary API debug CLI into vppDave Barach1-0/+5
Change-Id: I60ce73a62d8632a644fbfdfbe13ff8ddbb959233 Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-20Declare variables as externalDamjan Marion2-2/+2
non-external declarations in header files are generating multiple empty definitions of the same symbol. Change-Id: I7f3933404f79d08579468d0052c106731b57507c Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-07BFD: basic asynchronous session up/downKlement Sekera1-1/+2
This is a work-in-progress basic BFD session handling. Only asynchronous mode is supported at the moment. Setting the session flags doesn't work. Change-Id: Idba27f721b5c35be5a66a6d202a63d23ff7ecf6f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-05Move interface APIs to vnet/vnet/{interface.api,interface_api.c}Dave Barach1-0/+79
Change-Id: If3f0f73ad1c1d54ac69122052c977eb83a9e16eb Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-05Variable-message-length tracing support, VPP-370Dave Barach4-135/+49
Clean up several message handlers which spuriously depended on having a vlib_main_t * pointer passed as a second argument. That definitely doesn't happen when replaying an api trace... Change-Id: Id4cf9745f770933566cb13698ee779333ee35d79 Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-02API: Packaging of JSON files.Ole Troan1-3/+6
Change-Id: If041b6faf1a091d4758b514f0a8cd800ee0e6a89 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Ole Troan <otroan@ot-vpp.cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2016-11-30Start spliting vpe.api into logically related piecesDave Barach4-7/+170
To reduce rebase / manual merge pain, among other things Change-Id: I3186df0479066916a2ca69c48759178b45ef035c Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
2016-11-21Add client-side msg_name_and_crc -> msg_index tableDave Barach5-30/+115
vppapigen now generates per-message crcs. Verified that whitespace and real changes in message A don't change the crc for message B, etc. Fixed the sample and flowperpkt plugins to participate. Others need the same treatment. They don't build due to python/java language binding build issues. To use the scheme: Client connects as usual. Then call: u32 vl_api_get_msg_index(char * name_and_crc) name_and_crc is a string like: "flowperpkt_tx_interface_add_del_753301f3", aka the message name with _%08x <expected crc> appended. Try these vpp-api-test commands to play with it: vat# dump_msg_api_table <snip> [366]: punt_reply_cca27fbe [367]: ipsec_spd_dump_5e9ae88e [368]: ipsec_spd_details_6f7821b0 [369]: sample_macswap_enable_disable_0f2813e2 [370]: sample_macswap_enable_disable_reply_476738e5 [371]: flowperpkt_tx_interface_add_del_753301f3 [372]: flowperpkt_tx_interface_add_del_reply_d47e6e0b vat# get_msg_id sample_macswap_enable_disable_reply_476738e5 'sample_macswap_enable_disable_reply_476738e5' has message index 370 vat# get_msg_id sample_macswap_enable_disable_reply_476738e3 'sample_macswap_enable_disable_reply_476738e3' not found CRCs may vary, etc. vppapigen is used to build a set of JSON representations of each API file from vpp-api/Makefile.am and that is in turn used by each language binding (Java, Python, Lua). Change-Id: I3d64582e779dac5f20cddec79c562c288d8fd9c6 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
2016-11-12Clean up coverity warnings, VPP-486Dave Barach1-0/+1
Change-Id: I709e7cf0bb52d8e6cdc9ddb3b7648660204aa3bd Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-09Fix a batch of coverity warnings, VPP-486Dave Barach1-0/+2
Change-Id: I0379844824b4c2eb42588d0fb8e1a7eb441e923f Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-13add xxx_or_null(...) message buffer allocation variantsDave Barach2-6/+39
Useful when attempting to serialize potentially very large data structures and send them to API clients. NULL pointer checks are MANDATORY when calling xxx_or_null(...) variant functions. Change-Id: I6ae272deb7150a2c5aa82ec45a206e5bddee7a02 Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-05Fix mutex/condvar sleep when adding API msgs, VPP-461Dave Barach1-2/+39
Simply put, threads cannot sleep waiting for the vlib memory api main input queue to drain. If, say, thread i (i !=0) fills the vlib api main input queue with rpc requests - and then blocks trying to add another request - the game is over. RPCs attempt a barrier synchronization, which fails with Pr = {1.0} because thread i is in a mutex/condvar sleep. Add a main-thread cut-through path, which directly invokes the RPC callback function when called on the main thread. Change-Id: Ib036f0cc43b5738455c3a111cff64a132537152e Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-31VPP-210: Add "sh api status"Calvin1-3/+46
Change-Id: I164761bc2b242b6be527d057108dd09b99653ff5 Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-25VPP Python language binding - plugin supportOle Troan1-0/+4
- Moved Python generator tool to tools directory - Added build-vpp-api Makefile target - Generator now only creates a Python representation of the .api the rest of the framework is in the vpp_papi script - Each plugin has its own namespace. - Plugin Python files are installed in vpp_papi_plugins for easy use inside the build tree. Change-Id: I272c83bb7e5d5e416bdbd8a790a3cc35c5a04e38 Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-15VPP-327 Coding standards cleanup for vppinfraDave Barach2-5/+6
Fix additional a few additional deviations reported elsewhere by checkstyle Change-Id: I026a8ae1c5b1856bbe3c4a555e1b690e7501b045 Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-15VPP-236 Support 64-bit vector lengths, shared memory segments >4 GBDave Barach4-4/+79
Change-Id: I02aee33e96e7ae32094b9f82f6a667d30bb52f59 Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-12VPP-237: indent fixes in prep for checkstyleEd Warnicke5-19/+21
Ran indent *twice* Change-Id: If9c18b81983bb859cc8dc3b415c67cbf318fc618 Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-05vpp-189 Clean up more coverity warningsDave Barach1-0/+2
Time to make the donuts Change-Id: I528937800f7daefce19723dda0216e58d857942c Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-27VPP-210: Clearer error codes in vlib-api for API trace saveroot1-2/+14
Change-Id: Ic02eaaaa8cf7a0f1c75eca8e3b87956d5e9045e7 Signed-off-by: root <calvin.ference@gmail.com>
2016-07-27VPP-189 coverity warning cleanupsDave Barach3-0/+3
Change-Id: Ia4fbf4352119504e022b89d10d44a5259d94f316 Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-26Fix coverity warningsDave Barach4-1/+10
Change-Id: I37131f2d814a608fe9098daff83ff395f7ce99d7 Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-25Author: Dave Barach <dave@barachs.net>Dave Barach1-2/+4
--- log message follows this line -- Coverity: fix minor bug in test code Change-Id: I5921874b4902fc7fe140a9b22852e7d18583e7ae Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08fd-io-styleify passDave Barach17-3544/+4130
Change-Id: I72d0dff064162d11321257c858f68da1ba79ea48 Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08Remove unnecessary and obsolete configure.ac directivesDamjan Marion1-1/+0
Also enable silent rules where missing Change-Id: Ia521886815c862b013f01df4cc18fd8a298aaaa1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-17vpp-83: fix double-unlockDave Barach1-2/+3
Change-Id: I0b75b4f9bef62aba69e9cc163924f6b985a35455 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-07VPP-83: fix collateral damageDave Barach1-0/+1
Accidentally removed pthread_mutex_unlock (&root_rp->mutex) in the dead client scan case. Oops. Bad idea. Change-Id: I488b7e39d01c267052785bd346e8846351db90a9 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-01VPP-83 Allow non-privileged clients to use the vpp binary API.Dave Barach5-46/+61
Use the command line argument "api-segment { uid <nnn> gid <nnn> }" to configure shared memory segment file ownership. Defaults to uid = gid = 0. Shared-memory segments are explicitly set to 0770 mode, aka "rwxrwx---". Change-Id: Ic5d596b68139add61e7de6ace035c57dfd030111 Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-21Add per-thread, per-node runtime stats serializationDave Barach4-59/+306
Change-Id: Ic4009cdbac67b7cd53c88079439496b9d9dfaa35 Signed-off-by: Dave Barach <dave@barachs.net>
2016-04-26Make automake silent rules defaultDamjan Marion1-1/+1
Change-Id: Ia504ccdac1deac20f20cf7fb76f78b2d8c505474 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion4-11/+11
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-20Python-API: Inital commit of Python bindings for the VPP API.Ole Troan2-8/+13
See: https://wiki.fd.io/view/VPP/Python_API Change-Id: If135fc32208c7031787e1935b399d930e0e1ea1f Signed-off-by: Ole Troan <ot@cisco.com>
2016-04-19VPP-6: set epoll wait-time to zero when binary API messages are waitingDave Barach1-0/+2
Change-Id: I629ef98ecd3b729d2564b3a1ba8c6039f854f86c Signed-off-by: Dave Barach <dave@barachs.net>
2016-04-18Add support for AArch32Christophe Fontaine1-3/+3
gcc version 4.9.2 (Raspbian 4.9.2-10) Tested on Linux raspberrypi 4.4.6-v7+ #875 SMP Tue Apr 12 16:33:02 BST 2016 armv7l GNU/Linux CPUs may be little or big endian, detect with gcc flags, not the processor architecture Add a new flag $(PLATFORM)_uses_openssl which allows to disable the link with openssl lib. vlib/vlib/threads.c: startup.conf must: - specify the heapsize as we don't have hugepages on raspbian cpu { main-core 3 } heapsize 64M Corrects in various files the assumption uword == u64 and replaces 'u64' cast with 'pointer_to_uword' and 'uword_to_pointer' where appropriate. 256 CPUs may create an OOM when testing with small memory footprint ( heapsize 64M ), allows the number of VLIB_MAX_CPUS to be set in platforms/*.mk vppinfra/vppinfra/longjmp.S: ARM - copy r1 (1st parameter of the setjmp call) to r0 (return value) vppinfra/vppinfra/time.h: On ARMv7 in AArch32 mode, we can access to a 64bit register to retreive the cycles count. gcc on rpi only declare ARM_ARCH 6. Override this info, and check if it is possible to use 'mrrc'. /!\ the time function will NOT work without allowing the user mode access to the PMU. You may download the source of the kmod here: https://github.com/christophefontaine/arm_rdtsc Change-Id: I8142606436d9671a184133b935398427f08a8bd2 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-03-07build: fix call to mkdirJean-Mickael Guerin1-1/+1
Seen during build: /bin/bash: line 1: @mkdir: command not found Remove the extra prefix '@', this line is part of a single operation actually. Change-Id: I5fc265ae7c2dda01c61b369803d3c30a42a91f70 Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-02-19Serialize and upload the data plane node graphDave Barach3-1/+147
Include node names and graph arcs. Prep work for uploading node runtime data, so the latter can be reported in a comprehensible manner. Change-Id: I215b1f8cff244200c37c7e088f1f22229dc97eb6 Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10Replace AC_PROG_LIBTOOL with LT_INITDave Barach1-1/+1
Change-Id: I642c4b8e83dd07708658a10ad46e9fd2c28a7f1f Signed-off-by: Dave Barach <dave@barachs.net>
2016-01-22Enable shared-VM namespace supportDave Barach2-11/+12
Required prep work for gracefully supporting "... dpdk { proc-type secondary }" - multiple processes sharing a physical host, VM, container, etc. Change-Id: Ic3eb72f4093e26d7c86dde3b8799264f1d0c218b Signed-off-by: Dave Barach <dave@barachs.net>
2015-12-15Remove autotools generated productsDave Barach10-39229/+0
Change-Id: I7f23b8b8e5136cb56768bac3a7473e6df5ee4993 Signed-off-by: Dave Barach <dave@barachs.net>
2015-12-14Move rpc handler where it belongs, related cleanupDave Barach3-22/+87
Change-Id: I393df100558a85fe676f4a4c8c9b546fa549ecc9 Signed-off-by: Dave Barach <dave@barachs.net>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke30-0/+44561
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>