Skip to content

Commit d7e320e

Browse files
authored
feat: Update VPP 20.01 (ligato#1613)
* Generate binapi for VPP 20.01 Signed-off-by: Ondrej Fabry <[email protected]> * Update VPP 20.01 implementations Signed-off-by: Ondrej Fabry <[email protected]> * Update govpp Signed-off-by: Ondrej Fabry <[email protected]> * Remove VPP version 2001_324 Signed-off-by: Ondrej Fabry <[email protected]> * Address golangcibot comments Signed-off-by: Ondrej Fabry <[email protected]> * Remove jsongo replace Signed-off-by: Ondrej Fabry <[email protected]> * Remove blank imports for vpp2001_324 Signed-off-by: Ondrej Fabry <[email protected]> * Fix brackets in Makefile Signed-off-by: Ondrej Fabry <[email protected]> * Remove unused func Signed-off-by: Ondrej Fabry <[email protected]> * Define gre tunnel mode as P2P by default Signed-off-by: Ondrej Fabry <[email protected]> * Recognize VPP crash in integration tests Signed-off-by: Ondrej Fabry <[email protected]> * Add context to more vppcalls methods Signed-off-by: Ondrej Fabry <[email protected]> * Re-generate binapi for VPP 19.08 Signed-off-by: Ondrej Fabry <[email protected]> * Update Go version Signed-off-by: Ondrej Fabry <[email protected]> * Re-generate binapi for VPP 19.04 Signed-off-by: Ondrej Fabry <[email protected]> * Fix nil context Signed-off-by: Ondrej Fabry <[email protected]> * Update .dockerignore to ignore compiled files Signed-off-by: Ondrej Fabry <[email protected]> * Do not pull image by default Signed-off-by: Ondrej Fabry <[email protected]> * Add purge make target Signed-off-by: Ondrej Fabry <[email protected]> * Update .travis.yml - combine build & test stages - cache downloaded modules Signed-off-by: Ondrej Fabry <[email protected]> * Improve make target dep-check Signed-off-by: Ondrej Fabry <[email protected]> * Improve make target dep-check Signed-off-by: Ondrej Fabry <[email protected]> * Fix .travis.yml Signed-off-by: Ondrej Fabry <[email protected]> * Update .travis.yml Signed-off-by: Ondrej Fabry <[email protected]> * Define funcs for adding/checking non-retryable errors Signed-off-by: Ondrej Fabry <[email protected]> * Disable IP neighbor config for VPP 20.01 IP neighbor configuraton is not implemented for 20.01, because of breaking change in the API. New proto model must be defined to support configuring this properly. The current model does not allow separated config for IPv4 and IPv6. Signed-off-by: Ondrej Fabry <[email protected]> * Separate blank imports Signed-off-by: Ondrej Fabry <[email protected]> * Comment out unused Signed-off-by: Ondrej Fabry <[email protected]> * Define DefaultNat44GlobalConfig for NAT handler This allows having different default configuration for each VPP version. In VPP 20.01 the virtual reassembly has been moved from NAT to IP plugin and can be configured for both IPv4/IPv6. However due to incompatibilities, like Timeout being changed from sec to ms, it is disabled for now. The IP Reassembly configuration should be implemented in L3 plugin as it is not NAT-specific feature in any way. Signed-off-by: Ondrej Fabry <[email protected]> * Fix integration test for IP neighbor config Signed-off-by: Ondrej Fabry <[email protected]> * Skip dumping IP reassembly Signed-off-by: Ondrej Fabry <[email protected]> * Fix ip neighbor integration test Signed-off-by: Ondrej Fabry <[email protected]>
1 parent 0c8bd9f commit d7e320e

File tree

361 files changed

+11762
-65527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+11762
-65527
lines changed

.dockerignore

+12-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44
.idea/
55
.travis.yml
66
*.md
7-
LICENSE
8-
docs/
9-
examples/
10-
k8s/
7+
118
cmd/agentctl/agentctl
129
cmd/vpp-agent/vpp-agent
10+
1311
docker/dev/build.sh
1412
docker/prod/build.sh
15-
tests/perf/grpc-perf/grpc-perf
13+
14+
tests/perf/grpc-perf/grpc-perf
15+
**/*.test
16+
reports/
17+
18+
/docs/
19+
/examples/
20+
/k8s/
21+
/report/
22+
/vpp/

.travis.yml

+11-19
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
2+
os: linux
23
dist: xenial
34
sudo: required
45

56
language: go
67
go:
78
- 1.x
89

9-
go_import_path: go.ligato.io/vpp-agent
10+
go_import_path: go.ligato.io/vpp-agent/v3
1011

1112
services:
1213
- docker
@@ -18,22 +19,23 @@ git:
1819
cache:
1920
directories:
2021
- ${HOME}/.cache
22+
- ${HOME}/gopath/pkg/mod
2123

2224
install: true
2325

2426
stages:
2527
- Check
2628
- Test
27-
- Build
29+
- Build&Test
2830
- Integration
2931
- name: E2E
3032
if: ( type = push AND branch IN (master, dev) ) OR ( type IN (cron, api) ) OR ( commit_message =~ /^(test-e2e)/ )
3133

3234
jobs:
3335
include:
3436
- stage: Check
35-
language: shell
3637
name: "Check formatting"
38+
language: shell
3739
addons:
3840
apt:
3941
packages:
@@ -46,8 +48,12 @@ jobs:
4648
- name: "Check proto files"
4749
script: make check-proto
4850

49-
- stage: Test
50-
name: "Code linter"
51+
- stage: Build&Test
52+
name: "Build"
53+
script:
54+
- make cmd
55+
- make examples
56+
- name: "Code linter"
5157
script: make lint || true
5258
- name: "Unit tests"
5359
before_script:
@@ -57,11 +63,6 @@ jobs:
5763
- goveralls -coverprofile=/tmp/coverage.out -service=travis-ci
5864
- bash <(curl -s https://codecov.io/bash) -f /tmp/coverage.out -F unittests
5965

60-
- stage: Build
61-
script:
62-
- make cmd
63-
- make examples
64-
6566
- stage: Integration
6667
env: VPP_VERSION=1904
6768
script:
@@ -71,10 +72,6 @@ jobs:
7172
script:
7273
- make verify-binapi
7374
- make integration-tests
74-
- env: VPP_VERSION=2001_324
75-
script:
76-
- make verify-binapi
77-
- make integration-tests
7875
- env: VPP_VERSION=2001
7976
script:
8077
- make verify-binapi
@@ -91,11 +88,6 @@ jobs:
9188
- make e2e-tests-cover
9289
after_success:
9390
- bash <(curl -s https://codecov.io/bash) -f /tmp/e2e-cov.out -F e2e
94-
- env: VPP_VERSION=2001_324
95-
script:
96-
- make e2e-tests-cover
97-
after_success:
98-
- bash <(curl -s https://codecov.io/bash) -f /tmp/e2e-cov.out -F e2e
9991
- env: VPP_VERSION=2001
10092
script:
10193
- make e2e-tests-cover

Makefile

+12-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ifeq ($(VPP_VERSION),)
3737
VPP_VERSION=$(VPP_DEFAULT)
3838
endif
3939
VPP_IMG:=$(value VPP_$(VPP_VERSION)_IMAGE)
40-
ifeq (${UNAME_ARCH}, aarch64)
40+
ifeq ($(UNAME_ARCH), aarch64)
4141
VPP_IMG:=$(subst vpp-base,vpp-base-arm64,$(VPP_IMG))
4242
endif
4343
VPP_BINAPI?=$(value VPP_$(VPP_VERSION)_BINAPI)
@@ -133,6 +133,9 @@ clean-examples: ## Clean examples
133133
cd examples/localclient_vpp/nat && go clean
134134
cd examples/localclient_vpp/plugins && go clean
135135

136+
purge: ## Purge cached files
137+
go clean -testcache -cache ./...
138+
136139
debug-remote: ## Debug remotely
137140
cd ./cmd/vpp-agent && dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient
138141

@@ -236,11 +239,15 @@ dep-update:
236239

237240
dep-check:
238241
@echo "# checking dependencies"
242+
@if ! git --no-pager diff go.mod ; then \
243+
echo >&2 "go.mod has uncommitted changes!"; \
244+
exit 1; \
245+
fi
239246
go mod verify
240247
go mod tidy -v
241-
@if ! git diff --quiet go.mod ; then \
242-
echo "go mod tidy check failed"; \
243-
exit 1 ; \
248+
@if ! git --no-pager diff go.mod ; then \
249+
echo >&2 "go mod tidy check failed!"; \
250+
exit 1; \
244251
fi
245252

246253
# -------------------------------
@@ -310,7 +317,7 @@ prod-image: ## Build production image
310317

311318

312319
.PHONY: help \
313-
agent agentctl build clean install \
320+
agent agentctl build clean install purge \
314321
cmd examples clean-examples \
315322
test test-cover test-cover-html test-cover-xml \
316323
generate checknodiffgenerated genereate-binapi generate-proto get-binapi-generators \

docker/dev/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5555
&& rm -rf /var/lib/apt/lists/*
5656

5757
# Install Go
58-
ENV GOLANG_VERSION 1.13.6
58+
ENV GOLANG_VERSION 1.13.7
5959
RUN set -eux; \
6060
dpkgArch="$(dpkg --print-architecture)"; \
6161
case "${dpkgArch##*-}" in \
@@ -101,7 +101,7 @@ RUN \
101101
VERSION=$VERSION \
102102
COMMIT=$COMMIT \
103103
DATE=$DATE \
104-
make install
104+
make install purge
105105

106106
ENV SUPERVISOR_CONFIG=/opt/vpp-agent/dev/supervisor.conf
107107

docker/dev/build.sh

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ docker build -f Dockerfile \
3434
--build-arg DATE=${DATE} \
3535
--build-arg SKIP_CHECK=${SKIP_CHECK:-} \
3636
--tag ${IMAGE_TAG} \
37-
--pull \
3837
${DOCKER_BUILD_ARGS-} ../..
3938

4039
docker run --rm "${IMAGE_TAG}" vpp-agent -h || true

go.mod

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module go.ligato.io/vpp-agent/v3
33
go 1.12
44

55
require (
6-
git.fd.io/govpp.git v0.2.1-0.20200120113858-e095944d454b
6+
git.fd.io/govpp.git v0.2.1-0.20200131102335-2df59463fcbb
77
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
88
github.com/DataDog/zstd v1.3.5 // indirect
99
github.com/Microsoft/go-winio v0.4.7 // indirect
@@ -13,7 +13,6 @@ require (
1313
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 // indirect
1414
github.com/alicebob/miniredis v2.5.0+incompatible // indirect
1515
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
16-
github.com/bennyscetbun/jsongo v1.1.0 // indirect
1716
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
1817
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
1918
github.com/bsm/sarama-cluster v2.1.15+incompatible // indirect
@@ -92,5 +91,3 @@ require (
9291
google.golang.org/grpc v1.27.0
9392
gotest.tools v2.2.0+incompatible // indirect
9493
)
95-
96-
replace github.com/bennyscetbun/jsongo => github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
22
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
3-
git.fd.io/govpp.git v0.2.1-0.20200120113858-e095944d454b h1:3LKmS/LlPWuI43AudmJlu5HKaZmdvaL9QiV2mSwVhMM=
4-
git.fd.io/govpp.git v0.2.1-0.20200120113858-e095944d454b/go.mod h1:cJ7XSNm8O4jeU1dLgOacRoHt5MxlL+XPgas1yBC53gc=
3+
git.fd.io/govpp.git v0.2.1-0.20200131102335-2df59463fcbb h1:bzC2K2NOm0cg9fVgzRfGo06udRbKRB5m9+e+EvvZShg=
4+
git.fd.io/govpp.git v0.2.1-0.20200131102335-2df59463fcbb/go.mod h1:SaURD+s2tyKdTyPdzAiHaoHwG6KEzIkPY1ZOdxU63qU=
55
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
66
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
77
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
@@ -28,8 +28,8 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5
2828
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
2929
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM=
3030
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg=
31-
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66 h1:isQTypXGM6KLr0gdEDjhJ9Z5F0gefMdgDI42LrS5/LQ=
32-
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U=
31+
github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM=
32+
github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U=
3333
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
3434
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
3535
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=

plugins/govppmux/plugin_impl_govppmux.go

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import (
4242
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp1904"
4343
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp1908"
4444
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp2001"
45-
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp2001_324"
4645
)
4746

4847
var (

plugins/govppmux/vppcalls/vpp2001_324/vpe_vppcalls.go

-143
This file was deleted.

0 commit comments

Comments
 (0)