Skip to content

Conversation

ak-dhananjay
Copy link

-- Updated GoVPP version to 0.8.0.
-- Merged alkira/dev branch into new version of govpp.

ondrej-fabry and others added 30 commits June 16, 2020 10:40
This commit includes:

Features
- optimized [socketclient](adapter/socketclient) adapter and add method to set client name
- added list of compatible messages to `CompatibilityError`

Fixes
- `MsgCodec` will recover panic occurring during a message decoding
- calling `Unsubscibe` will close the notification channel

Other
- improved log messages to provide more relevant info

Examples
- added more code samples of working with unions in [union example](examples/union-example)
- added profiling mode to [perf bench](examples/perf-bench) example
- improved [simple client](examples/simple-client) example to work properly even with multiple runs

Dependencies
- updated `github.com/sirupsen/logrus` dep to `v1.6.0`
- updated `github.com/lunixbochs/struc` dep to `v0.0.0-20200521075829-a4cb8d33dbbe`

Change-Id: I136a3968ccf9e93760d7ee2b9902fc7e6390a09d
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: I5a6abb68b9d058866f94818169300e5c2fc43895
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: Idd76c7f19d952939caf153928ac60175845078ff
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: I2698e11b76ff55d9730b47d4fee990be93349516
Signed-off-by: Ondrej Fabry <[email protected]>
* Many aliases removed, aliased types reference original types via import instead
* Added various helper methods for simpler conversion between go and vpp types

Change-Id: I7999ac8d524cece4da03e6447b13421659765095
Signed-off-by: Vladimir Lavor <[email protected]>
README.md needs further cleanup

Signed-off-by: Dave Barach <[email protected]>
Change-Id: Iee170f909b57548d53f8a5fa67cd387652ccac99
* added example showing management of 2 VPP instances with different sockets
* updated changelog

Change-Id: I531eda8f055cc2a24ba2210217e70a8ad42a47c0
Signed-off-by: Vladimir Lavor <[email protected]>
* use generated Marshall/Unmarshall for socket client connection
  messages instead of the generic wrapper

Change-Id: Ie1049e080630dbc60085debc6875e17962e93a0e
Signed-off-by: Vladimir Lavor <[email protected]>
vpp cleans up socket clients when the socket closes. I verified that
sending a correctly-marshalled sockclnt_delete message results in
duplicate close complaints.

The marshalling code wasn't right - the (important) client_index field
is in a non-standard position - and there's no point in sending
a message we don't need to send.

Signed-off-by: Dave Barach <[email protected]>
Change-Id: Ia32980b08a99cc878835f5db21f64de391759fa4
- 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 <[email protected]>
This change allows informing client about the current
VPP state in more detail.

* In case the VPP is overloaded but keeps its configuration,
  client received 'NotResponding' event message
* If the VPP process dies (the socket is closed), the client
  receives 'Disconnected' event message

Additional fix: event messages are discarded if the buffer is
full. This could cause GoVPP to hang after some time in case
the client was not receiveing events.

Change-Id: I94a4647f6643f1d97bf52e5d7996d70229b0577d
Signed-off-by: Vladimir Lavor <[email protected]>
- fixed allocating byte slices before copying decoded data
- simplified encoding functions
- several minor improvements

Change-Id: I6669424b89eb86333805cb1b57e4551169980cc2
Signed-off-by: Ondrej Fabry <[email protected]>
- list prerequisites in README
- avoid calling go list by hard-coding module path

Change-Id: Ib8af1934f55b7e112a8124a20f1f4d39ce651133
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: I5db0460f375c9e34bc09170a310d52e1a619ed34
Signed-off-by: Vladimir Lavor <[email protected]>
Signed-off-by: Nathan Skrzypczak <[email protected]>
Change-Id: Ida098149bdf23dccafb7b1f2ac2bb83f21f918c9
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Change-Id: I6c8873b766df6ea866196a9b96a48ebd08689772
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 <[email protected]>
Change-Id: Iff7965388a74ecd21af80f10b5a59d4ed8da6340
* Compatible with stats v2 API
* Compatibility with stats v1 was persisted
* 19.04 (legacy) dropped

Change-Id: I91a3ab0c007fed6d972eee01d7caf69af29305d1
Signed-off-by: Vladimir Lavor <[email protected]>
Change-Id: I8f965a0758c4b7459f27a46c095dad232e331032
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: I0b5fbbd98fc1bb6fc9d86ed81cb1b3f9755fed67
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: Id6f6bc3de5b9ff7230108a4171810207c94f9a38
Signed-off-by: Ondrej Fabry <[email protected]>
Change-Id: If77b7b37ae736fdf21f4c337350905480e6fb011
Signed-off-by: Vladimir Lavor <[email protected]>
This change fixes calculated byte size of the union
composed from another union(s).

Change-Id: I596a3c2a585cc42570b1d00dab3a5ad4993dabfa
Signed-off-by: Vladimir Lavor <[email protected]>
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 <[email protected]>
Change-Id: I3290bbc8cbdfb634533ceb4606e4708b1a386dce
Signed-off-by: Vladimir Lavor <[email protected]>
Change-Id: I816b4802cb5fc46239f6db0480fa4cf3645fe2f0
Signed-off-by: Ondrej Fabry <[email protected]>
* 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 <[email protected]>
* This should fix GoVPP build

Change-Id: If53177253ad4a6616860aad50ce54e5944bbea6e
Signed-off-by: Vladimir Lavor <[email protected]>
ondrej-fabry and others added 22 commits June 5, 2023 12:03
* No error for messages with newer version in progress

Signed-off-by: Ondrej Fabry <[email protected]>

* Refactor resolving VPP API input

- add support for tarball archives
- improved linter
- several minor enhancements

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix issues

Signed-off-by: Ondrej Fabry <[email protected]>

* Update go.mod

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix issues reported by linter

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix issues

Signed-off-by: Ondrej Fabry <[email protected]>

* Improvements for lint and diff commands

Signed-off-by: Ondrej Fabry <[email protected]>

* Update CLI doc

Signed-off-by: Ondrej Fabry <[email protected]>

* Add new lint rule and improve message statuses

Signed-off-by: Ondrej Fabry <[email protected]>

* Regenerate files for change of status info

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix reported issue

Signed-off-by: Ondrej Fabry <[email protected]>

* Only consider versions starting with `v`

Signed-off-by: Ondrej Fabry <[email protected]>

* Move vppapi commands

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
* binapigen: initial support for counters and paths

Signed-off-by: Vladimir Lavor <[email protected]>

* defined explicit types for elements and paths

Signed-off-by: Vladimir Lavor <[email protected]>

* satisfy linter

Signed-off-by: Vladimir Lavor <[email protected]>

---------

Signed-off-by: Vladimir Lavor <[email protected]>
Co-authored-by: Ondrej Fabry <[email protected]>
Signed-off-by: Ondrej Fabry <[email protected]>
Signed-off-by: Ondrej Fabry <[email protected]>
Signed-off-by: Ondrej Fabry <[email protected]>
* Improvements for GoVPP CLI

- added new linter rule MessageSameStatus
- fixed issue with cache of cloned repository
- added option --targz for vppapi export command
- fixed issues with color mode when not using terminal
- added option to vppapi diff command to include comment differences
- added --paths option to filter out specific API files or paths

Signed-off-by: Ondrej Fabry <[email protected]>

* Remove test

Signed-off-by: Ondrej Fabry <[email protected]>

* Resolve review feedback

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
* Update test.yaml

Changes:
- add VPP 23.06 and remove VPP 22.02 from integration tests
- update Go to 1.20

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix Go version variable type

Use string instead of number (it converted `1.20` to `1.2`) to specify Go version

Signed-off-by: Ondrej Fabry <[email protected]>

* Revert branch push trigger to master only

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
- add more command examples and format with color
- resolve build date as mod time of binary by default

Signed-off-by: Ondrej Fabry <[email protected]>
* Regenerate binapi for VPP 23.06

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix binapi-generator version for check

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix compatibility checking in examples

This commit fixes an issue where examples would fail for older versions of VPP which did not have some of new messages in interface API.

- improved debug log message when check fails
- skip fatal exit if interface API does not pass check in examples

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
* Update README.md

Signed-off-by: Ondrej Fabry <[email protected]>

* Update README.md

Signed-off-by: Ondrej Fabry <[email protected]>

* Update TROUBLESHOOTING.md

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
* Add integration tests for trace functionality

Signed-off-by: Ondrej Fabry <[email protected]>

* Add README for integration tests

Signed-off-by: Ondrej Fabry <[email protected]>

* Skip old trace tests

Signed-off-by: Ondrej Fabry <[email protected]>

* Update README.md

Signed-off-by: Ondrej Fabry <[email protected]>

* Update README.md

Signed-off-by: Ondrej Fabry <[email protected]>

* Update README.md

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
* fix handling of EAGAIN reply return value

The new VPP binapi for stream can return a reply with the return value EAGAIN. This value signals, that VPP ends the transmition because the call has taken to long and is possibly blocking the master thread.
The client is then expected to repeat the request, optimally providing the cursor to the last received data.
Sofar, the implementation only returned an error without providing the cursor to the last received data point (in older versions, e.g., v0.4.0, govpp does not return an error and just accepts the incomplete response).

* Revert converting retval field to error

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
Co-authored-by: Fabio Streun <[email protected]>
* Bump version to v0.8.0

Signed-off-by: Ondrej Fabry <[email protected]>

* Update ci.yaml

Signed-off-by: Ondrej Fabry <[email protected]>

* Update ci.yaml

Signed-off-by: Ondrej Fabry <[email protected]>

* Fix linter issues

Signed-off-by: Ondrej Fabry <[email protected]>

* Change default config for yamllint

Signed-off-by: Ondrej Fabry <[email protected]>

* Update CI

Signed-off-by: Ondrej Fabry <[email protected]>

* Update release date for v0.8.0

Signed-off-by: Ondrej Fabry <[email protected]>

---------

Signed-off-by: Ondrej Fabry <[email protected]>
- from 'git.fd.io/govpp.git' to 'github.com/alkiranet/govpp'
+ accept an interface for NewPacketHandle makes it easy to unit tests functions which use NewPacketHandle without interacting with the lower level memif structure.
+ used in alkiranet/csn/services/memif-receiver service
@ak-dhananjay
Copy link
Author

Pending Items:
-- import module path fixes

-- fixing failed test as well.
@ak-dhananjay
Copy link
Author

Fixed lint warning & tests.
Ready for Review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.