blob: 7f8a0e0464565c1ad99e6ea5fd0308e8f7dc4424 [file] [log] [blame]
Nathan Skrzypczak9ad39c02021-08-19 11:38:06 +02001Software Architecture
2=====================
3
4The fd.io vpp implementation is a third-generation vector packet
5processing implementation specifically related to US Patent 7,961,636,
6as well as earlier work. Note that the Apache-2 license specifically
7grants non-exclusive patent licenses; we mention this patent as a point
8of historical interest.
9
10For performance, the vpp dataplane consists of a directed graph of
11forwarding nodes which process multiple packets per invocation. This
12schema enables a variety of micro-processor optimizations: pipelining
13and prefetching to cover dependent read latency, inherent I-cache phase
14behavior, vector instructions. Aside from hardware input and hardware
15output nodes, the entire forwarding graph is portable code.
16
17Depending on the scenario at hand, we often spin up multiple worker
18threads which process ingress-hashes packets from multiple queues using
19identical forwarding graph replicas.
20
21VPP Layers - Implementation Taxonomy
22------------------------------------
23
24.. figure:: /_images/VPP_Layering.png
25 :alt: image
26
27 image
28
29- VPP Infra - the VPP infrastructure layer, which contains the core
30 library source code. This layer performs memory functions, works with
31 vectors and rings, performs key lookups in hash tables, and works
32 with timers for dispatching graph nodes.
33- VLIB - the vector processing library. The vlib layer also handles
34 various application management functions: buffer, memory and graph
35 node management, maintaining and exporting counters, thread
36 management, packet tracing. Vlib implements the debug CLI (command
37 line interface).
38- VNET - works with VPP's networking interface (layers 2, 3, and 4)
39 performs session and traffic management, and works with devices and
40 the data control plane.
41- Plugins - Contains an increasingly rich set of data-plane plugins, as
42 noted in the above diagram.
43- VPP - the container application linked against all of the above.
44
45It’s important to understand each of these layers in a certain amount of
46detail. Much of the implementation is best dealt with at the API level
47and otherwise left alone.