Skip to content

Commit

Permalink
add pending resimulatin state.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Mar 11, 2024
1 parent ee2e49f commit 3cf763c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 5 additions & 4 deletions dash-pipeline/bmv2/dash_metadata.p4
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ enum bit<8> dash_ha_role_t {

// Flow sync state
enum bit<8> dash_ha_flow_sync_state_t {
FLOW_MISS = 0,
FLOW_CREATED = 1,
FLOW_SYNCED = 2,
FLOW_PENDING_DELETE = 3
FLOW_MISS = 0, // Flow not created yet
FLOW_CREATED = 1, // Flow is created but not synched or waiting for ack
FLOW_SYNCED = 2, // Flow has been synched to its peer
FLOW_PENDING_DELETE = 3, // Flow is pending deletion, waiting for ack
FLOW_PENDING_RESIMULATION = 4 // Flow is marked as pending resimulation
};

// HA flow sync operations
Expand Down
8 changes: 6 additions & 2 deletions documentation/high-avail/ha-api-hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ typedef enum _sai_dash_ha_flow_sync_state_t
SAI_DASH_HA_FLOW_SYNC_STATE_FLOW_MISS,
SAI_DASH_HA_FLOW_SYNC_STATE_FLOW_CREATED,
SAI_DASH_HA_FLOW_SYNC_STATE_FLOW_SYNCED,
SAI_DASH_HA_FLOW_SYNC_STATE_FLOW_PENDING_DELETE
SAI_DASH_HA_FLOW_SYNC_STATE_FLOW_PENDING_DELETE,
SAI_DASH_HA_FLOW_SYNC_STATE_FLOW_PENDING_RESIMULATION
} sai_dash_ha_flow_sync_state_t;
```

Expand All @@ -148,15 +149,18 @@ stateDiagram-v2
C: FLOW_CREATED
S: FLOW_SYNCED
D: FLOW_PENDING_DELETE
R: FLOW_PENDING_RESIMULATION
M --> C: Flow created
M --> S: Flow sync request<br>received on<br>standby node
C --> S: Flow sync ack received
S --> C: Flow resimulated
S --> R: Flow resimulation requested
R --> C: Flow updated
C --> D: Flow deleted
S --> D: Flow deleted
R --> D: Flow deleted
D --> M: Flow sync ack received
```
Expand Down

0 comments on commit 3cf763c

Please sign in to comment.