Skip to content

Commit 4ae78fc

Browse files
authored
Minor update on HA detail design to align with the latest implementation. (#2044)
* Minor update on HA detail design to align with the latest implementation. #2044
1 parent 829cd83 commit 4ae78fc

File tree

1 file changed

+57
-54
lines changed

1 file changed

+57
-54
lines changed

doc/smart-switch/high-availability/smart-switch-ha-detailed-design.md

Lines changed: 57 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,59 @@
99
| 0.5 | 06/03/2024 | Riff Jiang | Added DASH BFD probe state update workflow and DB schema. |
1010
| 0.6 | 03/23/2025 | Riff Jiang | Split DPU table into DPU and REMOTE_DPU. Add FEATURE table. |
1111

12-
- [1. High level data flow](#1-high-level-data-flow)
13-
- [1.1. Upstream config programming path](#11-upstream-config-programming-path)
14-
- [1.2. State generation and handling path](#12-state-generation-and-handling-path)
15-
- [2. Database Schema](#2-database-schema)
16-
- [2.1. External facing configuration tables](#21-external-facing-configuration-tables)
17-
- [2.1.1. CONFIG\_DB (per-NPU)](#211-config_db-per-npu)
18-
- [2.1.1.1. DPU / vDPU definitions](#2111-dpu--vdpu-definitions)
19-
- [2.1.1.2. HA global configurations](#2112-ha-global-configurations)
20-
- [2.1.2. APPL\_DB (per-NPU)](#212-appl_db-per-npu)
21-
- [2.1.2.1. HA set configurations](#2121-ha-set-configurations)
22-
- [2.1.2.2. HA scope configurations](#2122-ha-scope-configurations)
23-
- [2.1.2.3. ENI placement table (scope = `eni` only)](#2123-eni-placement-table-scope--eni-only)
24-
- [2.1.3. DPU\_APPL\_DB (per-DPU)](#213-dpu_appl_db-per-dpu)
25-
- [2.1.3.1. DASH object tables](#2131-dash-object-tables)
26-
- [2.2. External facing state tables](#22-external-facing-state-tables)
27-
- [2.2.1. STATE\_DB (per-NPU)](#221-state_db-per-npu)
28-
- [2.2.1.1. HA scope state](#2211-ha-scope-state)
29-
- [2.2.1.1.1. Table key](#22111-table-key)
30-
- [2.2.1.1.2. Basic information](#22112-basic-information)
31-
- [2.2.1.1.3. HA related states](#22113-ha-related-states)
32-
- [2.2.1.1.4. Aggregated health signals for this HA scope](#22114-aggregated-health-signals-for-this-ha-scope)
33-
- [2.2.1.1.5. Ongoing HA operation state](#22115-ongoing-ha-operation-state)
34-
- [2.3. Tables used by HA internally](#23-tables-used-by-ha-internally)
35-
- [2.3.1. DPU\_APPL\_DB (per-DPU)](#231-dpu_appl_db-per-dpu)
36-
- [2.3.1.1. HA set configurations](#2311-ha-set-configurations)
37-
- [2.3.1.2. HA scope configurations](#2312-ha-scope-configurations)
38-
- [2.3.1.3. Flow sync sessions](#2313-flow-sync-sessions)
39-
- [2.3.2. APPL\_DB (per-NPU)](#232-appl_db-per-npu)
40-
- [2.3.2.1. DASH\_ENI\_FORWARD\_TABLE](#2321-dash_eni_forward_table)
41-
- [2.3.3. CHASSIS\_STATE\_DB (per-NPU)](#233-chassis_state_db-per-npu)
42-
- [2.3.3.1. DPU / vDPU state](#2331-dpu--vdpu-state)
43-
- [2.3.4. DPU\_STATE\_DB (per-DPU)](#234-dpu_state_db-per-dpu)
44-
- [2.3.4.1. HA set state](#2341-ha-set-state)
45-
- [2.3.4.2. HA scope state](#2342-ha-scope-state)
46-
- [2.3.4.3. Flow sync session states](#2343-flow-sync-session-states)
47-
- [2.3.4.4. DASH BFD probe state](#2344-dash-bfd-probe-state)
48-
- [3. Telemetry](#3-telemetry)
49-
- [3.1. HA state and related health signals](#31-ha-state-and-related-health-signals)
50-
- [3.2. Traffic forwarding related](#32-traffic-forwarding-related)
51-
- [3.2.1. NPU-to-DPU probe status (Per-HA Scope)](#321-npu-to-dpu-probe-status-per-ha-scope)
52-
- [3.2.2. NPU-to-DPU tunnel counters (Per-HA Scope)](#322-npu-to-dpu-tunnel-counters-per-ha-scope)
53-
- [3.3. DPU traffic handling related](#33-dpu-traffic-handling-related)
54-
- [3.3.1. DPU level counters (Per-DPU)](#331-dpu-level-counters-per-dpu)
55-
- [3.3.2. ENI-level traffic counters (Per-ENI)](#332-eni-level-traffic-counters-per-eni)
56-
- [3.3.3. ENI-level pipeline drop counters (Per-ENI)](#333-eni-level-pipeline-drop-counters-per-eni)
57-
- [3.3.4. ENI-level flow operation counters (Per-ENI)](#334-eni-level-flow-operation-counters-per-eni)
58-
- [3.4. Flow sync counters](#34-flow-sync-counters)
59-
- [3.4.1. Data plane channel probing (Per-HA Set)](#341-data-plane-channel-probing-per-ha-set)
60-
- [3.4.2. Inline flow sync (Per-ENI)](#342-inline-flow-sync-per-eni)
61-
- [3.4.3. Bulk sync related counters (Per-HA Set)](#343-bulk-sync-related-counters-per-ha-set)
62-
- [4. SAI APIs](#4-sai-apis)
63-
- [5. CLI commands](#5-cli-commands)
12+
1. [1. High level data flow](#1-high-level-data-flow)
13+
1. [1.1. Upstream config programming path](#11-upstream-config-programming-path)
14+
2. [1.2. State generation and handling path](#12-state-generation-and-handling-path)
15+
2. [2. Database Schema](#2-database-schema)
16+
1. [2.1. External facing configuration tables](#21-external-facing-configuration-tables)
17+
1. [2.1.1. CONFIG\_DB (per-NPU)](#211-config_db-per-npu)
18+
1. [2.1.1.1. DPU / vDPU definitions](#2111-dpu--vdpu-definitions)
19+
2. [2.1.1.2. HA global configurations](#2112-ha-global-configurations)
20+
2. [2.1.2. APPL\_DB (per-NPU)](#212-appl_db-per-npu)
21+
1. [2.1.2.1. HA set configurations](#2121-ha-set-configurations)
22+
2. [2.1.2.2. HA scope configurations](#2122-ha-scope-configurations)
23+
3. [2.1.2.3. ENI placement table (scope = `eni` only)](#2123-eni-placement-table-scope--eni-only)
24+
3. [2.1.3. DPU\_APPL\_DB (per-DPU)](#213-dpu_appl_db-per-dpu)
25+
1. [2.1.3.1. DASH object tables](#2131-dash-object-tables)
26+
4. [2.1.4. FEATURE](#214-feature)
27+
2. [2.2. External facing state tables](#22-external-facing-state-tables)
28+
1. [2.2.1. STATE\_DB (per-NPU)](#221-state_db-per-npu)
29+
1. [2.2.1.1. HA scope state](#2211-ha-scope-state)
30+
1. [2.2.1.1.1. Table key](#22111-table-key)
31+
2. [2.2.1.1.2. Basic information](#22112-basic-information)
32+
3. [2.2.1.1.3. HA related states](#22113-ha-related-states)
33+
4. [2.2.1.1.4. Aggregated health signals for this HA scope](#22114-aggregated-health-signals-for-this-ha-scope)
34+
5. [2.2.1.1.5. Ongoing HA operation state](#22115-ongoing-ha-operation-state)
35+
3. [2.3. Tables used by HA internally](#23-tables-used-by-ha-internally)
36+
1. [2.3.1. DPU\_APPL\_DB (per-DPU)](#231-dpu_appl_db-per-dpu)
37+
1. [2.3.1.1. HA set configurations](#2311-ha-set-configurations)
38+
2. [2.3.1.2. HA scope configurations](#2312-ha-scope-configurations)
39+
3. [2.3.1.3. Flow sync sessions](#2313-flow-sync-sessions)
40+
2. [2.3.2. APPL\_DB (per-NPU)](#232-appl_db-per-npu)
41+
1. [2.3.2.1. DASH\_ENI\_FORWARD\_TABLE](#2321-dash_eni_forward_table)
42+
3. [2.3.3. CHASSIS\_STATE\_DB (per-NPU)](#233-chassis_state_db-per-npu)
43+
1. [2.3.3.1. DPU / vDPU state](#2331-dpu--vdpu-state)
44+
4. [2.3.4. DPU\_STATE\_DB (per-DPU)](#234-dpu_state_db-per-dpu)
45+
1. [2.3.4.1. HA set state](#2341-ha-set-state)
46+
2. [2.3.4.2. HA scope state](#2342-ha-scope-state)
47+
3. [2.3.4.3. Flow sync session states](#2343-flow-sync-session-states)
48+
4. [2.3.4.4. DASH BFD probe state](#2344-dash-bfd-probe-state)
49+
3. [3. Telemetry](#3-telemetry)
50+
1. [3.1. HA state and related health signals](#31-ha-state-and-related-health-signals)
51+
2. [3.2. Traffic forwarding related](#32-traffic-forwarding-related)
52+
1. [3.2.1. NPU-to-DPU probe status (Per-HA Scope)](#321-npu-to-dpu-probe-status-per-ha-scope)
53+
2. [3.2.2. NPU-to-DPU tunnel counters (Per-HA Scope)](#322-npu-to-dpu-tunnel-counters-per-ha-scope)
54+
3. [3.3. DPU traffic handling related](#33-dpu-traffic-handling-related)
55+
1. [3.3.1. DPU level counters (Per-DPU)](#331-dpu-level-counters-per-dpu)
56+
2. [3.3.2. ENI-level traffic counters (Per-ENI)](#332-eni-level-traffic-counters-per-eni)
57+
3. [3.3.3. ENI-level pipeline drop counters (Per-ENI)](#333-eni-level-pipeline-drop-counters-per-eni)
58+
4. [3.3.4. ENI-level flow operation counters (Per-ENI)](#334-eni-level-flow-operation-counters-per-eni)
59+
4. [3.4. Flow sync counters](#34-flow-sync-counters)
60+
1. [3.4.1. Data plane channel probing (Per-HA Set)](#341-data-plane-channel-probing-per-ha-set)
61+
2. [3.4.2. Inline flow sync (Per-ENI)](#342-inline-flow-sync-per-eni)
62+
3. [3.4.3. Bulk sync related counters (Per-HA Set)](#343-bulk-sync-related-counters-per-ha-set)
63+
4. [4. SAI APIs](#4-sai-apis)
64+
5. [5. CLI commands](#5-cli-commands)
6465

6566
## 1. High level data flow
6667

@@ -527,7 +528,7 @@ When a HA set configuration on NPU side contains a local DPU, `hamgrd` will crea
527528
| | | version | Config version. |
528529
| | | vip_v4 | IPv4 Data path VIP. |
529530
| | | vip_v6 | IPv6 Data path VIP. |
530-
| | | owner | Owner of HA state machine. It can be `controller`, `switch`. |
531+
| | | owner | Owner of HA state machine. It can be `dpu`, `switch`. |
531532
| | | scope | Scope of HA set. It can be `dpu`, `eni`. |
532533
| | | local_npu_ip | The IP address of local NPU. It can be IPv4 or IPv6. Used for setting up the BFD session. |
533534
| | | local_ip | The IP address of local DPU. It can be IPv4 or IPv6. |
@@ -614,8 +615,10 @@ DPU state table stores the health states of each DPU. These data are collected b
614615
| DASH_HA_SCOPE_STATE | | | State of each HA scope. |
615616
| | \<HA_SCOPE_ID\> | | HA scope ID. It can be the HA set ID or ENI ID, depending on the which HA mode is used. |
616617
| | | last_updated_time | The last update time of this state in milliseconds. |
617-
| | | ha_role | The current HA role confirmed by ASIC. Please refer to the HA states defined in HA HLD. |
618+
| | | ha_role | The current HA role confirmed by ASIC. Please refer to the HA roles defined in HA HLD. |
618619
| | | ha_role_start_time | The time when HA role is moved into current one in milliseconds. |
620+
| | | ha_state | Please refer to the HA states defined in HA HLD. |
621+
| | | ha_state_start_time | The time when HA state is moved into current one in milliseconds. |
619622
| | | ha_term | The current term confirmed by ASIC. |
620623
| | | activate_role_pending | DPU is pending on role activation. |
621624
| | | flow_reconcile_pending | Flow reconcile is requested and pending approval. |

0 commit comments

Comments
 (0)