aboutsummaryrefslogtreecommitdiffstats
path: root/core/stream.go
AgeCommit message (Collapse)AuthorFilesLines
2022-08-02Change module name to go.fd.io/govppHEADv0.6.0-alphamasterNathan Skrzypczak1-1/+1
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-01-31connection: prevent channel ID overlapLukas Vogel1-1/+5
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>
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-07Refactoring and fixesmhalaj11-10/+2
* 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
2020-12-03Fixed incorrect message error in the stream APIVladimir Lavor1-1/+11
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-10-15Stream API optionsVladimir Lavor1-16/+42
* 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-09-07Fix decoding messages of identical types in streamOndrej Fabry1-17/+24
Change-Id: Id6f6bc3de5b9ff7230108a4171810207c94f9a38 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-07-17Improve binapi generatorOndrej Fabry1-2/+17
- simplified Size/Marshal/Unmarshal methods - replace struc in unions with custom marshal/unmarshal - fix imports in generated files - fix mock adapter - generate rpc service using low-level stream API (dumps generate control ping or stream msg..) - move examples/binapi to binapi and generate all API for latest release - add binapigen.Plugin for developing custom generator plugins - optionally generate HTTP handlers (REST API) for RPC services - add govpp program for browsing VPP API Change-Id: I092e9ed2b0c17972b3476463c3d4b14dd76ed42b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2020-06-25Introduce Stream - experimental API for low-level access to VPP APIOndrej Fabry1-0/+124
Change-Id: I2698e11b76ff55d9730b47d4fee990be93349516 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>