aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/java
AgeCommit message (Collapse)AuthorFilesLines
2017-10-30jvpp: bugfix for deadlock in java future API (VPP-1037)Matej3-72/+160
- message sending method inside synchronization blocks causes deadlock between sending and receiving part - breaking atomicity of sending message and putting future with corresponding id to map needs additional handling by writer and receiver, regardless which part get access to sync block first will create new future and second one will complete it and remove from map, in case of dump calls where control ping reply is required as confirmation that all information were send, if ping reply is received before writer put future in map, reader will create regular control ping future instead and writer needs to made association between these two futures Change-Id: Id29a19be7a5319291a5e07cf931080610178f00c Signed-off-by: Matej <matej.perina@pantheon.tech>
2017-10-16jvpp: stop plugin intialization on first mismatchMarek Gradzki9-12/+15
Java bindings use get_message_id from jvpp-common to detect if messages known at compile time are avaliable at runtime. In case of missing entry, Java exception is propagated via JNI using (*env)->ThrowNew. But this function does not end code execution so, in order to prevent unexpected behaviour (e.g. calling vl_msg_api_set_handlers with id == 0), get_message_id caller should do it manually. Change-Id: I2edb5013fd3658dcdd77a867b5cdf62e559ee071 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-10-10jvpp: adding callbacks for all messages (VPP-914)Matej Perina21-147/+171
1) In the previous version callbacks were generated based on request-replay naming conventions. It turned out they were too strict in case of events (e.g. BFD sends Details messages as notifications). So now we generate callback for all messages, allowing to receive any message as notification.(callback_gen.py) 2) "notification" suffix is no longer added because all messages are treated same (dto_gen.py, jvpp_c_gen_.py) 3) name of property that holds notification/events changed in callback facade and future apis 4) JVppNotification.java is no longer used since all events are treated equally Change-Id: I13f6438affc3473040d63cd4acb3984d03e97482 Signed-off-by: Matej <matej.perina@pantheon.tech>
2017-10-03jvpp: added logs for sending and receiving event messages (VPP-982)Matej Perina5-0/+30
Change-Id: I47f9d12d934378f18c6f841b902af2a64ee7b187 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-27VPP-990 remove registered handler if control ping failsv18.01-rc0Matej Perina1-0/+1
Change-Id: I5ca5763f0dc0a73cc6f014b855426b7ac180f356 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-15jvpp: add vpe_pid to ConnectionInfoMatej Perina2-8/+11
ConnectionInfo now contains pid of vpp process pid is aquired through initial control ping during connection creation Change-Id: I68457770e07792d11c47bc7d8cbd0d2fd722d9b4 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-12ACL-plugin add "replace" semantics for adding a new MacIP aclPavel Kotucek1-0/+18
Change-Id: Ia5c869b2d8b8ad012b9e89fb6720c9c32d9ee065 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-25jvpp: adding debug usage into test documentationMatej Perina5-1/+14
added debug version commands to Readme files for example tests Change-Id: Icc5d5cdd33efb6d7c7512c7a78e22d9dc3d31fdc Signed-off-by: Matej Perina <mperina@cisco.com>
2017-08-25jvpp: introducing callback api and future api tests for all plugins (VPP-591)Matej Perina20-0/+724
test can be run with: make test TEST=test_jvpp memory_shared.c: declaring and assigning variable in if statement makes it usage outside statement impossible. Looks like memory space assigned to variable declared in statement is freed when statement ends svm.c: - fixed case when root path can have a "/" at beggining - added option for test to operate over shared memory space with /vpe-api name and not create new one with name consisting of root path and region name which would require root permisions Change-Id: Iff1170dc6a5c1be134c152f2757c7ab9b919a8ed Signed-off-by: Matej Perina <mperina@cisco.com>
2017-08-24jvpp: use (*env)->ExceptionClear before calling (*env)->ExceptionOccurredMarek Gradzki1-1/+4
Change-Id: I6cca455ead986cb8a507c84957a97a40b733b16c Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-23NAT: Rename snat plugin to nat (VPP-955)Matus Fabian6-45/+45
Change-Id: I30a7e3da7a4efc6038a91e27b48045d4b07e2764 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-16jvpp: suppress unwritten fields warrning found in DTO's hashCodeMarek Gradzki2-0/+42
DTOs fields are initialized by generated JNI code, so we can safely ignore FB.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD. Coverity uses FindBugs to analyse Java code, so it should be possible to suppress some of the issues that are false positives or intentional. Change-Id: I1375f6123e3eb44db44065d603d9d81726161acb Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-16jvpp: move JVppReply's id out of synchronized blockMarek Gradzki2-15/+17
Should make Coverity stop thinking we try to synchronize reply.context. Change-Id: I97169e46b9c8f594836d6beb75b9f42dfc6e5bad Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-14jvpp: ignore messages if callback method is missing (VPP-548)Marek Gradzki1-0/+8
Change-Id: I6a06dbcd8339bd6645a6b02ae70154aa0885dcf8 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-14jvpp: make shm_prefix configurable (VPP-591)Jan Srnicek3-20/+44
svm.c - set default map region root path only if root path is not already present memory_shared.c - added option for tests to send memory region name and root path in one variable, if so name and root path are separated here and set to map region structure so find function can find it properly jvpp-registry.c - added parameters shmPrefix to be able pass + removed sudo restriction specific shared memory prefix that is used while starting python tests(see framework.py) JVppRegistyImpl - added option to specify shmPrefix VppJNIConnection - added option to specify shmPrefix Change-Id: I3f89f867fb9b20eef00fbd497cb0e41b25d6eab7 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com> Signed-off-by: Matej Perina <mperina@cisco.com>
2017-08-11Dedicated SW Interface EventNeale Ranns5-19/+11
Change-Id: I06a10a4291e61aec3f1396d2514ed6fe3901897a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-09Add PPPoE PluginHongjun Ni3-0/+169
Supports 64K PPPoE sessions This plugin adds three graph nodes: 1) pppoe-input for PPPoE decapsulation 2) pppoe-encap for PPPoE encapsulation 3) pppoe-tap-dispatch for control plane process Below is the configuration to make PPPoE CP and DP work: vim /etc/vpp/startup.conf tuntap { enable ethernet name newtap } create pppoe tap tap-if-index 1 //Configure it after a subscriber's PPPoE discovery and PPP link establishment succeeds: create pppoe session client-ip 100.1.2.1 session-id 1 client-mac 00:11:01:00:00:01 show pppoe fib show pppoe session Change-Id: I73e724b6bf7c3e4181a9914c5752da1fa72d7e60 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-04jvpp: provide more detailed exception logs (VPP-436)Matej Perina3-3/+38
Error descriptions provided in api_errno.h are never used, only error tag/name and number make it to enum vnet_api_error_t so new macro is introduced in jvpp_common.c to extract message according to error number and passed to VppCallbackException constuctor. Change-Id: If2a687752807d7250d9226987583df00f151e87f Signed-off-by: Matej Perina <mperina@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-07-31jvpp: moving current tests to separate folder marked as examplesMatej Perina31-183/+114
Change-Id: Ib1a13e0a6cba69aba7a26e1bd52f4c55c4ccc027 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-05-30Flowprobe: Stateful flows and IPv6, L4 recordingOle Troan1-1/+1
Change-Id: I67839281623721bf42f0a918a53356143d9dc78a Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Pavel Kotucek <pkotucek@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-26Improve jvppgen object array member instantiationRobert Varga1-1/+1
Since all objects of the array have the same type, the object constructor is a loop invariant. Move the lookup out of the loop, making things faster. Change-Id: I631c72b59c6c63eccd49ede41c6dc0541c325db9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> Signed-off-by: Robert Varga <nite@hq.sk>
2017-05-26Fix JNI templatesRobert Varga1-0/+3
The JNI templates around array and object handling are wrong in the sense that they fail to delete local references for objects which have been assigned to fields/arrays. Fix this by invoking DeleteLocalRef. Change-Id: I1c31d81f4235d821ccd51c96be7b176f64284928 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> Signed-off-by: Robert Varga <nite@hq.sk>
2017-05-20API: Cleaning up message naming that does not follow the conventionsOle Troan2-10/+3
is_address_reachable - Disabled so deleted cli_request - Renamed to cli vnet_summary_stats_reply - Renamed to vnet_get_summary_stats_reply bridge_domain_sw_if_details - Deleted, incorporated in main message l2_fib_table_entry - Renamed to l2_fib_table_details Change-Id: I93b7e8769a3ba7b4989b3c270270f575f386464f Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-15Add GTP-U plugin. VPP-694Hongjun Ni3-0/+169
Basic GTP-U feature Change-Id: I31226f890a92c5303ac06e112ed7820cae52d9bd Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-15jvpp: fix memory allocation for variable lenght messages (VPP-841)Marek Gradzki4-22/+49
Change-Id: I9a46125e3cf9815c08cf8cca17713ec6e9121eae Signed-off-by: Marek Gradzki <mgradzki@cisco.com> (cherry picked from commit 307cfd8eb14ff7df04316ffa56f2c2481d650d7e)
2017-04-27japi: fix compilation on 32-bit systemsDamjan Marion7-7/+7
Change-Id: Ia7cb986544a13cc17b43b2f0948482deb02e8fb5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-06jvpp: remove unused print&endian headers (fixes VPP-688)Marek Gradzki6-64/+10
Change-Id: I97e03d98758a08b1f75a9a1f35f0181385a10ae8 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-03-30Clean up more Debian packaging symbol warningsDave Barach1-1/+0
Change-Id: I6081a38af3817f0957a2faf0e3e41afa4a74f3a4 Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-22jvpp: remove unnecessary msg_id_base cachingMarek Gradzki11-178/+90
Jvpp code uses CRCs to obtain msg IDs. Checking api_main_t.msg_index_by_name_and_crc is enough to detect API mismatch. Calling vl_client_get_first_plugin_msg_id is not needed. Also fixes VPP-627. Change-Id: Ie3085dfa458795fa11f17615ac94e76197a1c8cd Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-02-02LISP: enhance binary part of some APIsFilip Tehlar1-1/+2
Remote mapping and locator set binary APIs uses zero length arrays defined as 'u8 array[0]' in .api file. This path will change such cases to form 'type_t array[count];' in order to enhance maintainability. Change-Id: I98d0252b441020609c550d48186ed0d8338a3f2d Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-31jvpp: fix coverity warn: reliance on default encodingMarek Gradzki5-18/+35
Change-Id: I8333b7d19ebdacac5445b4505750dd0a46764b36 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-28Add files to CLEANFILES for robust make clean.Burt Silverman1-1/+1
At the least, $(BUILT_SOURCES) should be added to CLEANFILES. Also beneficial is $(api_DATA), and in the case of Java, *.files and *.h. Also there is a vpp/app/version.h, and some grammar and lex files in vppapigen. Change-Id: Ic6d3f2d40ce65e1d9a8b88217fa1f36de393ebb4 Signed-off-by: Burt Silverman <burtms@gmail.com>
2017-01-27jvpp: utilize per-message CRCs (VPP-544)Marek Gradzki11-15/+143
Since messages ids are no longer statically referenced, fixes also VPP-611. Change-Id: Ic8e6ee2b7f1142c185595347984d69350be25ac3 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-18jvpp: include libjvpp_common in rpm packagesMarek Gradzki1-0/+1
Change-Id: Idef5f036c9dc679b062931f38fcc311d00fc0017 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-16Fix linker warnings for jvpp shared libsMarek Gradzki1-1/+1
Change-Id: I02d01ce210d5bbe11ad2ee70f7703647f9147416 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-12jvpp: include jvpp_common in vpp packagesMarek Gradzki1-1/+1
Change-Id: Idcf37fc4a031c1c95362aeadf11768103e40d0fd Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-11jvpp: add missing dependencies on various libsMarek Gradzki1-5/+23
Change-Id: Ifa6845458f7249d2179a20b954fcdd49d6c68aa1 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-11Makefile.am cleanupDamjan Marion1-0/+1
- remove unused stuff - add --quiet flag to libtool - avoid building some tests programs when tests are not enabled Change-Id: Ie34aeec1a598ad811256a00354f66cfddae9d0b9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-11jvpp: compile static Java files and include in generated jarsMarek Gradzki1-3/+3
Most Java bindings for VPP APIs provide some tests/examples. The patch includes them in the compilation process. Change-Id: Icef3d061c1afd727e8544a7fe5c0204453b1c1d0 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-10japi: include tests in jar filesDamjan Marion1-0/+1
Change-Id: Idffaafda8fac06a45edef6f3ef13379293d0faa0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-05Added vpe.api java binding generationJan Srnicek1-0/+1
added missing path for vpe.api file Change-Id: I61f727002dd663d6a5656b0d01380e77b44c4a42 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
2017-01-03jvpp: install jvpp_common.h into include/Damjan Marion1-0/+3
Change-Id: Iaffc619f3219239e753609f0963d396237aae378 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-01Move java,lua api and remaining plugins to src/Damjan Marion77-0/+7763
Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d Signed-off-by: Damjan Marion <damarion@cisco.com>