- Notifications
You must be signed in to change notification settings - Fork51
User Plane Gateway (UPG) based on VPP
License
travelping/upg-vpp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
UPG implements a GTP-U user plane based on3GPP TS 23.214and3GPP TS 29.244 Release 15. It is implemented as anout-of-tree plugin forFD.io VPP.
The possible uses for UPG are:
- User Plane Function (UPF) in 5G networks
- Packet Data Network Gateway User plane (PGW-U)
- Traffic Detection Function User plane (TDF-U)
UPG is used in production in conjunction witherGW as GGSN/PGWin multiple installation in several telecom operators (Tier 1 andsmaller).
For the list of known issues, seeKNOWN_ISSUES document.
- PFCP protocol
- en/decoding of most IEs
- heartbeat
- node related messages
- session related messages
- Uplink and Downlink Packet Detection Rules (PDR) andForward Action Rules (FAR) -- (some parts)
- IPv4 -- inner and outer
- IPv6 -- inner and outer
- Usage Reporting Rules (URR)
- PFCP Session Reports
- Linked Usage Reports
- Buffer Action Rules (BAR)
- QoS Enforcement Rule (QER)
- FAR action with destination LI are not implemented
- Ethernet bearer support
Design rationale for the development environment is this:
- provide an easily reproducible development and build environmentusable both on CI and locally
- provide quick commands for common tasks
- simplify bisecting against upstream VPP
- discourage downstream VPP changes, as we should make effort toupstream them
Relevant parts of the source tree layout:
hack/
contains helper scripts most of which are wrapped inmake
commandsMakefile
provides user interface for the environmentupf/
contains the source code of the plugin1upf/test/
contains the integration tests1vpp.spec
contains the info on VPP-base repo, branch and commit to use
There's a simple dockerized environment wrapped in 'make'commands.
The "build image" which is used for the devenv is tagged with a hashofDockerfile.build
as well as VPP's external dependencies.
The followingmake
commands are supported:
make image
builds UPG Docker imagemake test
build VPP and run UPG integration tests. The compilationresults are retained undervpp/
make retest
run UPG integration tests without building VPP. Thesecan be run undermake test
to re-run the tests quickly if therewere no UPG / VPP code changesmake ensure-build-image
checks if the build image exists or can bepulled and builds it otherwisemake update-build-image-tag
updates the build image tag inthe Dockerfiles according to the hash calculatedfromDockerfile.build
and VPP external dependenciesmake install-hooks
installs git hooks in the repo which preventthe user from making commits that containZZZZZ:
substring. Thisis handy for debug print likeclib_warning("ZZZZZ: i %d", i);
make update-vpp
re-clones VPP intovpp/
directorymake buildenv
runs an interactive shell inside the buildenvironment with UPG and VPP sources mounted into the containermake e2e
build UPG and run E2E tests for it. For more information,seeE2E test documentationmake checkstyle
performs style checks on the source code
Commands for building images and running tests default to debug builds.To do release build instead, passBUILD_TYPE=release
tomake
:
make e2e BUILD_TYPE=release
If docker is used, one should set the following environment variableto enable wrapping the internally run commands in a docker container:
export UPG_BUILDENV=docker
It is also possible to use a k8s cluster to run the build container in a pod:
export UPG_BUILDENV=k8s# optional: specify the node to run the build podexport UPG_BUILDENV_NODE=somenode
In this case, the buildenv is run as statefulset inside the cluster.It can be removed using
hack/buildenv.sh clean
The CI for UPG-VPP is based onGitHub Actions. Currently,the CI only runs for pushes to branches in the repository itself.The jobs include:
prepare
: make sure build image is available for the commitbuild
(debug + release): build the docker images and binaries / packagescheckstyle
: check for style errors in the codetest
: unit and e2e tests for release and debug buildsconclude
: intermediate job used for sync by the release workflowslack
: internal notification job
The images built per-commit expire within 7 days.
When a tag is pushed, therelease
workflow is also run for it,re-tagging the images built as part of normal build process(preserving the old tags too). In case if the tag doesn't havetest
substring in it, it is also published as a release. The release noteslist the PRs with the following tags:
feature
,enhancement
: featuresfix
: fixestest
: tests
The releases for tags that containpre
substring are marked aspre-releases.
1: Historically, the project was named simply "UPF". There may be more UPF->UPG renames later
It is possible to attach to running buildenv container with VS Code to get full intellisense.
To do that runmake code
.
Note: this command leaves the buildenv running in the background.
After attaching for the first time, some vscode plugins may not be enabled.To fix that open:F1 -> "Dev Containers: Open Named Container Configuration File"
And specify what plugins you'd like loaded at start.
Here are some nice plugins to work with this repo:
{"workspaceFolder": "/src","extensions": ["eamodio.gitlens","EditorConfig.EditorConfig","golang.go","ms-azuretools.vscode-docker","ms-vscode.cmake-tools","ms-vscode.cpptools","ms-vscode.cpptools-extension-pack","ms-vscode.cpptools-themes","ms-vscode.makefile-tools","llvm-vs-code-extensions.vscode-clangd","xaver.clang-format","twxs.cmake",],}