Skip to content

gab-arrobo/upf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UPF

Go Report Card

Build Status

This project implements a 4G/5G User Plane Function (UPF) compliant with 3GPP TS23.501. It follows the 3GPP Control and User Plane Separation (CUPS) architecture, making use of the PFCP protocol for the communication between SMF (5G) / SPGW-C (4G) and UPF.

This UPF implementation is actively used as part of the Aether platform in conjunction with the SD-Core mobile core control plane.

Table Of Contents

Overview

The UPF implementation consists of two layers:

  • PFCP Agent (pfcpiface): a Go-based implementation of the PFCP northbound API used to interact with the mobile core control plane.
  • Datapath: responsible for the actual data plane packet processing.

The PFCP Agent implements datapath plugins that translate PFCP messages to datapath-specific configurations. We currently support two datapath implementations:

  • BESS: a software-based datapath built on top of the Berkeley Extensible Software Switch (BESS) framework. For more details, please see the ONFConnect 2019 talk and demo videos here and here.

    Note: The source code for the BESS-based datapath is in https://github.com/omec-project/bess

  • UP4: an implementation leveraging ONOS and P4-programmable switches to realize a hardware-based datapath.

The combination of PFCP Agent and UP4 is usually referred to as P4-UPF. While BESS-UPF denotes the combination of PFCP Agent and the BESS datapath.

PFCP Agent internally abstracts different datapaths using a common API, while the different plug-ins can use specific southbound protocols to communicate with the different datapath instances. Support for new datapaths can be provided by implementing new plugins.

UPF overview

This repository provides code to build two Docker images: pfcpiface (the PFCP Agent) and bess (the BESS-based datapath).

To build all Docker images run:

make docker-build

To build a selected image use DOCKER_TARGETS:

DOCKER_TARGETS=pfcpiface make docker-build

The latest Docker images are also published in the OMEC project's DockerHub registry: upf-epc-bess, upf-epc-pfcpiface.

BESS-UPF Components

upf

Zoom-in

bess-programming

Feature List

PFCP Agent

  • PFCP Association Setup/Release and Heartbeats
  • Session Establishment/Modification with support for PFCP entities such as Packet Detection Rules (PDRs), Forwarding Action Rules (FARs), QoS Enforcement Rules (QERs).
  • UPF-initiated PFCP association
  • UPF-based UE IP address assignment
  • Application filtering using SDF filters
  • Generation of End Marker Packets
  • Downlink Data Notification (DDN) using PFCP Session Report
  • Integration with Prometheus for exporting PFCP and data plane-level metrics.
  • Application filtering using application PFDs (experimental).

BESS-UPF

  • IPv4 support
  • N3, N4, N6, N9 interfacing
  • Single & Multi-port support
  • Monitoring/Debugging capabilities using
    • tcpdump on individual BESS modules
    • visualization web interface
    • command line shell interface for displaying statistics
  • Static IP routing
  • Dynamic IP routing
  • Support for IPv4 datagrams reassembly
  • Support for IPv4 packets fragmentation
  • Support for UE IP NAT
  • Service Data Flow (SDF) configuration via N4/PFCP
  • I-UPF/A-UPF ULCL/Branching i.e., simultaneous N6/N9 support within PFCP session
  • Downlink Data Notification (DDN) - notification only (no buffering)
  • Basic QoS support, with per-slice and per-session rate limiting
  • Per-flow latency and throughput metrics
  • DSCP marking of GTPu packets by copying the DSCP value from the inner IP packet
  • GTPu path monitoring
  • Network Token Functions (experimental)
  • Support for DPDK, CNDP, AF_PACKET and AF_XDP modes
    • BESS uses DPDK 22.11.4

P4-UPF

P4-UPF implements a core set of features capable of supporting requirements for a broad range of enterprise use cases.

See the ONF's blog post for an overview of P4-UPF. Additionally, refer to the SD-Fabric documentation for the detailed feature set.

Getting started

Installation

Please see installation document here for details on how to set up the PFCP Agent with BESS-UPF.

To install the PFCP Agent with UP4 please follow the SD-Fabric documentation.

Configuration

Please see the configuration guide here to learn more about the different configurations.

Testing

The UPF project currently implements three types of tests:

  • Unit tests
  • E2E integration tests
  • PTF tests for BESS-UPF

Unit tests for the PFCP Agent's code. To run unit tests use:

make test

E2E integration tests that verify the inter-working between the PFCP Agent and a datapath.

We provide two modes of E2E integration tests: native and docker.

The native mode invokes Go objects directly from the go test framework, thus it makes the test cases easier to debug. To run E2E integration tests for BESS-UPF in the native mode use:

make test-bess-integration-native

The docker mode uses fully containerized environment and runs all components (the PFCP Agent and a datapath mock) as Docker containers. It ensures the correct behavior of the package produced by the UPF project. To run E2E integration tests for UP4 in the docker mode use:

make test-up4-integration-docker

NOTE: The docker mode for BESS-UPF and the native mode for UP4 are not implemented yet.

PTF tests for BESS-UPF verify the BESS-based implementation of the UPF datapath (data plane). Details to run PTF tests for BESS-UPF can be found here.

Contributing

The UPF project welcomes new contributors. Feel free to propose a new feature, integrate a new UPF datapath or fix bugs!

Before contributing, please follow these guidelines:

Support

To report any other kind of problem, feel free to open a GitHub Issue or reach out to the project maintainers on the ONF Community Slack (aether-dev).

License

The project is licensed under the Apache License, version 2.0.

About

4G/5G Mobile Core User Plane

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 66.9%
  • Python 27.4%
  • Shell 3.6%
  • Dockerfile 1.2%
  • Makefile 0.9%