What is the Composable Network Application Processor (CNAP)?


CNAP is a flexible and ultra high performance software packet processing engine developed by Metaswitch to provide the foundation for virtualized network functions that handle data plane traffic such as the 5G User Plane Function (UPF).

At the heart of CNAP is a highly-tuned match-action classifier engine.   This can be configured to implement any arbitrary packet processing pipeline by means of a YAML document that describes the sequence of match-actions to be applied to each incoming packet.  For example, the upstream pipeline for the 5G UPF might include the following elements: identify session from GTP Tunnel Endpoint Identifier, strip GTP tunnel header, perform source address anti-spoofing check, identify this flow by finding a match with one of a set of Packet Detection Rules, apply bandwidth limit policing to this flow as per configured policy, perform usage reporting, apply Network Address Translation and route towards data network.

Optimized first stage of mobile packet core pipeline in CNAP

Optimized first stage of mobile packet core pipeline in CNAP

Like most high-performance packet processing engines, CNAP leverages the open source Data Plane Development Kit (DPDK) to maximize the efficiency of packet transfer between the network and the VNF workload.  But CNAP out-performs well-known DPDK-based packet processing engines such as Vector Packet Processor by a factor of about five, when applied to complex packet pipelines such as the 5G UPF.  This remarkable leap forward in performance has been achieved through the application of several breakthrough developments in packet processing:

  • CNAP supports match-action tables that allow lookups on multiple elements of the packet header in a single operation. With careful design of the packet pipeline, this allows multiple logical operations to be collapsed into a single match-action step.
  • CNAP enables the creation of pipelines that are highly optimized around the most common types of packet seen by the pipeline. For example, the CNAP pipeline for 5G UPF is optimized around payload packets passing between mobile subscribers and data networks, and uses a single lookup operation to distinguish between user and control plane packets, identify the user session, strip the GTP tunnel header, and apply the anti-spoofing check.
  • CNAP makes the best possible use of the L1/L2/L3 caches in Intel Architecture CPUs to maximize performance and efficiency. In addition to processing packets in batches, CNAP leverages explicit pre-fetch instructions and process interleaving to ensure that all match-action instructions, packet header data and lookup table data are in cache for the fastest possible execution.