# fdio/vpp architecture

> Architecture diagram of the GitHub repository fdio/vpp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fdio/vpp
- Repository: https://github.com/fdio/vpp

## Overview

VPP is a modular, high-performance packet-processing platform providing switch/router functionality. A typical operator or application configures it through its CLI or API; VPP applies that state while processing packets through its networking runtime and hardware interfaces. The map preserves major runtime, protocol, crypto, plugin, and client-facing capabilities visible in the tree. Several core links are dashed because the sampled excerpts do not show their runtime wiring; README-level product descriptions support the overall role, not specific call paths.

Main entry points: [`src/vpp/vnet/main.c`](https://github.com/fdio/vpp/blob/master/src/vpp/vnet/main.c) (VPP application), [`src/vnet/pipeline.h`](https://github.com/fdio/vpp/blob/master/src/vnet/pipeline.h) (VNET networking), [`src/vlibapi/api_helper_macros.h`](https://github.com/fdio/vpp/blob/master/src/vlibapi/api_helper_macros.h) (VPP API), [`src/vlib/main.c`](https://github.com/fdio/vpp/blob/master/src/vlib/main.c) (VLIB runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_app["VPP application<br/>[main.c]"]
  node_vlib["VLIB runtime<br/>[main.c]"]
  node_shared_memory["Shared memory<br/>[fifo_segment.c]"]
  node_session["Session layer<br/>[application.c]"]
end

subgraph group_networking["Networking"]
  node_networking["VNET networking<br/>[pipeline.h]"]
  node_drivers["Device drivers"]
  node_crypto["Crypto engines<br/>[main.c]"]
end

subgraph group_extensions["Extensions"]
  node_plugins["VPP plugins"]
  node_ipsec["IPsec engines"]
  node_snort["Snort integration<br/>[main.c]"]
end

subgraph group_interfaces["APIs and Clients"]
  node_api["VPP API"]
  node_api_client["C API client<br/>[client.c]"]
  node_python_api["Python API<br/>[vpp_papi.py]"]
  node_vat["API test client<br/>[main.c]"]
  node_vat2["JSON API client<br/>[main.c]"]
  node_memif["Memif client library<br/>[main.c]"]
  node_prometheus["Metrics exporter"]
end

node_operator(("Operator"))
node_network_result(("Packet forwarding"))

node_operator -.->|"configures"| node_app
node_operator -.->|"uses API"| node_api_client
node_operator -.->|"runs commands"| node_vat
node_api_client -.->|"sends requests"| node_api
node_python_api -.->|"sends requests"| node_api
node_vat -.->|"executes commands"| node_api
node_vat2 -.->|"executes JSON"| node_api
node_app -.->|"runs on"| node_vlib
node_vlib -.->|"uses segments"| node_shared_memory
node_app -.->|"hosts packet processing"| node_networking
node_networking -.->|"uses interfaces"| node_drivers
node_networking -.->|"extends features"| node_plugins
node_networking -.->|"uses crypto"| node_crypto
node_crypto -.->|"loads engines"| node_ipsec
node_plugins -.->|"includes integration"| node_snort
node_app -.->|"hosts sessions"| node_session
node_memif -.->|"exchanges packets"| node_shared_memory
node_app -.->|"exports metrics"| node_prometheus
node_networking -.->|"forwards packets"| node_network_result

click node_app "https://github.com/fdio/vpp/blob/master/src/vpp/vnet/main.c"
click node_vlib "https://github.com/fdio/vpp/blob/master/src/vlib/main.c"
click node_shared_memory "https://github.com/fdio/vpp/blob/master/src/svm/fifo_segment.c"
click node_session "https://github.com/fdio/vpp/blob/master/src/vnet/session/application.c"
click node_networking "https://github.com/fdio/vpp/blob/master/src/vnet/pipeline.h"
click node_drivers "https://github.com/fdio/vpp/tree/master/src/drivers"
click node_crypto "https://github.com/fdio/vpp/blob/master/src/vnet/crypto/main.c"
click node_plugins "https://github.com/fdio/vpp/tree/master/src/plugins"
click node_ipsec "https://github.com/fdio/vpp/tree/master/src/crypto_engines"
click node_snort "https://github.com/fdio/vpp/blob/master/src/plugins/snort/main.c"
click node_api "https://github.com/fdio/vpp/blob/master/src/vlibapi/api_helper_macros.h"
click node_api_client "https://github.com/fdio/vpp/blob/master/src/vpp-api/client/client.c"
click node_python_api "https://github.com/fdio/vpp/blob/master/src/vpp-api/python/vpp_papi/vpp_papi.py"
click node_vat "https://github.com/fdio/vpp/blob/master/src/vat/main.c"
click node_vat2 "https://github.com/fdio/vpp/blob/master/src/vat2/main.c"
click node_memif "https://github.com/fdio/vpp/blob/master/extras/libmemif/src/main.c"
click node_prometheus "https://github.com/fdio/vpp/blob/master/src/vpp/app/vpp_prometheus_push.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_vlib,node_shared_memory,node_session toneBlue
class node_networking,node_drivers,node_crypto toneAmber
class node_plugins,node_ipsec,node_snort toneMint
class node_api,node_api_client,node_python_api,node_vat,node_vat2,node_memif,node_prometheus toneRose
class node_operator,node_network_result toneIndigo
```

## Components

### Runtime

- [VPP application](https://github.com/fdio/vpp/blob/master/src/vpp/vnet/main.c): `src/vpp/vnet/main.c`
- [VLIB runtime](https://github.com/fdio/vpp/blob/master/src/vlib/main.c): `src/vlib/main.c`
- [Shared memory](https://github.com/fdio/vpp/blob/master/src/svm/fifo_segment.c): `src/svm/fifo_segment.c`
- [Session layer](https://github.com/fdio/vpp/blob/master/src/vnet/session/application.c): `src/vnet/session/application.c`

### Networking

- [VNET networking](https://github.com/fdio/vpp/blob/master/src/vnet/pipeline.h): `src/vnet/pipeline.h`
- [Device drivers](https://github.com/fdio/vpp/tree/master/src/drivers): `src/drivers`
- [Crypto engines](https://github.com/fdio/vpp/blob/master/src/vnet/crypto/main.c): `src/vnet/crypto/main.c`

### Extensions

- [VPP plugins](https://github.com/fdio/vpp/tree/master/src/plugins): `src/plugins`
- [IPsec engines](https://github.com/fdio/vpp/tree/master/src/crypto_engines): `src/crypto_engines`
- [Snort integration](https://github.com/fdio/vpp/blob/master/src/plugins/snort/main.c): `src/plugins/snort/main.c`

### APIs and Clients

- [VPP API](https://github.com/fdio/vpp/blob/master/src/vlibapi/api_helper_macros.h): `src/vlibapi/api_helper_macros.h`
- [C API client](https://github.com/fdio/vpp/blob/master/src/vpp-api/client/client.c): `src/vpp-api/client/client.c`
- [Python API](https://github.com/fdio/vpp/blob/master/src/vpp-api/python/vpp_papi/vpp_papi.py): `src/vpp-api/python/vpp_papi/vpp_papi.py`
- [API test client](https://github.com/fdio/vpp/blob/master/src/vat/main.c): `src/vat/main.c`
- [JSON API client](https://github.com/fdio/vpp/blob/master/src/vat2/main.c): `src/vat2/main.c`
- [Memif client library](https://github.com/fdio/vpp/blob/master/extras/libmemif/src/main.c): `extras/libmemif/src/main.c`
- [Metrics exporter](https://github.com/fdio/vpp/blob/master/src/vpp/app/vpp_prometheus_push.c): `src/vpp/app/vpp_prometheus_push.c`

### Other components

- **Operator**
- **Packet forwarding**

## Connections

- Operator → VPP application: configures
- Operator → C API client: uses API
- Operator → API test client: runs commands (evidence: `src/vat/main.c`)
- C API client → VPP API: sends requests (evidence: `src/vpp-api/client/client.c`)
- Python API → VPP API: sends requests
- API test client → VPP API: executes commands (evidence: `src/vat/main.c`)
- JSON API client → VPP API: executes JSON (evidence: `src/vat2/main.c`)
- VPP application → VLIB runtime: runs on
- VLIB runtime → Shared memory: uses segments
- VPP application → VNET networking: hosts packet processing
- VNET networking → Device drivers: uses interfaces
- VNET networking → VPP plugins: extends features
- VNET networking → Crypto engines: uses crypto
- Crypto engines → IPsec engines: loads engines
- VPP plugins → Snort integration: includes integration
- VPP application → Session layer: hosts sessions
- Memif client library → Shared memory: exchanges packets
- VPP application → Metrics exporter: exports metrics
- VNET networking → Packet forwarding: forwards packets
