• Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created about 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

User Plane Gateway (UPG) based on VPP

User Plane Gateway (UPG) based on VPP

CI

UPG implements a GTP-U user plane based on 3GPP TS 23.214 and 3GPP TS 29.244 Release 15. It is implemented as an out-of-tree plugin for FD.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)

Current State

UPG is used in production in conjunction with erGW as GGSN/PGW in multiple installation in several telecom operators (Tier 1 and smaller).

For the list of known issues, see KNOWN_ISSUES document.

Working features

  • PFCP protocol
    • en/decoding of most IEs
    • heartbeat
    • node related messages
    • session related messages
  • Uplink and Downlink Packet Detection Rules (PDR) and Forward Action Rules (FAR) -- (some parts)
  • IPv4 -- inner and outer
  • IPv6 -- inner and outer
  • Usage Reporting Rules (URR)
  • PFCP Session Reports
  • Linked Usage Reports

No yet working

  • Buffer Action Rules (BAR)
  • QoS Enforcement Rule (QER)

Limitations

  • FAR action with destination LI are not implemented
  • Ethernet bearer support

Development setup

Design rationale for the development environment is this:

  • provide an easily reproducible development and build environment usable 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 to upstream them

Relevant parts of the source tree layout:

  • hack/ contains helper scripts most of which are wrapped in make commands
  • Makefile provides user interface for the environment
  • upf/ contains the source code of the plugin1
  • upf/test/ contains the integration tests1
  • vpp.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 hash of Dockerfile.build as well as VPP's external dependencies.

The following make commands are supported:

  • make image builds UPG Docker image
  • make test build VPP and run UPG integration tests. The compilation results are retained under vpp/
  • make retest run UPG integration tests without building VPP. These can be run under make test to re-run the tests quickly if there were no UPG / VPP code changes
  • make ensure-build-image checks if the build image exists or can be pulled and builds it otherwise
  • make update-build-image-tag updates the build image tag in the Dockerfiles according to the hash calculated from Dockerfile.build and VPP external dependencies
  • make install-hooks installs git hooks in the repo which prevent the user from making commits that contain ZZZZZ: substring. This is handy for debug print like clib_warning("ZZZZZ: i %d", i);
  • make update-vpp re-clones VPP into vpp/ directory
  • make buildenv runs an interactive shell inside the build environment with UPG and VPP sources mounted into the container
  • make e2e build UPG and run E2E tests for it. For more information, see E2E test documentation
  • make checkstyle performs style checks on the source code

Commands for building images and running tests default to debug builds. To do release build instead, pass BUILD_TYPE=release to make:

make e2e BUILD_TYPE=release

If docker is used, one should set the following environment variable to 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 pod
export 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

CI and releases

The CI for UPG-VPP is based on GitHub 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 commit
  • build (debug + release): build the docker images and binaries / packages
  • checkstyle: check for style errors in the code
  • test: unit and e2e tests for release and debug builds
  • conclude: intermediate job used for sync by the release workflow
  • slack: internal notification job

The images built per-commit expire within 7 days.

When a tag is pushed, the release 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 have test substring in it, it is also published as a release. The release notes list the PRs with the following tags:

  • feature, enhancement: features
  • fix: fixes
  • test: tests

The releases for tags that contain pre substring are marked as pre-releases.

1: Historically, the project was named simply "UPF". There may be more UPF->UPG renames later

VS Code

It is possible to attach to running buildenv container with VS Code to get full intellisense.

To do that run make 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",
		"jkillian.custom-local-formatters",
		"ms-azuretools.vscode-docker",
		"ms-vscode.cmake-tools",
		"ms-vscode.cpptools",
		"ms-vscode.cpptools-extension-pack",
		"ms-vscode.cpptools-themes",
		"ms-vscode.makefile-tools",
		"twxs.cmake"
	]
}

More Repositories

1

ergw

erGW - Erlang implementations of GGSN or P-GW
Erlang
78
star
2

flower

FlowER - a Erlang OpenFlow development platform
Erlang
61
star
3

eradius

Erlang RADIUS server framework
Erlang
51
star
4

exometer_influxdb

Exometer reporter for InfluxDB
Erlang
36
star
5

hello

Erlang RPC server framework
Erlang
32
star
6

gen_socket

Erlang
29
star
7

freewtp

FreeWTP -- An Open Source CAPWAP WTP
C
28
star
8

gtplib

Erlang GTPv1/GTPv2 library
Erlang
21
star
9

docker-pcap

A docker image to run as site-car container capturing packets and rotating the capture files
Shell
16
star
10

dike

Erlang
15
star
11

gen_netlink

Erlang
15
star
12

capwap

Erlang CAPWAP AC implementation.
Erlang
13
star
13

tetrapak

Extensible build system for Erlang/OTP applications
Erlang
13
star
14

pfcplib

Erlang library for encoding and decoding Packet Forwarding Control Protocol (PFCP) frames.
Erlang
13
star
15

ekub

Kubernetes API client library
Erlang
12
star
16

enit

Dynamic OTP Releases
Erlang
11
star
17

ergw_aaa

Erlang AAA session implementation for erGW
Erlang
11
star
18

docker-nettools

A small alpine-based docker image with handy networking tools installed
Dockerfile
10
star
19

regine

regine - modular Erlang process registry
Erlang
10
star
20

lager_journald_backend

A lager backend to log native to the systemd journal
Erlang
10
star
21

ppp

PPP and PPPoE support in Erlang
Erlang
10
star
22

capwap-mitm

CAPWAP DTLS MITM (Man-In-The-Middle) Proxy
C
9
star
23

journal-gateway-gelf

journal-gateway-gelf
C
8
star
24

nattcp

nuttcp fork including NAT-operability changes and other goodies
C
8
star
25

vagrant-galera-mariadb

MariaDB Galera cluster using vagrant
Shell
7
star
26

gtp_u_edp

GTPv1-U Proxy
Erlang
6
star
27

ping-exporter

Go
6
star
28

sasl_syslog

syslog/UDP error logger report handler
Erlang
5
star
29

exometer_fetch

Erlang
5
star
30

kube-watch

Watch and handle Kubernetes objects changes
Shell
5
star
31

ergw-pgw

PGW GGSN Docker Container
Shell
4
star
32

prometheus_diameter_collector

DIAMETER Prometheus.io collector
Erlang
4
star
33

vrf-tools

mirror of http://git.spaceboyz.net/equinox/vrf-tools.git/
C
3
star
34

nfv-k8s-cluster

This project hosts resources to create an NFV Kubernetes Cluster to deploy cloud-native VNFs
Shell
3
star
35

aldertree

Erlang based Process BTree
3
star
36

capwap-dp

CAPWAP Datapath element
C
3
star
37

gtp_u_kmod

GTPv1-U Erlang interface process for Kernel Datapath
Erlang
3
star
38

ppplib

Erlang
2
star
39

net-snmp

travelping's net-snmp
C
2
star
40

dhcpv6

DHCPv6 Server in Erlang for running on Linux.
Erlang
2
star
41

ergw-gtp-c-node

Erlang
2
star
42

rebuildd-incoming

incoming mechanism for rebuildd (http://julien.danjou.info/rebuildd.html)
JavaScript
2
star
43

hello_test_server

Hello simple ping-pong
Elixir
2
star
44

pcapng

erlang pcap library
Erlang
2
star
45

vxlan-connector

A docker image to create a VXLAN towards a peer.
Shell
2
star
46

cennsonic

Shell
1
star
47

dike_cache

Erlang
1
star
48

k8s_api_client

Erlang Kubernetes API Client
Erlang
1
star
49

ergw-capwap-node

OTP application to package a erGW CAPWAP Control Node
Erlang
1
star
50

cni-installer

A docker image to install CNI plugins
Dockerfile
1
star
51

fpp-vpp

Base for VPP based subprojects
Dockerfile
1
star
52

tropicssl

Fork of the last BSD licensed release of PolarSSL / XySSL (forked from http://gitorious.org/tropicssl)
C
1
star
53

zoneinfo

zoneinfo implemented in Erlang
Erlang
1
star
54

ergw-gtp-u-node

Erlang
1
star
55

ergw-gtp-path-prober

Actively probes GTP paths
Erlang
1
star
56

docker-hyperdex-ycsb

docker hyperdex 1.6 from source with java-bindings and ycsb
Shell
1
star