From d7a5bc9a1aa9e0d41ab443aeb59d5a205bcf3a8c Mon Sep 17 00:00:00 2001 From: r12f Date: Sat, 1 Jun 2024 17:09:11 +0000 Subject: [PATCH] Multi-stage table support. --- dash-pipeline/Makefile | 5 +- dash-pipeline/SAI/specs/dash_acl.yaml | 139 +++++++++++++++--- .../SAI/specs/dash_direction_lookup.yaml | 14 +- dash-pipeline/SAI/specs/dash_eni.yaml | 22 +-- dash-pipeline/SAI/specs/dash_ha.yaml | 12 +- .../SAI/specs/dash_inbound_routing.yaml | 48 +++--- dash-pipeline/SAI/specs/dash_meter.yaml | 18 ++- .../SAI/specs/dash_outbound_ca_to_pa.yaml | 64 +++++--- .../SAI/specs/dash_outbound_routing.yaml | 108 ++++++++------ .../SAI/specs/dash_pa_validation.yaml | 14 +- dash-pipeline/SAI/specs/dash_tunnel.yaml | 53 +++++++ dash-pipeline/SAI/specs/dash_vip.yaml | 14 +- dash-pipeline/SAI/specs/dash_vnet.yaml | 6 +- dash-pipeline/SAI/specs/route.yaml | 18 ++- dash-pipeline/SAI/specs/sai_spec.yaml | 72 +++++---- .../SAI/utils/dash_p4/dash_p4_table.py | 6 +- .../SAI/utils/dash_p4/dash_p4_table_group.py | 25 ++-- dash-pipeline/SAI/utils/sai_spec/__init__.py | 2 +- .../SAI/utils/sai_spec/sai_api_p4_meta.py | 11 +- 19 files changed, 440 insertions(+), 211 deletions(-) create mode 100644 dash-pipeline/SAI/specs/dash_tunnel.yaml diff --git a/dash-pipeline/Makefile b/dash-pipeline/Makefile index 47fedf7d7..841ad33f3 100644 --- a/dash-pipeline/Makefile +++ b/dash-pipeline/Makefile @@ -177,8 +177,9 @@ sai: sai-headers sai-meta libsai sai-headers: p4 docker-saithrift-bldr-image-exists | SAI/SAI @echo "Generate SAI library headers and implementation..." - # Once the specs are checked in, we can use this to revert any local changes before generating the new specs. - # git checkout SAI/specs/* + # Revert any local changes before generating the new specs. + git clean -xf SAI/specs + git checkout SAI/specs/* mkdir -p SAI/lib diff --git a/dash-pipeline/SAI/specs/dash_acl.yaml b/dash-pipeline/SAI/specs/dash_acl.yaml index 1d7a771c0..9b8f7fd51 100644 --- a/dash-pipeline/SAI/specs/dash_acl.yaml +++ b/dash-pipeline/SAI/specs/dash_acl.yaml @@ -23,8 +23,10 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 50200087 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 50200087 + actions: {} - !!python/object:utils.sai_spec.sai_api.SaiApi name: dash_acl_rule description: '' @@ -102,21 +104,118 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 41950136 - actions: - SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_DASH_ACL_RULE_ACTION_PERMIT - id: 32161567 - attr_param_id: {} - SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE - id: 20706700 - attr_param_id: {} - SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_DASH_ACL_RULE_ACTION_DENY - id: 28146588 - attr_param_id: {} - SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE - id: 31424218 - attr_param_id: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 41950136 + actions: + SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + id: 32161567 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + id: 20706700 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY + id: 28146588 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + id: 31424218 + attr_param_id: {} + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 43016664 + actions: + SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + id: 32161567 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + id: 20706700 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY + id: 28146588 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + id: 31424218 + attr_param_id: {} + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 49695908 + actions: + SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + id: 32161567 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + id: 20706700 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY + id: 28146588 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + id: 31424218 + attr_param_id: {} + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 49209582 + actions: + SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + id: 18858683 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + id: 24263137 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY + id: 29962337 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + id: 26077229 + attr_param_id: {} + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 36478314 + actions: + SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + id: 18858683 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + id: 24263137 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY + id: 29962337 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + id: 26077229 + attr_param_id: {} + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 39012793 + actions: + SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + id: 18858683 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + id: 24263137 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY + id: 29962337 + attr_param_id: {} + SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + id: 26077229 + attr_param_id: {} diff --git a/dash-pipeline/SAI/specs/dash_direction_lookup.yaml b/dash-pipeline/SAI/specs/dash_direction_lookup.yaml index fb52e0525..c86c48a26 100644 --- a/dash-pipeline/SAI/specs/dash_direction_lookup.yaml +++ b/dash-pipeline/SAI/specs/dash_direction_lookup.yaml @@ -41,9 +41,11 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 44703784 - actions: - SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION - id: 17408972 - attr_param_id: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 44703784 + actions: + SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION + id: 17408972 + attr_param_id: {} diff --git a/dash-pipeline/SAI/specs/dash_eni.yaml b/dash-pipeline/SAI/specs/dash_eni.yaml index 8ffe338b6..1be5879be 100644 --- a/dash-pipeline/SAI/specs/dash_eni.yaml +++ b/dash-pipeline/SAI/specs/dash_eni.yaml @@ -53,13 +53,15 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 36648123 - actions: - SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI - id: 24618133 - attr_param_id: - SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ENI_ID: 1 + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 36648123 + actions: + SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI + id: 24618133 + attr_param_id: + SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ENI_ID: 1 - !!python/object:utils.sai_spec.sai_api.SaiApi name: eni description: '' @@ -1437,5 +1439,7 @@ sai_apis: valid_only: null deprecated: null p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 45859274 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 45859274 + actions: {} diff --git a/dash-pipeline/SAI/specs/dash_ha.yaml b/dash-pipeline/SAI/specs/dash_ha.yaml index d7164165f..a40afa19b 100644 --- a/dash-pipeline/SAI/specs/dash_ha.yaml +++ b/dash-pipeline/SAI/specs/dash_ha.yaml @@ -359,8 +359,10 @@ sai_apis: valid_only: null deprecated: null p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 45319666 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 45319666 + actions: {} - !!python/object:utils.sai_spec.sai_api.SaiApi name: ha_scope description: '' @@ -430,5 +432,7 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 49681752 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 49681752 + actions: {} diff --git a/dash-pipeline/SAI/specs/dash_inbound_routing.yaml b/dash-pipeline/SAI/specs/dash_inbound_routing.yaml index bdfa0990d..263215a35 100644 --- a/dash-pipeline/SAI/specs/dash_inbound_routing.yaml +++ b/dash-pipeline/SAI/specs/dash_inbound_routing.yaml @@ -113,26 +113,28 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 38920290 - actions: - SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP - id: 22253429 - attr_param_id: - SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_OR: 1 - SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_AND: 2 - SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE - id: 27987616 - attr_param_id: - SAI_INBOUND_ROUTING_ENTRY_SRC_VNET_ID: 1 - SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_OR: 2 - SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_AND: 3 - SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP - id: 32581635 - attr_param_id: {} - SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE - id: 22711915 - attr_param_id: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 38920290 + actions: + SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP + id: 22253429 + attr_param_id: + SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_OR: 1 + SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_AND: 2 + SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE + id: 27987616 + attr_param_id: + SAI_INBOUND_ROUTING_ENTRY_SRC_VNET_ID: 1 + SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_OR: 2 + SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_AND: 3 + SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP + id: 32581635 + attr_param_id: {} + SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE + id: 22711915 + attr_param_id: {} diff --git a/dash-pipeline/SAI/specs/dash_meter.yaml b/dash-pipeline/SAI/specs/dash_meter.yaml index cb5c81e25..1fa48f027 100644 --- a/dash-pipeline/SAI/specs/dash_meter.yaml +++ b/dash-pipeline/SAI/specs/dash_meter.yaml @@ -35,8 +35,10 @@ sai_apis: valid_only: null deprecated: null p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 45482818 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 45482818 + actions: {} - !!python/object:utils.sai_spec.sai_api.SaiApi name: meter_policy description: '' @@ -58,8 +60,10 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 40733610 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 40733610 + actions: {} - !!python/object:utils.sai_spec.sai_api.SaiApi name: meter_rule description: '' @@ -105,5 +109,7 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 44484556 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 44484556 + actions: {} diff --git a/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml b/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml index f972f9d89..1281c3204 100644 --- a/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml +++ b/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml @@ -97,6 +97,18 @@ sai_apis: allow_null: false valid_only: null deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_DASH_TUNNEL_ID + description: Action parameter DASH_TUNNEL_ID + type: sai_object_id_t + attr_value_field: u16 + default: SAI_NULL_OBJECT_ID + isresourcetype: false + flags: CREATE_AND_SET + object_name: SAI_OBJECT_TYPE_DASH_TUNNEL + allow_null: true + valid_only: null + deprecated: null - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute name: SAI_OUTBOUND_CA_TO_PA_ENTRY_FLOW_RESIMULATION_REQUESTED description: Action parameter FLOW_RESIMULATION_REQUESTED @@ -195,27 +207,31 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 43335456 - actions: - SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING - id: 25614729 - attr_param_id: - SAI_OUTBOUND_CA_TO_PA_ENTRY_UNDERLAY_DIP: 1 - SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_DMAC: 2 - SAI_OUTBOUND_CA_TO_PA_ENTRY_USE_DST_VNET_VNI: 3 - SAI_OUTBOUND_CA_TO_PA_ENTRY_METER_CLASS_OR: 4 - SAI_OUTBOUND_CA_TO_PA_ENTRY_FLOW_RESIMULATION_REQUESTED: 5 - SAI_OUTBOUND_CA_TO_PA_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 6 - SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING - id: 31441909 - attr_param_id: - SAI_OUTBOUND_CA_TO_PA_ENTRY_UNDERLAY_DIP: 1 - SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_SIP: 2 - SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_DIP: 3 - SAI_OUTBOUND_CA_TO_PA_ENTRY_DASH_ENCAPSULATION: 4 - SAI_OUTBOUND_CA_TO_PA_ENTRY_TUNNEL_KEY: 5 - SAI_OUTBOUND_CA_TO_PA_ENTRY_METER_CLASS_OR: 6 - SAI_OUTBOUND_CA_TO_PA_ENTRY_FLOW_RESIMULATION_REQUESTED: 7 - SAI_OUTBOUND_CA_TO_PA_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 8 + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 43335456 + actions: + SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING + id: 25614729 + attr_param_id: + SAI_OUTBOUND_CA_TO_PA_ENTRY_UNDERLAY_DIP: 1 + SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_DMAC: 2 + SAI_OUTBOUND_CA_TO_PA_ENTRY_USE_DST_VNET_VNI: 3 + SAI_OUTBOUND_CA_TO_PA_ENTRY_METER_CLASS_OR: 4 + SAI_OUTBOUND_CA_TO_PA_ENTRY_DASH_TUNNEL_ID: 5 + SAI_OUTBOUND_CA_TO_PA_ENTRY_FLOW_RESIMULATION_REQUESTED: 6 + SAI_OUTBOUND_CA_TO_PA_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 7 + SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING + id: 31441909 + attr_param_id: + SAI_OUTBOUND_CA_TO_PA_ENTRY_UNDERLAY_DIP: 1 + SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_SIP: 2 + SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_DIP: 3 + SAI_OUTBOUND_CA_TO_PA_ENTRY_DASH_ENCAPSULATION: 4 + SAI_OUTBOUND_CA_TO_PA_ENTRY_TUNNEL_KEY: 5 + SAI_OUTBOUND_CA_TO_PA_ENTRY_METER_CLASS_OR: 6 + SAI_OUTBOUND_CA_TO_PA_ENTRY_DASH_TUNNEL_ID: 7 + SAI_OUTBOUND_CA_TO_PA_ENTRY_FLOW_RESIMULATION_REQUESTED: 8 + SAI_OUTBOUND_CA_TO_PA_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 9 diff --git a/dash-pipeline/SAI/specs/dash_outbound_routing.yaml b/dash-pipeline/SAI/specs/dash_outbound_routing.yaml index d6e5eb673..d29efd32c 100644 --- a/dash-pipeline/SAI/specs/dash_outbound_routing.yaml +++ b/dash-pipeline/SAI/specs/dash_outbound_routing.yaml @@ -73,6 +73,18 @@ sai_apis: allow_null: true valid_only: null deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_DASH_TUNNEL_ID + description: Action parameter DASH_TUNNEL_ID + type: sai_object_id_t + attr_value_field: u16 + default: SAI_NULL_OBJECT_ID + isresourcetype: false + flags: CREATE_AND_SET + object_name: SAI_OBJECT_TYPE_DASH_TUNNEL + allow_null: true + valid_only: null + deprecated: null - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute name: SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR description: Action parameter METER_CLASS_OR @@ -243,48 +255,54 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 44010720 - actions: - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET - id: 21392322 - attr_param_id: - SAI_OUTBOUND_ROUTING_ENTRY_DST_VNET_ID: 1 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 2 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 3 - SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 4 - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT - id: 24813914 - attr_param_id: - SAI_OUTBOUND_ROUTING_ENTRY_DST_VNET_ID: 1 - SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_IP: 3 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 4 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 5 - SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 6 - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT - id: 31102279 - attr_param_id: - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 1 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 2 - SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 3 - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_SERVICE_TUNNEL: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_SERVICE_TUNNEL - id: 26982790 - attr_param_id: - SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_DIP: 2 - SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_DIP_MASK: 4 - SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_SIP: 6 - SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_SIP_MASK: 8 - SAI_OUTBOUND_ROUTING_ENTRY_UNDERLAY_DIP: 10 - SAI_OUTBOUND_ROUTING_ENTRY_UNDERLAY_SIP: 12 - SAI_OUTBOUND_ROUTING_ENTRY_DASH_ENCAPSULATION: 13 - SAI_OUTBOUND_ROUTING_ENTRY_TUNNEL_KEY: 14 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 15 - SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 16 - SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 17 - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_DROP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_DROP - id: 18759588 - attr_param_id: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 44010720 + actions: + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + id: 21392322 + attr_param_id: + SAI_OUTBOUND_ROUTING_ENTRY_DST_VNET_ID: 1 + SAI_OUTBOUND_ROUTING_ENTRY_DASH_TUNNEL_ID: 2 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 3 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 4 + SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 5 + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT + id: 24813914 + attr_param_id: + SAI_OUTBOUND_ROUTING_ENTRY_DST_VNET_ID: 1 + SAI_OUTBOUND_ROUTING_ENTRY_DASH_TUNNEL_ID: 2 + SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_IP: 4 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 5 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 6 + SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 7 + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT + id: 31102279 + attr_param_id: + SAI_OUTBOUND_ROUTING_ENTRY_DASH_TUNNEL_ID: 1 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 2 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 3 + SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 4 + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_SERVICE_TUNNEL: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_SERVICE_TUNNEL + id: 26982790 + attr_param_id: + SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_DIP: 2 + SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_DIP_MASK: 4 + SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_SIP: 6 + SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_SIP_MASK: 8 + SAI_OUTBOUND_ROUTING_ENTRY_UNDERLAY_DIP: 10 + SAI_OUTBOUND_ROUTING_ENTRY_UNDERLAY_SIP: 12 + SAI_OUTBOUND_ROUTING_ENTRY_DASH_ENCAPSULATION: 13 + SAI_OUTBOUND_ROUTING_ENTRY_TUNNEL_KEY: 14 + SAI_OUTBOUND_ROUTING_ENTRY_DASH_TUNNEL_ID: 15 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_OR: 16 + SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND: 17 + SAI_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION: 18 + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_DROP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_DROP + id: 18759588 + attr_param_id: {} diff --git a/dash-pipeline/SAI/specs/dash_pa_validation.yaml b/dash-pipeline/SAI/specs/dash_pa_validation.yaml index 37bfd69b4..88240ff6d 100644 --- a/dash-pipeline/SAI/specs/dash_pa_validation.yaml +++ b/dash-pipeline/SAI/specs/dash_pa_validation.yaml @@ -59,9 +59,11 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 35526612 - actions: - SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT - id: 32591400 - attr_param_id: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 35526612 + actions: + SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT + id: 32591400 + attr_param_id: {} diff --git a/dash-pipeline/SAI/specs/dash_tunnel.yaml b/dash-pipeline/SAI/specs/dash_tunnel.yaml new file mode 100644 index 000000000..027412538 --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_tunnel.yaml @@ -0,0 +1,53 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_tunnel +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: dash_tunnel + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_TUNNEL_DIP + description: Action parameter DIP + type: sai_ip_address_t + attr_value_field: ipaddr + default: 0.0.0.0 + isresourcetype: false + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_TUNNEL_DASH_ENCAPSULATION + description: Action parameter DASH_ENCAPSULATION + type: sai_dash_encapsulation_t + attr_value_field: s32 + default: SAI_DASH_ENCAPSULATION_VXLAN + isresourcetype: false + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_TUNNEL_TUNNEL_KEY + description: Action parameter TUNNEL_KEY + type: sai_uint32_t + attr_value_field: u32 + default: '0' + isresourcetype: false + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] + p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 44400659 + actions: {} diff --git a/dash-pipeline/SAI/specs/dash_vip.yaml b/dash-pipeline/SAI/specs/dash_vip.yaml index 89d0f00b4..79472acec 100644 --- a/dash-pipeline/SAI/specs/dash_vip.yaml +++ b/dash-pipeline/SAI/specs/dash_vip.yaml @@ -53,9 +53,11 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 45245089 - actions: - SAI_VIP_ENTRY_ACTION_ACCEPT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_VIP_ENTRY_ACTION_ACCEPT - id: 26041632 - attr_param_id: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 45245089 + actions: + SAI_VIP_ENTRY_ACTION_ACCEPT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_VIP_ENTRY_ACTION_ACCEPT + id: 26041632 + attr_param_id: {} diff --git a/dash-pipeline/SAI/specs/dash_vnet.yaml b/dash-pipeline/SAI/specs/dash_vnet.yaml index 0c54f3eb3..8caa323e1 100644 --- a/dash-pipeline/SAI/specs/dash_vnet.yaml +++ b/dash-pipeline/SAI/specs/dash_vnet.yaml @@ -23,5 +23,7 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 49590243 - actions: {} + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 49590243 + actions: {} diff --git a/dash-pipeline/SAI/specs/route.yaml b/dash-pipeline/SAI/specs/route.yaml index b9f0d5edc..802138137 100644 --- a/dash-pipeline/SAI/specs/route.yaml +++ b/dash-pipeline/SAI/specs/route.yaml @@ -77,11 +77,13 @@ sai_apis: deprecated: null stats: [] p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta - id: 49279256 - actions: - SAI_ROUTE_ENTRY_ACTION_PKT_ACT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction - name: SAI_ROUTE_ENTRY_ACTION_PKT_ACT - id: 32404057 - attr_param_id: - SAI_ROUTE_ENTRY_PACKET_ACTION: 1 - SAI_ROUTE_ENTRY_NEXT_HOP_ID: 2 + tables: + - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable + id: 49279256 + actions: + SAI_ROUTE_ENTRY_ACTION_PKT_ACT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction + name: SAI_ROUTE_ENTRY_ACTION_PKT_ACT + id: 32404057 + attr_param_id: + SAI_ROUTE_ENTRY_PACKET_ACTION: 1 + SAI_ROUTE_ENTRY_NEXT_HOP_ID: 2 diff --git a/dash-pipeline/SAI/specs/sai_spec.yaml b/dash-pipeline/SAI/specs/sai_spec.yaml index 47b34d09b..92e16b7f3 100644 --- a/dash-pipeline/SAI/specs/sai_spec.yaml +++ b/dash-pipeline/SAI/specs/sai_spec.yaml @@ -10,11 +10,17 @@ api_types: - SAI_API_DASH_VNET - SAI_API_DASH_OUTBOUND_ROUTING - SAI_API_DASH_PA_VALIDATION +- SAI_API_DASH_TUNNEL - SAI_API_ROUTE - SAI_API_DASH_VIP object_types: - SAI_OBJECT_TYPE_DASH_ACL_GROUP - SAI_OBJECT_TYPE_DASH_ACL_RULE +- SAI_OBJECT_TYPE_DASH_ACL_RULE +- SAI_OBJECT_TYPE_DASH_ACL_RULE +- SAI_OBJECT_TYPE_DASH_ACL_RULE +- SAI_OBJECT_TYPE_DASH_ACL_RULE +- SAI_OBJECT_TYPE_DASH_ACL_RULE - SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY - SAI_OBJECT_TYPE_ENI_ETHER_ADDRESS_MAP_ENTRY - SAI_OBJECT_TYPE_ENI @@ -28,6 +34,7 @@ object_types: - SAI_OBJECT_TYPE_VNET - SAI_OBJECT_TYPE_OUTBOUND_ROUTING_ENTRY - SAI_OBJECT_TYPE_PA_VALIDATION_ENTRY +- SAI_OBJECT_TYPE_DASH_TUNNEL - SAI_OBJECT_TYPE_ROUTE_ENTRY - SAI_OBJECT_TYPE_VIP_ENTRY object_entries: @@ -97,81 +104,81 @@ enums: description: '' value: '2' - !!python/object:utils.sai_spec.sai_enum.SaiEnum - name: sai_dash_tunnel_dscp_mode_t + name: sai_dash_encapsulation_t description: '' members: - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: PRESERVE_MODEL + name: INVALID description: '' value: '0' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: PIPE_MODEL + name: VXLAN description: '' value: '1' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: NVGRE + description: '' + value: '2' - !!python/object:utils.sai_spec.sai_enum.SaiEnum - name: sai_dash_ha_role_t + name: sai_dash_routing_actions_t description: '' members: - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: DEAD - description: '' - value: '0' - - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: ACTIVE + name: STATIC_ENCAP description: '' value: '1' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: STANDBY + name: NAT description: '' value: '2' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: STANDALONE + name: NAT46 description: '' - value: '3' + value: '4' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: SWITCHING_TO_ACTIVE + name: NAT64 description: '' - value: '4' + value: '8' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: NAT_PORT + description: '' + value: '16' - !!python/object:utils.sai_spec.sai_enum.SaiEnum - name: sai_dash_encapsulation_t + name: sai_dash_tunnel_dscp_mode_t description: '' members: - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: INVALID + name: PRESERVE_MODEL description: '' value: '0' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: VXLAN + name: PIPE_MODEL description: '' value: '1' - - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: NVGRE - description: '' - value: '2' - !!python/object:utils.sai_spec.sai_enum.SaiEnum - name: sai_dash_routing_actions_t + name: sai_dash_ha_role_t description: '' members: - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: STATIC_ENCAP + name: DEAD description: '' - value: '1' + value: '0' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: NAT + name: ACTIVE description: '' - value: '2' + value: '1' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: NAT46 + name: STANDBY description: '' - value: '4' + value: '2' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: NAT64 + name: STANDALONE description: '' - value: '8' + value: '3' - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember - name: NAT_PORT + name: SWITCHING_TO_ACTIVE description: '' - value: '16' + value: '4' port_extenstion: !!python/object:utils.sai_spec.sai_api_extension.SaiApiExtension attributes: [] stats: @@ -258,5 +265,6 @@ api_groups: - !inc '/SAI/specs/dash_vnet.yaml' - !inc '/SAI/specs/dash_outbound_routing.yaml' - !inc '/SAI/specs/dash_pa_validation.yaml' +- !inc '/SAI/specs/dash_tunnel.yaml' - !inc '/SAI/specs/route.yaml' - !inc '/SAI/specs/dash_vip.yaml' diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table.py index e599f0b10..46e17143d 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table.py @@ -5,7 +5,7 @@ from .dash_p4_table_action_param import * from .dash_p4_table_key import * from .dash_p4_table_action import * -from ..sai_spec import SaiApi, SaiStruct, SaiEnum, SaiEnumMember, SaiAttribute, SaiApiP4MetaAction +from ..sai_spec import SaiApi, SaiStruct, SaiEnum, SaiEnumMember, SaiAttribute, SaiApiP4MetaAction, SaiApiP4MetaTable @dash_p4rt_parser @@ -264,7 +264,7 @@ def __build_sai_attributes_after_parsing(self): # def to_sai(self) -> SaiApi: sai_api = SaiApi(self.name, "", self.is_object != "false") - sai_api.p4_meta.id = self.id + sai_api.p4_meta.tables.append(SaiApiP4MetaTable(self.id)) self.create_sai_action_enum(sai_api) self.create_sai_structs(sai_api) @@ -300,7 +300,7 @@ def create_sai_action_enum(self, sai_api: SaiApi) -> None: for action_param in action.params: p4_meta_action.attr_param_id[action_param.get_sai_name(self.name)] = action_param.id - sai_api.p4_meta.actions[action_enum_member_name] = p4_meta_action + sai_api.p4_meta.tables[0].actions[action_enum_member_name] = p4_meta_action action_enum_member_value += 1 diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_group.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_group.py index c6db8c07d..e2c232a8c 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_group.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_group.py @@ -1,7 +1,7 @@ from typing import List, Optional from .common import * from .dash_p4_table import DashP4Table -from ..sai_spec import SaiApiGroup +from ..sai_spec import SaiApiGroup, SaiApi class DashP4TableGroup(DashP4Object): @@ -25,20 +25,23 @@ def add_table(self, table: DashP4Table) -> None: self.tables.append(table) def post_parsing_process(self, all_table_names: List[str]) -> None: - self.__ignore_duplicated_tables_in_headers() - for table in self.tables: table.post_parsing_process(all_table_names) - - def __ignore_duplicated_tables_in_headers(self) -> None: - table_names = set() + + def to_sai(self) -> SaiApiGroup: + sai_api_list: List[SaiApi] = [] + sai_api_map: Dict[str, SaiApi] = {} for table in self.tables: - if table.name in table_names: + sai_api = table.to_sai() + + if table.name in sai_api_map: table.ignored_in_header = True - table_names.add(table.name) + sai_api_map[table.name].p4_meta.tables.extend(sai_api.p4_meta.tables) + else: + sai_api_map[table.name] = sai_api + sai_api_list.append(sai_api) - def to_sai(self) -> SaiApiGroup: sai_api_group = SaiApiGroup(self.app_name, "") - sai_api_group.sai_apis = [table.to_sai() for table in self.tables if not table.ignored_in_header] - return sai_api_group \ No newline at end of file + sai_api_group.sai_apis = sai_api_list + return sai_api_group diff --git a/dash-pipeline/SAI/utils/sai_spec/__init__.py b/dash-pipeline/SAI/utils/sai_spec/__init__.py index 21e711a82..3542b4756 100644 --- a/dash-pipeline/SAI/utils/sai_spec/__init__.py +++ b/dash-pipeline/SAI/utils/sai_spec/__init__.py @@ -7,4 +7,4 @@ from .sai_struct import SaiStruct from .sai_struct_entry import SaiStructEntry from .sai_attribute import SaiAttribute -from .sai_api_p4_meta import SaiApiP4Meta, SaiApiP4MetaAction \ No newline at end of file +from .sai_api_p4_meta import SaiApiP4Meta, SaiApiP4MetaTable, SaiApiP4MetaAction \ No newline at end of file diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_api_p4_meta.py b/dash-pipeline/SAI/utils/sai_spec/sai_api_p4_meta.py index 269899809..e1279faeb 100644 --- a/dash-pipeline/SAI/utils/sai_spec/sai_api_p4_meta.py +++ b/dash-pipeline/SAI/utils/sai_spec/sai_api_p4_meta.py @@ -1,4 +1,4 @@ -from typing import Dict +from typing import Dict, List class SaiApiP4MetaAction: @@ -8,7 +8,12 @@ def __init__(self, name: str, id: int): self.attr_param_id: Dict[str, int] = {} +class SaiApiP4MetaTable: + def __init__(self, id: int): + self.id: int = id + self.actions: Dict[str, SaiApiP4MetaAction] = {} + + class SaiApiP4Meta: def __init__(self): - self.id: int = 0 - self.actions: Dict[str, SaiApiP4MetaAction] = {} + self.tables: List[SaiApiP4MetaTable] = []