Carmelo Cascone | 4a883cb | 2021-09-28 18:20:15 -0700 | [diff] [blame^] | 1 | P4-based User Plane Function (P4-UPF) |
| 2 | ===================================== |
Daniele Moro | 69226c8 | 2021-09-28 17:37:49 +0200 | [diff] [blame] | 3 | |
| 4 | .. toctree:: |
| 5 | :maxdepth: 2 |
| 6 | :glob: |
| 7 | |
| 8 | upf_configuration |
Carmelo Cascone | 4a883cb | 2021-09-28 18:20:15 -0700 | [diff] [blame^] | 9 | |
| 10 | Overview |
| 11 | -------- |
| 12 | |
| 13 | SD-Fabric supports running a 4G/5G mobile core User Plane Function (UPF) as part |
| 14 | of the switches packet processing pipeline. Like the rest of the pipeline, this |
| 15 | is realized using P4 and for this reason we call this P4-UPF. |
| 16 | |
| 17 | P4-UPF is integrated with the ONF's SD-Core project. By default, SD-Core ships |
| 18 | with BESS-UPF, a containerized UPF implementation, based on the Berkeley |
| 19 | Software Switch (BESS). |
| 20 | |
| 21 | SD-Fabric can be used with BESS-UPF or any other UPF implementation that runs on |
| 22 | servers. In this case, the fabric switches can provide routing of GTP-U packets |
| 23 | to and from radio base station and servers. When P4-UPF is enabled, the same |
| 24 | fabric switches perform GTP-U tunnel termination. |
| 25 | |
| 26 | .. image:: ../images/bess-p4-upf.png |
| 27 | :width: 700px |
| 28 | |
| 29 | **Supported Features** |
| 30 | |
| 31 | SD-Fabric's P4-UPF implements a core set of features capable of supporting |
| 32 | requirements for a broad range of enterprise use cases: |
| 33 | |
| 34 | * GTP-U tunnel encap/decap: including support for 5G extensions such as PDU |
| 35 | Session Container carrying QoS Flow Information. |
| 36 | * Accounting: we use switch counters to collect per-flow stats and support usage |
| 37 | reporting and volume-based triggers. |
| 38 | * Downlink buffering: when a user device radio goes idle (power-save mode) or |
| 39 | during a handover, switches are updated to forward all downlink traffic for |
| 40 | the specific device (UE) to DBUF, a K8s-managed buffering service running on |
| 41 | servers. Then, when the device radio becomes ready to receive traffic, |
| 42 | packets are drained from the software buffers back to the switch to be |
| 43 | delivered to base stations. |
| 44 | * QoS: support for enforcement of maximum bitrate (MBR), minimum guaranteed |
| 45 | bitrate (GBR, via admission control), and prioritization using switch |
| 46 | queues and scheduling policy. |
| 47 | * Slicing: multiple logical UPFs can be instantiated on the same switch, each |
| 48 | one with its own QoS model and isolation guarantees enforced at the hardware |
| 49 | level using separate queues. |
| 50 | |
| 51 | **Distributed UPF** |
| 52 | |
| 53 | .. image:: ../images/upf-distributed.png |
| 54 | :width: 700px |
| 55 | |
| 56 | In SD-Fabric we support different topologies to meet the requirements of |
| 57 | different deployment sizes: from a single rack with just one leaf |
| 58 | switch, or a paired-leaves for redundancy, to NxM leaf-spine fabric for multi-rack |
| 59 | deployments. For this reason, P4-UPF is realized with a "distributed" data plane |
| 60 | implementation where all leaf switches are programmed with the same UPF |
| 61 | rules, such that any leaf can terminate any GTP-U tunnel. This provides several |
| 62 | benefits: |
| 63 | |
| 64 | * Simplified deployment: base stations can be connected via any leaf switch. |
| 65 | * Minimum latency: the UPF function is applied as soon as packets enter the |
| 66 | fabric, without going through additional devices before reaching their final |
| 67 | destination. |
| 68 | * Fast failover: when using paired-leaves, if one switch fails, the other can |
| 69 | immediately take over as it is already programmed with the same UPF state. |
| 70 | * Fabric-wide slicing & QoS guarantees: packets are classified as soon as they |
| 71 | hit the first leaf. We then use a custom DSCP-based marking to enforce the |
| 72 | same QoS rules on all hops. In case of congestion, flows deemed high priority |
| 73 | are treated as such by all switches. |
| 74 | |
| 75 | **Control Architecture and Integration with SD-Core** |
| 76 | |
| 77 | SD-Fabric's P4-UPF is integrated with the ONF SD-Core project to provide a |
| 78 | high-performance 3GPP-compliant mobile core solution. |
| 79 | |
| 80 | The integration with SD-Core is achieved via an ONOS called UP4, which is in |
| 81 | charge of populating the UPF tables of the switch pipeline. |
| 82 | |
| 83 | .. image:: ../images/up4-arch.png |
| 84 | :width: 600px |
| 85 | |
| 86 | The interface between the mobile core control plane and the UPF is defined by |
| 87 | the 3GPP standard Packet Forwarding Control Protocol (PFCP). This is a complex |
| 88 | protocol that can be difficult to understand, even though at its essence the |
| 89 | rules that it installs are simple match-action rules. The implementation of such |
| 90 | protocol, such as message parsing, state machines, and other bookkeeping can be |
| 91 | common to many different UPF realizations. For this reason, SD-Fabric relies on |
| 92 | an implementation of the PFCP protocol realized as an external microservice |
| 93 | named “PFCP-Agent”, which is provided by the SD-Core project. |
| 94 | |
| 95 | The UP4 App abstracts the whole fabric as one virtual big switch with UPF |
| 96 | capabilities, we call this the One-Big-UPF abstraction. Such abstraction allows |
| 97 | the upper layers to be independent of the underlying physical topology. |
| 98 | Communication between the PFCP Agent and the UP4 App is done via P4Runtime. This |
| 99 | is the same API that ONOS uses to communicate with the actual switches. However, |
| 100 | in the former case, it is used between two control planes, the mobile core, and |
| 101 | the SDN controller. By doing this, the deployment can be scaled up and down, |
| 102 | adding or removing racks and switches, without changing the mobile core control |
| 103 | plane, which instead is provided with the illusion of controlling just one |
| 104 | switch. |
| 105 | |
| 106 | The One-Big-UPF abstraction abstraction is realized with a ``virtual-upf.p4`` |
| 107 | program that formalizes the forwarding model described by PFCP as a series of |
| 108 | match-action tables. This program doesn't run on switches, but it's used as the |
| 109 | schema to define the content of the P4Runtime messages between PFCP Agent and |
| 110 | the UP4 App. On switches, we use a different program, fabric.p4, which |
| 111 | implements tables similar to the virtual UPF but optimized to satisfy the |
| 112 | resource constraints of Tofino, as well as tables for basic bridging, IP |
| 113 | routing, ECMP, and more. The UP4 App implements a P4Runtime server, like if it |
| 114 | were a switch, but instead it internally takes care of translating P4Runtime |
| 115 | rules from ``virtual-upf.p4`` to rules for the multiple physical switches running |
| 116 | fabric.p4, based on an up-to-date global view of the topology. |
| 117 | |
| 118 | ONOS Configuration |
| 119 | ------------------ |
| 120 | |
| 121 | ``TODO Daniele`` |
| 122 | |
| 123 | How to enable P4-UPF? |
| 124 | |
| 125 | * up4 app should be already active in ONOS |
| 126 | * change pipeconf ID |
| 127 | * explain/push netcfg |
| 128 | |
| 129 | SD-Core Configuration |
| 130 | --------------------- |
| 131 | |
| 132 | TODO Carmelo: |
| 133 | |
| 134 | * Assuming SD-Core is already installed... |
| 135 | * Instructions to install PFCP Agent for UP4 |
| 136 | * Reference for helm values configuration |
| 137 | |
| 138 | Should be similar to BESS install instructions (where the same helm chart |
| 139 | installs both PFCP agent and BESS): |
| 140 | https://docs.aetherproject.org/master/edge_deployment/bess_upf_deployment.html |
| 141 | |
| 142 | But using this helm chart (without BESS), just PFCP Agent: |
| 143 | https://gerrit.opencord.org/plugins/gitiles/aether-helm-charts/+/refs/heads/master/omec/omec-upf-pfcp-agent/ |
| 144 | |
| 145 | UP4 Troubleshooting |
| 146 | ------------------- |
| 147 | |
| 148 | ``TODO Daniele`` |
| 149 | |
| 150 | Example of UP4 CLI commands to debug the state of UP4. |
| 151 | |
| 152 | DBUF |
| 153 | ---- |
| 154 | |
| 155 | |
| 156 | ``TODO Carmelo`` overview |
| 157 | |
| 158 | |
| 159 | ``TODO Hung-Wei`` deployment instructions (helm chart) |