Skip to content

Commit

Permalink
feat: Update VPP 20.01 (#1613)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
ondrej-fabry authored Feb 6, 2020
1 parent 0c8bd9f commit d7e320e
Show file tree
Hide file tree
Showing 361 changed files with 11,762 additions and 65,527 deletions.
17 changes: 12 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
.idea/
.travis.yml
*.md
LICENSE
docs/
examples/
k8s/

cmd/agentctl/agentctl
cmd/vpp-agent/vpp-agent

docker/dev/build.sh
docker/prod/build.sh
tests/perf/grpc-perf/grpc-perf

tests/perf/grpc-perf/grpc-perf
**/*.test
reports/

/docs/
/examples/
/k8s/
/report/
/vpp/
30 changes: 11 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
os: linux
dist: xenial
sudo: required

language: go
go:
- 1.x

go_import_path: go.ligato.io/vpp-agent
go_import_path: go.ligato.io/vpp-agent/v3

services:
- docker
Expand All @@ -18,22 +19,23 @@ git:
cache:
directories:
- ${HOME}/.cache
- ${HOME}/gopath/pkg/mod

install: true

stages:
- Check
- Test
- Build
- Build&Test
- Integration
- name: E2E
if: ( type = push AND branch IN (master, dev) ) OR ( type IN (cron, api) ) OR ( commit_message =~ /^(test-e2e)/ )

jobs:
include:
- stage: Check
language: shell
name: "Check formatting"
language: shell
addons:
apt:
packages:
Expand All @@ -46,8 +48,12 @@ jobs:
- name: "Check proto files"
script: make check-proto

- stage: Test
name: "Code linter"
- stage: Build&Test
name: "Build"
script:
- make cmd
- make examples
- name: "Code linter"
script: make lint || true
- name: "Unit tests"
before_script:
Expand All @@ -57,11 +63,6 @@ jobs:
- goveralls -coverprofile=/tmp/coverage.out -service=travis-ci
- bash <(curl -s https://codecov.io/bash) -f /tmp/coverage.out -F unittests

- stage: Build
script:
- make cmd
- make examples

- stage: Integration
env: VPP_VERSION=1904
script:
Expand All @@ -71,10 +72,6 @@ jobs:
script:
- make verify-binapi
- make integration-tests
- env: VPP_VERSION=2001_324
script:
- make verify-binapi
- make integration-tests
- env: VPP_VERSION=2001
script:
- make verify-binapi
Expand All @@ -91,11 +88,6 @@ jobs:
- make e2e-tests-cover
after_success:
- bash <(curl -s https://codecov.io/bash) -f /tmp/e2e-cov.out -F e2e
- env: VPP_VERSION=2001_324
script:
- make e2e-tests-cover
after_success:
- bash <(curl -s https://codecov.io/bash) -f /tmp/e2e-cov.out -F e2e
- env: VPP_VERSION=2001
script:
- make e2e-tests-cover
Expand Down
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ifeq ($(VPP_VERSION),)
VPP_VERSION=$(VPP_DEFAULT)
endif
VPP_IMG:=$(value VPP_$(VPP_VERSION)_IMAGE)
ifeq (${UNAME_ARCH}, aarch64)
ifeq ($(UNAME_ARCH), aarch64)
VPP_IMG:=$(subst vpp-base,vpp-base-arm64,$(VPP_IMG))
endif
VPP_BINAPI?=$(value VPP_$(VPP_VERSION)_BINAPI)
Expand Down Expand Up @@ -133,6 +133,9 @@ clean-examples: ## Clean examples
cd examples/localclient_vpp/nat && go clean
cd examples/localclient_vpp/plugins && go clean

purge: ## Purge cached files
go clean -testcache -cache ./...

debug-remote: ## Debug remotely
cd ./cmd/vpp-agent && dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient

Expand Down Expand Up @@ -236,11 +239,15 @@ dep-update:

dep-check:
@echo "# checking dependencies"
@if ! git --no-pager diff go.mod ; then \
echo >&2 "go.mod has uncommitted changes!"; \
exit 1; \
fi
go mod verify
go mod tidy -v
@if ! git diff --quiet go.mod ; then \
echo "go mod tidy check failed"; \
exit 1 ; \
@if ! git --no-pager diff go.mod ; then \
echo >&2 "go mod tidy check failed!"; \
exit 1; \
fi

# -------------------------------
Expand Down Expand Up @@ -310,7 +317,7 @@ prod-image: ## Build production image


.PHONY: help \
agent agentctl build clean install \
agent agentctl build clean install purge \
cmd examples clean-examples \
test test-cover test-cover-html test-cover-xml \
generate checknodiffgenerated genereate-binapi generate-proto get-binapi-generators \
Expand Down
4 changes: 2 additions & 2 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# Install Go
ENV GOLANG_VERSION 1.13.6
ENV GOLANG_VERSION 1.13.7
RUN set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
Expand Down Expand Up @@ -101,7 +101,7 @@ RUN \
VERSION=$VERSION \
COMMIT=$COMMIT \
DATE=$DATE \
make install
make install purge

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

Expand Down
1 change: 0 additions & 1 deletion docker/dev/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ docker build -f Dockerfile \
--build-arg DATE=${DATE} \
--build-arg SKIP_CHECK=${SKIP_CHECK:-} \
--tag ${IMAGE_TAG} \
--pull \
${DOCKER_BUILD_ARGS-} ../..

docker run --rm "${IMAGE_TAG}" vpp-agent -h || true
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module go.ligato.io/vpp-agent/v3
go 1.12

require (
git.fd.io/govpp.git v0.2.1-0.20200120113858-e095944d454b
git.fd.io/govpp.git v0.2.1-0.20200131102335-2df59463fcbb
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/DataDog/zstd v1.3.5 // indirect
github.com/Microsoft/go-winio v0.4.7 // indirect
Expand All @@ -13,7 +13,6 @@ require (
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 // indirect
github.com/alicebob/miniredis v2.5.0+incompatible // indirect
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
github.com/bennyscetbun/jsongo v1.1.0 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
github.com/bsm/sarama-cluster v2.1.15+incompatible // indirect
Expand Down Expand Up @@ -92,5 +91,3 @@ require (
google.golang.org/grpc v1.27.0
gotest.tools v2.2.0+incompatible // indirect
)

replace github.com/bennyscetbun/jsongo => github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
git.fd.io/govpp.git v0.2.1-0.20200120113858-e095944d454b h1:3LKmS/LlPWuI43AudmJlu5HKaZmdvaL9QiV2mSwVhMM=
git.fd.io/govpp.git v0.2.1-0.20200120113858-e095944d454b/go.mod h1:cJ7XSNm8O4jeU1dLgOacRoHt5MxlL+XPgas1yBC53gc=
git.fd.io/govpp.git v0.2.1-0.20200131102335-2df59463fcbb h1:bzC2K2NOm0cg9fVgzRfGo06udRbKRB5m9+e+EvvZShg=
git.fd.io/govpp.git v0.2.1-0.20200131102335-2df59463fcbb/go.mod h1:SaURD+s2tyKdTyPdzAiHaoHwG6KEzIkPY1ZOdxU63qU=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
Expand All @@ -28,8 +28,8 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM=
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg=
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66 h1:isQTypXGM6KLr0gdEDjhJ9Z5F0gefMdgDI42LrS5/LQ=
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U=
github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM=
github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
Expand Down
1 change: 0 additions & 1 deletion plugins/govppmux/plugin_impl_govppmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import (
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp1904"
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp1908"
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp2001"
_ "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp2001_324"
)

var (
Expand Down
143 changes: 0 additions & 143 deletions plugins/govppmux/vppcalls/vpp2001_324/vpe_vppcalls.go

This file was deleted.

Loading

0 comments on commit d7e320e

Please sign in to comment.