aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-08-02Change module name to go.fd.io/govppHEADv0.6.0-alphamasterNathan Skrzypczak299-944/+944
We are changing the module name from git.fd.io/govpp.git to go.fd.io/govpp to make repository migration easier. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Idd6e0d583a92f6b82fe9adeffd026cd6b856038b
2022-08-02Set current version to 0.6.0-devNathan Skrzypczak2-3/+7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: I38df5efcb666f64301fecd69f82210b091deef96
2022-07-29GoVPP release v0.5.0v0.5.0Nathan Skrzypczak129-129/+145
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ie8586f85c0d8283ab2783240b1a460f29e627d8d
2022-07-29Fix stats API for vpp 22.06Lukas Vogel4-8/+9
VPP changed the error counters to be simple counters in https://gerrit.fd.io/r/c/vpp/+/35640, that broke goVPP stats extraction. This was partially fixed by https://gerrit.fd.io/r/c/govpp/+/36085, however this fix didn't make it work completely. There were some leftover conversions from dirType (== int) to StatType (== string). Unfortunately the Go compiler does not flag those, they would however be catched by go vet. The fixes that are done here makes the stats extraction work for us partially: We noticed that error counters are now of type symlink and unfortunately updating a stat dir that contains symlink counters doesn't work correctly. CopyEntryData, that is called when initializing the dir, correctly handles the symlink counters. But updateStatOnIndex simply ignores symlink counters because `dirType != entry.Type` will hold. We didn't really figure out how to correctly handle this so this would need to be picked up by someone who is more familiar with the code. For now we work around this limitation by not using the GetErrorStats API and instead manually read the dir everytime we want to access error counters. Co-authored-by: Sergio Gonzalez Monroy <monroy@anapaya.net> Change-Id: I322133f362e782fea3e8a2be70967a796ba87b75 Signed-off-by: Lukas Vogel <vogel@anapaya.net>
2022-07-25Fix statseg v1 error offset zeroNathan Skrzypczak1-4/+1
This is the same fix as [0] for the statsseg v1 implementation [0] https://gerrit.fd.io/r/c/govpp/+/36442 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ie22956152a83abe6371fe89482a66f2253b8493c
2022-07-25Fix statseg v2 error index zero id skipDmitry Valter1-1/+1
Don't skip zero id error counters as it's not a pointer. Type: fix Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru> Change-Id: I907bb9f110d8bf5db6326ae654206ddc83187044
2022-06-17add sknat to committersNathan Skrzypczak1-6/+7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ibc2b6db8502c964a0e9b9cb00bd87e75e67f6273
2022-05-30binapi: remove internal/testbinapiNathan Skrzypczak305-189999/+7
This patch is a proposal to remove the necessity to version two versions of the generated api. We would rely on `./binapi/` for 'internal' logic, making the dependancy on VPP a bit stronger, but removing a folder and a .json file we don't upgrade regularly. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: I99063ed571eb193271b3cda805d692155ac90f61
2022-05-30Update generated binapi to v22.02 & makefile changesNathan Skrzypczak405-6518/+9130
This patch does some small updates to the Makefile. * `make gen-binapi-from-code` is removed, and moves to `gen-binapi-local` * `make build` is patched to build cmd & examples * `make binapi-generator` to build the api-generator without other binaries, as they typically require its output to build. * `make gen-binapi-local` runs the locally built binapi-generator to update the local bindings. It expects ${VPP_DIR} to be set and to point to a local vpp repository checked out with the right version * `make gen-binapi-internal` runs the locally built binapi-generator to update the bindings in `internal/testbinapi/binapi2001` Regarding VPP, notable changes when moving to v22.02 are : - ControlPing moved from vpe to memclnt - CliInband went from vpe to vlib Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa
2022-05-30test: Fix test dependancyNathan Skrzypczak3-21/+109
This patch updates the go.mod with missing dependancies for running `make test` It also addresses an issue in `proxy/server.go` where make test would complain of the double newline at the end of the message. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ia2b00ffa9ecc398ee0ff6af165141f04b0025d61
2022-05-19Regenerate 'types' with APIFile/APIVersion/CrcVersionEd Warnicke18-0/+108
Signed-off-by: Ed Warnicke <hagbard@gmail.com> Change-Id: I4ca28677573f6479258a67e3699b0d92bf18b009
2022-05-19Generate APIName/APIVersion/CrcVersion for 'types'Ed Warnicke1-8/+6
Signed-off-by: Ed Warnicke <hagbard@gmail.com> Change-Id: I661eb993c10f73909e21dcde73466d92ff54b52d
2022-05-19Regenerate binapi from DockerfileEd Warnicke127-127/+127
Signed-off-by: Ed Warnicke <hagbard@gmail.com> Change-Id: Ia9364507e55498fa6ed1315ea4d115817f98ec44
2022-05-19Add Dockerfile to ease generation of binapi/Ed Warnicke2-0/+59
Signed-off-by: Ed Warnicke <hagbard@gmail.com> Change-Id: I2ca5fce1717c798348bb128d5252050cf78b0df2 Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2022-05-16go.mod: Update for go1.18 & bump to go 1.13Nathan Skrzypczak2-18/+4
This patch updates the go.mod & go.sum as the build was breaking with go1.18. It also bumps the required go version to 1.13 as -trimpath was introduced in 1.13 only. Tested `make build` with : - go 1.13 - go 1.17.10 - go 1.18.1 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: I8790e9b46757cb740c69042f6b72419e960f5d9a
2022-05-05support error counters also as normal countersVladimir Lavor5-72/+73
https://gerrit.fd.io/r/c/vpp/+/35640 Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: I91820bb15655e7b309af814c659eb9f5e7cd08a4
2022-05-05fixed data race in core.Connection.Close().Sergey Elantsev2-5/+32
The problem is triggered by the following events: 1. VPP stops. 2. core.Connection.healthCheckLoop() detects it and calls disconnectVPP(), which does close healthCheckDone channel for the first time. At this point Connection becomes unusable - re-entrance to connectLoop() will return immediately because of a closed healthCheckDone channel. But, the race is that connection may set c.vppConnected = 1 before terminating the connect loop. 3. User calls Connection.Close(), who seed c.vppConnected = 1, and tries to close already closed channel, which leads to a panic. This commit fixes this race by telling disconnectVPP() whether it is a terminal stop triggered via Close(), or a temporary one from connectLoop(). Change-Id: I555149da35ca3dc2b606bad59f2101266c0ef6b9 Signed-off-by: Sergey Elantsev <elantsev.s@yandex.ru>
2022-05-02read memory stats from per-heap coutersVladimir Lavor2-16/+63
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: Ic4a500ea83b392eb9720575d95597bc48b44c759
2022-03-17Properly close the socket watcherVladimir Lavor1-0/+1
Signed-off-by: Vladimir Lavor <vlavor@cisco.com> Change-Id: I40665a0413f273e52bcaeaabacdf1bd55afcfd67
2022-01-31connection: prevent channel ID overlapLukas Vogel3-11/+27
When creating a new channel and the channel ID wraps around, make sure to not re-use a channel ID that is still in use. Re-using the channel ID usually means that the connection health check will stop working and other things might break as well. Also rename maxChannelID to nextChannelID and use a lock to guard access instead of using an atomic. The lock does anyway need to be acquired because to put the entry in the map. This commit was inspired by the following PR on Github: https://github.com/FDio/govpp/pull/14. Change-Id: I8c1a4ca63a53d07a6482b6047a3005065168c0b4 Signed-off-by: Lukas Vogel <vogel@anapaya.net>
2022-01-17Begin development for v0.5.0Ondrej Fabry2-3/+9
Change-Id: I612aca78176a9195db05387291335e5a12791f40 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2022-01-17Prepare release v0.4.0v0.4.0Ondrej Fabry128-129/+129
Change-Id: I5e3cefc0e8b3eda4beacd2aab680a723e78884d6 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
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>