> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/fpp/2.11/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/2.11/releases/1.2.0.md).

# Fast Path Provider Manager 1.2.0

Fast Path Provider (FPP) v1.2.0 brings multiple updates and bug fixes. The most important ones are:

- Support for Kubernetes 1.22+
- Support kernel 5.15 and newer and cgroups v2
- GRE tunnel support
- Direct NIC management for uplinks and external network interfaces
- Manual configuration of VPP interfaces managed by VPPConfig and VPPInterface objects
- Static CPU core assignment for use by VPP
- New FPPNetwork custom resource (CR)
- Referencing FPPNetwork, RoutingTable, and VPPInterface objects by name
- Instance mode for FPP deployment
- New FPP Overview Grafana dashboard
- Configuration option for logging level added
- New DPDK NIC queue configuration
- Continuous reconciliation of uplinks and external network interfaces derived from VPPConfig
- Fixed memory leak in metrics code
- Fixed publishing error metrics

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

> **Warning**
>
> FPP v1.2.0 cannot be run alongside previous versions on the same cluster, FPP networks (VXLANs) on the new FPP
> version will not create a connection with old FPP nodes.

FPP-CRD 1.2.0 is backward compatible with the previous release 1.1.0. CRD changes
are only additive, and FPP 1.1.0 can work with FPP-CRD in v1.2.0 installed
in the cluster, except if new features such as named references to other CRs are being used in these resources,
in which case such CRs will not be handled properly by the older version.

## Features

### Support for Kubernetes 1.22+

Kubernetes **apiVersion** CustomResourceDefinition (CRD) was updated to version
`apiextensions.k8s.io/v1` in FPP CRD. This means that you can now install FPP 1.2 on Kubernetes 1.22 and newer.

You can safely migrate FPP CRD to a new one. Only new attributes, which are not mandatory, are added to the object
definitions. You can safely update FPP CRDs to a new one. The CRDs are backward-compatible with FPP 1.1, that is,
they don't remove any existing attributes and only add new ones, and FPP 1.1 can run with the new CRDs installed in the
cluster.

To update FPP CRDs, apply the FPP CRD chart version 1.2.0 to the cluster. The chart supports Kubernetes 1.16 and newer.

### Support newer kernel (5.15) and cgroups v2

Cgroups v2 introduces a new file layout for the cgroup filesystem, which is used by FPP for VPP CPU pinning. If your Linux
kernel uses cgroups v2, use FPP 1.2.0 which supports the new cgroup filesystem layout. Earlier FPP versions will fail
with the following message in the FPP pod logs:

```
ERRO[0000] unable to start VPP                           error="error getting available CPU cores: can't parse \"sys/fs/cgroup/cpuset/cpuset.cpus\": bad cpu list: \"\"" logger=setup
```

To check which version of cgroups is used by the kernel on the node, log in to the machine and check for these files:

- `/sys/fs/cgroup/cpuset/cpuset.cpus` – this file supports old cgroups, FPP 1.1.0 and 1.2.0 will work
- `/sys/fs/cgroup/cpuset.cpus.effective` – this file supports new cgroups, minimal FPP 1.2.0 is required

To check cgroup version used by the kernel on the node, run the following command on the machine:

```bash
grep cgroup /proc/mounts
```

In case the system uses v2 cgroups, the output will be

```
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
```

With cgroups v1, the output will be

```
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
...
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
...
```

FPP 1.1 supports only cgroups v1, and FPP 1.2 supports both v1 and v2 cgroups versions.

Kernel versions from 5.4 to 5.13 use the cgroups v1 (Ubuntu 18.04.5, 20.04.4).
Ubuntu 22.04 and 20.04.5 use kernel 5.15. FPP 1.2.0 supports both old and newer kernels.

### GRE tunnel support

GRE tunnels are added as a new interface type supported by VPPInterface CR. To create a GRE tunnel,
you need to specify the source interface or the source IP address and also the destination IP address.
At the moment, FPP only supports L3 GRE tunnels. A routing table ID or routing table name can be specified
for use for the encapsulated traffic. Keyed GRE tunnels are supported as defined in `RFC 2890`.

For more information, read the [VPPInterface - GRE Tunnel](https://docs.cennso.com/components/fpp/2.11/crs.md#vppinterface-gre-tunnel) document.

### Direct NIC management for uplinks and external network interfaces

It is now possible to specify Physical Function (PF) interfaces for uplinks and external network interfaces.
In this case, the SR-IOV Network Operator, which assigns the Virtual Functions (VFs) to the FPP pods, is no longer used.
You can define the PCI IDs for NIC PFs statically in the chart values, for example:

```
directNICMapping:
  nic:
  - "0000:8a:00.1"
  - "0000:8a:00.3"
```

For more details, read the [FPP documentation](https://docs.cennso.com/components/fpp/2.11/installation/installation-common.md#uplinks-using-direct-nic-assignment).

### VPP CLI command-based configuration VPP interfaces managed by VPPConfig and VPPInterface objects

The new field of **assumedInterfaces** was introduced in [VPPConfig CR](https://docs.cennso.com/components/fpp/2.11/crs.md#vppconfig-objects),
which allows for VPP CLI command-based configuration of VPP interfaces. This allows you to use `beforeCommands`
field in VPPConfig to configure interface types that aren't supported by FPP explicitly yet, such as
VPP subinterfaces that correspond to VLANs, and then represent these interfaces using VPPInterface objects.

For more details, read the [FPP documentation](https://docs.cennso.com/components/fpp/2.11/installation/multinode-direct-nic.md#steps).

### Static CPU core assignment for use by VPP

FPP helm chart deployment introduces a new feature of static core allocation for the VPP process,
instead of relying on Kubernetes CPU Manager to assign random CPU resources. This enables
to dedicate specific CPU cores for VPP packet processing. When the assigned cores are also
isolated from kernel process scheduling, this reduces the interference from other workloads.

To specify CPU cores in chart configuration, use `vpp.staticCPUCores`:

```yaml
vpp:
  staticCPUCores: 27,28,29,30,31
```

For more details, read the [CPU pinning documentation](https://docs.cennso.com/components/fpp/2.11/configuration/resource-configuration.md#cpu-pinning).

### New FPPNetwork CR

[FPPNetwork](https://docs.cennso.com/components/fpp/2.11/crs.md#fppnetwork-objects) is a new cluster-wide CR that will eventually replace `VXLAN` objects.
It allows one to create FPP-based networks using various tunnelling protocols.
Although only VXLAN is supported at the moment, support for more protocols
like GENEVE may be added later.

> **Warning**
>
> Using FPPNetwork is not backward compatible with the previous versions of FPP.

### Referencing FPPNetwork, RoutingTable, and VPPInterface objects by name

Until now, the network was supposed to be declared by VNI, routing table by a table number, and IP address by a string.

FPP 1.2.0 introduces name reference, so it's now possible to specify **networkName** instead of **bridgeDomain**
in VPPInterface object specification or **vni**** inside a NetworkAttachmentDefinition (NAD). Instead of providing
IP address as a plain string, you can now use VPPInterface **ifName**, for example in GRE interface definition.
Also when defining a GRE tunnel, you can use the routing table name instead of the routing table ID.

This is how the NAD definition looked like up till now:

```yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: fpp-interface
spec:
  config: |-
    {
      "cniVersion": "0.3.0",
      "ipam": {
        "addresses":
        [
          {
            "address": "10.0.0.1/24"
          }
        ],
        "type": "static"
      },
      "name": "srv",
      "table": 200,
      "type": "fpp-cni",
      "vni": 10,
      "vppIfaceType": "memif"
    }
```

You can now write the NAD definition in the following manner:

```yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: fpp-interface
spec:
  config: |-
    {
      "cniVersion": "0.3.0",
      "ipam": {
        "addresses":
        [
          {
            "address": "10.0.0.1/24"
          }
        ],
        "type": "static"
      },
      "name": "srv",
      "tableName": "gre-outer-table",
      "type": "fpp-cni",
      "networkName": "fpp-based-net",
      "vppIfaceType": "memif"
    }
```

For IP address and routing table names, the following configuration of the GRE interface can be used:

```yaml
vppInterfaces:
- ifName: mygre
  tableName: gre-inner-table
  greTunnel:
    sourceIf: srv # instead of <sourceIP: 10.0.0.1>
    destIP: 10.0.0.2
    encapTableName: gre-outer-table # instead of <encapVRFID: 10>
```

> **Warning**
>
> Specifying **networkName**/**tableName** in VPPInterface and NAD is not backward compatible with the previous versions of FPP.

### Instance mode for FPP deployment

FPP Helm chart in version 1.2 allows you to deploy FPP either as a node or as an instance. If you deploy FPP as a node,
the VPP Switch will use a DaemonSet. Only one VPP switch per node is allowed. Node mode provides
the usual VPP-based L2 switch, using Kubernetes API as a configuration source.

If you deploy the helm chart using instance mode, it will use Kubernetes Deployment to spawn standalone,
VPP-based CNFs which use FPP CRs for configuration. Instance mode makes it possible to build CNFs based
on VPP, reusing FPP Manager's CRs and VPP configuration management capabilities.

For more details, follow the [instance mode](https://docs.cennso.com/components/fpp/2.11/installation/cgw-2.0.md#fpp-deployment-using-instance-mode) deployment guide.

### New FPP Overview Grafana dashboard

In this release, the FPP Support Helm chart provides a Grafana dashboard for an overview of the FPP metrics.
To install the dashboard, specify these values in the `fpp-support` chart:

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

Prometheus ServiceMonitor provides additional labels to FPP metrics for the dashboard to work properly.

### Configuration option for logging level

The new FPP version introduces the following logging level values: `trace`, `debug`, `info`, and `error` (the latter also applies to warnings).
Up to now, the `trace` level was the only possible option. Since FPP 1.2, the
`debug` level is configured as default. To change the log level, specify the value
of the **logLevel** parameter in the `values.yaml`:

```yaml
# -- Sets verbosity of the logging, possible values trace/debug/info/error
logLevel: debug
```

### New DPDK NIC queue configuration

Up till now, VPP `startup.conf` had parameters of the RX/TX queue size hardcoded to `12`.
However, for some NIC types, the maximum number of queues was smaller than that,
and due to the specifics of the driver that could cause just one queue to be configured.
Now you can configure the DPDK NIC queue parameters by specifying the following chart values:

```yaml
uplinkResources:
  dummy.io/uplink-1:
    network: uplink-1
    numRxQueues: 10
    numTxQueues: 8
    numRxDesc: 1024
    numTxDesc: 512
```

If none of these are specified, the default values are used:

| Parameter | Default value |
| --- | --- |
| **num-rx-queues** | the number of worker cores, or `1` in case of a non-multicore setup |
| **num-tx-queues** | the number of worker cores, or `1` in case of a non-multicore setup |
| **num-rx-desc** | `2048` |
| **num-tx-desc** | `2048` |

For more details, refer to the [documentation](https://docs.cennso.com/components/fpp/2.11/devel/env-vars.md#uplink-related-env-vars).

## Fixes

### Continuous reconciliation of uplinks and external interfaces

The set of VPPInterfaces that correspond to the uplinks and the external network interfaces
and are derived from the corresponding VPPConfig sections is now continuously reconciled
against the changes in VPPConfig. As the result, FPP no longer has to restart when uplink
or external network configuration is changed in an applicable VPPConfig. Moreover, as
a consequence, stale uplinks and external network interfaces are removed upon startup.

This fixes issues [#204](https://github.com/travelping/fpp-manager/issues/204) and [#157](https://github.com/travelping/fpp-manager/issues/157).

### Metrics issues fixed

Up till now, VPP error metrics were using labels to represent error counters.
This caused the memory module to leak memory during repeated metric requests.
As a solution, we now publish VPP errors as values, not labels.

This fixes issue [#208](https://github.com/travelping/fpp-manager/issues/208).

## Known issue

### Low TAP performance under static load

Under a particular kind of synthetic load, on Intel E810 NICs, the maximum throughput for TAP interfaces
is reduced and may not meet the required KPIs.

There’s a problem with the IP-based distribution of traffic among queues in the VPP tap driver.
When using tap driver for Linux networking-based pods, 1 Mpps throughput is expected
if diverse TCP/UDP source/destination port combinations appear in the packets, even if few server ports are being used)
and 0.4 Mpps is expected if there are few source/destination port combinations, even if the source/destination IP
addresses vary. Thus, with most cases of real-world traffic 1 Mpps is expected.

## Migration guide

### 1.1 -> 1.2

> **Warning**
>
> FPP v1.2.0 cannot be run alongside previous versions on the same cluster, FPP networks (VXLANs) on the new FPP version will not create a connection with old FPP nodes. Before you upgrade to the newest version, migrate the FPP-based workloads from the nodes being upgraded.

> **Warning**
>
> Before updating to v1.2.0, remove VPPInterface objects of uplinks for nodes where FPP is being upgraded.

> **Warning**
>
> FPP upgrade will cause network downtime between 30 s and 1 minute for the workload pods located on the affected node.
> This kind of downtime may affect CNFs implementing 3GPP network functions, as standard path maintenance procedures
> may trigger sessions termination when there is no connectivity between SMC and UPG CNFs.

Follow these steps to upgrade FPP from 1.1 to 1.2 using Helm charts:

1. Install the `fpp-crd` Helm chart in version 1.2.0.
1. Migrate FPP-based workload from nodes under the upgrade. Do not mix workload spawned on nodes running on different versions of FPP (1.1 and 1.2).
1. Remove VPPInterface objects for uplink and external network interfaces for all nodes you want to upgrade.
1. Install the `fpp-support` Helm chart in version 1.2.0.
1. Install the `fpp` Helm chart in version 1.2.0.

To check which objects from the uplink `VPPInterfaces` should be deleted, run this command on a cluster under migration:

```
kubectl get vppinterfaces.fpp-manager.cennso.com -o jsonpath='{range.items[*]}{.metadata.name}:{.spec.ifName}{"\n"}{end}' -n <fpp-ns> -l fpp-manager.cennso.com/plumbing-node={NODE_NAME}
```

The output looks like this:

```
<node-name>-<suffix>:<interface-name>
wk-node1.cennso.net-0:uplink0n0
wk-node1.cennso.net-1:uplink1n0
wk-node1.cennso.net-bond:bond0
wk-node1.cennso.net-ext-net-0:ext-net0n0
```

VPPInterfaces with names starting with `uplink`, `bond`, and all external interfaces configured in VPPConfig
must be deleted before installing FPP 1.2.0.
