docs: convert plugins doc md->rst
[vpp.git] / docs / developer / corearchitecture / softwarearchitecture.rst
1 Software Architecture
2 =====================
3
4 The fd.io vpp implementation is a third-generation vector packet
5 processing implementation specifically related to US Patent 7,961,636,
6 as well as earlier work. Note that the Apache-2 license specifically
7 grants non-exclusive patent licenses; we mention this patent as a point
8 of historical interest.
9
10 For performance, the vpp dataplane consists of a directed graph of
11 forwarding nodes which process multiple packets per invocation. This
12 schema enables a variety of micro-processor optimizations: pipelining
13 and prefetching to cover dependent read latency, inherent I-cache phase
14 behavior, vector instructions. Aside from hardware input and hardware
15 output nodes, the entire forwarding graph is portable code.
16
17 Depending on the scenario at hand, we often spin up multiple worker
18 threads which process ingress-hashes packets from multiple queues using
19 identical forwarding graph replicas.
20
21 VPP 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
45 It’s important to understand each of these layers in a certain amount of
46 detail. Much of the implementation is best dealt with at the API level
47 and otherwise left alone.