summaryrefslogtreecommitdiffstats
path: root/src/vpp-api
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-12-13VOM: a couple of print fixesNeale Ranns2-2/+3
Change-Id: I4c22ad08bf8fa3e8f05b8938ff447cafa4eea5b2 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-10improve vapi json parser error handlingKlement Sekera1-1/+19
Change-Id: I39b975e6dc3b3ed1f81c1736ed498aee05f6a88b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-12-09jvpp: include all api files from @top_builddir@/vppMarek Gradzki2-6/+5
Currently: - vpe.api (supported previously) - stats.api - oam.api Change-Id: Iab48d5d142e9a1ea0a4f366352b1d9429cc47309 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-09jvpp: do not hardcode event sufixes (VPP-940)Marek Gradzki7-141/+175
JVpp maps request messages with replies for Java API user convenience, e.g.: - do not polute send APIs with messages other than requests/dumps, - allow callback registration only for replies/details and events. Since there are no conventions for event message naming (https://wiki.fd.io/view/VPP/API_Concepts#API_Conventions), jvpp should not limit events to messages that end with 'event' or 'counters' suffix. Instead jvpp should treat all messages except for requests/dumps as potential events. Such behaviour was introduced on Java API level by https://gerrit.fd.io/r/#/c/8377/ in order support reusing details messages as events (e.g. BFD events). This patch goes one step forward by relaxing rules at jvpp generation level. Change-Id: I2a35e9eb2a288b2cf02d36ca95e6cb13e76e19e3 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-08vom: acl-l3: Fix pretty print for TCP mask and flagsMohsin Kazmi1-2/+2
Change-Id: If14d1b2d9b73de77321d94f10d48fa1bb04846f6 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2017-12-08VOM: prefix bit fiddlingNeale Ranns3-19/+130
Change-Id: I4fbf4a574f455628d56e78cefc1a76adc06bc801 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-07jvpp: unify notification handlingMarek Gradzki3-23/+7
Since introduction of dedicated SW Interface Event, there is no need for special handling of messages that can be both requests and events. Change-Id: I76575e32c6d5b19e9a1ca953e5841d8ac3de4de7 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-07jvpp: remove special request<>reply mappingsMarek Gradzki10-102/+28
Since L2FibTable removal and introduction of dedicated SW Interface Event, special message handling code can be removed. The patch also fixes issues found by Intelij's code inspection tool. Change-Id: Ic4b2fd12ac30c7627f4cd6769716e4bb52ec0b10 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-02VOM: l2fib: Add bvi flag supportMohsin Kazmi3-13/+29
Change-Id: I03d7508649e80a538fcf9541815e2c29224bc87a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2017-12-01VOM: fixes for interface recreate on agent restart and L2 re-bindingNeale Ranns4-10/+24
Change-Id: I14c838ee99f9bc2db66bb2e775039d2cb2e7924f Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-29NAT: Remove old SNAT API (VPP-1070)Matus Fabian1-10/+10
Change-Id: I3d936d456ee27b2e0857843295efb60a9f2d0be7 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-11-29VOM: logging, populate and stats fixesNeale Ranns22-251/+372
logging: allow a client to register a callback handler to recieve log messages that way the client can maintain a correctly sequenced log populate: fix the creation of interface and the setting of the handle stats: the reset promise idea is not defined behaviour. Use an eanble/disable command pair Change-Id: I347720bb65df2874c7619e722d593bc863ee2bf1 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-27VOM: favour make_sharedNeale Ranns13-45/+49
Change-Id: I0c5e198049d510f3b3f9a6aefe49c315449768e3 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-25VOM: handle null for iterator in dump cmdNeale Ranns1-2/+21
Change-Id: I2e8743d70a8d8604d370218a73d5f37c2f7c4617 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-24VOM: Additions to allow uses to UT applications that use VOMNeale Ranns51-295/+676
- find object by key - compare objects Change-Id: I36ec8612be9482bcef7ceced2a59f7403f77b3e8 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-22VOM: stats: Associate stat obj to interfaceMohsin Kazmi5-25/+71
Change-Id: Id8b159dd72b92798538a32fe570fb0038d742ef2 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2017-11-20Have PAPI find its API definition filesChris Luke1-5/+140
- Add a basic heuristic to have vpp_papi search in several places for the JSON API files. - It's clever enough to work out the path to these files from within several places in the source tree, falling back to the system location as a last resort. Change-Id: I1f823588e5aa0064d545ce4206ab29dbdedc4c7f Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-11-20nowhere to set read_timeoutdongjuan1-2/+2
Change-Id: I8a16f2ba884451ca8028adb91383d57fdf1d9d50 Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2017-11-17VOM fixes and logger improvementsNeale Ranns7-30/+47
Change-Id: I5e3fa5e098a8ea26dbc3d3a1dc064e3507e33d8e Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-15VOM: interface's handle() retreives from singular instanceNeale Ranns2-0/+11
Change-Id: I262f2113f5805c0f89b615a0383efa8520184dd1 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-15VOM: interface RD update reconfigures L3 bindingsNeale Ranns4-21/+82
Change-Id: I273e1ea28c3c146e4a88d031c790c1cc56dccf00 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-14VOM: bridge-domain learning mode and route help commandsNeale Ranns8-7/+125
Change-Id: I2fa219d6530f1e7a3b8ae32d35a0c60ba57c5129 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-11-11Handle CPU flags from autotools projectDamjan Marion2-2/+2
Change-Id: Id085c1e3cbc7bf03df02755f9e35896cdb57e9e3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-10Break up vpe.apiNeale Ranns2-2/+2
- makes the VAPI generated file more consumable. - VOM build times improve. Change-Id: I838488930bd23a0d3818adfdffdbca3eead382df Signed-off-by: Neale Ranns <neale.ranns@cisco.com>