aboutsummaryrefslogtreecommitdiffstats
path: root/CHANGELOG.md
blob: b99afc73444bc9ee428a2cf6890d18e496ca725f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# Changelog

This file lists changes for the GoVPP releases.

<!-- TEMPLATE
### Fixes
-
### Features
-
### Other
-
-->

## 0.6.0

> _Upcoming_

## 0.5.0

> _28 July 2022_

### Features

- Also generate APIName/APIVersion/CrcVersion constants for the types packages
- Stat segment client fixes & improvements

### Fixes

- Fix go 1.18 support
- Fixed data race in core.Connection.Close()
- Fix channel ID overlap

## 0.4.0

> _17 January 2022_

### Binapi Generator

- the generator code has been split into multiple packages:
    - [vppapi](binapigen/vppapi) - parses VPP API (`.api.json`) files
    - [binapigen](binapigen) - processes parsed VPP API files and handles code generation
- added support for VPP enumflags type
- previously required manual patches for generated code should no longer be needed
- many generated aliases were removed and referenced to `*_types` files for simpler reading
- any types imported from other VPP API (`*_types.api`) files are now automatically resolved for generated Go code
- marshal/unmarshal methods for memory client messages are now generated
- generated new helper methods for more convenient IP and MAC address conversion
- RPC service code is now generated into a separated file (`*_rpc.ba.go`) in the same directory and uses a new low level
  stream API
- added option to generate HTTP handlers for RPC services
- generated code now contains comments with information about versions of VPP and binapi-generator
- in addition to the file name, the binapi generator now accepts full path (including extension,
  e.g. `/usr/share/vpp/api/core/vpe.api.json`)
- dependency on `github.com/lunixbochs/struc` was removed
- generated helper methods for `vpe_types.Timestamp`
- generated API messages comment may contain additional information about the given API development state (in progress,
  deprecated)
- type `[]bool` is now known to the generator
- enhanced VPP version resolution - the generator is more reliable to evaluate installed VPP version

### Features

- [socketclient](adapter/socketclient) was optimized and received a new method to add client name
- added new API [stream](api/api.go) for low-level access to VPP API
    - the `Stream` API uses the same default values as the `Channel` API
    - it supports the same functional options (request size, reply size, reply timeout)
- [statsclient](adapter/statsclient) supports additional options (retry period, retry timeout)
- the compatibility check error now contains a list of compatible and incompatible messages wrapped
  as `CompatibilityError`
- removed global binary API adapter. This change allows GoVPP to manage multiple VPP connections with different sockets
  simultaneously
- added support for the stats v2. The `statsclient` adapter recognizes the version automatically so the `StatsAPI`
  remains unchanged. In relation to this change, the legacy support (i.e. stat segment v0) for VPP <=19.04 was dropped.
- GoVPP now recognizes VPP state `NotResponding` which can be used to prevent disconnecting in case the VPP hangs or is
  overloaded
- added method `SetLogger()` for setting the global logger
- `StatsAPI` has a new method `GetMemory()` retrieving values related to the statseg memory heap
- the stats socket allows an option to connect asynchronously in the same manner as the API socket connection.
  Use `AsyncConnectStats()` to receive `ConnectionEvent` notifications
- Instead of a cumulative value, the `statsclient` error counter now provides a value per worker
- `ListStats(patterns ...string)` returns `StatIdentifier` containing the message name and the ID (instead of the name
  only)
- added support for VPP stat symlinks
- GoVPP received its own [API trace](api/trace.go). See the [example](examples/api-trace) for more details.

### Fixes

- `MsgCodec` will recover panic occurring during a message decoding
- calling `Unsubscibe` will close the notification channel
- GoVPP omits to send `sockclnt_delete` while cleaning up socket clients in order to remove VPP duplicated close
  complaints - VPP handles it itself
- fixed major bug causing GoVPP to not receive stats updates after VPP restart
- fixed name conflict in generated union field constructors
- the size of unions composed of other unions is now calculated correctly
- fixed race condition in the VPP adapter mock
- fixed crash caused by the return value of uint kind
- fixed encoding/decoding of float64
- fixed the stats reconnect procedure which occasionally failed re-enable the connection.
- fixed occasional panic during disconnect
- `statsclient` wait for socket procedure works properly
- fixed memory leak in health check

### Other

- improved log messages to provide more relevant info
- updated extras/libmemif to be compatible with the latest VPP changes
- default health check parameter was increased to 250 milliseconds (up from 100 milliseconds), and the default threshold
  was increased to 2 (up from 1)
- improved decoding of message context (message evaluation uses also the package path, not just the message ID)
- `statsclient` now recognizes between empty stat directories and does not treat them as unknown
- proxy client was updated to VPP 20.05

#### Examples

- added more code samples of working with unions in [binapi-types](examples/binapi-types)
- added profiling mode to [perf bench](examples/perf-bench) example
- improved [simple client](examples/simple-client) example to work properly even with multiple runs
- added [multi-vpp](examples/multi-vpp) example displaying management of two VPP instances from single application
- added [stream-client](examples/stream-client) example showing usage of the new stream API
- [simple client](examples/simple-client) and [binapi-types](examples/binapi-types) examples show usage of
  the `vpe_types.Timestamp`
- added [API trace example](examples/api-trace)

#### Dependencies

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

## 0.3.5

> _18 May 2020_

### Fixes

- statsclient: Fix stats data errors and panic for VPP 20.05

## 0.3.4

> _17 April 2020_

### Features

- binapi-generator: Format generated Go source code in-process

## 0.3.3

> _9 April 2020_

### Fixes

- proxy: Unexport methods that do not satisfy rpc to remove warning

## 0.3.2

> _20 March 2020_

### Fixes

- statsclient: Fix panic occurring with VPP 20.05-rc0 (master)

## 0.3.1

> _18 March 2020_

### Fixes

- Fix import path in examples/binapi

## 0.3.0

> _18 March 2020_

### Fixes

- binapi-generator: Fix parsing default meta parameter

### Features

- api: Improve compatibility checking with new error types:
  `adapter.UnknownMsgError` and `api.CompatibilityError`
- api: Added exported function `api.GetRegisteredMessageTypes()`
  for getting list of all registered message types
- binapi-generator: Support imports of common types from other packages
- binapi-generator: Generate `Reset()` method for messages
- binapi-generator: Compact generated methods

### Other

- deps: Update `github.com/bennyscetbun/jsongo` to `v1.1.0`
- regenerate examples/binapi for latest VPP from stable/2001

## 0.2.0

> _04 November 2019_

### Fixes

- fixed socketclient for 19.08
- fixed binapi compatibility with master (20.01-rc0)
- fixed panic during stat data conversion

### Features

- introduce proxy for remote access to stats and binapi
- optimizations for statclient

### Other

- migrate to Go modules
- print info for users when sockets are missing

## 0.1.0

> _03 July 2019_

The first release that introduces versioning for GoVPP.