From d94c45ae470ca9f0541f87c9d82a4c5e9a7cce3a Mon Sep 17 00:00:00 2001 From: Riff Date: Fri, 31 May 2024 16:11:12 -0700 Subject: [PATCH] [sai-gen] Create SAI spec for SAI API generation. (#573) ## Problem Currently, the SAI API generation is facing 2 issues: ABI compatibility and code review with SAI API change. To maintain the ABI compatibility, it is required to maintain the order of API, attributes, stats in the order of its creation. The newer ones must comes later. Before the "order" annotation is introduced, this problem was never solved. With "order" annotation, although it kinda helps some cases, but it is still not good - it is hacky, and it is not generically applicable. E.g., currently, the keys and action parameters are not sorted together, counters can be introduced in multiple files making "order" not intuitive. Furthermore, with P4 updates, it is hard to review the SAI API changes, because these changes are not captured in the PR. ## What we are doing in this change The SAI spec YAML file is introduced for helping these cases. First all, all changes to the SAI API will be reflected in the SAI spec YAML file, allow us to review the PR without building the SAI branch. Once the CI passes, we will know how the SAI APIs are being changed, and it works. Secondly, it helps maintaining the ABI compatibility in future. Instead of using "order" to explicitly order the attributes, we can merge the new API spec with the old API spec by insert any new things in the end of the spec. This ensures any new changes will be put in the end, and no hacky solution needs to be introduced again. This change will not change any generated SAI headers and libs. ![image](https://github.com/sonic-net/DASH/assets/1533278/279af16d-e0d7-4ea0-bc68-4595545e1dfc) --- dash-pipeline/Makefile | 5 + dash-pipeline/SAI/Makefile | 1 + dash-pipeline/SAI/sai_api_gen.py | 25 +- dash-pipeline/SAI/specs/dash_acl.yaml | 100 ++ .../SAI/specs/dash_direction_lookup.yaml | 42 + dash-pipeline/SAI/specs/dash_eni.yaml | 1430 +++++++++++++++++ dash-pipeline/SAI/specs/dash_ha.yaml | 428 +++++ .../SAI/specs/dash_inbound_routing.yaml | 114 ++ dash-pipeline/SAI/specs/dash_meter.yaml | 100 ++ .../SAI/specs/dash_outbound_ca_to_pa.yaml | 196 +++ .../SAI/specs/dash_outbound_routing.yaml | 244 +++ .../SAI/specs/dash_pa_validation.yaml | 60 + dash-pipeline/SAI/specs/dash_vip.yaml | 54 + dash-pipeline/SAI/specs/dash_vnet.yaml | 24 + dash-pipeline/SAI/specs/route.yaml | 78 + dash-pipeline/SAI/specs/sai_spec.yaml | 262 +++ dash-pipeline/SAI/templates/saiapi.h.j2 | 2 +- dash-pipeline/SAI/templates/saienums.j2 | 2 +- .../SAI/utils/dash_p4/dash_p4_counter.py | 15 + .../SAI/utils/dash_p4/dash_p4_enum.py | 8 + .../SAI/utils/dash_p4/dash_p4_enum_member.py | 4 + .../SAI/utils/dash_p4/dash_p4_table.py | 123 +- .../utils/dash_p4/dash_p4_table_attribute.py | 46 + .../SAI/utils/dash_p4/dash_p4_table_group.py | 16 + .../SAI/utils/dash_p4/dash_p4_table_key.py | 13 + .../SAI/utils/dash_p4/dash_sai_extensions.py | 62 + dash-pipeline/SAI/utils/sai_spec/__init__.py | 9 + dash-pipeline/SAI/utils/sai_spec/sai_api.py | 19 + .../SAI/utils/sai_spec/sai_api_extension.py | 14 + .../SAI/utils/sai_spec/sai_api_group.py | 13 + .../SAI/utils/sai_spec/sai_attribute.py | 33 + .../SAI/utils/sai_spec/sai_common.py | 8 + dash-pipeline/SAI/utils/sai_spec/sai_enum.py | 13 + .../SAI/utils/sai_spec/sai_enum_member.py | 12 + dash-pipeline/SAI/utils/sai_spec/sai_spec.py | 45 + .../SAI/utils/sai_spec/sai_struct.py | 13 + .../SAI/utils/sai_spec/sai_struct_entry.py | 21 + .../dockerfiles/Dockerfile.saithrift-bldr | 2 +- 38 files changed, 3650 insertions(+), 6 deletions(-) create mode 100644 dash-pipeline/SAI/specs/dash_acl.yaml create mode 100644 dash-pipeline/SAI/specs/dash_direction_lookup.yaml create mode 100644 dash-pipeline/SAI/specs/dash_eni.yaml create mode 100644 dash-pipeline/SAI/specs/dash_ha.yaml create mode 100644 dash-pipeline/SAI/specs/dash_inbound_routing.yaml create mode 100644 dash-pipeline/SAI/specs/dash_meter.yaml create mode 100644 dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml create mode 100644 dash-pipeline/SAI/specs/dash_outbound_routing.yaml create mode 100644 dash-pipeline/SAI/specs/dash_pa_validation.yaml create mode 100644 dash-pipeline/SAI/specs/dash_vip.yaml create mode 100644 dash-pipeline/SAI/specs/dash_vnet.yaml create mode 100644 dash-pipeline/SAI/specs/route.yaml create mode 100644 dash-pipeline/SAI/specs/sai_spec.yaml create mode 100644 dash-pipeline/SAI/utils/sai_spec/__init__.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_api.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_api_extension.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_api_group.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_attribute.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_common.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_enum.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_enum_member.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_spec.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_struct.py create mode 100644 dash-pipeline/SAI/utils/sai_spec/sai_struct_entry.py diff --git a/dash-pipeline/Makefile b/dash-pipeline/Makefile index 43bde771d..47fedf7d7 100644 --- a/dash-pipeline/Makefile +++ b/dash-pipeline/Makefile @@ -176,7 +176,12 @@ 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/* + mkdir -p SAI/lib + $(DOCKER_RUN) \ $(DOCKER_FLAGS) \ --name build_sai-$(USER) \ diff --git a/dash-pipeline/SAI/Makefile b/dash-pipeline/SAI/Makefile index 0403e8101..61908c17f 100644 --- a/dash-pipeline/SAI/Makefile +++ b/dash-pipeline/SAI/Makefile @@ -4,6 +4,7 @@ all: copysrc /bmv2/dash_pipeline.bmv2/dash_pipeline_p4rt.json \ --ir /bmv2/dash_pipeline.bmv2/dash_pipeline_ir.json \ --ignore-tables=appliance,eni_meter,slb_decap \ + --sai-spec-dir=/SAI/specs \ dash copysrc: diff --git a/dash-pipeline/SAI/sai_api_gen.py b/dash-pipeline/SAI/sai_api_gen.py index f031c3773..af8098b48 100755 --- a/dash-pipeline/SAI/sai_api_gen.py +++ b/dash-pipeline/SAI/sai_api_gen.py @@ -9,10 +9,13 @@ import jinja2 import typing import base64 + import yaml + import yaml_include import jsonpath_ng.ext as jsonpath_ext import jsonpath_ng as jsonpath from utils.dash_p4 import DashP4SAIExtensions from utils.p4ir import P4IRTree, P4VarRefGraph + from utils.sai_spec import SaiSpec from utils.sai_gen import SAIGenerator except ImportError as ie: print("Import failed for " + ie.name) @@ -27,15 +30,16 @@ parser.add_argument("--ir", type=str, help="Path to P4 program IR JSON file") parser.add_argument("--print-sai-lib", type=bool) parser.add_argument("--ignore-tables", type=str, default="", help="Comma separated list of tables to ignore") + parser.add_argument("--sai-spec-dir", type=str, required=True, help="Path to output SAI spec file") args = parser.parse_args() + os.chdir(os.path.dirname(os.path.realpath(__file__))) + p4rt_file_path = os.path.realpath(args.filepath) if not os.path.isfile(p4rt_file_path): print("File " + p4rt_file_path + " does not exist") exit(1) - os.chdir(os.path.dirname(os.path.realpath(__file__))) - p4ir = P4IRTree.from_file(args.ir) var_ref_graph = P4VarRefGraph(p4ir) @@ -49,5 +53,22 @@ print("Dumping parsed SAI data:") print(json.dumps(dash_sai_exts, indent=2)) + # Initialize YAML loader and dumper + sai_spec_dir = os.path.realpath(args.sai_spec_dir) + yaml_inc_ctor = yaml_include.Constructor(base_dir=sai_spec_dir, autoload=True) + yaml.add_constructor("!inc", yaml_inc_ctor) + yaml_inc_rpr = yaml_include.Representer("inc") + yaml.add_representer(yaml_include.Data, yaml_inc_rpr) + + # Ensure the current SAI spec can be loaded + print("Loading SAI spec from " + sai_spec_dir) + sai_spec = SaiSpec.deserialize(sai_spec_dir) + + # Output the new SAI spec + print("Outputting new SAI spec to " + sai_spec_dir) + yaml_inc_ctor.autoload = False + new_sai_spec = dash_sai_exts.to_sai() + new_sai_spec.serialize(sai_spec_dir) + # Generate and update all SAI files SAIGenerator(dash_sai_exts).generate() diff --git a/dash-pipeline/SAI/specs/dash_acl.yaml b/dash-pipeline/SAI/specs/dash_acl.yaml new file mode 100644 index 000000000..9203b9acd --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_acl.yaml @@ -0,0 +1,100 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_acl +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: dash_acl_group + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_ACL_GROUP_IP_ADDR_FAMILY + description: Action parameter IP_ADDR_FAMILY + type: sai_ip_addr_family_t + attr_value_field: u32 + default: SAI_IP_ADDR_FAMILY_IPV4 + isresourcetype: true + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: dash_acl_rule + description: '' + is_object: true + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_dash_acl_rule_action_t + description: Attribute data for SAI_DASH_ACL_RULE_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_DASH_ACL_RULE_ACTION_PERMIT + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_DASH_ACL_RULE_ACTION_DENY + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE + description: '' + value: '0' + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_ACL_RULE_ATTR_ACTION + description: Action + type: sai_dash_acl_rule_action_t + attr_value_field: null + default: SAI_DASH_ACL_RULE_ACTION_PERMIT + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_ACL_RULE_ATTR_COUNTER_ID + description: Attach a counter. When it is empty, then packet hits won't be counted. + type: sai_object_id_t + attr_value_field: null + default: SAI_NULL_OBJECT_ID + isresourcetype: false + flags: CREATE_AND_SET + object_name: SAI_OBJECT_TYPE_COUNTER + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_ACL_RULE_ATTR_PRIORITY + description: Rule priority in table + type: sai_uint32_t + attr_value_field: null + default: null + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DASH_ACL_RULE_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_direction_lookup.yaml b/dash-pipeline/SAI/specs/dash_direction_lookup.yaml new file mode 100644 index 000000000..f0bcf2869 --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_direction_lookup.yaml @@ -0,0 +1,42 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_direction_lookup +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: direction_lookup_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_direction_lookup_entry_action_t + description: Attribute data for SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_direction_lookup_entry_entry_t + description: Entry for direction_lookup_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: VNI + description: Exact matched key VNI + type: sai_uint32_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION + description: Action + type: sai_direction_lookup_entry_action_t + attr_value_field: null + default: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_eni.yaml b/dash-pipeline/SAI/specs/dash_eni.yaml new file mode 100644 index 000000000..69aa2df26 --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_eni.yaml @@ -0,0 +1,1430 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_eni +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: eni_ether_address_map_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_eni_ether_address_map_entry_action_t + description: Attribute data for SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_eni_ether_address_map_entry_entry_t + description: Entry for eni_ether_address_map_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: address + description: Exact matched key address + type: sai_mac_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ATTR_ACTION + description: Action + type: sai_eni_ether_address_map_entry_action_t + attr_value_field: null + default: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ENI_ID + description: Action parameter ENI_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_ENI + allow_null: true + valid_only: null + deprecated: null + stats: [] +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: eni + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_CPS + description: Action parameter CPS + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_PPS + description: Action parameter PPS + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_FLOWS + description: Action parameter FLOWS + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_ADMIN_STATE + description: Action parameter ADMIN_STATE + type: bool + attr_value_field: booldata + default: 'false' + 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_ENI_HA_SCOPE_ID + description: Action parameter HA_SCOPE_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_HA_SCOPE + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_VM_UNDERLAY_DIP + description: Action parameter VM_UNDERLAY_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_ENI_VM_VNI + description: Action parameter VM_VNI + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_VNET_ID + description: Action parameter VNET_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_VNET + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_PL_SIP + description: Action parameter PL_SIP + 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_ENI_PL_SIP_MASK + description: Action parameter PL_SIP_MASK + 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_ENI_PL_UNDERLAY_SIP + description: Action parameter PL_UNDERLAY_SIP + 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_ENI_V4_METER_POLICY_ID + description: Action parameter V4_METER_POLICY_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_METER_POLICY + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_V6_METER_POLICY_ID + description: Action parameter V6_METER_POLICY_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_METER_POLICY + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_DASH_TUNNEL_DSCP_MODE + description: Action parameter DASH_TUNNEL_DSCP_MODE + type: sai_dash_tunnel_dscp_mode_t + attr_value_field: s32 + default: SAI_DASH_TUNNEL_DSCP_MODE_PRESERVE_MODEL + 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_ENI_DSCP + description: Action parameter DSCP + type: sai_uint8_t + attr_value_field: u8 + default: '0' + isresourcetype: false + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: SAI_ENI_ATTR_DASH_TUNNEL_DSCP_MODE == SAI_DASH_TUNNEL_DSCP_MODE_PIPE_MODEL + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V4_STAGE1_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V4_STAGE1_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V4_STAGE2_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V4_STAGE2_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V4_STAGE3_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V4_STAGE3_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V4_STAGE4_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V4_STAGE4_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V4_STAGE5_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V4_STAGE5_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V6_STAGE1_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V6_STAGE1_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V6_STAGE2_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V6_STAGE2_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V6_STAGE3_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V6_STAGE3_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V6_STAGE4_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V6_STAGE4_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_INBOUND_V6_STAGE5_DASH_ACL_GROUP_ID + description: Action parameter INBOUND_V6_STAGE5_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V4_STAGE1_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V4_STAGE1_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V4_STAGE2_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V4_STAGE2_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V4_STAGE3_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V4_STAGE3_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V4_STAGE4_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V4_STAGE4_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V4_STAGE5_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V4_STAGE5_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V6_STAGE1_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V6_STAGE1_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V6_STAGE2_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V6_STAGE2_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V6_STAGE3_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V6_STAGE3_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V6_STAGE4_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V6_STAGE4_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_OUTBOUND_V6_STAGE5_DASH_ACL_GROUP_ID + description: Action parameter OUTBOUND_V6_STAGE5_DASH_ACL_GROUP_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_ACL_GROUP + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION + description: Action parameter DISABLE_FAST_PATH_ICMP_FLOW_REDIRECTION + type: bool + attr_value_field: booldata + default: 'false' + 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_ENI_FULL_FLOW_RESIMULATION_REQUESTED + description: Action parameter FULL_FLOW_RESIMULATION_REQUESTED + type: bool + attr_value_field: booldata + default: 'false' + 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_ENI_MAX_RESIMULATED_FLOW_PER_SECOND + description: Action parameter MAX_RESIMULATED_FLOW_PER_SECOND + type: sai_uint64_t + attr_value_field: u64 + default: '0' + isresourcetype: false + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_RX_BYTES + description: DASH ENI RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_RX_PACKETS + description: DASH ENI RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TX_BYTES + description: DASH ENI TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TX_PACKETS + description: DASH ENI TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_OUTBOUND_RX_BYTES + description: DASH ENI OUTBOUND_RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_OUTBOUND_RX_PACKETS + description: DASH ENI OUTBOUND_RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_OUTBOUND_TX_BYTES + description: DASH ENI OUTBOUND_TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_OUTBOUND_TX_PACKETS + description: DASH ENI OUTBOUND_TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INBOUND_RX_BYTES + description: DASH ENI INBOUND_RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INBOUND_RX_PACKETS + description: DASH ENI INBOUND_RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INBOUND_TX_BYTES + description: DASH ENI INBOUND_TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INBOUND_TX_PACKETS + description: DASH ENI INBOUND_TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_LB_FAST_PATH_ICMP_IN_BYTES + description: DASH ENI LB_FAST_PATH_ICMP_IN_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_LB_FAST_PATH_ICMP_IN_PACKETS + description: DASH ENI LB_FAST_PATH_ICMP_IN_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_CREATED + description: DASH ENI FLOW_CREATED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_CREATE_FAILED + description: DASH ENI FLOW_CREATE_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_UPDATED + description: DASH ENI FLOW_UPDATED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_UPDATE_FAILED + description: DASH ENI FLOW_UPDATE_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_UPDATED_BY_RESIMULATION + description: DASH ENI FLOW_UPDATED_BY_RESIMULATION stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_UPDATE_BY_RESIMULATION_FAILED + description: DASH ENI FLOW_UPDATE_BY_RESIMULATION_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_DELETED + description: DASH ENI FLOW_DELETED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_DELETE_FAILED + description: DASH ENI FLOW_DELETE_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_FLOW_AGED + description: DASH ENI FLOW_AGED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_SYNC_PACKET_RX_BYTES + description: DASH ENI INLINE_SYNC_PACKET_RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_SYNC_PACKET_RX_PACKETS + description: DASH ENI INLINE_SYNC_PACKET_RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_SYNC_PACKET_TX_BYTES + description: DASH ENI INLINE_SYNC_PACKET_TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_SYNC_PACKET_TX_PACKETS + description: DASH ENI INLINE_SYNC_PACKET_TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_SYNC_PACKET_RX_BYTES + description: DASH ENI TIMED_SYNC_PACKET_RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_SYNC_PACKET_RX_PACKETS + description: DASH ENI TIMED_SYNC_PACKET_RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_SYNC_PACKET_TX_BYTES + description: DASH ENI TIMED_SYNC_PACKET_TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_SYNC_PACKET_TX_PACKETS + description: DASH ENI TIMED_SYNC_PACKET_TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_REQ_SENT + description: DASH ENI INLINE_FLOW_CREATE_REQ_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_REQ_RECV + description: DASH ENI INLINE_FLOW_CREATE_REQ_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_REQ_FAILED + description: DASH ENI INLINE_FLOW_CREATE_REQ_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_REQ_IGNORED + description: DASH ENI INLINE_FLOW_CREATE_REQ_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_ACK_RECV + description: DASH ENI INLINE_FLOW_CREATE_ACK_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_ACK_FAILED + description: DASH ENI INLINE_FLOW_CREATE_ACK_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_CREATE_ACK_IGNORED + description: DASH ENI INLINE_FLOW_CREATE_ACK_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_REQ_SENT + description: DASH ENI TIMED_FLOW_CREATE_REQ_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_REQ_RECV + description: DASH ENI TIMED_FLOW_CREATE_REQ_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_REQ_FAILED + description: DASH ENI TIMED_FLOW_CREATE_REQ_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_REQ_IGNORED + description: DASH ENI TIMED_FLOW_CREATE_REQ_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_ACK_RECV + description: DASH ENI TIMED_FLOW_CREATE_ACK_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_ACK_FAILED + description: DASH ENI TIMED_FLOW_CREATE_ACK_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_CREATE_ACK_IGNORED + description: DASH ENI TIMED_FLOW_CREATE_ACK_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_REQ_SENT + description: DASH ENI INLINE_FLOW_UPDATE_REQ_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_REQ_RECV + description: DASH ENI INLINE_FLOW_UPDATE_REQ_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_REQ_FAILED + description: DASH ENI INLINE_FLOW_UPDATE_REQ_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_REQ_IGNORED + description: DASH ENI INLINE_FLOW_UPDATE_REQ_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_ACK_RECV + description: DASH ENI INLINE_FLOW_UPDATE_ACK_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_ACK_FAILED + description: DASH ENI INLINE_FLOW_UPDATE_ACK_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_UPDATE_ACK_IGNORED + description: DASH ENI INLINE_FLOW_UPDATE_ACK_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_REQ_SENT + description: DASH ENI TIMED_FLOW_UPDATE_REQ_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_REQ_RECV + description: DASH ENI TIMED_FLOW_UPDATE_REQ_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_REQ_FAILED + description: DASH ENI TIMED_FLOW_UPDATE_REQ_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_REQ_IGNORED + description: DASH ENI TIMED_FLOW_UPDATE_REQ_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_ACK_RECV + description: DASH ENI TIMED_FLOW_UPDATE_ACK_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_ACK_FAILED + description: DASH ENI TIMED_FLOW_UPDATE_ACK_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_UPDATE_ACK_IGNORED + description: DASH ENI TIMED_FLOW_UPDATE_ACK_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_REQ_SENT + description: DASH ENI INLINE_FLOW_DELETE_REQ_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_REQ_RECV + description: DASH ENI INLINE_FLOW_DELETE_REQ_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_REQ_FAILED + description: DASH ENI INLINE_FLOW_DELETE_REQ_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_REQ_IGNORED + description: DASH ENI INLINE_FLOW_DELETE_REQ_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_ACK_RECV + description: DASH ENI INLINE_FLOW_DELETE_ACK_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_ACK_FAILED + description: DASH ENI INLINE_FLOW_DELETE_ACK_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INLINE_FLOW_DELETE_ACK_IGNORED + description: DASH ENI INLINE_FLOW_DELETE_ACK_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_REQ_SENT + description: DASH ENI TIMED_FLOW_DELETE_REQ_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_REQ_RECV + description: DASH ENI TIMED_FLOW_DELETE_REQ_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_REQ_FAILED + description: DASH ENI TIMED_FLOW_DELETE_REQ_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_REQ_IGNORED + description: DASH ENI TIMED_FLOW_DELETE_REQ_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_ACK_RECV + description: DASH ENI TIMED_FLOW_DELETE_ACK_RECV stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_ACK_FAILED + description: DASH ENI TIMED_FLOW_DELETE_ACK_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_TIMED_FLOW_DELETE_ACK_IGNORED + description: DASH ENI TIMED_FLOW_DELETE_ACK_IGNORED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_OUTBOUND_ROUTING_ENTRY_MISS_DROP_PACKETS + description: DASH ENI OUTBOUND_ROUTING_ENTRY_MISS_DROP_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_OUTBOUND_CA_PA_ENTRY_MISS_DROP_PACKETS + description: DASH ENI OUTBOUND_CA_PA_ENTRY_MISS_DROP_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ENI_STAT_INBOUND_ROUTING_ENTRY_MISS_DROP_PACKETS + description: DASH ENI INBOUND_ROUTING_ENTRY_MISS_DROP_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null diff --git a/dash-pipeline/SAI/specs/dash_ha.yaml b/dash-pipeline/SAI/specs/dash_ha.yaml new file mode 100644 index 000000000..89815406f --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_ha.yaml @@ -0,0 +1,428 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_ha +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: ha_set + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_LOCAL_IP + description: Action parameter LOCAL_IP + 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_HA_SET_PEER_IP + description: Action parameter PEER_IP + 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_HA_SET_CP_DATA_CHANNEL_PORT + description: Action parameter CP_DATA_CHANNEL_PORT + type: sai_uint16_t + attr_value_field: u16 + default: '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_HA_SET_DP_CHANNEL_DST_PORT + description: Action parameter DP_CHANNEL_DST_PORT + type: sai_uint16_t + attr_value_field: u16 + default: '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_HA_SET_DP_CHANNEL_MIN_SRC_PORT + description: Action parameter DP_CHANNEL_MIN_SRC_PORT + type: sai_uint16_t + attr_value_field: u16 + default: '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_HA_SET_DP_CHANNEL_MAX_SRC_PORT + description: Action parameter DP_CHANNEL_MAX_SRC_PORT + type: sai_uint16_t + attr_value_field: u16 + default: '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_HA_SET_DP_CHANNEL_PROBE_INTERVAL_MS + description: Action parameter DP_CHANNEL_PROBE_INTERVAL_MS + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_DP_CHANNEL_PROBE_FAIL_THRESHOLD + description: Action parameter DP_CHANNEL_PROBE_FAIL_THRESHOLD + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_DP_CHANNEL_IS_ALIVE + description: Action parameter DP_CHANNEL_IS_ALIVE + type: bool + attr_value_field: booldata + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_REQ_RX_BYTES + description: DASH HA_SET DP_PROBE_REQ_RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_REQ_RX_PACKETS + description: DASH HA_SET DP_PROBE_REQ_RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_REQ_TX_BYTES + description: DASH HA_SET DP_PROBE_REQ_TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_REQ_TX_PACKETS + description: DASH HA_SET DP_PROBE_REQ_TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_ACK_RX_BYTES + description: DASH HA_SET DP_PROBE_ACK_RX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_ACK_RX_PACKETS + description: DASH HA_SET DP_PROBE_ACK_RX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_ACK_TX_BYTES + description: DASH HA_SET DP_PROBE_ACK_TX_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_ACK_TX_PACKETS + description: DASH HA_SET DP_PROBE_ACK_TX_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_DP_PROBE_FAILED + description: DASH HA_SET DP_PROBE_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_ATTEMPTED + description: DASH HA_SET CP_DATA_CHANNEL_CONNECT_ATTEMPTED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_RECEIVED + description: DASH HA_SET CP_DATA_CHANNEL_CONNECT_RECEIVED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_SUCCEEDED + description: DASH HA_SET CP_DATA_CHANNEL_CONNECT_SUCCEEDED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_FAILED + description: DASH HA_SET CP_DATA_CHANNEL_CONNECT_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_CP_DATA_CHANNEL_CONNECT_REJECTED + description: DASH HA_SET CP_DATA_CHANNEL_CONNECT_REJECTED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_CP_DATA_CHANNEL_TIMEOUT_COUNT + description: DASH HA_SET CP_DATA_CHANNEL_TIMEOUT_COUNT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_BULK_SYNC_MESSAGE_RECEIVED + description: DASH HA_SET BULK_SYNC_MESSAGE_RECEIVED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_BULK_SYNC_MESSAGE_SENT + description: DASH HA_SET BULK_SYNC_MESSAGE_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_BULK_SYNC_MESSAGE_SEND_FAILED + description: DASH HA_SET BULK_SYNC_MESSAGE_SEND_FAILED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_BULK_SYNC_FLOW_RECEIVED + description: DASH HA_SET BULK_SYNC_FLOW_RECEIVED stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SET_STAT_BULK_SYNC_FLOW_SENT + description: DASH HA_SET BULK_SYNC_FLOW_SENT stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: ha_scope + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SCOPE_HA_SET_ID + description: Action parameter HA_SET_ID + type: sai_uint16_t + attr_value_field: u16 + default: '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_HA_SCOPE_DASH_HA_ROLE + description: Action parameter DASH_HA_ROLE + type: sai_dash_ha_role_t + attr_value_field: s32 + default: SAI_DASH_HA_ROLE_DEAD + 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_HA_SCOPE_FLOW_VERSION + description: Action parameter FLOW_VERSION + type: sai_uint32_t + attr_value_field: u32 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_HA_SCOPE_FLOW_RECONCILE_REQUESTED + description: Action parameter FLOW_RECONCILE_REQUESTED + type: bool + attr_value_field: booldata + default: 'false' + 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_HA_SCOPE_FLOW_RECONCILE_NEEDED + description: Action parameter FLOW_RECONCILE_NEEDED + type: bool + attr_value_field: booldata + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_inbound_routing.yaml b/dash-pipeline/SAI/specs/dash_inbound_routing.yaml new file mode 100644 index 000000000..b4cb8e784 --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_inbound_routing.yaml @@ -0,0 +1,114 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_inbound_routing +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: inbound_routing_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_inbound_routing_entry_action_t + description: Attribute data for SAI_INBOUND_ROUTING_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_inbound_routing_entry_entry_t + description: Entry for inbound_routing_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: eni_id + description: Exact matched key eni_id + type: sai_object_id_t + objects: SAI_OBJECT_TYPE_ENI + valid_only: null + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: VNI + description: Exact matched key VNI + type: sai_uint32_t + objects: null + valid_only: null + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: sip + description: Ternary matched key sip + type: sai_ip_address_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_INBOUND_ROUTING_ENTRY_ATTR_ACTION + description: Action + type: sai_inbound_routing_entry_action_t + attr_value_field: null + default: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_OR + description: Action parameter METER_CLASS_OR + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_INBOUND_ROUTING_ENTRY_METER_CLASS_AND + description: Action parameter METER_CLASS_AND + type: sai_uint32_t + attr_value_field: u32 + default: '4294967295' + 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_INBOUND_ROUTING_ENTRY_SRC_VNET_ID + description: Action parameter SRC_VNET_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_VNET + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_INBOUND_ROUTING_ENTRY_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_meter.yaml b/dash-pipeline/SAI/specs/dash_meter.yaml new file mode 100644 index 000000000..9fd7df0ec --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_meter.yaml @@ -0,0 +1,100 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_meter +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: meter_bucket + description: '' + is_object: true + enums: [] + structs: [] + attributes: [] + stats: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_METER_BUCKET_STAT_OUTBOUND_BYTES + description: DASH METER_BUCKET OUTBOUND_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_METER_BUCKET_STAT_INBOUND_BYTES + description: DASH METER_BUCKET INBOUND_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: meter_policy + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_METER_POLICY_IP_ADDR_FAMILY + description: Action parameter IP_ADDR_FAMILY + type: sai_ip_addr_family_t + attr_value_field: u32 + default: SAI_IP_ADDR_FAMILY_IPV4 + isresourcetype: true + flags: CREATE_AND_SET + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: meter_rule + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_METER_RULE_METER_CLASS + description: Action parameter METER_CLASS + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_METER_RULE_ATTR_PRIORITY + description: Rule priority in table + type: sai_uint32_t + attr_value_field: null + default: null + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_METER_RULE_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml b/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml new file mode 100644 index 000000000..b1b1a8bff --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml @@ -0,0 +1,196 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_outbound_ca_to_pa +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: outbound_ca_to_pa_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_outbound_ca_to_pa_entry_action_t + description: Attribute data for SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_PRIVATE_LINK_MAPPING + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_outbound_ca_to_pa_entry_entry_t + description: Entry for outbound_ca_to_pa_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: dst_vnet_id + description: Exact matched key dst_vnet_id + type: sai_object_id_t + objects: SAI_OBJECT_TYPE_VNET + valid_only: null + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: dip + description: Exact matched key dip + type: sai_ip_address_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_ACTION + description: Action + type: sai_outbound_ca_to_pa_entry_action_t + attr_value_field: null + default: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_UNDERLAY_DIP + description: Action parameter UNDERLAY_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_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_DMAC + description: Action parameter OVERLAY_DMAC + type: sai_mac_t + attr_value_field: mac + default: vendor + 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_OUTBOUND_CA_TO_PA_ENTRY_USE_DST_VNET_VNI + description: Action parameter USE_DST_VNET_VNI + type: bool + attr_value_field: booldata + default: 'false' + 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_OUTBOUND_CA_TO_PA_ENTRY_METER_CLASS_OR + description: Action parameter METER_CLASS_OR + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_FLOW_RESIMULATION_REQUESTED + description: Action parameter FLOW_RESIMULATION_REQUESTED + type: bool + attr_value_field: booldata + default: 'false' + 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_OUTBOUND_CA_TO_PA_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION + description: Action parameter ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_SIP + description: Action parameter OVERLAY_SIP + 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_OUTBOUND_CA_TO_PA_ENTRY_OVERLAY_DIP + description: Action parameter OVERLAY_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_OUTBOUND_CA_TO_PA_ENTRY_DASH_ENCAPSULATION + description: Action parameter DASH_ENCAPSULATION + type: sai_dash_encapsulation_t + attr_value_field: s32 + default: SAI_DASH_ENCAPSULATION_INVALID + 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_OUTBOUND_CA_TO_PA_ENTRY_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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_COUNTER_ID + description: Attach a counter. When it is empty, then packet hits won't be counted. + type: sai_object_id_t + attr_value_field: null + default: SAI_NULL_OBJECT_ID + isresourcetype: false + flags: CREATE_AND_SET + object_name: SAI_OBJECT_TYPE_COUNTER + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_outbound_routing.yaml b/dash-pipeline/SAI/specs/dash_outbound_routing.yaml new file mode 100644 index 000000000..c97f30b36 --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_outbound_routing.yaml @@ -0,0 +1,244 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_outbound_routing +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: outbound_routing_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_outbound_routing_entry_action_t + description: Attribute data for SAI_OUTBOUND_ROUTING_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_SERVICE_TUNNEL + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_DROP + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_outbound_routing_entry_entry_t + description: Entry for outbound_routing_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: eni_id + description: Exact matched key eni_id + type: sai_object_id_t + objects: SAI_OBJECT_TYPE_ENI + valid_only: null + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: destination + description: Lpm matched key destination + type: sai_ip_prefix_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_ATTR_ACTION + description: Action + type: sai_outbound_routing_entry_action_t + attr_value_field: null + default: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_DST_VNET_ID + description: Action parameter DST_VNET_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_VNET + 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 + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_METER_CLASS_AND + description: Action parameter METER_CLASS_AND + type: sai_uint32_t + attr_value_field: u32 + default: '4294967295' + 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_OUTBOUND_ROUTING_ENTRY_ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION + description: Action parameter ROUTING_ACTIONS_DISABLED_IN_FLOW_RESIMULATION + 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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_OVERLAY_IP + description: Action parameter OVERLAY_IP + 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_OUTBOUND_ROUTING_ENTRY_OVERLAY_DIP + description: Action parameter OVERLAY_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_OUTBOUND_ROUTING_ENTRY_OVERLAY_DIP_MASK + description: Action parameter OVERLAY_DIP_MASK + 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_OUTBOUND_ROUTING_ENTRY_OVERLAY_SIP + description: Action parameter OVERLAY_SIP + 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_OUTBOUND_ROUTING_ENTRY_OVERLAY_SIP_MASK + description: Action parameter OVERLAY_SIP_MASK + 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_OUTBOUND_ROUTING_ENTRY_UNDERLAY_DIP + description: Action parameter UNDERLAY_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_OUTBOUND_ROUTING_ENTRY_UNDERLAY_SIP + description: Action parameter UNDERLAY_SIP + 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_OUTBOUND_ROUTING_ENTRY_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_OUTBOUND_ROUTING_ENTRY_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 + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_ATTR_COUNTER_ID + description: Attach a counter. When it is empty, then packet hits won't be counted. + type: sai_object_id_t + attr_value_field: null + default: SAI_NULL_OBJECT_ID + isresourcetype: false + flags: CREATE_AND_SET + object_name: SAI_OBJECT_TYPE_COUNTER + allow_null: true + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_OUTBOUND_ROUTING_ENTRY_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_pa_validation.yaml b/dash-pipeline/SAI/specs/dash_pa_validation.yaml new file mode 100644 index 000000000..2c3f9ba6c --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_pa_validation.yaml @@ -0,0 +1,60 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_pa_validation +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: pa_validation_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_pa_validation_entry_action_t + description: Attribute data for SAI_PA_VALIDATION_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_pa_validation_entry_entry_t + description: Entry for pa_validation_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: vnet_id + description: Exact matched key vnet_id + type: sai_object_id_t + objects: SAI_OBJECT_TYPE_VNET + valid_only: null + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: sip + description: Exact matched key sip + type: sai_ip_address_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PA_VALIDATION_ENTRY_ATTR_ACTION + description: Action + type: sai_pa_validation_entry_action_t + attr_value_field: null + default: SAI_PA_VALIDATION_ENTRY_ACTION_PERMIT + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PA_VALIDATION_ENTRY_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_vip.yaml b/dash-pipeline/SAI/specs/dash_vip.yaml new file mode 100644 index 000000000..b97418a0b --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_vip.yaml @@ -0,0 +1,54 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_vip +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: vip_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_vip_entry_action_t + description: Attribute data for SAI_VIP_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_VIP_ENTRY_ACTION_ACCEPT + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_vip_entry_entry_t + description: Entry for vip_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: VIP + description: Exact matched key VIP + type: sai_ip_address_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_VIP_ENTRY_ATTR_ACTION + description: Action + type: sai_vip_entry_action_t + attr_value_field: null + default: SAI_VIP_ENTRY_ACTION_ACCEPT + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_VIP_ENTRY_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/dash_vnet.yaml b/dash-pipeline/SAI/specs/dash_vnet.yaml new file mode 100644 index 000000000..297c8365e --- /dev/null +++ b/dash-pipeline/SAI/specs/dash_vnet.yaml @@ -0,0 +1,24 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: dash_vnet +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: vnet + description: '' + is_object: true + enums: [] + structs: [] + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_VNET_VNI + description: Action parameter VNI + 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: [] diff --git a/dash-pipeline/SAI/specs/route.yaml b/dash-pipeline/SAI/specs/route.yaml new file mode 100644 index 000000000..a8a76551a --- /dev/null +++ b/dash-pipeline/SAI/specs/route.yaml @@ -0,0 +1,78 @@ +!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup +name: route +description: '' +sai_apis: +- !!python/object:utils.sai_spec.sai_api.SaiApi + name: route_entry + description: '' + is_object: false + enums: + - !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_route_entry_action_t + description: Attribute data for SAI_ROUTE_ENTRY_ATTR_ACTION + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SAI_ROUTE_ENTRY_ACTION_PKT_ACT + description: '' + value: '0' + structs: + - !!python/object:utils.sai_spec.sai_struct.SaiStruct + name: sai_route_entry_entry_t + description: Entry for route_entry + members: + - !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: destination + description: Lpm matched key destination + type: sai_ip_prefix_t + objects: null + valid_only: null + attributes: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ROUTE_ENTRY_ATTR_ACTION + description: Action + type: sai_route_entry_action_t + attr_value_field: null + default: SAI_ROUTE_ENTRY_ACTION_PKT_ACT + isresourcetype: false + flags: MANDATORY_ON_CREATE | CREATE_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_ROUTE_ENTRY_PACKET_ACTION + description: Action parameter PACKET_ACTION + type: sai_uint16_t + attr_value_field: u16 + default: '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_ROUTE_ENTRY_NEXT_HOP_ID + description: Action parameter NEXT_HOP_ID + type: sai_uint16_t + attr_value_field: u16 + default: '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_ROUTE_ENTRY_ATTR_IP_ADDR_FAMILY + description: IP address family for resource accounting + type: sai_ip_addr_family_t + attr_value_field: null + default: null + isresourcetype: true + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + stats: [] diff --git a/dash-pipeline/SAI/specs/sai_spec.yaml b/dash-pipeline/SAI/specs/sai_spec.yaml new file mode 100644 index 000000000..47b34d09b --- /dev/null +++ b/dash-pipeline/SAI/specs/sai_spec.yaml @@ -0,0 +1,262 @@ +!!python/object:utils.sai_spec.sai_spec.SaiSpec +api_types: +- SAI_API_DASH_ACL +- SAI_API_DASH_DIRECTION_LOOKUP +- SAI_API_DASH_ENI +- SAI_API_DASH_HA +- SAI_API_DASH_INBOUND_ROUTING +- SAI_API_DASH_METER +- SAI_API_DASH_OUTBOUND_CA_TO_PA +- SAI_API_DASH_VNET +- SAI_API_DASH_OUTBOUND_ROUTING +- SAI_API_DASH_PA_VALIDATION +- SAI_API_ROUTE +- SAI_API_DASH_VIP +object_types: +- SAI_OBJECT_TYPE_DASH_ACL_GROUP +- SAI_OBJECT_TYPE_DASH_ACL_RULE +- SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY +- SAI_OBJECT_TYPE_ENI_ETHER_ADDRESS_MAP_ENTRY +- SAI_OBJECT_TYPE_ENI +- SAI_OBJECT_TYPE_HA_SET +- SAI_OBJECT_TYPE_HA_SCOPE +- SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY +- SAI_OBJECT_TYPE_METER_BUCKET +- SAI_OBJECT_TYPE_METER_POLICY +- SAI_OBJECT_TYPE_METER_RULE +- SAI_OBJECT_TYPE_OUTBOUND_CA_TO_PA_ENTRY +- SAI_OBJECT_TYPE_VNET +- SAI_OBJECT_TYPE_OUTBOUND_ROUTING_ENTRY +- SAI_OBJECT_TYPE_PA_VALIDATION_ENTRY +- SAI_OBJECT_TYPE_ROUTE_ENTRY +- SAI_OBJECT_TYPE_VIP_ENTRY +object_entries: +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: direction_lookup_entry + description: Object entry for DASH API direction_lookup_entry + type: sai_direction_lookup_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: eni_ether_address_map_entry + description: Object entry for DASH API eni_ether_address_map_entry + type: sai_eni_ether_address_map_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_ENI_ETHER_ADDRESS_MAP_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: inbound_routing_entry + description: Object entry for DASH API inbound_routing_entry + type: sai_inbound_routing_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_INBOUND_ROUTING_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: outbound_ca_to_pa_entry + description: Object entry for DASH API outbound_ca_to_pa_entry + type: sai_outbound_ca_to_pa_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_OUTBOUND_CA_TO_PA_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: outbound_routing_entry + description: Object entry for DASH API outbound_routing_entry + type: sai_outbound_routing_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_OUTBOUND_ROUTING_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: pa_validation_entry + description: Object entry for DASH API pa_validation_entry + type: sai_pa_validation_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_PA_VALIDATION_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: route_entry + description: Object entry for DASH API route_entry + type: sai_route_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_ROUTE_ENTRY, +- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry + name: vip_entry + description: Object entry for DASH API vip_entry + type: sai_vip_entry_t + objects: null + valid_only: object_type == SAI_OBJECT_TYPE_VIP_ENTRY, +enums: +- !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_dash_direction_t + description: '' + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: INVALID + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: OUTBOUND + description: '' + value: '1' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: INBOUND + description: '' + value: '2' +- !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_dash_tunnel_dscp_mode_t + description: '' + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: PRESERVE_MODEL + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: PIPE_MODEL + description: '' + value: '1' +- !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_dash_ha_role_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 + description: '' + value: '1' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: STANDBY + description: '' + value: '2' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: STANDALONE + description: '' + value: '3' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: SWITCHING_TO_ACTIVE + description: '' + value: '4' +- !!python/object:utils.sai_spec.sai_enum.SaiEnum + name: sai_dash_encapsulation_t + description: '' + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: INVALID + description: '' + value: '0' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + 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_routing_actions_t + description: '' + members: + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: STATIC_ENCAP + description: '' + value: '1' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: NAT + description: '' + value: '2' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: NAT46 + description: '' + value: '4' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: NAT64 + description: '' + value: '8' + - !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember + name: NAT_PORT + description: '' + value: '16' +port_extenstion: !!python/object:utils.sai_spec.sai_api_extension.SaiApiExtension + attributes: [] + stats: + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PORT_STAT_VIP_MISS_DROP_PACKETS + description: DASH PORT VIP_MISS_DROP_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PORT_STAT_ENI_MISS_DROP_PACKETS + description: DASH PORT ENI_MISS_DROP_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PORT_STAT_PORT_LB_FAST_PATH_ICMP_IN_BYTES + description: DASH PORT PORT_LB_FAST_PATH_ICMP_IN_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PORT_STAT_PORT_LB_FAST_PATH_ICMP_IN_PACKETS + description: DASH PORT PORT_LB_FAST_PATH_ICMP_IN_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PORT_STAT_PORT_LB_FAST_PATH_ENI_MISS_DROP_BYTES + description: DASH PORT PORT_LB_FAST_PATH_ENI_MISS_DROP_BYTES stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null + - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute + name: SAI_PORT_STAT_PORT_LB_FAST_PATH_ENI_MISS_DROP_PACKETS + description: DASH PORT PORT_LB_FAST_PATH_ENI_MISS_DROP_PACKETS stat count + type: sai_uint64_t + attr_value_field: u64 + default: null + isresourcetype: false + flags: READ_ONLY + object_name: null + allow_null: false + valid_only: null + deprecated: null +api_groups: +- !inc '/SAI/specs/dash_acl.yaml' +- !inc '/SAI/specs/dash_direction_lookup.yaml' +- !inc '/SAI/specs/dash_eni.yaml' +- !inc '/SAI/specs/dash_ha.yaml' +- !inc '/SAI/specs/dash_inbound_routing.yaml' +- !inc '/SAI/specs/dash_meter.yaml' +- !inc '/SAI/specs/dash_outbound_ca_to_pa.yaml' +- !inc '/SAI/specs/dash_vnet.yaml' +- !inc '/SAI/specs/dash_outbound_routing.yaml' +- !inc '/SAI/specs/dash_pa_validation.yaml' +- !inc '/SAI/specs/route.yaml' +- !inc '/SAI/specs/dash_vip.yaml' diff --git a/dash-pipeline/SAI/templates/saiapi.h.j2 b/dash-pipeline/SAI/templates/saiapi.h.j2 index 5700ff0f8..36c942415 100644 --- a/dash-pipeline/SAI/templates/saiapi.h.j2 +++ b/dash-pipeline/SAI/templates/saiapi.h.j2 @@ -185,7 +185,7 @@ typedef enum _sai_{{ table.name }}_attr_t {% endif %} {% endif %} -{% if sai_attr.validonly | length > 0 %} +{% if sai_attr.validonly != None %} * @validonly {{ sai_attr.validonly }} {% endif %} {% if sai_attr.isresourcetype == 'true' %} diff --git a/dash-pipeline/SAI/templates/saienums.j2 b/dash-pipeline/SAI/templates/saienums.j2 index 1b0c12541..a753d8068 100644 --- a/dash-pipeline/SAI/templates/saienums.j2 +++ b/dash-pipeline/SAI/templates/saienums.j2 @@ -18,4 +18,4 @@ typedef enum _sai_{{ enum.name }}_t {% endfor %} } sai_{{ enum.name }}_t; -{% endfor %} +{% endfor %} \ No newline at end of file diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_counter.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_counter.py index 2bc629041..88ef46b62 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_counter.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_counter.py @@ -143,3 +143,18 @@ def generate_counter_sai_attributes(self) -> "Iterator[DashP4Counter]": ) yield counter + + # + # Functions for generating SAI specs. + # + def _get_sai_name(self, table_name: str) -> str: + if self.attr_type == "stats": + return f"SAI_{table_name.upper()}_STAT_{self.name.upper()}" + + return f"SAI_{table_name.upper()}_{self.name.upper()}" + + def _get_sai_description(self, table_name: str): + if self.attr_type == "stats": + return f"DASH {table_name.upper()} {self.name.upper()} stat count" + + return f"Counter attribute {self.name.upper()}" \ No newline at end of file diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum.py index 187c0c69a..46c6c8b5c 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum.py @@ -2,6 +2,7 @@ from .common import * from .sai_type_solver import SAITypeSolver from .dash_p4_enum_member import DashP4EnumMember +from ..sai_spec import SaiEnum @dash_p4rt_parser @@ -59,3 +60,10 @@ def parse_p4rt(self, p4rt_enum: Dict[str, Any]) -> None: default="SAI_" + self.name.upper() + "_" + self.members[0].name.upper(), is_enum=True, ) + + def to_sai(self) -> SaiEnum: + return SaiEnum( + f"sai_{self.name}_t", + "", + members=[member.to_sai() for member in self.members], + ) diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum_member.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum_member.py index d889a709f..eb4631475 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum_member.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum_member.py @@ -1,5 +1,6 @@ import base64 from .common import * +from ..sai_spec import SaiEnumMember @dash_p4rt_parser @@ -22,3 +23,6 @@ def parse_p4rt(self, p4rt_member: Dict[str, Any]) -> None: """ decoded_bytes = base64.b64decode(str(p4rt_member["value"])) self.enum_value = int.from_bytes(decoded_bytes, byteorder="big") + + def to_sai(self) -> SaiEnumMember: + return SaiEnumMember(self.name, "", str(self.enum_value)) 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 243cd594d..1fff37500 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table.py @@ -5,6 +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 @dash_p4rt_parser @@ -16,6 +17,7 @@ class DashP4Table(DashP4Object): def __init__(self): super().__init__() self.ignored: bool = False + self.ignored_in_header: bool = False self.api_name: str = "" self.ipaddr_family_attr: str = "false" self.keys: List[DashP4TableKey] = [] @@ -125,6 +127,10 @@ def __table_with_counters(self, program: Dict[str, Any]) -> None: def __parse_table_keys(self, p4rt_table: Dict[str, Any]) -> None: for p4rt_table_key in p4rt_table[MATCH_FIELDS_TAG]: table_key = DashP4TableKey.from_p4rt(p4rt_table_key) + + if self.is_object != "false": + table_key.is_entry_key = False + self.keys.append(table_key) self.keys = DashP4TableAttribute.link_ip_is_v6_vars(self.keys) @@ -207,7 +213,7 @@ def post_parsing_process(self, all_table_names: List[str]) -> None: self.__update_table_param_object_name_reference(all_table_names) self.__build_sai_attributes_after_parsing() - def __update_table_param_object_name_reference(self, all_table_names) -> None: + def __update_table_param_object_name_reference(self, all_table_names: List[str]) -> None: # Update object name reference for action params for param in self.action_params: if param.type == "sai_object_id_t": @@ -252,3 +258,118 @@ def __build_sai_attributes_after_parsing(self): self.sai_stats = [] for order in sorted(sai_stats_by_order.keys()): self.sai_stats.extend(sai_stats_by_order[order]) + + # + # Functions for generating SAI specs: + # + def to_sai(self) -> SaiApi: + sai_api = SaiApi(self.name, "", self.is_object != "false") + + self.create_sai_action_enum(sai_api) + self.create_sai_structs(sai_api) + self.create_sai_attributes(sai_api) + self.create_sai_stats(sai_api) + + return sai_api + + def create_sai_action_enum(self, sai_api: SaiApi) -> None: + # If the table represents an SAI object, it should not have an action enum. + # If the table has only 1 action, we don't need to create the action enum. + if len(self.actions) <= 1 and self.is_object != "false": + return + + action_enum_member_value = 0 + action_enum_members: List[SaiEnumMember] = [] + for action in self.actions: + action_enum_members.append( + SaiEnumMember( + name=f"SAI_{self.name.upper()}_ACTION_{action.name.upper()}", + description="", + value=str(action_enum_member_value), + ) + ) + + action_enum_type_name = f"sai_{self.name.lower()}_action_t" + + action_enum = SaiEnum( + name=action_enum_type_name, + description=f"Attribute data for SAI_{ self.name.upper() }_ATTR_ACTION", + members=action_enum_members, + ) + sai_api.enums.append(action_enum) + + sai_attr_action = SaiAttribute( + name=f"SAI_{self.name.upper()}_ATTR_ACTION", + description="Action", + type=action_enum_type_name, + flags="MANDATORY_ON_CREATE | CREATE_ONLY", + default=action_enum_members[0].name, + ) + sai_api.attributes.append(sai_attr_action) + + def create_sai_structs(self, sai_api: SaiApi) -> None: + # The entry struct is only needed for non-object tables. + if self.is_object != "false": + return + + sai_struct_members = [attr.to_sai_struct_entry(self.name) for attr in self.keys if attr.skipattr != "true"] + + sai_struct = SaiStruct( + name=f"sai_{self.name.lower()}_entry_t", + description=f"Entry for {self.name.lower()}", + members=sai_struct_members, + ) + + sai_api.structs.append(sai_struct) + + def create_sai_stats(self, sai_api: SaiApi) -> None: + sai_api.stats = [ + sai_stat.to_sai_attribute(self.name) + for sai_stat in self.sai_stats + ] + + def create_sai_attributes(self, sai_api: SaiApi) -> None: + sai_api.attributes.extend( + [attr.to_sai_attribute(self.name) for attr in self.sai_attributes if attr.skipattr != "true"] + ) + + # If the table has an counter attached, we need to create a counter attribute for it. + # The counter attribute only counts that packets that hits any entry, but not the packet that misses all entries. + if self.with_counters == "true": + counter_attr = SaiAttribute( + name=f"SAI_{self.name.upper()}_ATTR_COUNTER_ID", + description="Attach a counter. When it is empty, then packet hits won't be counted.", + type="sai_object_id_t", + default="SAI_NULL_OBJECT_ID", + object_name="SAI_OBJECT_TYPE_COUNTER", + allow_null=True, + ) + + sai_api.attributes.append(counter_attr) + + if self.is_object == "true": + # If any match key in this table supports priority, we need to add a priority attribute. + if any([key.match_type != "exact" for key in self.keys]) and all( + [key.match_type != "lpm" for key in self.keys] + ): + priority_attr = SaiAttribute( + name=f"SAI_{self.name.upper()}_ATTR_PRIORITY", + description="Rule priority in table", + type="sai_uint32_t", + flags="MANDATORY_ON_CREATE | CREATE_ONLY", + ) + + sai_api.attributes.append(priority_attr) + + # If any match key contains an IP address, we need to add an IP address family attribute + # for IPv4 and IPv6 support. + if self.ipaddr_family_attr == "true": + ip_addr_family_attr = SaiAttribute( + name=f"SAI_{self.name.upper()}_ATTR_IP_ADDR_FAMILY", + description="IP address family for resource accounting", + type="sai_ip_addr_family_t", + flags="READ_ONLY", + isresourcetype=True, + ) + + sai_api.attributes.append(ip_addr_family_attr) diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_attribute.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_attribute.py index 3a86e2384..9563f3d51 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_attribute.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_attribute.py @@ -1,6 +1,7 @@ from typing import List, Optional from .common import * from .sai_type_solver import SAITypeInfo +from ..sai_spec import SaiAttribute, SaiStructEntry class DashP4TableAttribute(DashP4Object): @@ -17,6 +18,7 @@ def __init__(self): self.object_name: Optional[str] = None self.skipattr: Optional[str] = None self.match_type: str = "" + self.validonly: Optional[str] = None def _parse_sai_table_attribute_annotation( self, p4rt_anno_list: Dict[str, Any] @@ -88,3 +90,47 @@ def set_sai_type(self, sai_type_info: SAITypeInfo) -> None: self.field = sai_type_info.sai_attribute_value_field if self.default == None: self.default = sai_type_info.default + + # + # Functions for generating SAI specs. + # + def to_sai_struct_entry(self, table_name: str) -> SaiStructEntry: + name = self._get_sai_name(table_name) + description = self._get_sai_description(table_name) + object_name = f"SAI_OBJECT_TYPE_{self.object_name.upper()}" if self.object_name else None + + return SaiStructEntry( + name = name, + description = description, + type = self.type, + objects = object_name, + valid_only = self.validonly, + ) + + def to_sai_attribute(self, table_name: str) -> SaiAttribute: + name = self._get_sai_name(table_name) + description = self._get_sai_description(table_name) + + default_value = None if self.isreadonly == "true" else self.default + object_name = f"SAI_OBJECT_TYPE_{self.object_name.upper()}" if self.object_name else None + sai_flags = "READ_ONLY" if self.isreadonly == "true" else "CREATE_AND_SET" + allow_null = True if self.type == "sai_object_id_t" else False + + return SaiAttribute( + name = name, + description = description, + type = self.type, + attr_value_field = self.field, + default = default_value, + isresourcetype = self.isresourcetype == "true", + flags = sai_flags, + object_name = object_name, + allow_null = allow_null, + valid_only = self.validonly, + ) + + def _get_sai_name(self, table_name: str) -> str: + return f"SAI_{table_name.upper()}_{self.name.upper()}" + + def _get_sai_description(self, table_name: str): + return f"Action parameter {self.name.upper()}" \ No newline at end of file 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 c538070d0..c6db8c07d 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,6 +1,7 @@ from typing import List, Optional from .common import * from .dash_p4_table import DashP4Table +from ..sai_spec import SaiApiGroup class DashP4TableGroup(DashP4Object): @@ -24,5 +25,20 @@ 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() + + for table in self.tables: + if table.name in table_names: + table.ignored_in_header = True + table_names.add(table.name) + + 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 diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_key.py b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_key.py index 3daccc28c..ec2c26f20 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_key.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_key.py @@ -12,6 +12,7 @@ class DashP4TableKey(DashP4TableAttribute): def __init__(self): super().__init__() self.ip_is_v6_field_id: int = 0 + self.is_entry_key: bool = True def parse_p4rt(self, p4rt_table_key: Dict[str, Any]) -> None: """ @@ -56,3 +57,15 @@ def parse_p4rt(self, p4rt_table_key: Dict[str, Any]) -> None: self.set_sai_type(sai_type_info) return + + # + # Functions for generating SAI specs. + # + def _get_sai_name(self, table_name: str) -> str: + if self.is_entry_key: + return self.name + + return f"SAI_{table_name.upper()}_{self.name.upper()}" + + def _get_sai_description(self, table_name: str): + return f"{self.match_type.capitalize()} matched key {self.name}" \ No newline at end of file diff --git a/dash-pipeline/SAI/utils/dash_p4/dash_sai_extensions.py b/dash-pipeline/SAI/utils/dash_p4/dash_sai_extensions.py index f5946f79e..19ae5bf26 100644 --- a/dash-pipeline/SAI/utils/dash_p4/dash_sai_extensions.py +++ b/dash-pipeline/SAI/utils/dash_p4/dash_sai_extensions.py @@ -7,6 +7,7 @@ from .dash_p4_table import DashP4Table from .dash_p4_table_action import DashP4TableAction from ..p4ir import P4VarRefGraph +from ..sai_spec import * @dash_p4rt_parser @@ -112,3 +113,64 @@ def post_parsing_process(self) -> None: all_table_names = [table.name for api in self.table_groups for table in api.tables] for table_group in self.table_groups: table_group.post_parsing_process(all_table_names) + + # + # Functions for generating SAI specs: + # + def to_sai(self) -> SaiSpec: + sai_spec = SaiSpec() + self.create_sai_api_types(sai_spec) + self.create_sai_object_types(sai_spec) + self.create_sai_object_entries(sai_spec) + self.create_sai_enums(sai_spec) + self.create_sai_port_counters(sai_spec.port_extenstion) + sai_spec.api_groups = [api_group.to_sai() for api_group in self.table_groups] + return sai_spec + + def create_sai_api_types(self, sai_spec: SaiSpec): + for table_group in self.table_groups: + sai_spec.api_types.append(f"SAI_API_{table_group.app_name.upper()}") + + def create_sai_object_types(self, sai_spec: SaiSpec): + for table_group in self.table_groups: + for table in table_group.tables: + if table.ignored_in_header: + continue + + sai_spec.object_types.append(f"SAI_OBJECT_TYPE_{table.name.upper()}") + + def create_sai_object_entries(self, sai_spec: SaiSpec): + for table_group in self.table_groups: + for table in table_group.tables: + if table.ignored_in_header: + continue + + if table.is_object != "false": + continue + + object_entry = SaiStructEntry( + name=table.name, + description=f"Object entry for DASH API {table.name}", + type=f"sai_{table.name}_t", + valid_only=f"object_type == SAI_OBJECT_TYPE_{table.name.upper()}," + ) + + sai_spec.object_entries.append(object_entry) + + def create_sai_enums(self, sai_spec: SaiSpec): + for enum in self.enums: + sai_spec.enums.append(enum.to_sai()) + + def create_sai_port_counters(self, api_ext: SaiApiExtension) -> None: + for counter in self.counters: + # If the counter is associated to any table actions, the counter will be generated as part of that table. + # Otherwise, the counters will be generated as part of the port level counter or stats. + if len(counter.param_actions) > 0: + continue + + sai_counter = counter.to_sai_attribute("port") + + if counter.attr_type != "stats": + api_ext.attributes.append(sai_counter) + else: + api_ext.stats.append(sai_counter) \ No newline at end of file diff --git a/dash-pipeline/SAI/utils/sai_spec/__init__.py b/dash-pipeline/SAI/utils/sai_spec/__init__.py new file mode 100644 index 000000000..e79348a72 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/__init__.py @@ -0,0 +1,9 @@ +from .sai_spec import SaiSpec +from .sai_api_group import SaiApiGroup +from .sai_api import SaiApi +from .sai_api_extension import SaiApiExtension +from .sai_enum import SaiEnum +from .sai_enum_member import SaiEnumMember +from .sai_struct import SaiStruct +from .sai_struct_entry import SaiStructEntry +from .sai_attribute import SaiAttribute diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_api.py b/dash-pipeline/SAI/utils/sai_spec/sai_api.py new file mode 100644 index 000000000..07334c4f9 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_api.py @@ -0,0 +1,19 @@ +from typing import List +from .sai_common import SaiCommon +from .sai_attribute import SaiAttribute +from .sai_enum import SaiEnum +from .sai_struct import SaiStruct + + +class SaiApi(SaiCommon): + """ + Defines a SAI API, such as an object or table. + """ + + def __init__(self, name: str, description: str, is_object: bool = False): + super().__init__(name, description) + self.is_object: bool = is_object + self.enums: List[SaiEnum] = [] + self.structs: List[SaiStruct] = [] + self.attributes: List[SaiAttribute] = [] + self.stats: List[SaiAttribute] = [] diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_api_extension.py b/dash-pipeline/SAI/utils/sai_spec/sai_api_extension.py new file mode 100644 index 000000000..3ebd9e38a --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_api_extension.py @@ -0,0 +1,14 @@ +from typing import List +from .sai_attribute import SaiAttribute + + +class SaiApiExtension: + """ + The SAI APIs can be extended with additional attributes and stats. + + This class holds all the attributes and stats that is used to extend a single SAI API. + """ + + def __init__(self): + self.attributes: List[SaiAttribute] = [] + self.stats: List[SaiAttribute] = [] diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_api_group.py b/dash-pipeline/SAI/utils/sai_spec/sai_api_group.py new file mode 100644 index 000000000..25f0b7b38 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_api_group.py @@ -0,0 +1,13 @@ +from typing import List +from .sai_common import SaiCommon +from .sai_api import SaiApi + + +class SaiApiGroup(SaiCommon): + """ + Defines a SAI API group, which holds multiple SAI APIs. + """ + + def __init__(self, name: str, description: str): + super().__init__(name, description) + self.sai_apis: List[SaiApi] = [] diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_attribute.py b/dash-pipeline/SAI/utils/sai_spec/sai_attribute.py new file mode 100644 index 000000000..bdb680f0a --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_attribute.py @@ -0,0 +1,33 @@ +from typing import Optional +from .sai_common import SaiCommon + + +class SaiAttribute(SaiCommon): + """ + This class represents a single SAI attribute. + """ + + def __init__( + self, + name: str, + description: str, + type: str, + attr_value_field: Optional[str] = None, + default: Optional[str] = None, + isresourcetype: bool = False, + flags: str = "CREATE_AND_SET", + object_name: Optional[str] = None, + allow_null: bool = False, + valid_only: Optional[str] = None, + deprecated: Optional[bool] = None, + ): + super().__init__(name, description) + self.type = type + self.attr_value_field = attr_value_field + self.default = default + self.isresourcetype = isresourcetype + self.flags = flags + self.object_name = object_name + self.allow_null = allow_null + self.valid_only = valid_only + self.deprecated = deprecated diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_common.py b/dash-pipeline/SAI/utils/sai_spec/sai_common.py new file mode 100644 index 000000000..7f1a21332 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_common.py @@ -0,0 +1,8 @@ +class SaiCommon: + """ + Base class for all SAI objects. + """ + + def __init__(self, name: str, description: str): + self.name: str = name + self.description: str = description diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_enum.py b/dash-pipeline/SAI/utils/sai_spec/sai_enum.py new file mode 100644 index 000000000..bae1cff4c --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_enum.py @@ -0,0 +1,13 @@ +from typing import List +from .sai_common import SaiCommon +from .sai_enum_member import SaiEnumMember + + +class SaiEnum(SaiCommon): + """ + This class represents a single SAI enum and holds all enum values. + """ + + def __init__(self, name: str, description: str, members: List[SaiEnumMember] = []): + super().__init__(name, description) + self.members: List[SaiEnumMember] = members diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_enum_member.py b/dash-pipeline/SAI/utils/sai_spec/sai_enum_member.py new file mode 100644 index 000000000..f8cfb6bd2 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_enum_member.py @@ -0,0 +1,12 @@ +from typing import Any, Dict +from .sai_common import SaiCommon + + +class SaiEnumMember(SaiCommon): + """ + This class represents a single SAI enum member. + """ + + def __init__(self, name: str, description: str, value: str): + super().__init__(name, description) + self.value: str = value diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_spec.py b/dash-pipeline/SAI/utils/sai_spec/sai_spec.py new file mode 100644 index 000000000..74cd6ee33 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_spec.py @@ -0,0 +1,45 @@ +import os +import yaml +import yaml_include +from typing import List +from .sai_enum import SaiEnum +from .sai_api_group import SaiApiGroup +from .sai_api_extension import SaiApiExtension +from .sai_struct_entry import SaiStructEntry + + +class SaiSpec: + """ + Top class of the SAI API, which holds all the SAI API groups and any top level objects. + """ + + def __init__(self): + self.api_types: List[str] = [] + self.object_types: List[str] = [] + self.object_entries: List[SaiStructEntry] = [] + self.enums: List[SaiEnum] = [] + self.port_extenstion: SaiApiExtension = SaiApiExtension() + self.api_groups: List[SaiApiGroup] = [] + + def serialize(self, spec_dir: str): + yaml_inc_files = [] + for api_group in self.api_groups: + sai_api_group_spec_file_path = os.path.join(spec_dir, api_group.name + ".yaml") + + with open(sai_api_group_spec_file_path, "w") as f: + f.write(yaml.dump(api_group, indent=2, sort_keys=False)) + + yaml_inc_files.append(yaml_include.Data(urlpath=sai_api_group_spec_file_path)) + + api_groups = self.api_groups + self.api_groups = yaml_inc_files + + sai_spec_file_path = os.path.join(spec_dir, "sai_spec.yaml") + with open(sai_spec_file_path, "w") as f: + f.write(yaml.dump(self, indent=2, sort_keys=False)) + + self.api_groups = api_groups + + def deserialize(spec_dir: str): + with open(os.path.join(spec_dir, "sai_spec.yaml")) as f: + return yaml.unsafe_load(f) diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_struct.py b/dash-pipeline/SAI/utils/sai_spec/sai_struct.py new file mode 100644 index 000000000..b98cf3a27 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_struct.py @@ -0,0 +1,13 @@ +from typing import List +from .sai_common import SaiCommon +from .sai_struct_entry import SaiStructEntry + + +class SaiStruct(SaiCommon): + """ + This class represents a single SAI struct. + """ + + def __init__(self, name: str, description: str, members: List[SaiStructEntry] = []): + super().__init__(name, description) + self.members: List[SaiStructEntry] = members diff --git a/dash-pipeline/SAI/utils/sai_spec/sai_struct_entry.py b/dash-pipeline/SAI/utils/sai_spec/sai_struct_entry.py new file mode 100644 index 000000000..1f4e6ea06 --- /dev/null +++ b/dash-pipeline/SAI/utils/sai_spec/sai_struct_entry.py @@ -0,0 +1,21 @@ +from typing import Optional +from .sai_common import SaiCommon + + +class SaiStructEntry(SaiCommon): + """ + This class represents a single SAI struct entry. + """ + + def __init__( + self, + name: str, + description: str, + type: str, + objects: Optional[str] = None, + valid_only: Optional[str] = None, + ): + super().__init__(name, description) + self.type = type + self.objects = objects + self.valid_only = valid_only diff --git a/dash-pipeline/dockerfiles/Dockerfile.saithrift-bldr b/dash-pipeline/dockerfiles/Dockerfile.saithrift-bldr index c8233327a..2834bf47f 100644 --- a/dash-pipeline/dockerfiles/Dockerfile.saithrift-bldr +++ b/dash-pipeline/dockerfiles/Dockerfile.saithrift-bldr @@ -27,7 +27,7 @@ ENV DASH_SAIGEN_DEPS python3 python3-pip RUN apt-get update -q && \ apt-get install -y --no-install-recommends $SAI_PTF_DEPS $DASH_SAIGEN_DEPS && \ - pip3 install ctypesgen jinja2 jsonpath-ng + pip3 install ctypesgen jinja2 jsonpath-ng pyyaml pyyaml-include ENV SAI_THRIFT_DEPS automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config