> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/fpp/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/fpp/latest.md).

# Fast Path Provider

Fast Path Provider (FPP) is a Cennso Network Core (CNC) project, which provides a framework for running [VPP](https://fd.io/) (Vector Packet Processing) on Kubernetes clusters to provide a fast data path for the user plane traffic. "Fast path" implies that the traffic intended to be handled by VPP is never handled by Linux kernel network stack at any point. Vector Packet Processing (VPP) is an open-source software-based network processing framework that provides a fast, scalable, and extensible platform for building high-performance network applications. It is designed to run on commodity hardware and supports a wide range of network protocols, including IPv4/IPv6, GRE, VXLAN, and much more.

This diagram describes the general architecture and workflow of Fast Path Provider (FPP) and its correlation to the related resources:

![FPP architecture](https://docs.cennso.com/api/assets/components/fpp/latest/assets/fpp-architecture-general.svg)

1. User creates the VPPOperator, FPPDeployment, and CGWDeployment Custom Resources (CRs) on Management Cluster and modifies them according to their needs to deploy VPP in a Core Cluster
2. Cennso FPP Extension watches for them and either creates or modifies the following CRs:
   - Deployment/StatefulSet - spawns the Operator pods
   - VPPDeployment - CR based on which VPP Operator creates the VPP DaemonSet
   - VPPConfig - CR based on which VPP Operator configures the VPP DaemonSet
3. VPP Operator watches for the VPPConfig and VPPDeployment CRs and creates or updates the VPP DaemonSet based on them.
4. To set up the infrastructure, the user creates a set of CRs on the Management Cluster. They can be either created by FPP/CGWDeployment CR or by other means.
   - RoutingTable - CR used to create routes and routing for a network
   - FPPNetwork - CR used to create a virtual network for FPP
   - [NetworkAttachmentDefinition](https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/how-to-use.md#create-network-attachment-definition) - external, Multus CNI-based CR that contains the specification of a network interface. Multus CNI, that is a prerequisite to Cennso installation, watches for the NetworkAttachmentDefinition CR and forwards its content to the FPP CNI that translates it further to the VPPInterface CR.
5. VPP Operator watches for the RoutingTable, FPPNetwork, and VPPInterface CRs and configures the VPP DaemonSet according to them.

VPP uses a vectorized approach to packet processing, which means that it processes packets in batches, rather than one at a time. This enables VPP to achieve very high packet processing rates and low latency, even on commodity hardware.

FPP creates high-performance distributed networks based on the virtual L2 switch concept. Such networks can be connected to the host NICs and external networks, providing connectivity for the CNFs running on the cluster. This allows you to build solutions based on fast packet processing in user space.

FPP uses [FPP VPP](https://github.com/travelping/fpp-vpp) with downstream VPP patches that support Cennso Network Solutions.

The distinguishing features of FPP are:

- single central controller managing VPP configuration and lifecycle
- memif interface is used to connect VPP-based workloads
- VPP's fast tap driver is used to connect pods with Linux networking
- VXLANs are used to connect the pods together and different VNIs for interfaces can be used to partition the network
- both VPP-based and Linux networking pods can have multiple FPP interfaces with the help of [Multus CNI](https://github.com/k8snetworkplumbingwg/multus-cni)
- works with [SR-IOV Network Operator](https://github.com/openshift/sriov-network-operator)
- NICs or VFs are handled by VPP out of the box, without the use of a slow AF_PACKET driver
- VPP interface configuration for both VPPSwitch daemon pods and VPP-based workloads is stored in Kubernetes CRs, which are
  continuously reconciled against the state of corresponding VPP processes, enabling dynamic reconfiguration
- CNI is provided for the pods (although you can also configure VPPInterface CRs directly)
- [CPU Manager](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/)-aware VPP core selection out of the box

## FPP Components

### FPP Extension

FPP Extension is a Cennso Package that installs Crossplane components on the Management Cluster. It includes a Crossplane Composition and CompositeResourceDefinitions (XRDs). It includes `VPPOperator`, `FPPDeployment`, and `CGWDeployment` object definitions and their supporting Crossplane components.

### VPP Operator

VPP Operator synchronizes VPP configuration with the state of Kubernetes API resources (Custom Resources, CRs).
The application is implemented in Go, which makes it possible to import it as a Go module, extending the VPP reconciliation mechanism
and the set of metrics that it exposes.

### FPP node switch

One type of VPP pod is a VPP switch pod, which runs as a daemonset on each Data Plane node, creating an overlay networking for Cennso workloads:

![FPP Diagram](https://docs.cennso.com/api/assets/components/fpp/latest/assets/fpp.svg)

FPP manages network interfaces of the following types in the cluster:

- memif - high-performance user space in memory interface usually for VPP-based CNFs
- TAP - userspace interface to connect regular Linux Based CNFs and Workloads, to be used by standard Linux networking-based applications
- DPDK NIC Interface - interfaces utilizing high-performance NIC Driver based on DPDK that can handle physical NICs and SR-IOV Virtual Functions
- Tunnel-Based Interfaces: VXLAN, GRE or similar, to interconnect cluster endpoint with remote endpoints

### VPP-based workloads

VPP Operator manages VPP-based workloads by running the FPP pod in **instance mode**. Examples of such workloads include User Plane Gateway (UPG) and Connectivity Gateway (CGW). These components are deployed as StatefulSets and are managed by the VPP Operator using GoRPC and VPP CLI commands. VPP configuration is stored in FPP-related Custom Resources, such as `VPPConfig`, `VPPInterface`, and `RoutingTable`.

### Kubernetes API extensions

FPP provides a set of Custom Resource Definitions to extend Kubernetes API with FPP-related objects.

The FPP Management API provides the Resources belonging to the `fpp-manager.cennso.com` API group (created on the Core Cluster):

- `FPPNetwork`: creates overlay L2 networks that connect cluster nodes
- `IPFIXExporter`: configures IPFIX export functionality in VPP
- `RoutingTable`: specifies routes to be installed in VPP
- `UPFLBConfig`: configures the User Plane Function (UPF) load balancer (UPF-LB) in a CGW
- `VPPConfig`:  general VPP configuration, including VPP CLI commands
- `VPPInterface`: configures VPP interface inside the local VPP instance

A detailed description is available in the [Custom Resources](https://docs.cennso.com/components/fpp/latest/crs.md) section.

### FPP-CNI

FPP-CNI is a Kubernetes CNI plugin, which can be used together with [Multus CNI](https://github.com/k8snetworkplumbingwg/multus-cni)
to setup FPP-based interfaces.

## Deployment method

FPP and CGW are provided as part of the Fast Path Provider extension. See the [installation docs](https://docs.cennso.com/components/fpp/latest/installation/installation.md) for more information on how to deploy them.
