aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api
AgeCommit message (Collapse)AuthorFilesLines
2018-04-18Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'Neale Ranns31-69/+153
Change-Id: I994649761fe2e66e12ae0e49a84fb1d0a966ddfb Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 756cd9441752fc8f84104c9ee19099506ba89f85)
2018-04-13VOM: Add sub_interface in specific routing tableMohsin Kazmi2-0/+19
Change-Id: I3700fc1d140e30da783e41762670618f0298c7db Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 1e583111ebeb0333435cfad8af10ebe0e9842d4d)
2018-04-13vom: Fix the itf stats replayMohsin Kazmi3-1/+39
Change-Id: Iedc6bbaa1c0a1c3c6e1b8ed6d67db28046a551f4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 58c711a196d9b178bfe6190964a7df92145cf949)
2018-04-13VOM: 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> (cherry picked from commit 47cca9b0f2a406a4494e646c4c4cd37abb47053a)
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>
2018-01-25VPP-1144: PAPI Import leads to duplicate type definition.Ole Troan1-0/+15
Change-Id: I54c147004fd93681a6a9cf30fa5277c1dabce67c Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-23For DHCP client configuration control the setting of the broadcast flag in theNeale Ranns4-6/+28
DISCOVER message sent. According to RFC2131: In the case of a client using DHCP for initial configuration (before the client's TCP/IP software has been completely configured), DHCP requires creative use of the client's TCP/IP software and liberal interpretation of RFC 1122. The TCP/IP software SHOULD accept and forward to the IP layer any IP packets delivered to the client's hardware address before the IP address is configured; DHCP servers and BOOTP relay agents may not be able to deliver DHCP messages to clients that cannot accept hardware unicast datagrams before the TCP/IP software is configured. To work around some clients that cannot accept IP unicast datagrams before the TCP/IP software is configured as discussed in the previous paragraph, DHCP uses the 'flags' field [21]. The leftmost bit is defined as the BROADCAST (B) flag. The semantics of this flag are discussed in section 4.1 of this document. The remaining bits of the flags field are reserved for future use. They MUST be set to zero by clients and ignored by servers and relay agents. Figure 2 gives the format of the 'flags' field. this changes means VPP conforms to the: "SHOULD accept and forward to the IP layer any IP packets delivered to the client's hardware address before the IP address is configured" with the caveat that VPP allows DHCP packets destined to the stanard client DHCP port to be delivered. With this enhancement the control-plane is now able to choose the setting of the broadcast flag. Change-Id: Ia4eb2c9bb1e30c29f9192facc645e9533641955a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
This is a version of the VPP API generator in Python PLY. It supports the existing language, and has a plugin architecture for generators. Currently C and JSON are supported. Changes: - vl_api_version to option version = "major.minor.patch" - enum support - Added error checking and reporting - import support (removed the C pre-processor) - services (tying request/reply together) Version: option version = "1.0.0"; Enum: enum colours { RED, BLUE = 50, }; define foo { vl_api_colours_t colours; }; Services: service { rpc foo returns foo_reply; rpc foo_dump returns stream foo_details; rpc want_stats returns want_stats_reply events ip4_counters, ip6_counters; }; Future planned features: - unions - bool, text - array support (including length) - proto3 output plugin - Refactor C/C++ generator as a plugin - Refactor Java generator as a plugin Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-22vom: acl: Fix l3 acl handle populateMohsin Kazmi3-0/+21
Change-Id: I5f105a1abb8a28645d6c961ad92f91c23787047f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22vom: ip_route: fix handle populateMohsin Kazmi1-5/+15
Change-Id: I91892084133daadb74caa7aa13ee1071599ba892 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22vom: Fix connection to VAPI and add disconnect functionMohsin Kazmi6-28/+48
Change-Id: I2dd5dbafe36e5ae536b3e600beb6920a71238b7a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22svm: queue sub: Add conditional timed waitMohsin Kazmi4-8/+17
On reviece side svm queue only permits blocking and non-blocking calls. This patch adds timed wait blocking functionality which returns either on signal/event or on given time out. It also preserves the original behavior, so it will not hurt client applications which are using svm queue. Change-Id: Ic10632170330a80afb8bc781d4ccddfe4da2c69a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-10makefile set CXXFLAGS so they are propageted to sub-buildsNeale Ranns1-2/+1
Change-Id: I55d9953851062f7106c66701d46bcd9073cf1ee4 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-01-09Revert "VOM: fix cflags"Dave Wallace1-2/+1
This reverts commit 4363ad6c96b5641fca1b16c5a6ec22e2364adcfd. Change-Id: Ie71ee265659e06ada37f40cfceed4c20b1cbf6e5 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-09api: refactor vlibmemoryFlorin Coras18-36/+34
- 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>
2018-01-09VOM: fix cflagsNeale Ranns1-1/+2
override the default CXXFLAGS (which provides a -O2) with the system set CFLAGS (providing -O0/-O2 for debug/release builds) Change-Id: Ic84e51baafdc22d37139303566d705d759e36721 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-09DVR: run L3 output featuresNeale Ranns5-25/+95
- rename l2_bridged to is_dvr. Including on the ip.api this was new in the 18.01 release so no compatability issues. - steal the free space in vnet_buffer_opaque_t for use with flags. - run the ipX-output feature arc from the DVR DPO Change-Id: I040e5976d1dbe076fcdda3a40a7804f56337ce3f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-04VOM: NAT coverity found bugsNeale Ranns2-3/+3
Change-Id: Ic55ad2e0a1435f552ce84ed1a9b1981191bc178b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-02VOM: NAT updatesNeale Ranns12-174/+518
Change-Id: I112afaa1f2ccd2ee62a436c73802afaea9b44779 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-20L2 EmulationNeale Ranns6-1/+560
L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and inject them into the L3 path (i.e. into the appropriate ip[4|6]_input node). L3 routes in the table_id for that interface should then be configured as DVR routes, therefore the forwarded packet has the L2 header preserved and togehter the L3 routed system behaves like an L2 bridge. Change-Id: I8effd7e2f4c67ee277b73c7bc79aa3e5a3e34d03 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-14vom: acl: Extend constructor for l3 ruleMohsin Kazmi2-9/+23
New constructor can construct the l3 rule using all or partial paratmeters. Change-Id: I828ec1c4713decb5824e4a73c3692cebc2324cc2 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2017-12-14vom: acl-list: Add comparison operator - for UTMohsin Kazmi1-0/+12
Change-Id: I341f522b46dd85fb3b1dd43fd125513f16f89171 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>