From a164c525a71c3d86c598f3965c2b8bee1435bca1 Mon Sep 17 00:00:00 2001 From: Dimitrios Markou Date: Mon, 22 Apr 2024 15:43:38 +0000 Subject: [PATCH] fix(evpn-bridge): add flow charts Signed-off-by: Dimitrios Markou --- docs/CreateVRF-overview.md | 135 ++++++++++++++++++++++ docs/NetlinkWatcherModule-VRF-overview.md | 23 ++++ 2 files changed, 158 insertions(+) create mode 100644 docs/CreateVRF-overview.md create mode 100644 docs/NetlinkWatcherModule-VRF-overview.md diff --git a/docs/CreateVRF-overview.md b/docs/CreateVRF-overview.md new file mode 100644 index 00000000..982e0f24 --- /dev/null +++ b/docs/CreateVRF-overview.md @@ -0,0 +1,135 @@ +# Create VRF example (Overview) + +```mermaid +sequenceDiagram + actor User as User + participant GrpcServer as GrpcServer + participant InfraDB as InfraDB + participant TaskManager as TaskManager + participant SubFram as SubFram + participant StorageLib as StorageLib + participant DB as DB + participant FrrModule as FrrModule + participant Frr as Frr + participant GenLinuxModule as GenLinuxModule + participant VendorLinuxModule as VendorLinuxModule + participant VendorModule as VendorModule + participant XpuFastpath as XpuFastpath + participant XpuLinuxSlowpath as XpuLinuxSlowpath + + User ->> GrpcServer: Create protobuf VRF + + GrpcServer ->> GrpcServer: Convert to infraDB model + + GrpcServer ->> InfraDB: Create infradb VRF + +rect rgb(255, 229, 204) + note right of User: Under global lock + + InfraDB ->> SubFram: Get Subscribed modules + SubFram -->> InfraDB: List[GenLinuxModule, VendorLinuxModule, FRRModule, VendorModule] + InfraDB ->> StorageLib: Store VRF intent + StorageLib ->> DB: Store VRF intent + InfraDB ->> TaskManager: Create a task to realize the stored VRF intent + GrpcServer -->> User: VRF has been created +end + +%% General Linux Module section +rect rgb(204, 255, 255) + note right of TaskManager: Task Manager Thread + TaskManager ->> GenLinuxModule: Notify GenLinux module + TaskManager ->> TaskManager: Wait until General Linux module update the Status of the VRF object in the DB +end + + +rect rgb(192, 192, 192) + note right of InfraDB: GenLinux module thread + GenLinuxModule ->> InfraDB: Get VRF infradb object + InfraDB -->> GenLinuxModule: VRF infradb object + GenLinuxModule ->> XpuLinuxSlowpath: ApplyLinuxConf() + + rect rgb(255, 229, 204) + note right of InfraDB: Under global lock + GenLinuxModule ->> InfraDB: Update VRF infradb object module status to success + InfraDB ->> TaskManager: VRF infradb object status has been updated from General Linux module perspective + InfraDB -->> GenLinuxModule: Status has been updated + end +end + +%% Vendor Linux Module section +rect rgb(204, 255, 255) + note right of TaskManager: Task Manager Thread + TaskManager ->> TaskManager: wake up and move on to the Vendor Linux module + TaskManager ->> VendorLinuxModule: Notify VendorLinux module + TaskManager ->> TaskManager: Wait until Vendor Linux module update the Status of the VRF object in the DB +end + + +rect rgb(192, 192, 192) + note right of InfraDB: VendorLinux module thread + VendorLinuxModule ->> InfraDB: Get VRF infradb object + InfraDB -->> VendorLinuxModule: VRF infradb object + VendorLinuxModule ->> XpuLinuxSlowpath: ApplyLinuxConf() + + rect rgb(255, 229, 204) + note right of InfraDB: Under global lock + VendorLinuxModule ->> InfraDB: Update VRF infradb object module status to success + InfraDB ->> TaskManager: VRF infradb object status has been updated from Vendor Linux module perspective + InfraDB -->> VendorLinuxModule: Status has been updated + end +end + +%% FRR Module section +rect rgb(204, 255, 255) + note right of TaskManager: Task Manager Thread + TaskManager ->> TaskManager: wake up and move on to the FRR module + TaskManager ->> FrrModule: Notify Frr module + TaskManager ->> TaskManager: Wait until FRR module update the Status of the VRF object in the DB +end + + +rect rgb(192, 192, 192) + note right of InfraDB: Frr module thread + FrrModule ->> InfraDB: Get VRF infradb object + InfraDB -->> FrrModule: VRF infradb object + FrrModule ->> Frr: ApplyFrrConf() + + rect rgb(255, 229, 204) + note right of InfraDB: Under global lock + FrrModule ->> InfraDB: Update VRF infradb object module status to success + InfraDB ->> TaskManager: VRF infradb object status has been updated from FRR module perspective + InfraDB -->> FrrModule: Status has been updated + end +end + +%% Vendor Module section +rect rgb(204, 255, 255) + note right of TaskManager: Task Manager Thread + TaskManager ->> TaskManager: wake up and move on to the Vendor module + TaskManager ->> VendorModule: Notify Vendor module + TaskManager ->> TaskManager: Wait until Vendor module update the Status of the VRF object in the DB +end + + +rect rgb(192, 192, 192) + note right of InfraDB: Vendor module thread + VendorModule ->> InfraDB: Get VRF infradb object + InfraDB -->> VendorModule: VRF infradb object + VendorModule ->> XpuFastpath: ApplyFastPathConf() + + rect rgb(255, 229, 204) + note right of InfraDB: Under global lock + VendorModule ->> InfraDB: Update VRF infradb object module status to success + InfraDB ->> InfraDB: Update VRF object overall operational status to UP + InfraDB ->> TaskManager: VRF infradb object status has been updated from Vendor module perspective + InfraDB -->> VendorModule: Status has been updated + end +end + +%% Module Section ends + +rect rgb(204, 255, 255) + note right of TaskManager: Task Manager Thread + TaskManager ->> TaskManager: Drop VRF realization Task. The VRF intent has been finally realized succesfully +end +``` diff --git a/docs/NetlinkWatcherModule-VRF-overview.md b/docs/NetlinkWatcherModule-VRF-overview.md new file mode 100644 index 00000000..df6b4c48 --- /dev/null +++ b/docs/NetlinkWatcherModule-VRF-overview.md @@ -0,0 +1,23 @@ +# Netlink Watcher Module VRF example (Overview) + +```mermaid +sequenceDiagram + participant XpuLinuxSlowpath as XpuLinuxSlowpath + participant NetlinkWatcher as NetlinkWatcher + participant InfraDB as InfraDB + participant VendorModule as VendorModule + participant XpuFastpath as XpuFastpath + + NetlinkWatcher ->> XpuLinuxSlowpath: Poll for changes in the Linux VRF configuration state + NetlinkWatcher ->> InfraDB: Fetch VRF infradb object + InfraDB -->> NetlinkWatcher: VRF infradb object + NetlinkWatcher ->> NetlinkWatcher: Create a NelinkDB snapshot which includes the latest polled linux configuration + annotated information from the VRF DB object + NetlinkWatcher ->> NetlinkWatcher: Compare the latest NetlinkDB snapshot with the older one + NetlinkWatcher ->> NetlinkWatcher: Delta between the two snapshots has been observed + + + + NetlinkWatcher ->> VendorModule: Notify Vendor Module to make changes on the pipeline (Fastpath) + + VendorModule ->> XpuFastpath: Apply pipeline (Fastpath) changes. +```