summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-01-17Update READMEOndrej Fabry2-71/+72
Change-Id: Id070a39c871a1d428523cbf2eec58dcb51e2c14a Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2022-01-14doc: Update READMEOndrej Fabry3-161/+196
Change-Id: I577ec64c78fe5684fcef109c216810e5fe6b4009 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2022-01-11Changelog for release 0.4.0Vladimir Lavor1-25/+79
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: I1a260fae5633783624f28a658ebf72977effdf76
2021-11-29Add "FromIP" helper for addressesAloys Augustin4-2/+71
Change-Id: Ib34b84b8267c95ce3bacef4806cc52a6c7c24f05 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-10-19Fix memory leak in health checkVladimir Lavor1-51/+56
1. On connection disconnect, health check loop ends immediately and independently on probe interval setup 2. Proper resource cleanup On disconnect, health check terminates itself with a delay based on the probe interval. It causes memory usage going up if AsyncConnect() & Disconnect() are called in a loop. Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: Ibcdfec9d2d7736f9390e21039d9a917228114273
2021-09-27core: close Stream after Connection.InvokeVladimir Popov1-0/+1
Fixes core.Stream leaking on every core.(*Connection).Invoke() https://lists.fd.io/g/govpp-dev/topic/govpp_is_leaking_channels_on/85836420 Signed-off-by: Vladimir Popov <vladimir.popov@xored.com> Change-Id: I8d5bcb3c3aa40ccda3fb249ee80bb82809f284b1
2021-09-08binapigen: enhanced vpp version resolutionVladimir Lavor1-2/+2
While assuming whether the VPP is installed (in order to retrieve a version), the generator looks directly for the VPP executable instead of the API path. This allows to get version if generated from any directory. Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: I147e4fba49c102bf5f1cbcf2784c212479dc15b6
2021-09-07Refactoring and fixesmhalaj1204-161/+911
* refactor creation of new channel * add missing closing of created streams * correct documentation regarding thread safety of stream Signed-off-by: mhalaj1 <matus.halaj@pantheon.tech> Change-Id: Ic601efff298fcbdecaafab83fa236253af69de21
2021-08-26regenerate binapimhalaj1170-3875/+26034
Signed-off-by: mhalaj1 <matus.halaj@pantheon.tech> Change-Id: I9bb6a5ca00aa542128bde0bfbbba7b57b9f16ed2
2021-08-10proxy update to vpp 20.05mhalaj13-19/+192
Signed-off-by: mhalaj1 <matus.halaj@pantheon.tech> Change-Id: I1c7b11950756d0fe789eb7badc3e883c12826671
2021-07-27https://jira.fd.io/browse/GOVPP-21Kusakabe Si2-1/+19
Signed-off-by: Kusakabe Si <linux@kskb.eu.org> Change-Id: Ib1761e3b93dae70680646ce7fdd78a1168fd0b9f
2021-07-22feat: api-traceVladimir Lavor8-55/+798
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: I7de363dfb3930db13a30e97f154c57d75c07f01c
2021-06-24https://jira.fd.io/projects/GOVPP/issues/GOVPP-20Kusakabe Si1-0/+5
Signed-off-by: Kusakabe Si <linux@kskb.eu.org> Change-Id: I14ae5071414d945a45d3d104390982085f3109ab
2021-06-15Fix encode/decode for []boolVladimir Lavor1-8/+4
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: I6649d6825a208b9cd936bf8f3b80e69ff84f8b74
2021-06-01statsclient: fix retrieving stats typeVladimir Lavor2-4/+10
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: Id51fa03ac69a2fc29aca5ff644178cdfcabe523c
2021-05-26statsclient: added symlinksVladimir Lavor6-25/+127
Symlink support based on https://gerrit.fd.io/r/c/vpp/+/31636 Added new stat types `CounterStat` and `CombinedCounterStat` which represent simple/combined value of a single item (interface, node) as a array of values by workers. Example: /if/names NameVector [local0 tap0 tap1] /if/ip6 SimpleCounterVector [[0 9 0] [0 25 3] [0 0 60] [0 0 0]] /interfaces/tap0/ip6 SimpleCounterVector [[9] [25] [0] [0]] /interfaces/tap1/ip6 SimpleCounterVector [[0] [3] [60] [0]] Field `Symlink` added to StatEntry to mark symlink stats. For stats v2 only Change-Id: Iadc825f3c42b05bfc9a91462dba8a0b0068c7cd6 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-05-05statsclient: allow index as patternVladimir Lavor9-198/+307
* ListStats() returns stats identifiers containing the stat name and index * New method PrepareDirOnIndex(indexes...). Instead of the name filter it does not browse through all available indexes * Stats example shows how to get the last epoch value (added "e" or "epoch" command) Change-Id: Ibb15090fb0dfdb7f9b0ecf8ac07a5eb9a9ace8f8 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-04-22added api message optionsVladimir Lavor3-9/+62
In case the API message contains option of type deprecated or in-progress, the information is displayed in the generated code in a form of additional comment: // InProgress: <info> // Deprecated: <info> In case the <info> is not provided, a generic message is shown. Possible future use to automatically search whether such messages are in use. Change-Id: Icf87cc9a2fe6bf31f7555320255c9f0736add6e1 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-04-20Recognize stat_dir_type_emptyVladimir Lavor2-0/+11
Do not to handle empty stats directory as unknown. Empty dir's value is always treated as zero. Change-Id: I40a3829675c5b7c9da80ceaa7e2d0a87fe02dc7c Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-04-15fix INFO.yamlVladimir Lavor1-8/+4
Change-Id: Id18086b2d1df911cdc5d0092e48fd6034ddc414e Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-04-07Add statsclient options and fix wait for socketVladimir Lavor2-11/+46
Change-Id: Ib5674fee5862a2b16f4b0044b6f6af533a7b6b33 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-03-19Fix panic during disconnectionAlexander Demidenko1-8/+11
Sometimes there are situations when the callback is called during the processing of the disconnect. To avoid problems with races (for example, when using race-detector), use atomic pointers. Signed-off-by: Alexander Demidenko <hurd@yandex-team.ru> Change-Id: Ic825872ac620d68a191bc88889a096b15ea57464
2021-03-03Provide error counters per worker for statsclientVladimir Lavor7-16/+33
Instead of a single value, the ErrorCounter now contains an array representing couter values per workers. Change-Id: I2b869e5b228bcb3e155b1fef08a4cd00e7d2e16a Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-02-23Added asynchronous connection for stats socketVladimir Lavor4-57/+195
The stats socket now allows an option to connect asynchronously in the same manner as the api socket connection. New method AsyncConnectStats returns a channel where notificaitons of type ConnectionEvent will be sent. Fixed the stats reconnect procedure which sometimes failed to re-eneable the connection. Change-Id: I0bdb19f0d57e3a1ea259b8b1ba0a5e5fa49a09db Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-02-02binapigen: added enumflags typeVladimir Lavor8-892/+2287
Change-Id: I2f46504bd05862e415dab518fad349d08aedf919 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2021-02-01Rework test for binary API union sizesVladimir Lavor4-52/+269
The test now generates various unions from union.api.json and tests correct sizes of generated types. Change-Id: Ifaf18a8ce650e71a8ca8b2d5cfb9d7eed2d757c6 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-12-21Remove socket warnings from client adaptersOndrej Fabry2-120/+58
Change-Id: I5e72df39c0e4ba4f0a70d561d7f9b220b4e72a4c Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-12-14Added INFO.yamlVladimir Lavor1-0/+56
Change-Id: Id63f1516678cddfef82570958be7e1871ead2c45 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-12-03Decode message context using the message type onlyVladimir Lavor3-34/+15
In order to prevent potential future issues, the method returning message based on its ID but ignoring its package was optimized. Change-Id: I12aa2b243f32f38cb3dbc7731613c7ed9fc66539 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-12-03Fixed incorrect message error in the stream APIVladimir Lavor8-86/+137
The message package is passed to the stream object and used to evaluate correct reply message type Change-Id: I2c9844d6447d024af1693205efd5721e2f89f22d Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-11-04Update changelogVladimir Lavor2-5/+9
Change-Id: I08f5ba1fb5ec02717e5715447837ca3b75fa894d Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-10-30Stats API: added GetMemory()Vladimir Lavor8-13/+68
Retrieved numbers relate to the statseg heap. Change-Id: I72750183db3524481918c71c993b39e65c28ddb6 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-10-30Fix encoding for float64 and generate conversion for TimestampOndrej Fabry7-26/+142
- fixes encoding/decoding of float64 - uses little endian (contrary to all other types) - generates helper methods for vpe_types.Timestamp type - adds usage code to simple-client and binapi-types examples Change-Id: I2e83eee0629eb67964049406c50c7ee0a692ccaf Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-10-23Fix panic for Retval fields with uint kindsOndrej Fabry1-1/+9
Change-Id: I5e588d48461a0cf551552a5068218a58920e52aa Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-10-15Stream API optionsVladimir Lavor6-98/+382
* Stream API uses the same default values as the Channel API * request size, reply size and reply timeout settable using functional options * Added stream client example to show the stream API usage Change-Id: Id599134a7f520fc19f7d770ed5e3de74a7936829 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-10-13Generate VPE HTTP handlerVladimir Lavor3-1/+247
* This should fix GoVPP build Change-Id: If53177253ad4a6616860aad50ce54e5944bbea6e Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-10-10Updated multi-vpp exampleVladimir Lavor2-90/+273
* In addition to configuring multiple VPPs it now also shows how to connect and read stats from several VPPs at once * Added a brief readme * More readable example log output * May run in a loop Change-Id: Ifa5d54e954557e7b6569826a48c526185ec751a3 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-10-02Check retval value and convert to error in generated RPC client codeOndrej Fabry299-13337/+882
Change-Id: I816b4802cb5fc46239f6db0480fa4cf3645fe2f0 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-10-01Updated changelog for v0.4.0Vladimir Lavor1-6/+24
Change-Id: I3290bbc8cbdfb634533ceb4606e4708b1a386dce Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-09-22Reload stats socket when VPP restartsVladimir Lavor1-25/+100
The current implementation loads the stats socket and maps it to the memory. If VPP restarts, the socket file is recreated while the mapped data remain unchanged, silently failing since it does not get any updates. This change adds socket file monitoring which reconnects and remaps the socket file in such a case. Change-Id: I061f7400410f4dfe5de66ba7844c4ae1567bbcbe Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-09-18binapigen: fix union sizeVladimir Lavor112-468/+404
This change fixes calculated byte size of the union composed from another union(s). Change-Id: I596a3c2a585cc42570b1d00dab3a5ad4993dabfa Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-09-07Remove unnecessary allocationVladimir Lavor4-52/+51
Change-Id: If77b7b37ae736fdf21f4c337350905480e6fb011 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-09-07Fix decoding messages of identical types in streamOndrej Fabry1-17/+24
Change-Id: Id6f6bc3de5b9ff7230108a4171810207c94f9a38 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-09-04Increase default health check parametersOndrej Fabry1-2/+2
Change-Id: I0b5fbbd98fc1bb6fc9d86ed81cb1b3f9755fed67 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-09-04Update VPP config warnings and change log level in proxyOndrej Fabry3-4/+4
Change-Id: I8f965a0758c4b7459f27a46c095dad232e331032 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-09-04Stats APIv2Vladimir Lavor7-700/+1045
* Compatible with stats v2 API * Compatibility with stats v1 was persisted * 19.04 (legacy) dropped Change-Id: I91a3ab0c007fed6d972eee01d7caf69af29305d1 Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2020-09-03Improve doc & fix import orderingNathan Skrzypczak206-228/+604
This also updates /binapi and adds a new make command to generate api files out of a local vpp repo clone Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Iff7965388a74ecd21af80f10b5a59d4ed8da6340
2020-09-02fixed data race in mock vpp adapterSergey Elantsev1-1/+4
There was a race in reading VppAdapter.mode in SendMsg and writing in MockReply/MockReplyHandler/MockReplyWithContext. All these *Reply* methods hold VppAdapter.repliesLock, so this fix uses this lock to safely read the value of a mode field. Signed-off-by: Sergey Elantsev <elantsev.s@yandex.ru> Change-Id: I6c8873b766df6ea866196a9b96a48ebd08689772
2020-08-28fix(binapigen): Fix name conflict for union field constructorsOndrej Fabry2-8/+19
PROBLEM Issue discovered in flow_types.api on master (20.09-rc0), where generator encountered inconsistent naming for union type Flow, causing name conflicts with their constructors. SOLUTION Previous cases of union types (address, punt) both contain suffix "Union", thus generator now adds "Union" suffix it is not defined. This way we won't break previously generated code for users. Change-Id: Iffadc167774d66d8416fe36485782bb68ca2a70d Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-08-25Binapi generator: improved file inputVladimir Lavor5-29/+44
In addition to the standard file name input (for example "vpe"), binary API generator now again accepts full file path like "/usr/share/vpp/api/core/vpe.api.json" as an input direcotry or argument. Change-Id: I591b5d26e7f101cdcc4af64d3bdabaab48b5b2ef Signed-off-by: Vladimir Lavor <vlavor@cisco.com>