From 066789be3c3948b5cc472c9eabce36d415b9f812 Mon Sep 17 00:00:00 2001 From: David Morel Date: Wed, 28 Jun 2023 17:34:47 +0200 Subject: [PATCH] Architecture: Add high level view of networking Signed-off-by: David Morel --- .../img/architecture/Network-Stack-Component.svg | 1 + docs/architecture.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 assets/img/architecture/Network-Stack-Component.svg diff --git a/assets/img/architecture/Network-Stack-Component.svg b/assets/img/architecture/Network-Stack-Component.svg new file mode 100644 index 00000000..5a2efed2 --- /dev/null +++ b/assets/img/architecture/Network-Stack-Component.svg @@ -0,0 +1 @@ +Wednesday, June 28, 2023 at 4:54 PM Central European Summer Time[Component] XCP-ng - Network StackPV Drivers[Container]VIF Frontend[Component]-Network Stack[Container]VIF Backend[Component: C]VIF driver running on hostOpen vSwitch[Component: C]Network core of XCP-ngHost Kernel NetworkStack[Component: C]Kernel Network handlingXAPI[Container: OCaml, Python, C, […]]Centralized API to configure anXCP-ng host and its VMsConfiguresRemove link.Link options.ConfiguresRemove link.Link options.Sends packets toRemove vertex.Remove link.Link options.Receivedspackets fromRemove vertex.Remove link.Link options.Sends packets toRemove vertex.Remove link.Link options.ConfiguresRemove link.Link options.Routes packets tothe right portRemove vertex.Remove link.Link options.Sends packets toRemove vertex.Remove link.Link options.Receivedspackets fromRemove vertex.Remove link.Link options.Hooks early inRemove vertex.Remove link.Link options. \ No newline at end of file diff --git a/docs/architecture.md b/docs/architecture.md index 1318f5cb..883746e2 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -23,6 +23,20 @@ Here is how they organize and interface with each others: ![c4 container diagram of XCP-ng](../assets/img/architecture/XCP-ng-Container.svg) +## Network + +This parts focuses on XCP-ng and Para-Virtualized VMs. + +In XCP-ng, at the dom0 level, most of the networking is handled by [Open vSwitch](http://www.openvswitch.org/) for routing, filtering, tunneling and more. It hooks early in the Linux network stack, and the PV drivers handle the devices and their communication with the VMs. + +![c4 component diagram of XCP-ng's Network Stack](../assets/img/architecture/Network-Stack-Component.svg) + +The VIF driver is splitted in two parts: +- the backend that runs on the dom0 and creates network interfaces named `vif[…].0`, like `vif1.0` +- the frontend that runs on the guest VM and creates `enX0` + +This driver communicates between the two sides through shared memory pages. + ## Storage ### Virtual disks on HVMs and PV guests