summaryrefslogtreecommitdiffstats
path: root/src/vpp-api
AgeCommit message (Collapse)AuthorFilesLines
2018-06-17Python API: Add enum and union support.Ole Troan5-309/+542
As well as a rewrite of the encoders/decoders to make it more readable and extensible. Change-Id: I253369ac76303922bf9c11377622c8974fa92f19 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-06Alter logging semantics for VPP PAPI objectIan Wells1-2/+11
Logging previously used a string name for the log level and changed the system-wide log level based on this string name. It now uses a logging-module provided constant for the log level and changes its own logger's level based on the name, and only if the level is provided. This allows the logging to be more compatible with Pythonic usage, where an external source may be used to dictate logging levels across the system on a per module basis and should not be overridden. Change-Id: Icf6896ff61a29b12c11d04374767322cdb330323 Signed-off-by: Ian Wells <iawells@cisco.com>
2018-06-05VPP API: Memory traceOle Troan2-7/+61
if you plan to put a hash into shared memory, the key sum and key equal functions MUST be set to constants such as KEY_FUNC_STRING, KEY_FUNC_MEM, etc. -lvppinfra is PIC, which means that the process which set up the hash won't have the same idea where the key sum and key compare functions live in other processes. Change-Id: Ib3b5963a0d2fb467b91e1f16274df66ac74009e9 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-04Join the VAC read timeout threadNeale Ranns1-21/+25
Change-Id: I5bcbae276f8ac23718c5afc859da222508d07ad7 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2018-05-07fix: AttributeError: module 'os' has no attribute 'cwd'Andrey "Zed" Zaikin1-1/+1
Change-Id: I1c49a12ef7fa7bd0046f1a420b01c1654b6d21ec Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-05-04Address compilation issues with Java > 1.8Marco Varlese1-8/+3
This patch addresses the changes in the JDK to build headers (javah no longer available) Change-Id: I3e94b1cf97c8c474535c26b75ea08379338fe0af Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-05-04VAPI: support VLAs in type definitionsKlement Sekera3-59/+57
Change-Id: I8d54415972d6644190857175b0e895c5319ce7b6 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-04-27Move VOM to extras/vomDamjan Marion175-32365/+0
Change-Id: Iea174f03dfba3bd06024db0f0cc373532300dcae Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-25GBPv6: NAT66 actions for GBPNeale Ranns3-132/+172
Change-Id: I379150a88f2d53d6281be41e8bad6fc4f4e88a71 Signed-off-by: Neale Ranns <neale.ranns@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-04-13Revert "MTU: Setting of MTU on software interface (instead of hardware ↵Damjan Marion2-3/+3
interface)" This reverts commit 70083ee74c3141bbefb185525315f1b34497dcaa. Reverting as this patch is causing following crash: 0: /home/damarion/cisco/vpp3/build-data/../src/vnet/devices/devices.h:131 (vnet_get_device_input_thread_index) assertion `queue_id < vec_len (hw->input_node_thread_index_by_queue)' fails Aborted Change-Id: Ie2a365032110b1f67be7a9d832885b9899813d39 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-13VOM: GBP: update subnet is type changesNeale Ranns2-5/+16
Change-Id: Ic04f419b9c09be34afc390e672793180d56c4665 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-04-13MTU: Setting of MTU on software interface (instead of hardware interface)Ole Troan2-3/+3
Change-Id: I98bd454a761a1032738a21edeb0fe847e801f901 Signed-off-by: Ole Troan <ot@cisco.com>
2018-04-13GBP V2Neale Ranns36-90/+2843
update the GBP plugin to implement the full NAT feature set of opflex agent Change-Id: Ic06a039c889445ed0b9087fa1f292634192b0f8d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-04-12export new VOM hpp post 11648Neale Ranns1-0/+1
Change-Id: I3e670c22b3b8a674c98ff30eb093c5c6ab873e53 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-12Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'Neale Ranns31-69/+153
Change-Id: I994649761fe2e66e12ae0e49a84fb1d0a966ddfb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-12vom: Fix the itf stats replayMohsin Kazmi3-1/+39
Change-Id: Iedc6bbaa1c0a1c3c6e1b8ed6d67db28046a551f4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-12fixes python3 TypeError; python2 intactAndrey "Zed" Zaikin1-1/+1
exception in vpp_api.vac_write(): "TypeError: initializer for ctype 'char *' must be a bytes or list or tuple, not str" Change-Id: Ib6bcfb86e6e36c557174979a110113af689c6754 Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-04-11fix: sample vpp-api C client hangs vpp daemon because of NULL callbackAndrey "Zed" Zaikin1-4/+3
Change-Id: I686254b332a4527cb0cad3c5c0a17ea4c9f40e1d Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-04-05VOM: Get vhost-user type from nameMohsin Kazmi1-1/+2
Adopt nova naming convention for vhost-user interfaces. Change-Id: If70f0828106bf594eb11d4f0ed2898a35ec0af15 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-05VOM: Add sub_interface in specific routing tableMohsin Kazmi2-0/+19
Change-Id: I3700fc1d140e30da783e41762670618f0298c7db Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-04Detailed stats collection featureNeale Ranns5-6/+123
Use device-input and interface-output feautre arcs to collect unicast, multicast and broadcast states for RX and TX resp. Since these feature arcs are present only for 'physical' interfaces (i.e. not su-interfaces) counter collection is supported only on parent interface types. Change-Id: I915c235e336b0fc3a3c3de918f95dd674e4e0e4e Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-28vom: Fix the error handling for already existing itfMohsin Kazmi1-1/+5
Change-Id: I5695d51dd4f6daff472877fe1cce3ddcb924b187 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-27VOM: Fix connection stateNeale Ranns3-8/+14
Change-Id: I4851b2245f81bcf3cf5f40909c4d158a51af7068 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-27VOM: bond: Add support for LACPMohsin Kazmi17-6/+1701
Change-Id: I0245263b212142858d3305b0f365d8342912dbb9 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-22vom: itf: make vhost_user as socket slaveMohsin Kazmi1-1/+2
Change-Id: I57b2ec35d9629fb5336c1ccfa4c6c849df118f7b Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-22vom: l2-emulation: Fix sweep functionMohsin Kazmi2-2/+2
Change-Id: I6fdb9e7b718c696f7352541f90026cf60f11338f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-14VOM: acl: Add support for acl ethertype unbind and dumpMohsin Kazmi3-1/+182
Change-Id: I667b9ccabe54c8f9cff5b1a2e63864965f5064f5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-13Common form of fib-path reproting in dumpsNeale Ranns1-4/+16
Change-Id: I8f6fdbbeef2ac7e9fe5d87490ae5cba6e9a0b294 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-07VAPI: Ensure type definitions are generated in same order as .api file.Ole Troan2-4/+4
The previous use of a dictionary instead of a list led to typedefs being generated in wrong order. Change-Id: Iee6ff73f920883ce6e599180c1b47fe997c1702e Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-06VOM: Fix state reconciliationMohsin Kazmi11-67/+165
This commit also fixes the acl and arp handle for inspector to view internal state of VOM. Change-Id: Ibc8ff6cb51d2a77b4c04993ac7212564b8892337 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-06API: Add service definitions for events and singleton messages (second attempt)Marek Gradzki1-0/+17
Based on https://gerrit.fd.io/r/#/c/10920/ Updates service definition in stats.api with correct reply message names. Change-Id: I3282bee5304e667e23bc1fab3f43d967a50d880d Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-03-05Revert "API: Add service definitions for events and singleton messages."Ole Trøan1-17/+0
This reverts commit f7b7fa53b7eaec81d8c00c1023fb7d01f1f9761f. Change-Id: I87496342943248e94f01ada31459f387c0a3a610 Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-05API: Add service definitions for events and singleton messages.Ole Troan1-0/+17
Change-Id: I7de987c30b263d43521e6280c5273f30b5f6e11c Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-02gitignore: negate "No core files" pattern in 'vpp-api/java'Marek Gradzki1-0/+2
The 'vpp-api/java' includes 'core' subdir which should be tracked. This patch adds .gitignore for 'vpp-api/java' to negate pattern that matches 'core' files/dirs, introduced by https://gerrit.fd.io/r/#/c/9848/. Change-Id: I4e10ca10a891a2d95d6b45e479ee8d2196749132 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-03-02jvpp: object model for jvpp generator (VPP-1184)Marek Gradzki19-2341/+2267
Introduces JSON parser which builds object model of Java API. Also rewrites JNI translation of typedefs to use per type translation functions instead of code inlining. Not covered: - integrate with vappigen plugin (VPP-1154) or vapi parser (VPP-1155) - use better templating engine (VPP-480) - improvements of generator structure (e.g. VPP-1186) Change-Id: I9e12d76c2f3c6ee041669f58e8a37917f656aa90 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-03-01PAPI: pycodestyle on vpp_papi.pyOle Troan1-22/+36
Change-Id: I15cf4a9fd2d2518df4bfffc1ba3c556a87ca5afa Signed-off-by: Ole Troan <ot@cisco.com>
2018-02-27VOM: interface: Fix the vhost user interfaceMohsin Kazmi2-1/+5
Change-Id: I38904dafb4110322ec0138f7a5b3a65c96426b2b Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-25vapi: handle more magicKlement Sekera1-3/+15
Change-Id: I25cbf947d6aabadbf637387497104cb301762def Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-22VOM: vhost-use interfacesNeale Ranns7-15/+303
Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-19VOM: acl: Some necessary fixesMohsin Kazmi3-7/+13
It: 1. changes ethertype_rule_t to hold actual objects instead of reference to them. 2. fixes acl_ethertype 'update' function 3. fixes pretty-print of acl-list-update. 4. adds l3-acl update unit test. Change-Id: Iec72212806e96bd0574b46b563de79f0744cb248 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-17vpp_papi: remove legacy way of calling VPP APIsKlement Sekera1-7/+0
This allows VPP to define APIs which conflict with internal function names used in vpp_papi without issues. Change-Id: I56c21814e1c11fa2aa6bcd95adb3fdeacd304e8e Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-17vpp_papi: reduce memory leaksKlement Sekera1-12/+16
This changes makes unused VPP objects collectable by garbage collector, allowing running all `make test` tests again instead of python crashing due to running out of memory. Change-Id: I0e271c2b3f195d9d3b64840f9f11144da0fe967d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-15VOM: Fix broken MakefileMohsin Kazmi1-1/+1
Typo mistake broken the makefile which results in missing vom headers in system. Change-Id: Ic2e5f742f0e38140559138b4aa7564f8c25b73e4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-14VOM: build with plugins disabledNeale Ranns3-30/+79
Change-Id: I1384d16deb3fa38b988dd2fc98f436124e381536 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-02-13VOM: ACL: Add Object Model for acl ethertypeMohsin Kazmi7-0/+747
Change-Id: I2b572ebd4b7bb26381f127912a4cc0825c04fc34 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-09GBP pluginNeale Ranns11-3/+1339
Group Base Policy (GBP) defines: - endpoints: typically a VM or container that is connected to the virtual switch/router (i.e. to VPP) - endpoint-group: (EPG) a collection of endpoints - policy: rules determining which traffic can pass between EPGs a.k.a a 'contract' Here, policy is implemented via an ACL. EPG classification for transit packets is determined by: - source EPG: from the packet's input interface - destination EPG: from the packet's destination IP address. Change-Id: I7b983844826b5fc3d49e21353ebda9df9b224e25 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-02-02VOM: route-domain find() fixNeale Ranns3-24/+5
Change-Id: I5b7117f3568e3ba979baa15521b2cfc180abb682 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-01-27jvpp: map VPP API enums to primitive typesMarek Gradzki2-3/+76
Adding enum support (VPP-1153) requires JVPP generator refactoring (see: VPP-1154, VPP-1155, VPP-480) As a workaround we just update all the mappings used for VPP API definitions to JAVA and C/JNI translation. Change-Id: I9dff83e5199039a1a46a3d4685ce57cdeeeb2014 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-01-27jvpp: use Python's logging APIMarek Gradzki10-34/+61
Change-Id: Iec437e4672af1f0d1a24458afb977ba6fbeba4ed Signed-off-by: Marek Gradzki <mgradzki@cisco.com>