> 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/releases/2.0.0.md).

# Fast Path Provider 2.0.0

Fast Path Provider (FPP) 2.0 provides new architecture, splitting FPP into two parts:

- FPP Operator - component responsible for reconciling the VPP configuration stored as Kubernetes API objects
- Amberd - VPP wrapper pod which runs the packet processing engine (VPP) and communicates with FPP Operator using goRPC

The new approach allows you to separate the management layer from packet processing. In consequence, the part responsible for reading Kubernetes API objects can be upgraded without interrupting the network connectivity.

FPP 2.0 also provides new functionality:

- Bump VPP to version 22.10
- Linux Control Plane (LCP) feature
- BGP support
- Beta feature: VRRP functionality
- Beta feature: Source Based Routing - ACL-based forwarding

>**NOTE:** Before upgrading to the newest version, follow the instructions provided in the [migration guide](#migration-guide).

FPP 2.0 is compatible with the previous 1.X releases that use the FPP Helm chart. You can install FPP 2.0 using the same Helm values.

>**CAUTION:** The `instance` mode deployment of FPP 1.X is not supported by FPP 2.0 and should be removed before installing FPP 2.0. The `node` mode daemonset compatibility requires performing specific steps described in the [migration guide](#migration-guide).

## Features

### FPP Operator

FPP operator starts the central pod which reconciles FPP Custom Resources for all deployments in the cluster. A new VPPDeployment Custom Resource is introduced. It is processed by FPP operator and creates Amberd pods, which are wrapper instances to run VPP inside. The Amberd pods register to FPP operator through a Kubernetes service and the configuration commands are passed from FPP Operator to Amberd using GoRPC. Two modes are exposed:

- `node` mode
- `instance` mode

Multiple FPP Operators per cluster are also possible, you must run each instance of the Operator with a different `slice` label.

### Bumping VPP to version 22.10

FPP 2.0 uses the FPP-VPP v22.10 line, which updates the VPP version from 22.02 to 22.10. The main feature is Linux Control Plane, patched
using the latest upstream fixes, as well as internal found issues and fixed in the downstream FPP-VPP 22.10.3 release.

More info:

- [VPP 22.10 release notes](https://s3-docs.fd.io/vpp/22.10/aboutvpp/releasenotes/v22.10.html)
- [FPP-VPP release notes](https://github.com/travelping/fpp-vpp/releases)

### Linux Control Plane (LCP) feature

The LCP plugin allows VPP to integrate with the Linux kernel. The general model is that Linux is the network stack, which means that it has the control plane protocols, like ARP, IPv6 ND/MLD, ping, etc, and VPP provides a SW based ASIC for forwarding.

This integration with the Linux kernel allows you to use network tools like Bird (BGP daemon) to manage routing and allow VPP to do the traffic forwarding.

More info about LCP: [VPP LCP docs page](https://s3-docs.fd.io/vpp/22.10/developer/plugins/lcp.html)

### BGP support

FPP 2.0 provides new functionality to integrate BGP routing with the VPP engine. VPPTool concept is introduced to manage the BGP daemon as a side container of an FPP instance.

### Beta feature: VRRP functionality

VRRP is an existing functionality in the VPP framework. FPP 2.0 provides a detailed description of how to integrate a VRRP configuration in the form of VPP CLI commands in the VPPConfig `afterCommands` field. You can find the detailed feature descriptions in the [VRRP deployment guide](https://docs.cennso.com/components/fpp/latest/deployment-guides/vrrp.md).

In future FPP releases, the VRRP feature will be incorporated in the Custom Resource object configuration.

### Beta feature: Source-based routing

FPP supports source-based routing known as ACL-Based Forwarding (ABF) in VPP. FPP 2.0 describes now to integrate ABF using VPP CLI commands in the VPPConfig `afterCommands` field.
You can find the detailed feature descriptions in the [ABF deployment guide](https://docs.cennso.com/components/fpp/latest/operation-guides/source-based-forwarding.md)

In future FPP releases, the ABF feature will be incorporated in the Custom Resource object configuration.

## Known issues

### VPPTool CR modification causes Amberd pod restarts

As VPPTool is a cluster-wide resource, any modification of Custom Resource objects will cause all Amberd pods using this tool
to be restarted. As a consequence, network downtime will happen.

The future version of FPP will block any modification of VPPTool object, to avoid unintentionally restarting Amberd pods.

### VPPConfig `afterCommands` causes Amberd to restart

If VPPConfig targeting Amberd pods has `afterCommands` defined, Amberd pods are restarted after FPP Operator restart.

Future improvement in FPP should detect if `VPPConfig.afterCommands` are changed and do not restart Amberd pods, if
`afterCommands` field was not changed.

This has been fixed in FPP 2.0.1.

### Low TAP performance

The maximum throughput for TAP interfaces is reduced and may not meet the required KPIs. Placing TAP and MEMIF interface in the pipeline on the same node results in 0.4 Mpps achieved rate.

Some workaround has been introduced to separate the egress TAP and ingress MEMIF interfaces on separate nodes. However, for performant forwarding, avoid TAP interfaces and create the chain based solely on physical or virtual PCI or MEMIF interfaces.

### SRIOV VF MAC conflict

Under some circumstances, such as a combination of Linux kernel and a NIC driver, SRIOV VF MAC address may conflict with the MAC address assigned by VPP inside the container. This results in a warning message and a possible lack of connectivity. Sample message in `dmesg`:

```
[23544.190430] i40e 0000:06:00.2: MAC addr e2:0d:d2:15:f5:78 has been set by PF, cannot delete it for VF 8, reset VF to change MAC addr
[23544.190468] i40e 0000:06:00.2: VF 8 failed opcode 11, retval: -5
```

The following kernel and driver versions are known not to work:

- kernels: `5.4.0-131-generic`, `5.4.0-148-generic`
- Intel NIC driver i40e in version `2.8.20-k`

The manner of handling such a situation is described in [the SRIOV VF deployment guide](https://docs.cennso.com/components/fpp/latest/troubleshooting/sriov.md#sriov-vf-mac-conflict).

## Migration guide

This section describes a detailed description of how to perform the FPP upgrade from version 1.3 to 2.0. This upgrade process enables the coexistence of FPP 1.X and 2.0 nodes in a single cluster, also workload pods running on different versions of FPP can communicate with each other.

>**CAUTION:** Migration of `instance` mode deployments of FPP 1.X to 2.0 are not supported. Remove FPP 1.X `instance` mode deployments before installing FPP 2.0. Then, bring up the instances based on FPP 2.0.

### Sample deployment case

There is a cluster of at least 2 nodes, each node holds FPP-based workload pods. Both nodes are running FPP 1.3.2, which is deployed using node selector: `fpp-manager.cennso.com/fpp=1.3.2`.

The goal is to select one node and deploy FPP 2.0 on it, let's call it a canary node.
This means that on the canary node, for a short period, FPP 1.3.2 will be removed and FPP 2.0 will be deployed. The network connectivity will be lost.

To remove FPP 1.3, the deployment should be based on a node selector which should be removed. Label the canary node with a new node selector and use the same label in the `node` mode Amberd VPPDeployment.

The workload placed on a canary node should be able to communicate with other workloads placed on nodes running FPP 1.3. The workload deployment should not be modified with FPP infrastructure details.

### Migration steps

**Prerequisites**:

Nodes running FPP 1.X should be labelled with `fpp-manager.cennso.com/legacy-node=true`.

Example:

  ```bash
  kubectl label node worker-node-name fpp-manager.cennso.com/legacy-node=true
  ```

If FPP 1.X nodes are not labelled, FPP 2.0 removes uplink VPPInterface objects and connectivity with the workload on these nodes is lost

If SRIOV VFs are used as FPP uplinks, check whether [the known issue with SRIOV VF MAC address set](#sriov-vf-mac-conflict) is not occurring.

1. Install FPP-CRDs chart in version `2.0.0`.

2. Ensure that cert-manager is running in the cluster.

3. Install FPP Operator Helm chart in version `2.0.0`.

  Sample configuration:

  ```yaml
  # -- Define non default image
  # image:
  #   repository: registry.cennso.com/cennso-dev/fpp-manager
  #   tag: "feature-add-chart-cennso-340-v2.0.0-rc.3.8-d707c377_release"

  # -- Enable detailed logging
  # logLevel: trace
  # dumpControllerEvents: true

  # -- Enable multiple FPP Operators by specifying non default label
  # slice: "testing"

  # -- Set resources that will handle production cluster
  resources:
    cpu: 1
    memory: 512Mi

  imagePullSecrets:
  - name: cur-image-pull-secret
  ```

4. Deprovision FPP 1.X from the node that is being upgraded.

  Sample command to remove FPP 1.3.2 node selector:

  ```bash
  kubectl label node canary-worker-node fpp-manager.cennso.com/fpp-
  ```

5. Remove the legacy node label.

  Sample command to remove legacy node label:

  ```bash
  kubectl label node canary-worker-node fpp-manager.cennso.com/legacy-node-
  ```

6. Label the canary node with a new label.

  ```bash
  kubectl label node canary-worker-node fpp-manager.cennso.com/fpp=2.0.0
  ```

7. Install the FPP chart in version `2.0.0`.

  The `values` YAML file for FPP 2.0.0 chart can be the same as for FPP 1.3.2 deployment. Example:

  ```yaml
    uplinkResources:
      openshift.io/uplink0_vfio: fpp/uplink0
      openshift.io/uplink1_vfio: fpp/uplink1

    nodeSelector:
       fpp-manager.cennso.com/fpp: "2.0.0"

    buffersPerNuma: 512000

    imagePullSecrets:
    - name: cur-image-pull-secret
  ```

8. For Grafana and Prometheus, install FPP-support chart in version 2.0.0.

  ```yaml
  prometheus:
    servicemonitor:
      enabled: true
  dashboard:
    enabled: true
  ```

After validation that the workload pods on canary nodes work ok, other nodes in the cluster can be upgraded to FPP 2.0 using steps 4.-7.
