Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hld]: Support for multiple routing type actions #273

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 52 additions & 22 deletions documentation/general/dash-sonic-hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@

###### Revision

| Rev | Date | Author | Change Description |
|:---:|:-----------:|:---------------------:|:------------------------------------|
| 0.1 | 02/01/2022 | Prince Sunny | Initial version |
| 0.2 | 03/09/2022 | Prince Sunny | Packet Flows/DB Objects |
| 0.3 | 05/24/2022 | Oleksandr | Memory Footprints |
| 0.4 | 06/01/2022 | Prince Sunny | Design Considerations |
| 0.5 | 06/13/2022 | Chris Sommers | Schema Relationships |
| 0.6 | 08/05/2022 | Mukesh M Velayudhan | Outbound VNI derivation in pipeline |
| 0.7 | 08/09/2022 | Prince Sunny | Add Inbound Routing rules |
| 0.6 | 04/20/2022 | Marian Pritsak | APP_DB to SAI mapping |
| 0.8 | 09/30/2022 | Prabhat Aravind | Update APP_DB table names |
| Rev | Date | Author | Change Description |
|:----:|:-----------:|:---------------------:|:-----------------------------------------|
| 0.1 | 02/01/2022 | Prince Sunny | Initial version |
| 0.2 | 03/09/2022 | Prince Sunny | Packet Flows/DB Objects |
| 0.3 | 05/24/2022 | Oleksandr | Memory Footprints |
| 0.4 | 06/01/2022 | Prince Sunny | Design Considerations |
| 0.5 | 06/13/2022 | Chris Sommers | Schema Relationships |
| 0.6 | 08/05/2022 | Mukesh M Velayudhan | Outbound VNI derivation in pipeline |
| 0.7 | 08/09/2022 | Prince Sunny | Add Inbound Routing rules |
| 0.8 | 09/07/2022 | Marian Pritsak | APP_DB to SAI mapping |
| 0.9 | 09/30/2022 | Prabhat Aravind | Update APP_DB table names |
| 0.10 | 11/02/2022 | Lawrence Lee | Update DASH_ROUTING_TYPE_TABLE schema |


# About this Manual
Expand Down Expand Up @@ -273,20 +274,34 @@ dst_port = list of range of destination ports ',' separated

### 3.2.5 ROUTING TYPE

Two different schemas are used for the routing type table. The first is used when there is only a single action associated with a routing type:
```
DASH_ROUTING_TYPE_TABLE:{{routing_type}}: [
"action_name":{{string}}
"action_type": {{action_type}}
DASH_ROUTING_TYPE_TABLE:{{routing_type}}
"action_name": {{string}}
"action_type": {{action_type}}
"encap_type": {{encap type}} (OPTIONAL)
"vni": {{vni}} (OPTIONAL)
]

key = DASH_ROUTING_TYPE_TABLE:routing_type:action_name; routing type can be {direct, vnet, vnet_direct, vnet_encap, appliance, privatelink, privatelinknsg, servicetunnel}; action_name is a string
; field = value
action_name = action name as a string
action_type = action_type can be {maprouting, direct, staticencap, appliance, 4to6, mapdecap, decap, drop}
encap_type = encap type depends on the action_type - {vxlan, nvgre}
vni = vni value associated with the corresponding action. Applicable if encap_type is specified.
```

The second schema is used when multiple, ordered actions are associated with a routing type:
```
key = DASH_ROUTING_TYPE_TABLE:routing_type; routing type can be {direct, vnet, vnet_direct, vnet_encap, appliance, privatelink, privatelinknsg, servicetunnel}; actions can be a list of action_types
DASH_ROUTING_TYPE_TABLE:{{routing_type}}:{{action_name}}
"action_type": {{action_type}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further changes will be needed here since we cannot guarantee that all actions for a routing type will be programmed at the same time - there may be a delay between them which need to be handled before we push the updates to SAI

"action_order": {{int}}
"encap_type": {{encap type}} (OPTIONAL)
"vni": {{vni}} (OPTIONAL)

key = DASH_ROUTING_TYPE_TABLE:routing_type:action_name; routing type can be {direct, vnet, vnet_direct, vnet_encap, appliance, privatelink, privatelinknsg, servicetunnel}; action_name is a string
; field = value
action_name = action name as string
action_type = action_type can be {maprouting, direct, staticencap, appliance, 4to6, mapdecap, decap, drop}
action_order = an integer indicating what order to execute the action among all actions for the same routing_type.
encap_type = encap type depends on the action_type - {vxlan, nvgre}
vni = vni value associated with the corresponding action. Applicable if encap_type is specified.
```
Expand Down Expand Up @@ -652,26 +667,41 @@ Refer DASH documentation for the test plan.
},
{
"DASH_ROUTING_TYPE_TABLE:vnet": {
"name": "action1",
"action_name": "action1",
"action_type": "maprouting"
},
"OP": "SET"
},
{
"DASH_ROUTING_TYPE_TABLE:vnet_direct": {
"name": "action1",
"action_name": "action1",
"action_type": "maprouting"
},
"OP": "SET"
},
{
"DASH_ROUTING_TYPE_TABLE:vnet_encap": {
"name": "action1",
"action_type": "staticencap",
"encap_type": "vxlan"
"action_name": "action1",
"action_type": "staticencap",
"encap_type": "vxlan"
},
"OP": "SET"
},
{
"DASH_ROUTING_TYPE_TABLE:servicetunnel:4to6transform": {
"action_order": "1",
"action_type": "4to6"
},
"OP": "SET"
},
{
"DASH_ROUTING_TYPE_TABLE:servicetunnel:encap": {
"action_order": "2",
"action_type": "staticencap",
"encap_type": "vxlan"
},
"OP": "SET"
}
{
"DASH_ROUTE_TABLE:F4939FEFC47E:10.1.0.0/16": {
"action_type":"vnet",
Expand Down