From d95804eed18d38a6a1cdf9ff15603c3fa2f62926 Mon Sep 17 00:00:00 2001 From: Ric Li Date: Thu, 16 Nov 2023 15:23:28 +0800 Subject: [PATCH] update the doc Signed-off-by: Ric Li --- lib/src/mt_instance.c | 1 + manager/README.md | 19 +++++++++++++++++-- manager/manager-design.svg | 4 ++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 manager/manager-design.svg diff --git a/lib/src/mt_instance.c b/lib/src/mt_instance.c index 53105997c..11c23c880 100644 --- a/lib/src/mt_instance.c +++ b/lib/src/mt_instance.c @@ -56,6 +56,7 @@ int mt_instance_get_lcore(struct mtl_main_impl* impl, unsigned int lcore_id) { int response = msg.body.response_msg.response; + /* retuen negative value incase user check with < 0 */ return -response; } diff --git a/manager/README.md b/manager/README.md index 266aa7ceb..4a32f79b7 100644 --- a/manager/README.md +++ b/manager/README.md @@ -1,9 +1,20 @@ -# MTL Manager +# MTL Manager Documentation -Manager is a daemon server running under root privilege. It is responsible for managing the instances of MTL and handling control plane configurations which require high privileges. +## Overview + +![design](manager-design.svg) + +MTL Manager is a daemon server designed to operate with root privileges. Its primary role is to manage the lifecycle and configurations of MTL instances. It addresses a variety of administrative tasks, including: + +- Lcore Management: Ensures that MTL instances are aware of the lcores used by others, optimizing resource allocation. +- eBPF/XDP Loader: Dynamically loads and manages eBPF/XDP programs for advanced packet processing and performance tuning. +- NIC Configuration: Configures Network Interface Cards (NICs) with capabilities like adding or deleting flow and queue settings. +- Instances Monitor: Continuously monitors MTL instances, providing status reporting and clearing mechanisms. ## Build +To compile the MTL Manager, use the following commands: + ```bash meson setup build meson compile -C build @@ -11,6 +22,10 @@ meson compile -C build ## Run +To run the MTL Manager, execute: + ```bash sudo ./build/MtlManager ``` + +This command will start the MTL Manager with root privileges, which are necessary for the advanced eBPF and network configurations and management tasks it performs. diff --git a/manager/manager-design.svg b/manager/manager-design.svg new file mode 100644 index 000000000..7f2920bbe --- /dev/null +++ b/manager/manager-design.svg @@ -0,0 +1,4 @@ + + + +mtl managermtl instancemtl instancemtl instancemtl_manager.socklistenconnectconnectconnectwritewritewriteread        struct message {             header(magic, type),             body(union)        }LcoremanagementXDP loader,send map fdset port filterNIC managementStatus clearon clientcrush/disconnect \ No newline at end of file