summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-11-05Begin development of next release 0.3.0Ondrej Fabry14-135/+174
- update info in package ./version - update to Go 1.13 - regenerate ./examples/binapi for latest VPP: 19.08.1-release - clean code in proxy - refactor Makefile Change-Id: Ibf5c2682c2f4b3cbbea4aa1e35d3f02175d40a9b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-11-04Update changelog for release 0.2.0v0.2.0Ondrej Fabry2-1/+18
Change-Id: Ifed742e75a48d065987d945c8667af2bdedb876a Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-10-30fix data races in proxy serverMatus Mrekaj10-126/+442
Signed-off-by: Matus Mrekaj <matus.mrekaj@pantheon.tech> Change-Id: I932d560548ee816e28683243a7318a2a7fbbb24a
2019-10-17add missing implementation for proxyMatus Mrekaj3-13/+88
Signed-off-by: Matus Mrekaj <matus.mrekaj@pantheon.tech> Change-Id: I1ab9efb9e575e7993501e7774628cbb60d16ec43
2019-10-15fix: Add guards for converting Stat interface (might be nil)Ondrej Fabry1-28/+33
Change-Id: I54cd9ca6fb6607a70031ba5e6318a9ea58db7e6c Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-10-10Introduce proxy for VPPOndrej Fabry4-0/+520
- proxy server defines RPC service for proxying binapi/stats to VPP - use cmd/vpp-proxy for proxy server/client Change-Id: I6e698e166ecf6db7109ae5adf8a93f308d3f3f2a Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-10-03Optimizations for statsclientOndrej Fabry17-680/+1286
- this dramatically improves performance for stats data collection - memory allocation is now done only when stat dirs change - updating prepared stat dir does not need to allocate memory - created integration test for testing stats client - added NumWorkerThreads and VectorRatePerWorker to SystemStats - added ReduceSimpleCounterStatIndex, ReduceCombinedCounterStatIndex for aggregating specific index Change-Id: I702731a69024ab5dd0832bb5cfe2773a987359e5 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-09-09add MockClearReplyHandlers() api for mock vpp adapterRavi Raju1-0/+10
Change-Id: I12285c77c9cf09a24c957a777b26ae54f082f317 Signed-off-by: Ravi Raju <ravir@employees.org>
2019-09-09Fix compatibility with latest master (20.01-rc0)Ondrej Fabry13-574/+1274
- fixed generator for new string types - update simple client example - regenerate examples binapi for VPP 19.08 Change-Id: If4fe78c130d95641f35f75cd0262b35b032acaf8 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-09-09Use new default binapi socket with fallback to legacyOndrej Fabry4-23/+61
Change-Id: I1a6839e3bbb8d599fcbdbc2b1aff7c81f7d263c9 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-08-08Add tag beyond18.10 to prevent build stat_clientRinat Baygildin1-1/+1
There is a problem to use upstream govpp with vpp 18.04 because of lack stat_client.h file. Build tag allows to exclude stat client from old vpp versions. Signed-off-by: Rinat Baygildin <bayrinat@yandex-team.ru> Change-Id: Ic39029b0c4577f88ff8796dfd14e6a2696f85f4c
2019-08-02Migrate to modules, refactor Makefile and use Travis for CIOndrej Fabry442-178210/+319
- migrate to Go modules and remove vendor - refactor Makefile - add version package and store version - split extras from the rest - use travis for CI Change-Id: I81b35220653b0f7c9a0fcdd4c527d691ec1e96c1 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-08-01Fix unit testsOndrej Fabry3-143/+35
Change-Id: I49e0ec8420cf2563b77ec2b5a9cf9674286d5e5d Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-30Use common logger in core packageOndrej Fabry1-3/+3
Change-Id: If9da8381212273f8f2655d7b0a3077b5ba32921f Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-19Print info for users to stderr when socket files are missingOndrej Fabry6-25/+68
Change-Id: Ibdbfcb78b05cf80945a93ed424a7a2a03b6ea06d Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-10Fix socketclient for VPP 19.08Ondrej Fabry5-89/+109
- in VPP 19.08 the socket type has changed to STREAM and data has to be writtento VPP with single flush, otherwise msg might get mixed with next header and cause VPP to stop responding - this also fixes WaitReady for socketclient and vppapiclient Change-Id: I022724c0c09c9b92d4c695d1cf2be15994fff717 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-03Add CHANGELOG and update READMEv0.1.0Ondrej Fabry2-59/+73
Change-Id: I2d6f5eacae0cc71e659f904aa604ff0519daa79c Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-03Fix error counters for VPP 19.04Ondrej Fabry6-139/+161
Change-Id: I87251362668bbe9a31f52c1b5e9b3ab596f7b2f3 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-02Fix duplicate typesOndrej Fabry1-13/+37
- .api.json input files from VPP now sometimes contain duplicate objects - parsing is skipped if type is already known Change-Id: Ibf28f5baa68f6cfb40aeb75e1bde72241120ac23 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-01Fix reading statsclient entriesOndrej Fabry2-28/+36
- omit entries with empty/invalid names - change log level to debug for invalid entries - remove some excessive debug logs - improve log message when falling back to old stat segment version Change-Id: If9ceae9a42e586172bbec130452fba9dfbab2cd7 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-27Improvements for binapi-generator and support VPP 19.04 in statsclientOndrej Fabry24-1396/+1786
- RPC service client implementation for dumps requests now streams responses - RPC service generation is now enabled by default - examples now allow setting binapi socket address - input dir flag for binapi-generator will recursively look into dirs to support core/plugins in /usr/share/vpp/api - minor improvements in debug logs - add support for VPP 19.04 for statsclient Change-Id: I0939ee3aa6e9f850d073fc5c87aff4ccc56b0d70 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-20Add statsclient - pure Go implementation for stats APIOndrej Fabry9-18/+655
Change-Id: Ia5bab652c6089378697459f477f9060dc7a53e90 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-12Fix parsing API with removed CRC for types and unionsOndrej Fabry11-25/+34
- method GetCrcString() was also removed from DataType interface - fix generated comment for services - fix permissions for created files and directories Change-Id: If0b7a57e01f1128b5ba574fc5ee13b6a7c6aa6fd Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-06Add various generator improvementsOndrej Fabry37-10190/+2391
- generate service implementation for modules - generate conversion maps and String() method for enums - generate module name and version as constants - rename Union_data field to XXX_UnionData for consistency - generate constant GoVppAPIPackageIsVersionN for checking compatibility with API - add example for using service clients - add some documentation to socketclient adapter - cleanup gen.go file used for generating binapi - regenerate binapi with latest VPP release (19.04.1) - change global variables Messages into a function AllMessages Change-Id: Id1ef97764570759eaa3e5a4dc14ecda7a168ee39 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-04Fix union data size for types with enumsOndrej Fabry5-33/+96
- this also fixed proper alphabetical order for struct tags - env var DEBUG_BINAPI_GENERATOR=y can be used to enable debug mode Change-Id: I5b08a696ad2ff2a297872f231f9229cd956ee443 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-31Support for error vectorsOndrej Fabry3-5/+24
- this fixes compilation error for VPP 19.08 and keeps backwards compatibility with previous versions Change-Id: Ib58557a090caa5e8342c0cb21de8af684cb18137 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-27Merge "Add support for field meta data to binapi-generator"Ondrej Fabry3-14/+62
2019-05-27Add support for field meta data to binapi-generatorOndrej Fabry3-14/+62
Change-Id: Id0164d36727d070e395a522000f2e09ee5444bd0 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-21Change default adapter to socketclient and cleanup some logsOndrej Fabry2-16/+15
Change-Id: I16ae8dbb5214e022304f4e8ae60798b370567fc8 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-15Try using different type of unix socket connectionOndrej Fabry1-3/+8
Change-Id: I6abde10043c4ff4d42d15a39cca10f82327d83dc Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-06Fix compilation for VPP 19.01Ondrej Fabry4-189/+252
This commit introduces header files for wrapping vppapiclient library. The stat_client_wrapper.h now uses macro to determine version of stats API. Change-Id: Ife218e0e90742e9a22fd12ca77307fbd0cc7d714 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-23Add comments to provide info about VPP requirementsOndrej Fabry1-3/+3
Change-Id: I116b9c0ab064418940eec82fb1442d30816386d7 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-18Merge "Add buffer pool stats"Rastislav Szabo3-7/+79
2019-04-18Add buffer pool statsOndrej Fabry3-7/+79
Change-Id: I15d1df825b4d4fc760da83d9c878a621936bb6fa Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-18Check if dir ls/dump returns nilOndrej Fabry1-0/+15
Change-Id: I9a0a74f53825fc0255bc664c06e32eaef6c45d82 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-16Fix crash in stats for removed interfaces/nodesOndrej Fabry2-3/+10
Change-Id: I36b4cd2625c7f0c5846fe402be7b2aeece4707f8 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-11Add support for names vector and fill name in interface/node statsOndrej Fabry5-12/+79
Change-Id: I3a6bcb635701c0f00e47d04fce2113e1ac23b67b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-05Split outgoing packet data by 4096 bytesOndrej Fabry1-37/+74
Change-Id: I92e2b60c1460873e890b0e9b6736b5a221742349 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-05Merge "Exposed input_queue_size argument to user"Ondrej Fabry2-7/+19
2019-04-05Exposed input_queue_size argument to userOndrej Fabry2-7/+19
Change-Id: If617c61bab4c5ee8ea41ec17932132050bf5cdba Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-05Fix WaitReady for VPP client adaptersOndrej Fabry2-19/+43
Change-Id: I57d29a819132d4894691e1131b7d79e19c90456e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-04fix govpp, add more checks to makefileVladimir Lavor3-4/+5
Change-Id: Ie118b0c254e5d70e66d5cb4a5f6eb8fa852f0ed8 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2019-04-04socketclient: wait for socket to be createdVladimir Lavor3-15/+62
domain sockets are checked/watched for existence in same manner as shm prefixes also the connection attempts and timeout in between can be configured for async-connect Change-Id: I084a3efaefea10d106866968deab90d3fda77cfe Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2019-03-21Fixup build with golang 1.12Nicolas PLANEL2-6/+6
_Ctype_ direct call are prohibited, use C namespace instead. Change-Id: Ifd77469e15a10ce8381b8308282d549c62f1318c Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
2019-03-20fixup race on ch.reqChanNicolas PLANEL1-4/+1
git.fd.io/govpp.git/core/request_handler.go:37 git.fd.io/govpp.git/core/channel.go:188 Change-Id: I5be8be5e3ca105822ea4bb3b9690938634950d78 Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
2019-03-08Add socketclient implementationOndrej Fabry6-8/+1523
Change-Id: Ibf9edc0e5911d08229ac590b37c5afbc27f424a0 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-02-19Introduce higer-level API for retrieving statisticsOndrej Fabry8-32/+649
- see stats-api example Change-Id: I11d29d32b60d25238e75cb6b86ee34842348ab38 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-02-08Add support for using multiple generated versionsOndrej Fabry15-88/+411
- added CheckCompatibility for checking if given messages are compatible - generating Messages global for easier usage of compatibility check - added ReconnectInterval and MaxReconnectAttempts for reconnecting - added Failed state that is sent after exceeding max reconnect attempts Change-Id: I1062ba453f22657c1a2a31aa64cb103ef1223b0f Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-02-08Generator improvements and cleanupOndrej Fabry25-8163/+348
- generator now supports include-comments flag (as opt-in) - minor code cleanup in binapi-generator - remove obsolete unit tests - flatten examples from examples/cmd folder - introduce constant for checking compatibility in future versions Change-Id: I3545f2ba4b869a3b51d6d0de7e742f3f1e1be392 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-02-07Mock VPP adapter nitbrecode1-1/+1
- change the api reference from api.GetAllMessages() to GetRegisteredMessages() Change-Id: I8ba43b7640f3482e8398dd1e35dd74d71de0fc4e Signed-off-by: Nikos Bregiannis <nikos.bre@gmail.com>