├── .github
└── workflows
│ ├── dash-bmv2-bldr-docker.yml
│ ├── dash-bmv2-ci.yml
│ ├── dash-dpdk-ci.yml
│ ├── dash-grpc1.43.2-docker.yml
│ ├── dash-md-spellcheck.yml
│ ├── dash-p4c-bmv2-docker.yml
│ ├── dash-p4c-dpdk-docker.yml
│ ├── dash-saichallenger-client-bldr-docker.yml
│ ├── dash-saichallenger-client-docker.yml
│ ├── dash-saithrift-bldr-docker.yml
│ ├── dash-saithrift-client-bldr-docker.yml
│ ├── dash-saithrift-client-docker.yml
│ └── pre-commit-check.yml
├── .gitignore
├── .gitmodules
├── .pre-commit-config.yaml
├── .spellcheck.yml
├── .wordlist.txt
├── CODE_OF_CONDUCT.md
├── Disaggregated_APIs_ for_SONiC_Hosts_Trademark_License.docx
├── Enterprise_Disaggregated_APIs_for_SONiC_API_Distribution_Trademark_License.docx
├── Governance.md
├── LICENSE
├── LICENSE-CODE.md
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── assets
├── CI-badge-failing.svg
├── CI-badge-passing.svg
├── CI-build-log-fail-p4-drilldown.png
├── CI-build-log-fail.png
├── CI-build-log-ok.png
├── CI-fail-README-badge.png
├── appliance.png
├── asic.png
├── cloud-icon.svg
├── cplus-icon.png
├── dash-specs-flow.svg
├── docker-icon.png
├── docker-logo.png
├── dut-network-card.png
├── express-route-icon.svg
├── files-group-icon.png
├── gears-icon.png
├── github-icon.png
├── manual-tests-icon.png
├── nic-dpu-appliance.png
├── on-prem-gateway.svg
├── p4-icon.png
├── p4-tests-icon.png
├── python-icon.png
├── python-tests-icon.png
├── sai-submodule-in-repo.png
├── scapy-icon.png
├── smart-switch.png
├── snappi-icon.png
├── sonic-icon.png
├── ubuntu-logo.svg
├── vm-icon.svg
├── words-cloud.csv
├── yaml.svg
└── yy.svg
├── dash-pipeline
├── .dockerignore
├── Makefile
├── Makefile.3rdpty
├── README-common-errors.md
├── README-dash-as-submodule.md
├── README-dash-ci.md
├── README-dash-docker.md
├── README-dash-workflows.md
├── README-ptftests.md
├── README-pytests.md
├── README-saithrift.md
├── README.md
├── SAI
│ ├── Makefile
│ ├── README.md
│ ├── debian
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── libsai-dev_1.0.0_amd64
│ │ │ └── DEBIAN
│ │ │ │ └── control
│ │ └── libsai_1.0.0_amd64
│ │ │ └── DEBIAN
│ │ │ ├── control
│ │ │ ├── shlibs
│ │ │ └── triggers
│ ├── sai_api_gen.py
│ ├── saithrift
│ │ └── Makefile
│ ├── specs
│ │ ├── dash_acl.yaml
│ │ ├── dash_appliance.yaml
│ │ ├── dash_direction_lookup.yaml
│ │ ├── dash_eni.yaml
│ │ ├── dash_flow.yaml
│ │ ├── dash_ha.yaml
│ │ ├── dash_inbound_routing.yaml
│ │ ├── dash_meter.yaml
│ │ ├── dash_outbound_ca_to_pa.yaml
│ │ ├── dash_outbound_port_map.yaml
│ │ ├── dash_outbound_routing.yaml
│ │ ├── dash_pa_validation.yaml
│ │ ├── dash_trusted_vni.yaml
│ │ ├── dash_tunnel.yaml
│ │ ├── dash_vip.yaml
│ │ ├── dash_vnet.yaml
│ │ ├── route.yaml
│ │ └── sai_spec.yaml
│ ├── src
│ │ ├── Makefile
│ │ ├── config.cpp
│ │ ├── config.h
│ │ ├── dashsai.cpp
│ │ ├── dashsai.h
│ │ ├── logger.cpp
│ │ ├── logger.h
│ │ ├── objectidmanager.cpp
│ │ ├── objectidmanager.h
│ │ ├── p4meta.cpp
│ │ ├── p4meta.h
│ │ ├── sai_dash_acl.cpp
│ │ ├── sai_dash_buffer.cpp
│ │ ├── sai_dash_dtel.cpp
│ │ ├── sai_dash_hostif.cpp
│ │ ├── sai_dash_neighbor.cpp
│ │ ├── sai_dash_next_hop.cpp
│ │ ├── sai_dash_policer.cpp
│ │ ├── sai_dash_port.cpp
│ │ ├── sai_dash_router_interface.cpp
│ │ ├── sai_dash_switch.cpp
│ │ ├── saidash.h
│ │ ├── utils.cpp
│ │ └── utils.h
│ ├── templates
│ │ ├── headers
│ │ │ ├── sai_api_comment_object_id.j2
│ │ │ ├── sai_api_func_bulk.j2
│ │ │ ├── sai_api_func_quad.j2
│ │ │ ├── sai_api_func_stats.j2
│ │ │ ├── sai_api_group.h.j2
│ │ │ ├── sai_api_param_object_id.j2
│ │ │ ├── sai_attribute.j2
│ │ │ ├── sai_attributes.j2
│ │ │ ├── sai_enum.j2
│ │ │ ├── sai_stats.j2
│ │ │ ├── sai_stats_extensions.j2
│ │ │ ├── sai_struct.j2
│ │ │ └── sai_struct_entry.j2
│ │ ├── impls
│ │ │ ├── p4_table_entry_match.cpp.j2
│ │ │ ├── p4_table_util.cpp.j2
│ │ │ ├── sai_api_func_bulk.cpp.j2
│ │ │ ├── sai_api_func_quad.cpp.j2
│ │ │ ├── sai_api_func_stats.cpp.j2
│ │ │ └── sai_api_group.cpp.j2
│ │ ├── saiapi.cpp.j2
│ │ ├── saiapi.h.j2
│ │ ├── saicounter.j2
│ │ ├── saienums.j2
│ │ ├── saifixedapis.cpp.j2
│ │ └── saiimpl.h.j2
│ └── utils
│ │ ├── __init__.py
│ │ ├── dash_p4
│ │ ├── __init__.py
│ │ ├── common.py
│ │ ├── dash_p4_counter.py
│ │ ├── dash_p4_enum.py
│ │ ├── dash_p4_enum_member.py
│ │ ├── dash_p4_table.py
│ │ ├── dash_p4_table_action.py
│ │ ├── dash_p4_table_action_param.py
│ │ ├── dash_p4_table_attribute.py
│ │ ├── dash_p4_table_group.py
│ │ ├── dash_p4_table_key.py
│ │ ├── dash_sai_extensions.py
│ │ ├── sai_type_info.py
│ │ └── sai_type_solver.py
│ │ ├── p4ir
│ │ ├── __init__.py
│ │ ├── p4ir_tree.py
│ │ ├── p4ir_var_info.py
│ │ ├── p4ir_var_ref_graph.py
│ │ └── p4ir_var_ref_info.py
│ │ ├── sai_gen
│ │ ├── __init__.py
│ │ ├── sai_file_updater.py
│ │ ├── sai_generator.py
│ │ ├── sai_header_generator.py
│ │ ├── sai_impl_generator.py
│ │ └── sai_template_renderer.py
│ │ └── sai_spec
│ │ ├── __init__.py
│ │ ├── sai_api.py
│ │ ├── sai_api_extension.py
│ │ ├── sai_api_group.py
│ │ ├── sai_api_p4_meta.py
│ │ ├── sai_attribute.py
│ │ ├── sai_common.py
│ │ ├── sai_enum.py
│ │ ├── sai_enum_member.py
│ │ ├── sai_spec.py
│ │ ├── sai_spec_utils.py
│ │ ├── sai_struct.py
│ │ └── sai_struct_entry.py
├── bmv2
│ ├── README.md
│ ├── dash_acl.p4
│ ├── dash_arch_specific.p4
│ ├── dash_bmv2_v1model.p4
│ ├── dash_conntrack.p4
│ ├── dash_counters.p4
│ ├── dash_dpdk_pna.p4
│ ├── dash_headers.p4
│ ├── dash_inbound.p4
│ ├── dash_metadata.p4
│ ├── dash_nvgre.p4
│ ├── dash_outbound.p4
│ ├── dash_parser.p4
│ ├── dash_pipeline.p4
│ ├── dash_routing_types.p4
│ ├── dash_service_tunnel.p4
│ ├── dash_tunnel.p4
│ ├── dash_vxlan.p4
│ ├── defines.h
│ ├── routing_actions
│ │ ├── routing_action_encap_underlay.p4
│ │ ├── routing_action_nat46.p4
│ │ ├── routing_action_nat64.p4
│ │ ├── routing_action_nat_port.p4
│ │ ├── routing_action_set_mac.p4
│ │ └── routing_actions.p4
│ ├── stages
│ │ ├── conntrack_lookup.p4
│ │ ├── direction_lookup.p4
│ │ ├── eni_lookup.p4
│ │ ├── ha.p4
│ │ ├── inbound_routing.p4
│ │ ├── metering_update.p4
│ │ ├── outbound_mapping.p4
│ │ ├── outbound_port_map.p4
│ │ ├── outbound_pre_routing_action_apply.p4
│ │ ├── outbound_routing.p4
│ │ ├── pre_pipeline.p4
│ │ ├── routing_action_apply.p4
│ │ ├── trusted_vni.p4
│ │ └── tunnel_stage.p4
│ └── underlay.p4
├── disable_veth_ipv6.sh
├── dockerfiles
│ ├── .dockerignore
│ ├── DOCKER_BMV2_BLDR_IMG.env
│ ├── DOCKER_DPAPP_IMG.env
│ ├── DOCKER_GRPC_IMG.env
│ ├── DOCKER_P4C_BMV2_IMG.env
│ ├── DOCKER_P4C_DPDK_IMG.env
│ ├── DOCKER_SAITHRIFT_BLDR_IMG.env
│ ├── DOCKER_SAITHRIFT_CLIENT_BLDR_IMG.env
│ ├── DOCKER_SAI_CHALLENGER_CLIENT_BLDR_IMG.env
│ ├── Dockerfile.bmv2-bldr
│ ├── Dockerfile.bmv2-obsolete
│ ├── Dockerfile.dpapp
│ ├── Dockerfile.grpc1.43.2
│ ├── Dockerfile.p4c-bmv2
│ ├── Dockerfile.p4c-dpdk
│ ├── Dockerfile.saichallenger-client
│ ├── Dockerfile.saichallenger-client-bldr
│ ├── Dockerfile.saithrift-bldr
│ ├── Dockerfile.saithrift-client
│ ├── Dockerfile.saithrift-client-bldr
│ └── README.md
├── dpapp
│ ├── CMakeLists.txt
│ ├── Makefile
│ ├── README.md
│ ├── dash
│ │ ├── CMakeLists.txt
│ │ ├── dash.api
│ │ ├── dash.c
│ │ ├── dash.h
│ │ ├── dash_node.c
│ │ ├── dash_test.c
│ │ ├── flow.c
│ │ ├── flow.h
│ │ └── saiapi.c
│ ├── dpapp.sh
│ ├── startup.conf
│ └── tools
│ │ └── send_p2a_pkt.py
├── images
│ ├── dash-docker-branch-workflow.svg
│ ├── dash-docker-fork-dockerhub-workflow.svg
│ ├── dash-docker-fork-workflow.svg
│ ├── dash-p4-bmv2-thrift-workflow.svg
│ ├── dash-submodule-git-hierarchy.svg
│ ├── dash-submodule-workflow.svg
│ ├── dev-workflow-p4-libsai.svg
│ ├── dev-workflow-p4-saithrift.svg
│ ├── dev-workflow-p4.svg
│ ├── docker-volume-mounts.svg
│ ├── dockerhub-p4lang-bm-latest.png
│ └── git-conditional-actions-skipped.png
├── pna.p4
├── tests
│ ├── libsai
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── init_switch
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ └── init_switch.cpp
│ │ └── vnet_out
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ └── vnet_out.cpp
│ ├── requirements.txt
│ └── saithrift
│ │ ├── README.md
│ │ ├── ptf
│ │ ├── README.md
│ │ ├── run-saithrift-ptftests.sh
│ │ └── thrift
│ │ │ └── test_thrift_session.py
│ │ └── pytest
│ │ ├── conftest.py
│ │ ├── echo
│ │ └── test_echo_port.py
│ │ ├── pytest.ini
│ │ ├── run-saithrift-pytests.sh
│ │ ├── saithrift_rpc_client.py
│ │ ├── switch
│ │ └── test_saithrift_switch.py
│ │ ├── thrift
│ │ └── test_saithrift_session.py
│ │ └── vnet
│ │ └── test_saithrift_vnet.py
└── utils
│ ├── README.md
│ ├── dash_pipeline_utils.py
│ └── setup.py
├── doc-github-rules.md
├── documentation
├── README.md
├── dataplane
│ ├── README.md
│ ├── dash-bmv2-data-plane-app.md
│ ├── dash-config-schema-json.md
│ ├── dash-flow-api.md
│ ├── dash-flow-api.pdf
│ ├── dash-flow-resimulation.md
│ ├── dash-routing-actions.md
│ ├── dash-update-timing.md
│ └── images
│ │ ├── dash-bmv2-data-plane-app-arch.drawio.svg
│ │ ├── dash-bmv2-data-plane-app-overview.drawio.svg
│ │ ├── dash-flow-api-example.svg
│ │ └── dash-flow-api-model.svg
├── encrypt-gw-service
│ └── README.md
├── express-route-service
│ ├── README.md
│ ├── express-route-gateway-bypass.md
│ └── images
│ │ ├── ergw-bypass-pl-initial.svg
│ │ ├── ergw-bypass-pl-nsg.svg
│ │ └── ergw-bypass-pl-return.svg
├── general
│ ├── README.md
│ ├── dash-general-compliance-requirements.md
│ ├── dash-handling-fragmented-packets.md
│ ├── dash-high-level-design.md
│ ├── dash-sai-pipeline-packet-flow.md
│ ├── dash-sonic-hld.md
│ ├── data
│ │ └── AppDBMemoryEstimation.xlsx
│ ├── images
│ │ ├── dash-asymmetrical-encap.svg
│ │ ├── dash-data-path-overview.svg
│ │ ├── dash-hld-eni-objects.svg
│ │ ├── dash-hld-inbound-packet-processing-pipeline.svg
│ │ ├── dash-hld-outbound-meter-pipeline.png
│ │ ├── dash-hld-outbound-packet-processing-pipeline.svg
│ │ ├── dash-hld-outbound-vni.svg
│ │ ├── dash-hld-vnet-objects.svg
│ │ ├── dash-simplified-physical-deployment-example.svg
│ │ ├── dash-tunnel-learning.svg
│ │ ├── dash-words-cloud.png
│ │ ├── hld
│ │ │ ├── dash-appliance-architecture.svg
│ │ │ ├── dash-high-level-appliance.svg
│ │ │ ├── dash-high-level-design-schema.svg
│ │ │ ├── dash-high-level-design.svg
│ │ │ ├── dash-high-level-smart-switch.svg
│ │ │ ├── dash-hld-project-ecosystem.svg
│ │ │ ├── dash-hld-software-stack.svg
│ │ │ ├── dash-single-dpu-architecture.svg
│ │ │ └── dash-smart-switch-architecture.svg
│ │ ├── in_slow_path_no_flow_match.png
│ │ ├── inb_fast_path_flow_match.png
│ │ ├── inbound_frm_ilb.png
│ │ ├── out_fast_path_flow_match.png
│ │ ├── out_slow_path_pol_eval_no_flow_match.png
│ │ ├── outbound_nat_l4.png
│ │ ├── packet-flow-in-flow-match.svg
│ │ ├── private_link.png
│ │ ├── private_link_service.png
│ │ ├── req
│ │ │ ├── [msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-02.png
│ │ │ ├── [msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-01.png
│ │ │ ├── [msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-02.png
│ │ │ ├── cps-streams.png
│ │ │ ├── learning-streams.png
│ │ │ ├── msft-8v-1m-rx-bw-port1-100sec-01.png
│ │ │ ├── msft-8v-1m-rx-bw-port1-100sec-02.png
│ │ │ ├── msft-8v-1m-rx-pps-64pkt-flow-100sec-01.png
│ │ │ ├── msft-8v-1m-rx-pps-64pkt-flow-100sec-02.png
│ │ │ ├── msft-8v-1m-rx-pps-learning-01.png
│ │ │ ├── msft-8v-1m-rx-pps-learning-02.png
│ │ │ ├── msft-8v-1m-tx-bw-port1-100sec-01.png
│ │ │ ├── msft-8v-1m-tx-bw-port1-100sec-02.png
│ │ │ ├── msft-8v-1m-tx-pps-64pkt-flow-100sec-01.png
│ │ │ ├── msft-8v-1m-tx-pps-64pkt-flow-100sec-02.png
│ │ │ ├── msft-8v-1m-tx-pps-learning-01.png
│ │ │ ├── msft-8v-1m-tx-pps-learning-02.png
│ │ │ ├── msft-8v-4m-stream-1-syn-tx-cps-100sec-01.png
│ │ │ ├── msft-8v-4m-stream-1-syn-tx-cps-100sec-02.png
│ │ │ ├── msft-8v-4m-stream-2-syn-ack-rx-cps-100sec-01.png
│ │ │ ├── msft-8v-4m-stream-2-syn-ack-rx-cps-100sec-02.png
│ │ │ ├── msft-8v-4m-stream-3-ack-tx-cps-100sec-01.png
│ │ │ ├── msft-8v-4m-stream-3-ack-tx-cps-100sec-02.png
│ │ │ ├── msft-8v-4m-stream-4-fin-ack-rx-cps-100sec-01.png
│ │ │ ├── msft-8v-4m-stream-4-fin-ack-rx-cps-100sec-02.png
│ │ │ ├── msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-01.png
│ │ │ ├── msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-02.png
│ │ │ ├── msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-02.png
│ │ │ ├── msft-lab-ixia-config-01.png
│ │ │ └── msft-lab-ixia-config-02.png
│ │ ├── sdn-appliance.svg
│ │ ├── sdn-high-cps.svg
│ │ ├── sdn
│ │ │ ├── eni-match-flow-direction.svg
│ │ │ ├── inbound-fast-path-flow.svg
│ │ │ ├── inbound-slow-path-flow.svg
│ │ │ ├── outbound-fast-path-flow.svg
│ │ │ ├── outbound-slow-path-flow.svg
│ │ │ ├── sdn-packet-transforms-inbound-from-lb.svg
│ │ │ ├── sdn-packet-transforms-outbound-nat-l4.svg
│ │ │ ├── sdn-packet-transforms-private-link-service.svg
│ │ │ ├── sdn-packet-transforms-private-link.svg
│ │ │ ├── sdn-packet-transforms-service-tunneling.svg
│ │ │ ├── sdn-packet-transforms-vm-internal-load-balancer.svg
│ │ │ ├── sdn-packet-transforms-vm-to-vm.svg
│ │ │ └── sdn-virtual-port.svg
│ │ ├── service_tunneling.png
│ │ ├── tcp-connection-abort.svg
│ │ ├── tcp-connection-create.svg
│ │ ├── tcp-connection-delete.svg
│ │ ├── vm_to_ilb.png
│ │ ├── vm_to_vm.png
│ │ └── vport.png
│ ├── program-scale-testing-requirements
│ │ ├── README.md
│ │ ├── hero-implementation-details.md
│ │ ├── loss.svg
│ │ ├── pre-dash-testing.md
│ │ ├── results.svg
│ │ ├── tcp.png
│ │ ├── testbed1.svg
│ │ ├── testbed2.svg
│ │ ├── testbed3.svg
│ │ └── udp.png
│ ├── sdn-features-packet-transforms.md
│ └── sdn-pipeline-basic-elements.md
├── gnmi
│ ├── README.md
│ ├── dash-gnmi-design.md
│ ├── dash-reference-config-example.md
│ └── images
│ │ ├── gnmi-arch.svg
│ │ ├── gnmi-get-flow.svg
│ │ ├── gnmi-reboot.svg
│ │ └── gnmi-set-flow.svg
├── high-avail
│ ├── AMD-Pensando_HA_Proposal.md
│ ├── AMD_Pensando_HA_Overview.pdf
│ ├── README.md
│ ├── ha-api-hld.md
│ ├── high-availability-and-scale.md
│ ├── images
│ │ ├── channels.003.png
│ │ ├── dash-ha-appliance.svg
│ │ ├── dash-ha-smart-switch.svg
│ │ ├── dp_repl_packet.005.png
│ │ ├── dpreplication.004.png
│ │ ├── ha-bm-packet-flow.svg
│ │ ├── ha-components-complex.svg
│ │ ├── ha-components-dpu-level-ha.svg
│ │ ├── ha-components-eni-level-ha.svg
│ │ ├── ha-functional-diag.svg
│ │ ├── ha-state-sync-packet-format.svg
│ │ ├── ha-sync-operations.svg
│ │ ├── ha_sm.006.png
│ │ ├── node_pairing.007.png
│ │ ├── planned_switchover.009.jpeg
│ │ ├── prepemt_flow.010.png
│ │ ├── terminology.001.png
│ │ ├── topology.002.jpeg
│ │ ├── traffic-flow-has-scale-appliance.png
│ │ └── unplanned_switchover.008.png
│ ├── slides
│ │ ├── DASH High Availability.pptx
│ │ └── README.md
│ ├── xsight-labs-ha-proposal-new-ideas.md
│ └── xsight-labs-ha-proposal-v1.md
├── images
│ ├── README.md
│ ├── general
│ │ ├── dash-specs-flow.svg
│ │ └── github-project-workflow.svg
│ └── icons
│ │ ├── DASH_100.png
│ │ ├── DASH_25.png
│ │ ├── DASH_40.png
│ │ ├── DASH_60.png
│ │ ├── DASH_75.png
│ │ ├── dash-icon-large.png
│ │ ├── dash-icon-large.svg
│ │ ├── dash-icon-medium.png
│ │ ├── dash-icon-medium.svg
│ │ ├── dash-icon-small.png
│ │ ├── dash-icon-small.svg
│ │ ├── dash-icon-xlarge.png
│ │ ├── dash-icon-xlarge.svg
│ │ └── icon-service-Sonic-Dash.svg
├── load-bal-service
│ ├── README.md
│ ├── fast-path-icmp-flow-redirection.md
│ └── images
│ │ ├── ilb-rx-redirect.png
│ │ ├── ilb-transformation.svg
│ │ ├── ilb-tx-after-redirect.png
│ │ ├── ilb-tx-syn.png
│ │ ├── load-balancer-fast-path-architecture.png
│ │ ├── pe-tx-syn.png
│ │ ├── pl-rx-redirect.png
│ │ ├── pl-transformation.svg
│ │ ├── pl-tx-after-redirect.png
│ │ ├── vip-rx-redirect.png
│ │ ├── vip-transformation.svg
│ │ ├── vip-tx-after-redirect.png
│ │ └── vip-tx-syn.png
├── metering
│ ├── README.md
│ └── metering.md
├── private-link-service
│ ├── README.md
│ ├── images
│ │ ├── private-link-nsg-vm-to-pls.svg
│ │ ├── private-link-pls-to-vm.svg
│ │ ├── private-link-redirect-pls-to-vm.svg
│ │ ├── private-link-redirect-vm-to-pls.svg
│ │ └── private-link-vm-to-pls.svg
│ ├── private-link-redirect-map.md
│ └── private-link-service.md
├── sai
│ ├── DASH-apis-rough-draft.xlsx
│ └── README.md
├── stpl-service
│ └── README.md
├── vnet-peering-service
│ └── README.md
└── vnet2vnet-service
│ ├── README.md
│ ├── images
│ ├── packet-pipeline-processing-per-eni-inbound.svg
│ ├── packet-pipeline-processing-per-eni-outbound.svg
│ ├── packet-processing-pipeline-example.png
│ ├── packet-processing-pipeline-tables-example.svg
│ ├── packet-transforms-vm-to-vm-in-vnet-without-dash.svg
│ ├── routing-packet-10.1.0.1.svg
│ ├── routing-packet-10.1.1.1.svg
│ ├── routing-packet-10.2.5.1.svg
│ ├── routing-packet-30.0.0.1.svg
│ └── vm-to-vm-communication-vnet.svg
│ └── vnet-to-vnet-service.md
├── images
├── DASH_in_FNIC_mode.png
├── DASH_in_VM_mode.png
├── github-project-workflow.svg
└── sdn-packet-transforms-vm-to-vm.svg
├── license_custom.md
├── powered_by_Disaggregated_APIs_for_SONiC_Hosts_Trademark_License .docx
├── slides
├── DASH P4 CI Testing Update 2022-07-27.pdf
├── DASH SAI Generation Improvements (2024-01-17).pdf
├── DASH SAI PTF Test Framework Demo on Intel-IPU-HW.pptx
├── DASH_P4_CI_Testing_2022-06-08.pdf
├── SAI_Challenger_Enhancements_for_DASH_Testing_Episode_2.pdf
├── SAI_Challenger_Enhancements_for_DASH_Testing_Sneak_Preview_2022-09-14.pdf
├── SMART NIC Summit 2023 - DASH-workshop-Keysight.pdf
├── Srikanth Kandula In Network Transformations for AI_ML.pdf
├── dash-sonic-test-workflow-v2.pdf
├── dash-sonic-test-workflow-v2.pptx
├── dash-sonic-test-workflow-v3.pdf
├── dash-sonic-test-workflow-v3.pptx
└── sharing_acl_statistical_data.pptx
└── test
├── .gitignore
├── README.md
├── docs
├── README-SAIC-DASH-config-spec.md
├── README.md
├── dash-ptf-testbed.md
├── dash-saichallenger-testbed.md
├── dash-test-HLD.md
├── dash-test-maturity-stages.md
├── dash-test-ref-arch.md
├── dash-test-sai-challenger.md
├── dash-test-workflow-p4-saithrift.md
├── dash-test-workflow-saithrift.md
├── images
│ ├── outbound_scenario_explained.svg
│ └── vnet2vnet_outbound_traffic_scaling.svg
├── testbed
│ ├── README.md
│ ├── README.testbed.Cli.md
│ ├── README.testbed.Config.md
│ ├── README.testbed.Overview.md
│ ├── README.testbed.hardware.md
│ └── README.testbed.software.md
└── testplans
│ ├── README.md
│ ├── acl.md
│ ├── eni.md
│ ├── vnet.md
│ └── vnet_to_vnet.md
├── environments
├── README.md
└── keysight
│ ├── Dockerfile
│ └── requirements.txt
├── images
├── dash-gnmi-api.svg
├── dash-sai-challenger.svg
├── dash-saichallenger-enhanced.svg
├── dash-test-maturity-stages-dummy-north.png
├── dash-test-maturity-stages-dut-config-north.png
├── dash-test-maturity-stages-dut-config-sai.png
├── dash-test-maturity-stages-dut-config-sairedis.png
├── dash-test-maturity-stages-manual.png
├── dash-test-maturity-stages-nb-appldb.png
├── dash-test-maturity-stages-options.png
├── dash-test-maturity-stages-orch-asicdb.png
├── dash-test-maturity-stages-prereq.png
├── dash-test-maturity-stages-std-test-cases.png
├── dash-test-maturity-stages-syncd-fakesai.png
├── dash-test-wflow-p4-saithrift.svg
├── dash-test-wflow-saithrift.svg
├── dash-testbed-inband-via-switch.svg
├── dash-testbed-inband-via-tgen.svg
├── dash-testbed-out-of-band-mgmt.svg
├── dash-testbed-out-of-band-via-iface.svg
├── dash-testbed-out-of-band-via-proxy.svg
├── dash-testbed-ref-arch.svg
├── dash-testbed-tests.svg
├── dash-thrift-sai-api.svg
├── ixia-c.dut.svg
└── test_vxlan_1vpc_1ip.svg
├── requirements.txt
├── targets
├── README.md
└── sku
│ ├── __init__.py
│ └── sku.py
├── test-cases
├── .gitignore
├── README.md
├── functional
│ ├── README.md
│ ├── ptf
│ │ ├── p4_dash_utils.py
│ │ ├── run-tests.sh
│ │ ├── sai_dash_utils.py
│ │ ├── saidashacl.py
│ │ ├── saidashdpapp_sanity.py
│ │ ├── saidasheni.py
│ │ ├── saidashflow.py
│ │ ├── saidashvnet.py
│ │ └── saidashvnet_sanity.py
│ └── saic
│ │ ├── config_bidir_setup_commands.py
│ │ ├── config_inbound_setup_commands.py
│ │ ├── config_outbound_setup_commands.json
│ │ ├── conftest.py
│ │ ├── empty_test.py
│ │ ├── pytest.ini
│ │ ├── run-tests.sh
│ │ ├── sai-api
│ │ ├── test_sai_api_vnet_acl_in.py
│ │ ├── test_sai_api_vnet_acl_out.py
│ │ ├── test_sai_api_vnet_direction_lookup.py
│ │ ├── test_sai_api_vnet_eni.py
│ │ ├── test_sai_api_vnet_eni_addr.py
│ │ ├── test_sai_api_vnet_in_route.py
│ │ ├── test_sai_api_vnet_inbound_vpe.py
│ │ ├── test_sai_api_vnet_out_route.py
│ │ ├── test_sai_api_vnet_pa_entry.py
│ │ └── test_sai_api_vnet_vni.py
│ │ ├── sai_dpu_client_server_ptf.json
│ │ ├── sai_dpu_client_server_snappi.json
│ │ ├── test_vm_to_vm_commn_acl_inbound.py
│ │ ├── test_vm_to_vm_commn_acl_outbound.py
│ │ ├── test_vm_to_vm_commn_udp_bidir.py
│ │ ├── test_vm_to_vm_commn_udp_inbound.py
│ │ ├── test_vm_to_vm_commn_udp_outbound.py
│ │ └── tutorial
│ │ ├── README.md
│ │ ├── images
│ │ ├── dut-config-custom-gen-files.svg
│ │ ├── dut-config-custom-gen.svg
│ │ ├── dut-config-dpugen-files.svg
│ │ ├── dut-config-dpugen.svg
│ │ ├── dut-config-list-comprehension-files.svg
│ │ ├── dut-config-list-comprehension.svg
│ │ └── dut-config-literal.svg
│ │ ├── run-tests.sh
│ │ ├── test_sai_vnet_outbound_small_scale_config_via_dpugen.py
│ │ ├── test_sai_vnet_outbound_small_scale_config_via_dpugen_create.json
│ │ ├── test_sai_vnet_outbound_small_scale_config_via_dpugen_files.py
│ │ ├── test_sai_vnet_outbound_small_scale_config_via_dpugen_remove.json
│ │ ├── test_sai_vnet_vips_config_via_custom_gen.py
│ │ ├── test_sai_vnet_vips_config_via_custom_gen_create.json
│ │ ├── test_sai_vnet_vips_config_via_custom_gen_files.py
│ │ ├── test_sai_vnet_vips_config_via_custom_gen_remove.json
│ │ ├── test_sai_vnet_vips_config_via_list_comprehension.py
│ │ ├── test_sai_vnet_vips_config_via_list_comprehension_create.json
│ │ ├── test_sai_vnet_vips_config_via_list_comprehension_files.py
│ │ ├── test_sai_vnet_vips_config_via_list_comprehension_remove.json
│ │ └── test_sai_vnet_vips_config_via_literal.py
├── scale
│ ├── README.md
│ ├── credentials.py.template
│ ├── saic
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── pytest.ini
│ │ ├── run-tests.sh
│ │ ├── sai_dpu_client_server_ptf.json
│ │ ├── sai_dpu_client_server_snappi.json
│ │ ├── test_config_vnet_inbound.py
│ │ ├── test_config_vnet_outbound.py
│ │ ├── test_config_vnet_route_bidirectional.py
│ │ ├── test_config_vnet_route_unidirectional.py
│ │ ├── test_sai_vnet_inbound.py
│ │ ├── test_sai_vnet_outbound_scale.py
│ │ ├── test_sai_vnet_outbound_simple.py
│ │ ├── test_sai_vnet_route_bidirectional.py
│ │ ├── test_sai_vnet_route_unidirectional.py
│ │ ├── vnet_inbound_setup_commands.json
│ │ ├── vnet_outbound_setup_commands_scale.json
│ │ ├── vnet_outbound_setup_commands_simple.json
│ │ ├── vnet_route_setup_commands_bidirectional.json
│ │ └── vnet_route_setup_commands_unidirectional.json
│ ├── testbed.py
│ └── vnet2vnet
│ │ ├── 48K-ips
│ │ ├── README.md
│ │ ├── test_vxlan_8vpc_48K-ips.py
│ │ └── testdata_vxlan_8vpc_48K-ips.py
│ │ ├── README.md
│ │ ├── bgp_stateful_config.py
│ │ ├── conftest.py
│ │ ├── one-ip
│ │ ├── README.md
│ │ ├── dash_1vpc_1ip_peer.json
│ │ ├── test_vxlan_1vpc_1ip.py
│ │ └── testdata_vxlan_1vpc_1ip.py
│ │ ├── utils
│ │ ├── __init__.py
│ │ └── common.py
│ │ └── vlan_to_vxlan_stateful_config.py
└── utils
│ ├── README.md
│ ├── snappi_utils.py
│ └── vnet2vnet_helper.py
└── third-party
└── traffic_gen
├── README.md
├── deploy_ixiac.sh
├── deployment
├── .env
├── README.md
├── ixia-c-deployment.yml
└── ixia-c.drawio.svg
└── undeploy_ixiac.sh
/.github/workflows/dash-bmv2-bldr-docker.yml:
--------------------------------------------------------------------------------
1 | name: DASH-docker-bmv2-bldr-build-image
2 |
3 | on:
4 | push:
5 | branches: [ "**" ]
6 | paths:
7 | - '.github/workflows/dash-bmv2-bldr-docker.yml'
8 | - 'dash-pipeline/Makefile'
9 | - 'dash-pipeline/dockerfiles/Dockerfile.bmv2-bldr'
10 | - 'dash-pipeline/dockerfiles/DOCKER_BMV2_BLDR_IMG.env'
11 | - 'dash-pipeline/.dockerignore'
12 | - 'dash-pipeline/dockerfiles/.dockerignore'
13 | pull_request:
14 | branches: [ "**" ]
15 | paths:
16 | - '.github/workflows/dash-bmv2-bldr-docker.yml'
17 | - 'dash-pipeline/Makefile'
18 | - 'dash-pipeline/dockerfiles/Dockerfile.bmv2-bldr'
19 | - 'dash-pipeline/dockerfiles/DOCKER_BMV2_BLDR_IMG.env'
20 | - 'dash-pipeline/.dockerignore'
21 | - 'dash-pipeline/dockerfiles/.dockerignore'
22 | workflow_dispatch:
23 |
24 | jobs:
25 | build:
26 | name: Build docker dash-bmv2-bldr image
27 | runs-on: ubuntu-22.04
28 | defaults:
29 | run:
30 | working-directory: ./dash-pipeline
31 | steps:
32 | - uses: actions/checkout@v3
33 | - name: Build dash-bmv2-bldr docker image
34 | run: make docker-bmv2-bldr
35 |
36 | # Can only publish from within DASH repo (need credentials from secrets)
37 | - uses: azure/docker-login@v1
38 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
39 | with:
40 | login-server: sonicdash.azurecr.io
41 | username: ${{ secrets.DASH_ACR_USERNAME }}
42 | password: ${{ secrets.DASH_ACR_PASSWORD }}
43 | - name: Publish dash-bmv2-bldr image
44 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
45 | run: make docker-publish-bmv2-bldr
46 |
--------------------------------------------------------------------------------
/.github/workflows/dash-dpdk-ci.yml:
--------------------------------------------------------------------------------
1 | name: DASH-DPDK-CI
2 |
3 | on:
4 | push:
5 | branches: [ "**" ]
6 | paths:
7 | - '.gitmodules'
8 | - '.github/workflows/dash-dpdk-ci.yml'
9 | - 'test/**.py'
10 | - 'test/**requirements.txt'
11 | - 'test/**.sh'
12 | - 'test/**.yml'
13 | - 'dash-pipeline/**'
14 | - '!dash-pipeline/dockerfiles/Dockerfile.*'
15 | - 'dash-pipeline/dockerfiles/DOCKER_P4C_DPDK_IMG.env'
16 | - '!dash-pipeline/.dockerignore'
17 | - '!dash-pipeline/**.md'
18 | - '!dash-pipeline/**.svg'
19 | - '!dash-pipeline/**.png'
20 | - '!dash-pipeline/**.txt'
21 | pull_request:
22 | branches: [ "**" ]
23 | paths:
24 | - '.gitmodules'
25 | - '.github/workflows/dash-bmv2-ci.yml'
26 | - 'test/**.py'
27 | - 'test/**requirements.txt'
28 | - 'test/**.sh'
29 | - 'test/**.yml'
30 | - 'dash-pipeline/**'
31 | - '!dash-pipeline/dockerfiles/Dockerfile.*'
32 | - 'dash-pipeline/dockerfiles/DOCKER_P4C_DPDK_IMG.env'
33 | - '!dash-pipeline/.dockerignore'
34 | - '!dash-pipeline/**.md'
35 | - '!dash-pipeline/**.svg'
36 | - '!dash-pipeline/**.png'
37 | - '!dash-pipeline/**.txt'
38 | workflow_dispatch:
39 |
40 | jobs:
41 | build:
42 | name: Build DASH Pipeline for P4-DPDK
43 | runs-on: ubuntu-22.04
44 | env:
45 | docker_fg_flags: --privileged
46 | docker_fg_root_flags: --privileged -u root
47 | docker_bg_flags: -d --privileged
48 | defaults:
49 | run:
50 | working-directory: ./dash-pipeline
51 | steps:
52 | - uses: actions/checkout@v3
53 | - name: Pull/Build docker p4c-dpdk image
54 | run: make docker-dash-p4c-dpdk
55 | - name: Build P4 software switch (dpdk) and P4Info
56 | run: DOCKER_FLAGS=$docker_fg_flags make p4c-dpdk-pna
57 |
58 |
--------------------------------------------------------------------------------
/.github/workflows/dash-grpc1.43.2-docker.yml:
--------------------------------------------------------------------------------
1 | name: DASH-docker-grpc1.43.2-build-image
2 |
3 | on:
4 | push:
5 | branches: [ "**" ]
6 | paths:
7 | - '.github/workflows/dash-grpc1.43.2-docker.yml'
8 | - 'dash-pipeline/Makefile'
9 | - 'dash-pipeline/dockerfiles/Dockerfile.grpc1.43.2'
10 | - 'dash-pipeline/dockerfiles/DOCKER_GRPC_IMG.env'
11 | - 'dash-pipeline/.dockerignore'
12 | - 'dash-pipeline/dockerfiles/.dockerignore'
13 | pull_request:
14 | branches: [ "**" ]
15 | paths:
16 | - '.github/workflows/dash-grpc1.43.2-docker.yml'
17 | - 'dash-pipeline/Makefile'
18 | - 'dash-pipeline/dockerfiles/Dockerfile.grpc1.43.2'
19 | - 'dash-pipeline/dockerfiles/DOCKER_GRPC_IMG.env'
20 | - 'dash-pipeline/.dockerignore'
21 | - 'dash-pipeline/dockerfiles/.dockerignore'
22 | workflow_dispatch:
23 |
24 | jobs:
25 | build:
26 | name: Build docker dash-grpc1.43.2 image
27 | runs-on: ubuntu-22.04
28 | defaults:
29 | run:
30 | working-directory: ./dash-pipeline
31 | steps:
32 | - uses: actions/checkout@v3
33 | - name: Build dash-grpc1.43.2 docker image
34 | run: make docker-dash-grpc
35 |
36 | - uses: azure/docker-login@v1
37 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
38 | with:
39 | login-server: sonicdash.azurecr.io
40 | username: ${{ secrets.DASH_ACR_USERNAME }}
41 | password: ${{ secrets.DASH_ACR_PASSWORD }}
42 | - name: Publish dash-grpc1.43.2 image
43 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
44 | run: make docker-publish-dash-grpc
45 |
--------------------------------------------------------------------------------
/.github/workflows/dash-md-spellcheck.yml:
--------------------------------------------------------------------------------
1 | name: Spellcheck
2 | on:
3 | pull_request:
4 | paths:
5 | - '**/*.md'
6 | - '.wordlist.txt'
7 | push:
8 | paths:
9 | - '**/*.md'
10 | - '.wordlist.txt'
11 | workflow_dispatch:
12 |
13 | jobs:
14 | spelling:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@master
18 | - name: Spellcheck
19 | uses: rojopolis/spellcheck-github-actions@0.35.0
20 |
--------------------------------------------------------------------------------
/.github/workflows/dash-p4c-bmv2-docker.yml:
--------------------------------------------------------------------------------
1 | name: DASH-docker-p4c-bmv2-build-image
2 |
3 | on:
4 | push:
5 | branches: [ "**" ]
6 | paths:
7 | - '.github/workflows/dash-p4c-bmv2-docker.yml'
8 | - 'dash-pipeline/dockerfiles/Dockerfile.p4c-bmv2'
9 | - 'dash-pipeline/dockerfiles/DOCKER_P4C_BMV2_IMG.env'
10 | - 'dash-pipeline/.dockerignore'
11 | - 'dash-pipeline/dockerfiles/.dockerignore'
12 | pull_request:
13 | branches: [ "**" ]
14 | paths:
15 | - '.github/workflows/dash-p4c-bmv2-docker.yml'
16 | - 'dash-pipeline/dockerfiles/Dockerfile.p4c-bmv2'
17 | - 'dash-pipeline/dockerfiles/DOCKER_P4C_BMV2_IMG.env'
18 | - 'dash-pipeline/.dockerignore'
19 | - 'dash-pipeline/dockerfiles/.dockerignore'
20 | workflow_dispatch:
21 |
22 | jobs:
23 | build:
24 | name: Build docker dash-p4c-bmv2 image
25 | runs-on: ubuntu-22.04
26 | defaults:
27 | run:
28 | working-directory: ./dash-pipeline
29 | steps:
30 | - uses: actions/checkout@v3
31 | - name: Build dash-p4c-bmv2 docker image
32 | run: make docker-dash-p4c
33 |
34 | - uses: azure/docker-login@v1
35 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
36 | with:
37 | login-server: sonicdash.azurecr.io
38 | username: ${{ secrets.DASH_ACR_USERNAME }}
39 | password: ${{ secrets.DASH_ACR_PASSWORD }}
40 | - name: Publish dash-p4c-bmv2 docker image to ACR
41 | run: make docker-publish-dash-p4c
42 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
43 |
--------------------------------------------------------------------------------
/.github/workflows/dash-p4c-dpdk-docker.yml:
--------------------------------------------------------------------------------
1 | name: DASH-docker-p4c-dpdk-build-image
2 |
3 | on:
4 | push:
5 | branches: [ "**" ]
6 | paths:
7 | - '.github/workflows/dash-p4c-dpdk-docker.yml'
8 | - 'dash-pipeline/dockerfiles/Dockerfile.p4c-dpdk'
9 | - 'dash-pipeline/dockerfiles/DOCKER_P4C_DPDK_IMG.env'
10 | - 'dash-pipeline/.dockerignore'
11 | - 'dash-pipeline/dockerfiles/.dockerignore'
12 | pull_request:
13 | branches: [ "**" ]
14 | paths:
15 | - '.github/workflows/dash-p4c-dpdk-docker.yml'
16 | - 'dash-pipeline/dockerfiles/Dockerfile.p4c-dpdk'
17 | - 'dash-pipeline/dockerfiles/DOCKER_P4C_DPDK_IMG.env'
18 | - 'dash-pipeline/.dockerignore'
19 | - 'dash-pipeline/dockerfiles/.dockerignore'
20 | workflow_dispatch:
21 |
22 | jobs:
23 | build:
24 | name: Build docker dash-p4c-dpdk image
25 | runs-on: ubuntu-22.04
26 | defaults:
27 | run:
28 | working-directory: ./dash-pipeline
29 | steps:
30 | - uses: actions/checkout@v3
31 | - name: Build dash-p4c-dpdk docker image
32 | run: make docker-dash-p4c-dpdk
33 |
34 | - uses: azure/docker-login@v1
35 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
36 | with:
37 | login-server: sonicdash.azurecr.io
38 | username: ${{ secrets.DASH_ACR_USERNAME }}
39 | password: ${{ secrets.DASH_ACR_PASSWORD }}
40 | - name: Publish dash-p4c-dpdk docker image to ACR
41 | run: make docker-publish-dash-p4c-dpdk
42 | if: ${{ github.event_name != 'pull_request' && github.repository == 'sonic-net/DASH' }}
43 |
--------------------------------------------------------------------------------
/.github/workflows/dash-saichallenger-client-docker.yml:
--------------------------------------------------------------------------------
1 | name: DASH-docker-saichallenger-client-img
2 |
3 | on:
4 | push:
5 | branches: [ "**" ]
6 | paths:
7 | - '.github/workflows/dash-saichallenger-client-docker.yml'
8 | - 'dash-pipeline/Makefile'
9 | - 'dash-pipeline/dockerfiles/Dockerfile.saichallenger-client'
10 | - 'dash-pipeline/.dockerignore'
11 | - 'dash-pipeline/dockerfiles/.dockerignore'
12 | pull_request:
13 | branches: [ "**" ]
14 | paths:
15 | - '.github/workflows/dash-saichallenger-client-docker.yml'
16 | - 'dash-pipeline/Makefile'
17 | - 'dash-pipeline/dockerfiles/Dockerfile.saichallenger-client'
18 | - 'dash-pipeline/.dockerignore'
19 | - 'dash-pipeline/dockerfiles/.dockerignore'
20 | workflow_dispatch:
21 |
22 | jobs:
23 | build:
24 | name: Build dash-saichallenger-client-image
25 | runs-on: ubuntu-22.04
26 | env:
27 | docker_fg_flags: -u root --privileged
28 | docker_bg_flags: -d -u root --privileged
29 | defaults:
30 | run:
31 | working-directory: ./dash-pipeline
32 | steps:
33 | - uses: actions/checkout@v3
34 | - name: Pull docker p4c image
35 | run: make docker-pull-dash-p4c
36 | - name: Build P4 software switch (bmv2) and P4Info
37 | run: DOCKER_FLAGS=$docker_fg_flags make p4
38 | - name: Install SAI submodule
39 | run: git submodule update --init
40 | - name: Generate SAI API
41 | run: DOCKER_FLAGS=$docker_fg_flags make sai
42 | - name: Generate SAI-Thrift client and server code and libs
43 | run: DOCKER_FLAGS=$docker_fg_flags make saithrift-server
44 | - name: Build SAI-Challenger client builder base docker image
45 | run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client-bldr
46 | - name: Build SAI-Challenger client docker image
47 | run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **~
2 | **.swp
3 | .DS_STORE
4 | .idea
5 | .vscode
6 | *.bkp
7 | *.log
8 | *.pcap
9 | __pycache__/
10 | .pytest_cache/
11 | dash-pipeline/bmv2/dash_pipeline.bmv2/
12 | dash-pipeline/dpdk-pna/dash_pipeline.dpdk
13 | dash-pipeline/SAI/lib/
14 | dash-pipeline/SAI/rpc/
15 | dash-pipeline/dpapp/build
16 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "dash-pipeline/SAI/SAI"]
2 | path = dash-pipeline/SAI/SAI
3 | url = https://github.com/opencomputeproject/SAI.git
4 | branch = master
5 | [submodule "test/SAI-Challenger"]
6 | path = test/SAI-Challenger
7 | url = https://github.com/opencomputeproject/SAI-Challenger.git
8 | branch = main
9 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | # See https://pre-commit.com for more information
2 | # See https://pre-commit.com/hooks.html for more hooks
3 | repos:
4 | - repo: https://github.com/pre-commit/pre-commit-hooks
5 | rev: v4.4.0
6 | hooks:
7 | - id: mixed-line-ending
8 | args: [--fix=lf]
9 | # - id: trailing-whitespace
10 | # - id: end-of-file-fixer
11 | # - id: check-case-conflict
12 | # - id: check-ast
13 | # - id: check-json
14 | # - id: double-quote-string-fixer
15 | # - repo: https://github.com/PyCQA/flake8
16 | # rev: 6.0.0
17 | # hooks:
18 | # - id: flake8
19 | # args: ["--max-line-length=201", "--extend-ignore=F601,F821"]
20 |
--------------------------------------------------------------------------------
/.spellcheck.yml:
--------------------------------------------------------------------------------
1 | matrix:
2 | - name: Markdown
3 | expect_match: false
4 | apsell:
5 | mode: en
6 | dictionary:
7 | wordlists:
8 | - .wordlist.txt
9 | output: wordlist.dic
10 | encoding: utf-8
11 | pipeline:
12 | - pyspelling.filters.markdown:
13 | markdown_extensions:
14 | - markdown.extensions.extra:
15 | - pyspelling.filters.html:
16 | comments: false
17 | attributes:
18 | - alt
19 | ignores:
20 | - ':matches(code, pre)'
21 | - 'code'
22 | - 'pre'
23 | - 'blockquote'
24 | sources:
25 | - '**/*.md'
26 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/Disaggregated_APIs_ for_SONiC_Hosts_Trademark_License.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/Disaggregated_APIs_ for_SONiC_Hosts_Trademark_License.docx
--------------------------------------------------------------------------------
/Enterprise_Disaggregated_APIs_for_SONiC_API_Distribution_Trademark_License.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/Enterprise_Disaggregated_APIs_for_SONiC_API_Distribution_Trademark_License.docx
--------------------------------------------------------------------------------
/LICENSE-CODE.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # TODO: The maintainer of this repository has not yet edited this file
2 |
3 | **REPOSITORY OWNER**: Do you want Customer Service & Support (CSS) support for this product/project?
4 |
5 | - **No CSS support:** Fill out this template with information about how to file issues and get help.
6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport).
7 | - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide.
8 |
9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.*
10 |
11 | # Support
12 |
13 | ## How to file issues and get help
14 |
15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing
16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or
17 | feature request as a new Issue.
18 |
19 | For help and questions about using this project, please **REPOSITORY MAINTAINER: INSERT INSTRUCTIONS HERE
20 | FOR HOW TO ENGAGE REPOSITORY OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER
21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**.
22 |
23 | ## Microsoft Support Policy
24 |
25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above.
26 |
--------------------------------------------------------------------------------
/assets/CI-build-log-fail-p4-drilldown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/CI-build-log-fail-p4-drilldown.png
--------------------------------------------------------------------------------
/assets/CI-build-log-fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/CI-build-log-fail.png
--------------------------------------------------------------------------------
/assets/CI-build-log-ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/CI-build-log-ok.png
--------------------------------------------------------------------------------
/assets/CI-fail-README-badge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/CI-fail-README-badge.png
--------------------------------------------------------------------------------
/assets/appliance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/appliance.png
--------------------------------------------------------------------------------
/assets/asic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/asic.png
--------------------------------------------------------------------------------
/assets/cloud-icon.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/assets/cplus-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/cplus-icon.png
--------------------------------------------------------------------------------
/assets/docker-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/docker-icon.png
--------------------------------------------------------------------------------
/assets/docker-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/docker-logo.png
--------------------------------------------------------------------------------
/assets/dut-network-card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/dut-network-card.png
--------------------------------------------------------------------------------
/assets/express-route-icon.svg:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/assets/files-group-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/files-group-icon.png
--------------------------------------------------------------------------------
/assets/gears-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/gears-icon.png
--------------------------------------------------------------------------------
/assets/github-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/github-icon.png
--------------------------------------------------------------------------------
/assets/manual-tests-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/manual-tests-icon.png
--------------------------------------------------------------------------------
/assets/nic-dpu-appliance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/nic-dpu-appliance.png
--------------------------------------------------------------------------------
/assets/on-prem-gateway.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/assets/p4-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/p4-icon.png
--------------------------------------------------------------------------------
/assets/p4-tests-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/p4-tests-icon.png
--------------------------------------------------------------------------------
/assets/python-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/python-icon.png
--------------------------------------------------------------------------------
/assets/python-tests-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/python-tests-icon.png
--------------------------------------------------------------------------------
/assets/sai-submodule-in-repo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/sai-submodule-in-repo.png
--------------------------------------------------------------------------------
/assets/scapy-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/scapy-icon.png
--------------------------------------------------------------------------------
/assets/smart-switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/smart-switch.png
--------------------------------------------------------------------------------
/assets/snappi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/snappi-icon.png
--------------------------------------------------------------------------------
/assets/sonic-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/assets/sonic-icon.png
--------------------------------------------------------------------------------
/assets/ubuntu-logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/vm-icon.svg:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/assets/words-cloud.csv:
--------------------------------------------------------------------------------
1 | DASH,
2 | High CPS,
3 | Behavioral Model,
4 | High Availability,
5 | SONiC,
6 | P4,
7 | SAI,
8 | SDN,
9 | ASICS,
10 | Overlay,
11 | Underlay,
12 | Northbound,
13 | Southbound,
14 | Scenarios,
15 | Reliability,
16 |
--------------------------------------------------------------------------------
/assets/yaml.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/yy.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
--------------------------------------------------------------------------------
/dash-pipeline/.dockerignore:
--------------------------------------------------------------------------------
1 | *.bkp
2 | *.log
3 | *.pcap
4 | __pycache__/
5 | .pytest_cache/
6 |
--------------------------------------------------------------------------------
/dash-pipeline/README-common-errors.md:
--------------------------------------------------------------------------------
1 | # Common Errors and their workarounds
2 |
3 | ## Docker access denied
4 | **Symptoms:**
5 |
6 | ```
7 | docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: ...
8 | connect: permission denied.
9 | ```
10 | **Cause**
11 |
12 | You need to be part of the Docker user group
13 |
14 | **Remedy:**
15 |
16 | ```
17 | sudo usermod -aG docker
18 | ```
19 | You will need to logout and log back in to obtain the group membership. To check it:
20 | ```
21 | $ id
22 | uid=1001(dash) gid=1001(dash) groups=1001(dash),27(sudo),998(docker)
23 | ```
24 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/Makefile:
--------------------------------------------------------------------------------
1 |
2 | all: copysrc
3 | ./sai_api_gen.py \
4 | /bmv2/dash_pipeline.bmv2/dash_pipeline_p4rt.json \
5 | --ir /bmv2/dash_pipeline.bmv2/dash_pipeline_ir.json \
6 | --ignore-tables=underlay_mac,eni_meter,slb_decap \
7 | --sai-spec-dir=specs \
8 | dash
9 |
10 | copysrc:
11 | install -CDv src/Makefile src/*h src/*cpp lib/
12 |
13 | .PHONY: clean
14 | clean:
15 | rm -f lib/*
16 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/debian/.gitignore:
--------------------------------------------------------------------------------
1 | *.deb
2 | **/usr
3 | **/DEBIAN/md5sums
4 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/debian/Makefile:
--------------------------------------------------------------------------------
1 |
2 | # TODO lib directory could be changed to /usr/local/lib
3 |
4 | VERSION=1.0.0
5 |
6 | all: debs
7 |
8 | debs: libsai-dev_$(VERSION)_amd64.deb libsai_$(VERSION)_amd64.deb
9 |
10 | libsai-dev_$(VERSION)_amd64.deb: ../SAI/inc/*.h ../SAI/experimental/*.h
11 | mkdir -p -m 755 libsai-dev_$(VERSION)_amd64/usr/include/sai
12 | find -type d |xargs chmod go-w
13 | install -vCD -m 644 ../SAI/inc/*.h libsai-dev_$(VERSION)_amd64/usr/include/sai/
14 | install -vCD -m 644 ../SAI/experimental/*.h libsai-dev_$(VERSION)_amd64/usr/include/sai/
15 | cd libsai-dev_$(VERSION)_amd64 && find usr -type f | xargs md5sum > DEBIAN/md5sums
16 | dpkg-deb --build --root-owner-group libsai-dev_$(VERSION)_amd64
17 |
18 | libsai_$(VERSION)_amd64.deb: ../lib/libsai.so
19 | mkdir -p -m 755 libsai_$(VERSION)_amd64/etc/dash
20 | install -vCD ../../bmv2/dash_pipeline.bmv2/* libsai_$(VERSION)_amd64/etc/dash/
21 | mkdir -p -m 755 libsai_$(VERSION)_amd64/usr/lib/x86_64-linux-gnu/
22 | find -type d |xargs chmod go-w
23 | install -vCD ../lib/libsai.so libsai_$(VERSION)_amd64/usr/lib/x86_64-linux-gnu/libsai.so
24 | install -vCD ../SAI/meta/libsaimetadata.so libsai_$(VERSION)_amd64/usr/lib/x86_64-linux-gnu/libdashsaimetadata.so
25 | cd libsai_$(VERSION)_amd64 && find usr -type f | xargs md5sum > DEBIAN/md5sums
26 | dpkg-deb --build --root-owner-group libsai_$(VERSION)_amd64
27 |
28 | .PHONY: clean
29 |
30 | clean:
31 | rm -f *.deb */DEBIAN/md5sums
32 | rm -rf libsai_$(VERSION)_amd64/usr libsai-dev_$(VERSION)_amd64/usr
33 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/debian/libsai-dev_1.0.0_amd64/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: libsai-dev
2 | Source: dash
3 | Version: 1.0.0
4 | Architecture: amd64
5 | Maintainer: Kamil Cudnik
6 | Section: libdevel
7 | Priority: optional
8 | Description: This package contains development files for DASH libsai
9 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/debian/libsai_1.0.0_amd64/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: libsai
2 | Source: dash
3 | Version: 1.0.0
4 | Architecture: amd64
5 | Maintainer: Kamil Cudnik
6 | Section: libs
7 | Priority: optional
8 | Description: This package contains DASH libsai
9 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/debian/libsai_1.0.0_amd64/DEBIAN/shlibs:
--------------------------------------------------------------------------------
1 | libsai 0 libsai
2 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/debian/libsai_1.0.0_amd64/DEBIAN/triggers:
--------------------------------------------------------------------------------
1 | activate-noawait ldconfig
2 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/specs/dash_appliance.yaml:
--------------------------------------------------------------------------------
1 | !!python/object:utils.sai_spec.sai_api_group.SaiApiGroup
2 | name: dash_appliance
3 | description: DASH appliance
4 | api_type: overlay
5 | sai_apis:
6 | - !!python/object:utils.sai_spec.sai_api.SaiApi
7 | name: dash_appliance
8 | description: DASH appliance
9 | is_object: true
10 | enums: []
11 | structs: []
12 | attributes:
13 | - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
14 | name: SAI_DASH_APPLIANCE_ATTR_LOCAL_REGION_ID
15 | description: Action parameter local region id
16 | type: sai_uint8_t
17 | attr_value_field: u8
18 | default: '0'
19 | isresourcetype: false
20 | flags: CREATE_ONLY
21 | object_name: null
22 | allow_null: false
23 | valid_only: null
24 | is_vlan: false
25 | deprecated: false
26 | stats: []
27 | p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
28 | tables:
29 | - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
30 | id: 45177948
31 | single_match_priority: false
32 | stage: null
33 | keys:
34 | - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey
35 | name: appliance_id
36 | id: 1
37 | match_type: exact
38 | field: u16
39 | bitwidth: 8
40 | ip_is_v6_field_id: 0
41 | is_object_key: true
42 | actions:
43 | SAI_DASH_APPLIANCE_ACTION_SET_APPLIANCE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
44 | name: SAI_DASH_APPLIANCE_ACTION_SET_APPLIANCE
45 | id: 17143042
46 | attr_params:
47 | SAI_DASH_APPLIANCE_ATTR_LOCAL_REGION_ID: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaActionParam
48 | id: 1
49 | field: u8
50 | bitwidth: 8
51 | ip_is_v6_field_id: 0
52 | skipattr: null
53 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/specs/dash_vnet.yaml:
--------------------------------------------------------------------------------
1 | !!python/object:utils.sai_spec.sai_api_group.SaiApiGroup
2 | name: dash_vnet
3 | description: DASH VNET
4 | api_type: overlay
5 | sai_apis:
6 | - !!python/object:utils.sai_spec.sai_api.SaiApi
7 | name: vnet
8 | description: VNET
9 | is_object: true
10 | enums: []
11 | structs: []
12 | attributes:
13 | - !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
14 | name: SAI_VNET_ATTR_VNI
15 | description: Action parameter VNI
16 | type: sai_uint32_t
17 | attr_value_field: u32
18 | default: '0'
19 | isresourcetype: false
20 | flags: CREATE_AND_SET
21 | object_name: null
22 | allow_null: false
23 | valid_only: null
24 | is_vlan: false
25 | deprecated: false
26 | stats: []
27 | p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
28 | tables:
29 | - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
30 | id: 39583935
31 | single_match_priority: false
32 | stage: null
33 | keys:
34 | - !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey
35 | name: vnet_id
36 | id: 1
37 | match_type: exact
38 | field: u16
39 | bitwidth: 16
40 | ip_is_v6_field_id: 0
41 | is_object_key: true
42 | actions:
43 | SAI_VNET_ACTION_SET_VNET_ATTRS: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
44 | name: SAI_VNET_ACTION_SET_VNET_ATTRS
45 | id: 28116018
46 | attr_params:
47 | SAI_VNET_ATTR_VNI: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaActionParam
48 | id: 1
49 | field: u32
50 | bitwidth: 24
51 | ip_is_v6_field_id: 0
52 | skipattr: null
53 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | extern "C" {
4 | #include
5 | }
6 |
7 | #include
8 | #include
9 |
10 | namespace dash
11 | {
12 | constexpr char DEFAULT_GRPC_TARGET[] = "0.0.0.0:9559";
13 |
14 | constexpr char DEFAULT_PIPELINE_JSON[] = "/etc/dash/dash_pipeline.json";
15 |
16 | constexpr char DEFAULT_PIPELINE_PROTO[] = "/etc/dash/dash_pipeline_p4rt.txt";
17 |
18 | constexpr int DEFAULT_DEVICE_ID = 0;
19 |
20 | constexpr uint32_t DEFAULT_BMV2_NUM_PORTS = 2;
21 |
22 | constexpr uint32_t MAX_BMV2_NUM_PORTS = 64;
23 |
24 | class Config
25 | {
26 | public:
27 |
28 | Config();
29 | ~Config() = default;
30 |
31 | public:
32 |
33 | static std::shared_ptr getDefaultConfig();
34 |
35 | static std::shared_ptr getConfig(
36 | const sai_service_method_table_t* serviceMethodTable);
37 |
38 | std::string getConfigString() const;
39 |
40 | public:
41 |
42 | std::string m_grpcTarget;
43 |
44 | std::string m_pipelineJson;
45 |
46 | std::string m_pipelineProto;
47 |
48 | int m_deviceId;
49 |
50 | uint32_t m_bmv2NumPorts;
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/logger.cpp:
--------------------------------------------------------------------------------
1 | #include "logger.h"
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | using namespace dash;
8 |
9 | Logger &Logger::getInstance()
10 | {
11 | static Logger m_logger;
12 |
13 | return m_logger;
14 | }
15 |
16 | void Logger::setMinPrio(Priority prio)
17 | {
18 | getInstance().m_minPrio = prio;
19 | }
20 |
21 | Logger::Priority Logger::getMinPrio()
22 | {
23 | return getInstance().m_minPrio;
24 | }
25 |
26 | void Logger::write(Priority prio, const char *fmt, ...)
27 | {
28 | if (prio > m_minPrio)
29 | return;
30 |
31 | // print to syslog
32 | {
33 | va_list ap;
34 | va_start(ap, fmt);
35 |
36 | vsyslog(prio, fmt, ap);
37 |
38 | va_end(ap);
39 | }
40 |
41 | // print to stderr
42 | {
43 | va_list ap;
44 | va_start(ap, fmt);
45 |
46 | vfprintf(stderr, fmt, ap);
47 | fprintf(stderr, "\n");
48 |
49 | va_end(ap);
50 | }
51 | }
52 |
53 | Logger::ScopeLogger::ScopeLogger(int line, const char *fun) : m_line(line), m_fun(fun)
54 | {
55 | dash::Logger::getInstance().write(dash::Logger::DASH_DEBUG, "d:> %s: enter", m_fun);
56 | }
57 |
58 | Logger::ScopeLogger::~ScopeLogger()
59 | {
60 | dash::Logger::getInstance().write(dash::Logger::DASH_DEBUG, "d:< %s: exit", m_fun);
61 | }
62 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_acl.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(ACL_TABLE,acl_table);
4 |
5 | sai_acl_api_t dash_sai_acl_api_impl = {
6 |
7 | DASH_GENERIC_QUAD_API(acl_table)
8 |
9 | .create_acl_entry = 0,
10 | .remove_acl_entry = 0,
11 | .set_acl_entry_attribute = 0,
12 | .get_acl_entry_attribute = 0,
13 |
14 | .create_acl_counter = 0,
15 | .remove_acl_counter = 0,
16 | .set_acl_counter_attribute = 0,
17 | .get_acl_counter_attribute = 0,
18 |
19 | .create_acl_range = 0,
20 | .remove_acl_range = 0,
21 | .set_acl_range_attribute = 0,
22 | .get_acl_range_attribute = 0,
23 |
24 | .create_acl_table_group = 0,
25 | .remove_acl_table_group = 0,
26 | .set_acl_table_group_attribute = 0,
27 | .get_acl_table_group_attribute = 0,
28 |
29 | .create_acl_table_group_member = 0,
30 | .remove_acl_table_group_member = 0,
31 | .set_acl_table_group_member_attribute = 0,
32 | .get_acl_table_group_member_attribute = 0,
33 |
34 | .create_acl_table_chain_group = 0,
35 | .remove_acl_table_chain_group = 0,
36 | .set_acl_table_chain_group_attribute = 0,
37 | .get_acl_table_chain_group_attribute = 0,
38 | };
39 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_buffer.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(BUFFER_POOL,buffer_pool);
4 | DASH_GENERIC_QUAD(INGRESS_PRIORITY_GROUP,ingress_priority_group);
5 | DASH_GENERIC_QUAD(BUFFER_PROFILE,buffer_profile);
6 |
7 | sai_buffer_api_t dash_sai_buffer_api_impl = {
8 |
9 | DASH_GENERIC_QUAD_API(buffer_pool)
10 |
11 | .get_buffer_pool_stats = 0,
12 | .get_buffer_pool_stats_ext = 0,
13 | .clear_buffer_pool_stats = 0,
14 |
15 | DASH_GENERIC_QUAD_API(ingress_priority_group)
16 |
17 | .get_ingress_priority_group_stats = 0,
18 | .get_ingress_priority_group_stats_ext = 0,
19 | .clear_ingress_priority_group_stats = 0,
20 |
21 | DASH_GENERIC_QUAD_API(buffer_profile)
22 |
23 | .set_ingress_priority_groups_attribute = 0,
24 | .get_ingress_priority_groups_attribute = 0,
25 | };
26 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_dtel.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(DTEL,dtel);
4 | DASH_GENERIC_QUAD(DTEL_QUEUE_REPORT,dtel_queue_report);
5 | DASH_GENERIC_QUAD(DTEL_INT_SESSION,dtel_int_session);
6 | DASH_GENERIC_QUAD(DTEL_REPORT_SESSION,dtel_report_session);
7 | DASH_GENERIC_QUAD(DTEL_EVENT,dtel_event);
8 |
9 | sai_dtel_api_t dash_sai_dtel_api_impl = {
10 |
11 | DASH_GENERIC_QUAD_API(dtel)
12 | DASH_GENERIC_QUAD_API(dtel_queue_report)
13 | DASH_GENERIC_QUAD_API(dtel_int_session)
14 | DASH_GENERIC_QUAD_API(dtel_report_session)
15 | DASH_GENERIC_QUAD_API(dtel_event)
16 | };
17 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_hostif.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(HOSTIF,hostif);
4 | DASH_GENERIC_QUAD(HOSTIF_TABLE_ENTRY,hostif_table_entry);
5 | DASH_GENERIC_QUAD(HOSTIF_TRAP_GROUP,hostif_trap_group);
6 | DASH_GENERIC_QUAD(HOSTIF_TRAP,hostif_trap);
7 | DASH_GENERIC_QUAD(HOSTIF_USER_DEFINED_TRAP,hostif_user_defined_trap);
8 |
9 | sai_hostif_api_t dash_sai_hostif_api_impl = {
10 |
11 | DASH_GENERIC_QUAD_API(hostif)
12 | DASH_GENERIC_QUAD_API(hostif_table_entry)
13 | DASH_GENERIC_QUAD_API(hostif_trap_group)
14 | DASH_GENERIC_QUAD_API(hostif_trap)
15 | DASH_GENERIC_QUAD_API(hostif_user_defined_trap)
16 |
17 | .recv_hostif_packet = 0,
18 | .send_hostif_packet = 0,
19 | .allocate_hostif_packet = 0,
20 | .free_hostif_packet = 0,
21 | };
22 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_neighbor.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | static sai_status_t dash_create_neighbor_entry(
4 | _In_ const sai_neighbor_entry_t *neighbor_entry,
5 | _In_ uint32_t attr_count,
6 | _In_ const sai_attribute_t *attr_list)
7 | {
8 | DASH_LOG_ENTER();
9 |
10 | DASH_LOG_WARN("dummy create");
11 |
12 | return SAI_STATUS_SUCCESS;
13 | }
14 |
15 | static sai_status_t dash_remove_neighbor_entry(
16 | _In_ const sai_neighbor_entry_t *neighbor_entry)
17 | {
18 | DASH_LOG_ENTER();
19 |
20 | DASH_LOG_WARN("dummy remove");
21 |
22 | return SAI_STATUS_SUCCESS;
23 | }
24 |
25 | static sai_status_t dash_set_neighbor_entry_attribute(
26 | _In_ const sai_neighbor_entry_t *neighbor_entry,
27 | _In_ const sai_attribute_t *attr)
28 | {
29 | DASH_LOG_ENTER();
30 |
31 | DASH_LOG_WARN("dummy set");
32 |
33 | return SAI_STATUS_SUCCESS;
34 | }
35 |
36 | static sai_status_t dash_get_neighbor_entry_attribute(
37 | _In_ const sai_neighbor_entry_t *neighbor_entry,
38 | _In_ uint32_t attr_count,
39 | _Inout_ sai_attribute_t *attr_list)
40 | {
41 | DASH_LOG_ENTER();
42 |
43 | DASH_LOG_ERROR("not implemented");
44 |
45 | return SAI_STATUS_NOT_IMPLEMENTED;
46 | }
47 |
48 | sai_neighbor_api_t dash_sai_neighbor_api_impl = {
49 |
50 | DASH_GENERIC_QUAD_API(neighbor_entry)
51 |
52 | .remove_all_neighbor_entries = 0,
53 |
54 | .create_neighbor_entries = 0,
55 | .remove_neighbor_entries = 0,
56 | .set_neighbor_entries_attribute = 0,
57 | .get_neighbor_entries_attribute = 0,
58 | };
59 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_next_hop.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(NEXT_HOP,next_hop);
4 |
5 | sai_next_hop_api_t dash_sai_next_hop_api_impl = {
6 |
7 | DASH_GENERIC_QUAD_API(next_hop)
8 |
9 | .create_next_hops = 0,
10 | .remove_next_hops = 0,
11 | .set_next_hops_attribute = 0,
12 | .get_next_hops_attribute = 0,
13 | };
14 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_policer.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(POLICER,policer);
4 |
5 | sai_policer_api_t dash_sai_policer_api_impl = {
6 |
7 | DASH_GENERIC_QUAD_API(policer)
8 | DASH_GENERIC_STATS_API(policer)
9 | };
10 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_port.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(PORT,port);
4 |
5 | sai_port_api_t dash_sai_port_api_impl = {
6 |
7 | DASH_GENERIC_QUAD_API(port)
8 |
9 | .get_port_stats = 0,
10 | .get_port_stats_ext = 0,
11 | .clear_port_stats = 0,
12 | .clear_port_all_stats = 0,
13 | .create_port_pool = 0,
14 | .remove_port_pool = 0,
15 | .set_port_pool_attribute = 0,
16 | .get_port_pool_attribute = 0,
17 | .get_port_pool_stats = 0,
18 | .get_port_pool_stats_ext = 0,
19 | .clear_port_pool_stats = 0,
20 | .create_port_connector = 0,
21 | .remove_port_connector = 0,
22 | .set_port_connector_attribute = 0,
23 | .get_port_connector_attribute = 0,
24 | .create_port_serdes = 0,
25 | .remove_port_serdes = 0,
26 | .set_port_serdes_attribute = 0,
27 | .get_port_serdes_attribute = 0,
28 | .create_ports = 0,
29 | .remove_ports = 0,
30 | .set_ports_attribute = 0,
31 | .get_ports_attribute = 0,
32 | .create_port_serdess = 0,
33 | .remove_port_serdess = 0,
34 | .set_port_serdess_attribute = 0,
35 | .get_port_serdess_attribute = 0,
36 | };
37 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_router_interface.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(ROUTER_INTERFACE,router_interface);
4 |
5 | sai_router_interface_api_t dash_sai_router_interface_api_impl = {
6 |
7 | DASH_GENERIC_QUAD_API(router_interface)
8 | DASH_GENERIC_STATS_API(router_interface)
9 |
10 | .create_router_interfaces = 0,
11 | .remove_router_interfaces = 0,
12 | .set_router_interfaces_attribute = 0,
13 | .get_router_interfaces_attribute = 0,
14 | };
15 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/sai_dash_switch.cpp:
--------------------------------------------------------------------------------
1 | #include "saiimpl.h"
2 |
3 | DASH_GENERIC_QUAD(SWITCH,switch);
4 |
5 | static sai_status_t dash_create_switch_uniq(
6 | _Out_ sai_object_id_t *switch_id,
7 | _In_ uint32_t attr_count,
8 | _In_ const sai_attribute_t *attr_list)
9 | {
10 | DASH_LOG_ENTER();
11 |
12 | return dash_create_switch(
13 | switch_id,
14 | SAI_NULL_OBJECT_ID, // no switch id since we create switch
15 | attr_count,
16 | attr_list);
17 | }
18 |
19 | sai_switch_api_t dash_sai_switch_api_impl = {
20 | .create_switch = dash_create_switch_uniq,
21 | .remove_switch = dash_remove_switch,
22 | .set_switch_attribute = dash_set_switch_attribute,
23 | .get_switch_attribute = dash_get_switch_attribute,
24 | .get_switch_stats = 0,
25 | .get_switch_stats_ext = 0,
26 | .clear_switch_stats = 0,
27 | .switch_mdio_read = 0,
28 | .switch_mdio_write = 0,
29 | .create_switch_tunnel = 0,
30 | .remove_switch_tunnel = 0,
31 | .set_switch_tunnel_attribute = 0,
32 | .get_switch_tunnel_attribute = 0,
33 | .switch_mdio_cl22_read = 0,
34 | .switch_mdio_cl22_write = 0,
35 | };
36 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/src/saidash.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /**
4 | * @def SAI_KEY_DASH_GRPC_TARGET
5 | *
6 | * Specifies GRPC target in format IP:port.
7 | *
8 | * Example: 0.0.0.0:9559
9 | */
10 | #define SAI_KEY_DASH_GRPC_TARGET "SAI_DASH_GRPC_TARGET"
11 |
12 | /**
13 | * @def SAI_KEY_DASH_PIPELINE_JSON
14 | *
15 | * Specifies pipeline json file path.
16 | *
17 | * Example: /etc/dash/dash_pipeline.json
18 | */
19 | #define SAI_KEY_DASH_PIPELINE_JSON "SAI_DASH_PIPELINE_JSON"
20 |
21 | /**
22 | * @def SAI_KEY_DASH_PIPELINE_PROTO
23 | *
24 | * Specifies pipeline proto p4rt file path.
25 | *
26 | * Example: /etc/dash/dash_pipeline_p4rt.txt
27 | */
28 | #define SAI_KEY_DASH_PIPELINE_PROTO "SAI_DASH_PIPELINE_PROTO"
29 |
30 | /** Below defines could be depreacated if multiple asic will appear */
31 |
32 | /**
33 | * @def SAI_KEY_DASH_DEVICE_ID
34 | *
35 | * Specifies device ID as integer.
36 | *
37 | * Example: 0
38 | */
39 | #define SAI_KEY_DASH_DEVICE_ID "SAI_DASH_DEVICE_ID"
40 |
41 | /**
42 | * @def SAI_KEY_DASH_BMV2_NUM_PORTS
43 | *
44 | * Specifies number of ports in bmv2 as unsigned integer.
45 | *
46 | * Example: 2
47 | */
48 | #define SAI_KEY_DASH_BMV2_NUM_PORTS "SAI_DASH_BMV2_NUM_PORTS"
49 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_api_comment_object_id.j2:
--------------------------------------------------------------------------------
1 | {% if api.is_object == True %}
2 | * @param[in] {{ api.name }}_id Entry id
3 | {% else %}
4 | * @param[in] {{ api.name }} Entry
5 | {% endif %}
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_api_param_object_id.j2:
--------------------------------------------------------------------------------
1 | {% if api.is_object %}
2 | _In_ sai_object_id_t {{ api.name }}_id
3 | {%- else %}
4 | _In_ const sai_{{ api.name }}_t *{{ api.name }}
5 | {%- endif %}
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_attribute.j2:
--------------------------------------------------------------------------------
1 | /**
2 | * @brief {{ attr.description }}
3 | *
4 | * @type {{ attr.type }}
5 | * @flags {{ attr.flags }}
6 | {% if attr.deprecated %}
7 | * @deprecated true
8 | {% endif %}
9 | {% if attr.is_vlan %}
10 | * @isvlan true
11 | {% endif %}
12 | {% if attr.object_name != None %}
13 | * @objects {{ attr.object_name }}
14 | {% endif %}
15 | {% if attr.allow_null %}
16 | * @allownull true
17 | {% endif %}
18 | {% if attr.default != None %}
19 | * @default {{ attr.default }}
20 | {% endif %}
21 | {% if attr.valid_only != None %}
22 | * @validonly {{ attr.valid_only }}
23 | {% endif %}
24 | {% if attr.isresourcetype %}
25 | * @isresourcetype true
26 | {% endif %}
27 | */
28 | {% if ns.firstattr %}
29 | {{ attr.name }} = SAI_{{ api.name | upper }}_ATTR_START,
30 | {% set ns.firstattr = false %}
31 | {% else %}
32 | {{ attr.name }},
33 | {% endif %}
34 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_attributes.j2:
--------------------------------------------------------------------------------
1 | /**
2 | * @brief Attribute ID for {{ api.description }}
3 | */
4 | typedef enum _sai_{{ api.name }}_attr_t
5 | {
6 | /**
7 | * @brief Start of attributes
8 | */
9 | SAI_{{ api.name | upper }}_ATTR_START,
10 | {% set ns = namespace(firstattr=true) %}
11 | {% for attr in api.attributes %}
12 |
13 | {% include 'templates/headers/sai_attribute.j2' %}
14 | {% endfor %}
15 |
16 | /**
17 | * @brief End of attributes
18 | */
19 | SAI_{{ api.name | upper }}_ATTR_END,
20 |
21 | /** Custom range base value */
22 | SAI_{{ api.name | upper }}_ATTR_CUSTOM_RANGE_START = 0x10000000,
23 |
24 | /** End of custom range base */
25 | SAI_{{ api.name | upper }}_ATTR_CUSTOM_RANGE_END,
26 |
27 | } sai_{{ api.name }}_attr_t;
28 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_enum.j2:
--------------------------------------------------------------------------------
1 | /**
2 | * @brief {{ enum.description }}
3 | */
4 | typedef enum _{{ enum.name }}
5 | {
6 | {% for enum_member in enum.members %}
7 | {{ enum_member.name }},
8 |
9 | {% endfor %}
10 | } {{ enum.name }};
11 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_stats.j2:
--------------------------------------------------------------------------------
1 | /**
2 | * @brief Counter IDs for {{ api.description }}
3 | */
4 | typedef enum _sai_{{ api.name }}_stat_t
5 | {
6 | {% for stat in api.stats %}
7 | /** {{ stat.description }} */
8 | {{ stat.name }},
9 |
10 | {% endfor %}
11 | } sai_{{ api.name }}_stat_t;
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_stats_extensions.j2:
--------------------------------------------------------------------------------
1 | {% set sai_stats_extensions_ns = namespace(is_first_attr = is_first_attr) %}
2 | {% for stat in sai_stats %}
3 | /** DASH {{ table_name | lower }} {{ stat.name | upper }} stat count */
4 | {% if sai_stats_extensions_ns.is_first_attr == true %}
5 | SAI_{{ table_name | upper }}_STAT_{{ stat.name | upper }} = SAI_{{ table_name | upper }}_STAT_EXTENSIONS_RANGE_START,
6 | {% else %}
7 | SAI_{{ table_name | upper }}_STAT_{{ stat.name | upper }},
8 | {% endif %}
9 | {% set sai_stats_extensions_ns.is_first_attr = false %}
10 |
11 | {% endfor %}
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_struct.j2:
--------------------------------------------------------------------------------
1 | /**
2 | * @brief {{ struct.description }}
3 | */
4 | typedef struct _{{ struct.name }}
5 | {
6 | {% for member in struct.members %}
7 | {% include 'templates/headers/sai_struct_entry.j2' %}
8 |
9 |
10 | {% endfor %}
11 | } {{ struct.name }};
12 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/headers/sai_struct_entry.j2:
--------------------------------------------------------------------------------
1 | /**
2 | * @brief {{ member.description }}
3 | {% if member.objects != None or member.valid_only != None %}
4 | *
5 | {% endif %}
6 | {% if member.objects != None %}
7 | * @objects {{ member.objects }}
8 | {% endif %}
9 | {% if member.valid_only != None %}
10 | * @validonly {{ member.valid_only }}
11 | {% endif %}
12 | */
13 | {{ member.type }} {{ member.name }};
14 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/impls/p4_table_entry_match.cpp.j2:
--------------------------------------------------------------------------------
1 | {% import 'templates/impls/p4_table_util.cpp.j2' as util %}
2 | {% for key in table['keys'] %}
3 | {% set value = 'tableEntry->' ~ key.name|lower %}
4 | {
5 | auto mf = matchActionEntry->add_match();
6 | mf->set_field_id({{key.id}});
7 | {% if key.match_type == 'exact' %}{{ util.set_key_exact(key, value) }}
8 | {% elif key.match_type == 'lpm' %}{{ util.set_key_lpm(key, value) }}
9 | {% elif key.match_type == 'ternary' %}{{ util.set_key_ternary(key, value) }}
10 | {% elif key.match_type == 'optional' %}{{ util.set_key_optional(key, value) }}
11 | {% elif key.match_type == 'list' %}{{ util.set_key_list(key, value) }}
12 | {% elif key.match_type == 'range' %}{{ util.set_key_range(table, key, value) }}
13 | {% elif key.match_type == 'range_list' %}{{ util.set_key_range_list(key, value) }}
14 | {% endif %}
15 | }
16 | {% if key.ip_is_v6_field_id != 0 %}
17 | {
18 | // set ip_is_v6_field_id field
19 | auto mf = matchActionEntry->add_match();
20 | mf->set_field_id({{key.ip_is_v6_field_id}});
21 | auto mf_exact = mf->mutable_exact();
22 | booldataSetVal(({{value}}.addr_family == SAI_IP_ADDR_FAMILY_IPV4) ? 0 : 1, mf_exact, 1);
23 | }
24 | {% endif %}
25 | {% endfor %}
26 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/impls/sai_api_func_stats.cpp.j2:
--------------------------------------------------------------------------------
1 | static sai_status_t dash_sai_get_{{ api.name }}_stats(
2 | {% include 'templates/headers/sai_api_param_object_id.j2' %},
3 | _In_ uint32_t number_of_counters,
4 | _In_ const sai_stat_id_t *counter_ids,
5 | _Out_ uint64_t *counters)
6 | {
7 | DASH_LOG_ENTER();
8 | assert(0 && "sai_get_{{ api.name }}_stats NYI");
9 | return SAI_STATUS_FAILURE;
10 | }
11 |
12 | static sai_status_t dash_sai_get_{{ api.name }}_stats_ext(
13 | {% include 'templates/headers/sai_api_param_object_id.j2' %},
14 | _In_ uint32_t number_of_counters,
15 | _In_ const sai_stat_id_t *counter_ids,
16 | _In_ sai_stats_mode_t mode,
17 | _Out_ uint64_t *counters)
18 | {
19 | DASH_LOG_ENTER();
20 | assert(0 && "sai_get_{{ api.name }}_stats_ext NYI");
21 | return SAI_STATUS_FAILURE;
22 | }
23 |
24 | static sai_status_t dash_sai_clear_{{ api.name }}_stats(
25 | {% include 'templates/headers/sai_api_param_object_id.j2' %},
26 | _In_ uint32_t number_of_counters,
27 | _In_ const sai_stat_id_t *counter_ids)
28 | {
29 | DASH_LOG_ENTER();
30 | assert(0 && "sai_clear_{{ api.name }}_stats NYI");
31 | return SAI_STATUS_FAILURE;
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/saicounter.j2:
--------------------------------------------------------------------------------
1 | {% set sai_counter_ns = namespace(is_first_attr = is_first_attr) %}
2 | {% for counter in sai_counters %}
3 | /**
4 | * @brief DASH counter {{ counter.name | upper }}
5 | *
6 | * @type sai_object_id_t
7 | * @flags CREATE_AND_SET
8 | * @objects SAI_OBJECT_TYPE_COUNTER
9 | * @allownull true
10 | * @default SAI_NULL_OBJECT_ID
11 | */
12 | {% if sai_counter_ns.is_first_attr == true %}
13 | SAI_{{ table_name | upper }}_ATTR_{{ counter.name | upper }} = SAI_{{ table_name | upper }}_ATTR_EXTENSIONS_RANGE_START,
14 | {% set sai_counter_ns.is_first_attr = false %}
15 | {% else %}
16 | SAI_{{ table_name | upper }}_ATTR_{{ counter.name | upper }},
17 | {% endif %}
18 |
19 | {% endfor %}
--------------------------------------------------------------------------------
/dash-pipeline/SAI/templates/saienums.j2:
--------------------------------------------------------------------------------
1 | {% for enum in sai_enums %}
2 | /**
3 | * @brief Defines a list of enums for {{ enum.name }}
4 | {% if enum.explicit_value %}
5 | *
6 | * @flags strict
7 | {% endif %}
8 | */
9 | typedef enum _sai_{{ enum.name }}_t
10 | {
11 | {% for member in enum.members %}
12 | {% if enum.explicit_value %}
13 | SAI_{{ enum.name | upper }}_{{ member.name | upper }} = {{ member.enum_value }},
14 | {% else %}
15 | SAI_{{ enum.name | upper }}_{{ member.name | upper }},
16 | {% endif %}
17 |
18 | {% endfor %}
19 | } sai_{{ enum.name }}_t;
20 |
21 | {% endfor %}
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/dash-pipeline/SAI/utils/__init__.py
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/dash_p4/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # Parsed SAI objects and parsers:
3 | #
4 | # The SAI objects are parsed from the P4Runtime JSON file, generated by p4 compiler, which contains the information
5 | # of all tables and entry information.
6 | #
7 | # The classes below are used to parse the P4Runtime JSON file to get the key information, so we can generate the SAI
8 | # API headers and implementation files afterwards.
9 | #
10 | # At high level, the hiredarchy of the SAI objects is as follows:
11 | #
12 | # DASHSAIExtensions : All DASH SAI extensions.
13 | # |- SAIEnum : A single enum type.
14 | # | |- SAIEnumMember : A single enum member within the enum.
15 | # |- SAIAPISet : All information for a single SAI API set, such as routing or CA-PA mapping.
16 | # |- SAIAPITable : All information for a single SAI API table used in the API set.
17 | # |- SAIAPITableKey : Information of a single P4 table key defined in the table.
18 | # |- SAIAPITableAction <-------| : Information of a single P4 table action defined used by the table.
19 | # |- SAIAPITableActionParam -| : Information of a single P4 table action parameter used by the action.
20 | #
21 | from .dash_sai_extensions import DashP4SAIExtensions
22 | from .dash_p4_table_group import DashP4TableGroup
23 | from .dash_p4_table import DashP4Table
24 | from .dash_p4_table_action import DashP4TableAction
25 | from .dash_p4_table_key import DashP4TableKey
26 | from .dash_p4_table_action_param import DashP4TableActionParam
27 | from .dash_p4_counter import DashP4Counter
28 | from .dash_p4_enum import DashP4Enum
29 | from .dash_p4_enum_member import DashP4EnumMember
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/dash_p4/dash_p4_enum_member.py:
--------------------------------------------------------------------------------
1 | import base64
2 | from .common import *
3 | from ..sai_spec import SaiEnumMember
4 |
5 |
6 | @dash_p4rt_parser
7 | class DashP4EnumMember(DashP4Object):
8 | """
9 | This class represents a single SAI enum member and provides parser from the P4Runtime enum member object
10 | """
11 |
12 | def __init__(self):
13 | super().__init__()
14 | self.enum_value: int = ""
15 |
16 | def parse_p4rt(self, p4rt_member: Dict[str, Any]) -> None:
17 | """
18 | This method parses the P4Runtime enum member object and populates the SAI enum member object.
19 |
20 | Example P4Runtime enum member object:
21 |
22 | { "name": "INVALID", "value": "AAA=" }
23 | """
24 | decoded_bytes = base64.b64decode(str(p4rt_member["value"]))
25 | self.enum_value = int.from_bytes(decoded_bytes, byteorder="big")
26 |
27 | def to_sai(self) -> SaiEnumMember:
28 | return SaiEnumMember(self.name, "", str(self.enum_value))
29 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/dash_p4/dash_p4_table_action_param.py:
--------------------------------------------------------------------------------
1 | from .common import *
2 | from .dash_p4_table_attribute import *
3 | from .sai_type_solver import *
4 |
5 |
6 | @dash_p4rt_parser
7 | class DashP4TableActionParam(DashP4TableAttribute):
8 | def __init__(self):
9 | super().__init__()
10 | self.bitwidth: int = 0
11 | self.ip_is_v6_field_id: int = 0
12 | self.param_actions: List[Any] = []
13 | # TODO: Fix circular type references
14 | # self.param_actions: List[SAIAPITableAction] = []
15 |
16 | def parse_p4rt(self, p4rt_table_action_param: Dict[str, Any]) -> None:
17 | """
18 | This method parses the P4Runtime table action object and populates the SAI API table action object.
19 |
20 | Example P4Runtime table action object:
21 |
22 | { "id": 1, "name": "dst_vnet_id", "bitwidth": 16 }
23 | """
24 | self.bitwidth = int(p4rt_table_action_param[BITWIDTH_TAG])
25 | # print("Parsing table action param: " + self.name)
26 |
27 | self._parse_sai_table_attribute_annotation(p4rt_table_action_param)
28 |
29 | # If type is specified, use it. Otherwise, try to find the proper type using default heuristics.
30 | if self.type != None:
31 | sai_type_info = SAITypeSolver.get_sai_type(self.type)
32 | else:
33 | sai_type_info = SAITypeSolver.get_object_sai_type(self.bitwidth)
34 |
35 | self.set_sai_type(sai_type_info)
36 |
37 | return
38 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/dash_p4/sai_type_info.py:
--------------------------------------------------------------------------------
1 | class SAITypeInfo:
2 | def __init__(
3 | self,
4 | name: str,
5 | sai_attribute_value_field: str,
6 | default: str = None,
7 | is_enum: bool = False,
8 | ):
9 | self.name: str = name
10 | self.sai_attribute_value_field: str = sai_attribute_value_field
11 | self.default: str = default
12 | self.is_enum: bool = is_enum
13 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/p4ir/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # P4 IR parser and analyzer:
3 | #
4 | from .p4ir_var_ref_graph import *
5 | from .p4ir_var_info import *
6 | from .p4ir_var_ref_info import *
7 | from .p4ir_tree import *
8 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/p4ir/p4ir_tree.py:
--------------------------------------------------------------------------------
1 | import json
2 | import jsonpath_ng.ext as jsonpath_ext
3 | from typing import Any, Dict, Callable
4 |
5 |
6 | class P4IRTree:
7 | @staticmethod
8 | def from_file(path: str) -> "P4IRTree":
9 | with open(path, "r") as f:
10 | return P4IRTree(json.load(f))
11 |
12 | def __init__(self, program: Dict[str, Any]) -> None:
13 | self.program = program
14 |
15 | def walk(self, path: str, on_match: Callable[[Any, Any], None]) -> None:
16 | jsonpath_exp = jsonpath_ext.parse(path)
17 | for match in jsonpath_exp.find(self.program):
18 | on_match(match)
19 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/p4ir/p4ir_var_info.py:
--------------------------------------------------------------------------------
1 | import json
2 | from typing import Any
3 |
4 |
5 | class P4IRVarInfo:
6 | @staticmethod
7 | def from_ir(ir_def_node: Any) -> "P4IRVarInfo":
8 | return P4IRVarInfo(
9 | ir_def_node["Node_ID"],
10 | ir_def_node["name"],
11 | ir_def_node["Source_Info"]["source_fragment"],
12 | ir_def_node["type"]["path"]["name"],
13 | )
14 |
15 | def __init__(
16 | self, ir_id: int, ir_name: str, code_name: str, type_name: str
17 | ) -> None:
18 | self.ir_id = ir_id
19 | self.ir_name = ir_name
20 | self.code_name = code_name
21 | self.type_name = type_name
22 |
23 | def __str__(self) -> str:
24 | return f"ID = {self.ir_id}, Name = {self.ir_name}, VarName = {self.code_name}, Type = {self.type_name}"
25 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/p4ir/p4ir_var_ref_info.py:
--------------------------------------------------------------------------------
1 | from typing import Any
2 | from .p4ir_var_info import P4IRVarInfo
3 |
4 |
5 | class P4IRVarRefInfo:
6 | @staticmethod
7 | def from_ir(ir_ref_node: Any, ir_var_info: P4IRVarInfo) -> "P4IRVarRefInfo":
8 | return P4IRVarRefInfo(
9 | ir_var_info,
10 | ir_ref_node["Node_ID"],
11 | ir_ref_node["Node_Type"],
12 | ir_ref_node["name"],
13 | )
14 |
15 | def __init__(
16 | self, var: P4IRVarInfo, caller_id: int, caller_type: str, caller: str
17 | ) -> None:
18 | self.var = var
19 | self.caller_id = caller_id
20 | self.caller_type = caller_type
21 | self.caller = caller
22 |
23 | def __str__(self) -> str:
24 | return f"VarName = {self.var.code_name}, CallerID = {self.caller_id}, CallerType = {self.caller_type}, Caller = {self.caller}"
25 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_gen/__init__.py:
--------------------------------------------------------------------------------
1 | from .sai_file_updater import SAIFileUpdater
2 | from .sai_template_renderer import SAITemplateRenderer
3 | from .sai_generator import SAIGenerator
4 | from .sai_header_generator import SaiHeaderGenerator
5 | from .sai_impl_generator import SaiImplGenerator
6 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_gen/sai_header_generator.py:
--------------------------------------------------------------------------------
1 | from utils.sai_spec import SaiSpec, SaiApiGroup
2 | from .sai_template_renderer import SAITemplateRenderer
3 |
4 |
5 | class SaiHeaderGenerator:
6 | def __init__(self, sai_spec: SaiSpec):
7 | self.sai_spec: SaiSpec = sai_spec
8 |
9 | def generate(self) -> None:
10 | print("\nGenerating all SAI header files ...")
11 |
12 | for api_group in self.sai_spec.api_groups:
13 | if api_group.api_type == "underlay":
14 | continue
15 |
16 | self._generate_sai_api_group(api_group)
17 |
18 | def _generate_sai_api_group(self, api_group: SaiApiGroup) -> None:
19 | print(f"Generating SAI API definitions for API group: {api_group.name} ...")
20 |
21 | # SAI header file
22 | sai_header_file_name = f"saiexperimental{api_group.name.replace('_', '')}.h"
23 | SAITemplateRenderer("templates/headers/sai_api_group.h.j2").render_to_file(
24 | f"SAI/experimental/{sai_header_file_name}", api_group = api_group
25 | )
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_gen/sai_impl_generator.py:
--------------------------------------------------------------------------------
1 | from utils.sai_spec import SaiSpec, SaiApiGroup
2 | from .sai_template_renderer import SAITemplateRenderer
3 |
4 |
5 | class SaiImplGenerator:
6 | def __init__(self, sai_spec: SaiSpec):
7 | self.sai_spec: SaiSpec = sai_spec
8 |
9 | def generate(self) -> None:
10 | print("\nGenerating SAI API implementation for all APIs ...")
11 |
12 | for api_group in self.sai_spec.api_groups:
13 | self._generate_sai_api_group(api_group)
14 |
15 | def _generate_sai_api_group(self, api_group: SaiApiGroup) -> None:
16 | print(f"Generating SAI API implementation for API group: {api_group.name} ...")
17 |
18 | # SAI implementation file
19 | sai_impl_file_name = f"sai{api_group.name.replace('_', '')}.cpp"
20 | SAITemplateRenderer("templates/impls/sai_api_group.cpp.j2").render_to_file(
21 | f"lib/{sai_impl_file_name}", api_group = api_group
22 | )
23 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_gen/sai_template_renderer.py:
--------------------------------------------------------------------------------
1 | from typing import Any
2 | from jinja2 import Template, Environment, FileSystemLoader
3 | from .sai_file_updater import SAIFileUpdater
4 |
5 | class SAITemplateRenderer:
6 | jinja2_env: Environment = None
7 |
8 | @classmethod
9 | def new_tm(cls, template_file_path: str):
10 | if cls.jinja2_env == None:
11 | cls.jinja2_env = Environment(loader=FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
12 | cls.jinja2_env.add_extension('jinja2.ext.loopcontrols')
13 | cls.jinja2_env.add_extension('jinja2.ext.do')
14 |
15 | return cls.jinja2_env.get_template(template_file_path)
16 |
17 | def __init__(self, template_file_path: str):
18 | self.template_file_path = template_file_path
19 | self.tm = SAITemplateRenderer.new_tm(template_file_path)
20 |
21 | def render(self, **kwargs: Any) -> str:
22 | return self.tm.render(**kwargs)
23 |
24 | def render_to_file(self, target_file_path: str, **kwargs: Any) -> None:
25 | print("Updating file: " + target_file_path + " (template = " + self.template_file_path + ") ...")
26 | rendered_str = self.tm.render(**kwargs)
27 | SAIFileUpdater.write_if_different(target_file_path, rendered_str)
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/__init__.py:
--------------------------------------------------------------------------------
1 | from .sai_spec import SaiSpec
2 | from .sai_api_group import SaiApiGroup
3 | from .sai_api import SaiApi
4 | from .sai_api_extension import SaiApiExtension
5 | from .sai_enum import SaiEnum
6 | from .sai_enum_member import SaiEnumMember
7 | from .sai_struct import SaiStruct
8 | from .sai_struct_entry import SaiStructEntry
9 | from .sai_attribute import SaiAttribute
10 | from .sai_api_p4_meta import SaiApiP4Meta, SaiApiP4MetaTable, \
11 | SaiApiP4MetaAction, SaiApiP4MetaActionParam, SaiApiP4MetaKey
12 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_api.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 | from .sai_common import SaiCommon
3 | from .sai_attribute import SaiAttribute
4 | from .sai_enum import SaiEnum
5 | from .sai_struct import SaiStruct
6 | from .sai_api_p4_meta import SaiApiP4Meta
7 | from . import sai_spec_utils
8 |
9 |
10 | class SaiApi(SaiCommon):
11 | """
12 | Defines a SAI API, such as an object or table.
13 | """
14 |
15 | def __init__(self, name: str, description: str, is_object: bool = False):
16 | super().__init__(name, description)
17 | self.is_object: bool = is_object
18 | self.enums: List[SaiEnum] = []
19 | self.structs: List[SaiStruct] = []
20 | self.attributes: List[SaiAttribute] = []
21 | self.stats: List[SaiAttribute] = []
22 | self.p4_meta: SaiApiP4Meta = SaiApiP4Meta()
23 |
24 | def finalize(self):
25 | super().finalize()
26 | _ = [enum.finalize() for enum in self.enums]
27 | _ = [struct.finalize() for struct in self.structs]
28 | _ = [attribute.finalize() for attribute in self.attributes]
29 | _ = [stat.finalize() for stat in self.stats]
30 |
31 | def merge(self, other: "SaiCommon"):
32 | super().merge(other)
33 |
34 | self.is_object = other.is_object
35 | sai_spec_utils.merge_sai_common_lists(self.enums, other.enums)
36 | sai_spec_utils.merge_sai_common_lists(self.structs, other.structs)
37 | sai_spec_utils.merge_sai_common_lists(self.attributes, other.attributes)
38 | sai_spec_utils.merge_sai_common_lists(self.stats, other.stats)
39 |
40 | # The P4 meta can be merged by replacing the old one, since it doesn't affect the ABI,
41 | # and the new one is always more up-to-date.
42 | self.p4_meta = other.p4_meta
43 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_api_extension.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 | from .sai_attribute import SaiAttribute
3 | from . import sai_spec_utils
4 |
5 |
6 | class SaiApiExtension:
7 | """
8 | The SAI APIs can be extended with additional attributes and stats.
9 |
10 | This class holds all the attributes and stats that is used to extend a single SAI API.
11 | """
12 |
13 | def __init__(self):
14 | self.attributes: List[SaiAttribute] = []
15 | self.stats: List[SaiAttribute] = []
16 |
17 | def finalize(self):
18 | _ = [attribute.finalize() for attribute in self.attributes]
19 | _ = [stat.finalize() for stat in self.stats]
20 |
21 | def merge(self, other: "SaiApiExtension"):
22 | sai_spec_utils.merge_sai_common_lists(self.attributes, other.attributes)
23 | sai_spec_utils.merge_sai_common_lists(self.stats, other.stats)
24 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_api_group.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 | from .sai_common import SaiCommon
3 | from .sai_api import SaiApi
4 | from . import sai_spec_utils
5 |
6 |
7 | class SaiApiGroup(SaiCommon):
8 | """
9 | Defines a SAI API group, which holds multiple SAI APIs.
10 | """
11 |
12 | def __init__(self, name: str, description: str):
13 | super().__init__(name, description)
14 | self.api_type: str = ""
15 | self.sai_apis: List[SaiApi] = []
16 |
17 | def finalize(self):
18 | super().finalize()
19 | _ = [sai_api.finalize() for sai_api in self.sai_apis]
20 |
21 | def merge(self, other: "SaiCommon"):
22 | super().merge(other)
23 | self.api_type = other.api_type
24 | sai_spec_utils.merge_sai_common_lists(self.sai_apis, other.sai_apis)
25 |
26 | def deprecate(self) -> bool:
27 | """
28 | Deprecate API group.
29 |
30 | When deprecating the API group, we can safely remove it from the list as the
31 | net effect is the same as keeping it:
32 | - The old API type, object type and object entries will not be changed.
33 | - The SAI headers will not be changed, because their API groups are present.
34 | - The DASH libsai will not be generated anymore, but it is ok, since we will not
35 | use them in the BMv2 anyway.
36 | """
37 | return True
38 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_api_p4_meta.py:
--------------------------------------------------------------------------------
1 | from typing import Dict, List, Optional
2 |
3 |
4 | class SaiApiP4MetaActionParam:
5 | def __init__(self, id: int, field: str, bitwidth: int,
6 | ip_is_v6_field_id: int, skipattr: str):
7 | self.id: int = id
8 | self.field: str = field
9 | self.bitwidth: int = bitwidth
10 | self.ip_is_v6_field_id: int = ip_is_v6_field_id
11 | self.skipattr: str = skipattr
12 |
13 | class SaiApiP4MetaAction:
14 | def __init__(self, name: str, id: int):
15 | self.name: str = name
16 | self.id: int = id
17 | self.attr_params: Dict[str, SaiApiP4MetaActionParam] = {}
18 |
19 | class SaiApiP4MetaKey:
20 | def __init__(self, name: str, id: int, match_type: str,
21 | field: str, bitwidth: int, ip_is_v6_field_id: int,
22 | is_object_key: bool):
23 | self.name: str = name
24 | self.id: int = id
25 | self.match_type: int = match_type
26 | self.field: str = field
27 | self.bitwidth: int = bitwidth
28 | self.ip_is_v6_field_id: int = ip_is_v6_field_id
29 | self.is_object_key: bool = is_object_key
30 |
31 | class SaiApiP4MetaTable:
32 | def __init__(self, id: int, single_match_priority: bool, stage: Optional[str] = None):
33 | self.id: int = id
34 | self.single_match_priority: bool = single_match_priority
35 | self.stage: Optional[str] = stage
36 | self.keys: List[SaiApiP4MetaKey] = []
37 | self.actions: Dict[str, SaiApiP4MetaAction] = {}
38 |
39 |
40 | class SaiApiP4Meta:
41 | def __init__(self):
42 | self.tables: List[SaiApiP4MetaTable] = []
43 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_attribute.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 | from .sai_common import SaiCommon
3 |
4 |
5 | class SaiAttribute(SaiCommon):
6 | """
7 | This class represents a single SAI attribute.
8 | """
9 |
10 | def __init__(
11 | self,
12 | name: str,
13 | description: str,
14 | type: str,
15 | attr_value_field: Optional[str] = None,
16 | default: Optional[str] = None,
17 | isresourcetype: bool = False,
18 | flags: str = "CREATE_AND_SET",
19 | object_name: Optional[str] = None,
20 | allow_null: bool = False,
21 | valid_only: Optional[str] = None,
22 | is_vlan: bool = False,
23 | deprecated: bool = False,
24 | ):
25 | super().__init__(name, description)
26 | self.type = type
27 | self.attr_value_field = attr_value_field
28 | self.default = default
29 | self.isresourcetype = isresourcetype
30 | self.flags = flags
31 | self.object_name = object_name
32 | self.allow_null = allow_null
33 | self.valid_only = valid_only
34 | self.is_vlan = is_vlan
35 | self.deprecated = deprecated
36 |
37 | def merge(self, other: "SaiCommon"):
38 | super().merge(other)
39 | self.__dict__.update(other.__dict__)
40 |
41 | def deprecate(self) -> bool:
42 | self.deprecated = True
43 | return False
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_common.py:
--------------------------------------------------------------------------------
1 | from . import sai_spec_utils
2 |
3 | class SaiCommon:
4 | """
5 | Base class for all SAI objects.
6 | """
7 |
8 | def __init__(self, name: str, description: str):
9 | self.name: str = name
10 | self.description: str = description
11 |
12 | def finalize(self):
13 | """
14 | Finalize the object after all the attributes are set.
15 | """
16 | self.description = sai_spec_utils.normalize_sai_comment(self.description)
17 |
18 | def merge(self, other: "SaiCommon"):
19 | """
20 | Merge the other SaiCommon object into this object.
21 | """
22 | if not isinstance(other, type(self)):
23 | raise TypeError(f"Cannot merge {type(self)} with {type(other)}")
24 |
25 | self.description = other.description
26 |
27 | def deprecate(self) -> bool:
28 | """
29 | Deprecate this object.
30 |
31 | If the value doesn't support deprecation marking, we don't do anything
32 | but return False to keep it in the list.
33 | """
34 | return False
35 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_enum.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 | from .sai_common import SaiCommon
3 | from .sai_enum_member import SaiEnumMember
4 | from . import sai_spec_utils
5 |
6 |
7 | class SaiEnum(SaiCommon):
8 | """
9 | This class represents a single SAI enum and holds all enum values.
10 | """
11 |
12 | def __init__(self, name: str, description: str, members: List[SaiEnumMember] = []):
13 | super().__init__(name, description)
14 | self.members: List[SaiEnumMember] = members
15 |
16 | def finalize(self):
17 | super().finalize()
18 | _ = [member.finalize() for member in self.members]
19 |
20 | def merge(self, other: "SaiCommon"):
21 | super().merge(other)
22 | sai_spec_utils.merge_sai_common_lists(self.members, other.members)
23 |
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_enum_member.py:
--------------------------------------------------------------------------------
1 | from typing import Any, Dict
2 | from .sai_common import SaiCommon
3 |
4 |
5 | class SaiEnumMember(SaiCommon):
6 | """
7 | This class represents a single SAI enum member.
8 | """
9 |
10 | def __init__(self, name: str, description: str, value: str):
11 | super().__init__(name, description)
12 | self.value: str = value
13 |
14 | def merge(self, other: "SaiCommon"):
15 | super().merge(other)
16 | self.value = other.value
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_struct.py:
--------------------------------------------------------------------------------
1 | from typing import List
2 | from .sai_common import SaiCommon
3 | from .sai_struct_entry import SaiStructEntry
4 | from . import sai_spec_utils
5 |
6 | class SaiStruct(SaiCommon):
7 | """
8 | This class represents a single SAI struct.
9 | """
10 |
11 | def __init__(self, name: str, description: str, members: List[SaiStructEntry] = []):
12 | super().__init__(name, description)
13 | self.members: List[SaiStructEntry] = members
14 |
15 | def finalize(self):
16 | super().finalize()
17 | _ = [member.finalize() for member in self.members]
18 |
19 | def merge(self, other: "SaiCommon"):
20 | super().merge(other)
21 | sai_spec_utils.merge_sai_common_lists(self.members, other.members)
--------------------------------------------------------------------------------
/dash-pipeline/SAI/utils/sai_spec/sai_struct_entry.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 | from .sai_common import SaiCommon
3 |
4 |
5 | class SaiStructEntry(SaiCommon):
6 | """
7 | This class represents a single SAI struct entry.
8 | """
9 |
10 | def __init__(
11 | self,
12 | name: str,
13 | description: str,
14 | type: str,
15 | objects: Optional[str] = None,
16 | valid_only: Optional[str] = None,
17 | ):
18 | super().__init__(name, description)
19 | self.type = type
20 | self.objects = objects
21 | self.valid_only = valid_only
22 |
23 | def merge(self, other: "SaiCommon"):
24 | super().merge(other)
25 | self.__dict__.update(other.__dict__)
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/dash_bmv2_v1model.p4:
--------------------------------------------------------------------------------
1 |
2 | control dash_verify_checksum(inout headers_t hdr,
3 | inout metadata_t meta)
4 | {
5 | apply { }
6 | }
7 |
8 | control dash_compute_checksum(inout headers_t hdr,
9 | inout metadata_t meta)
10 | {
11 | apply {
12 | #ifdef TARGET_BMV2_V1MODEL
13 | update_checksum(
14 | hdr.u0_ipv4.isValid(),
15 | {
16 | hdr.u0_ipv4.version,
17 | hdr.u0_ipv4.ihl,
18 | hdr.u0_ipv4.diffserv,
19 | hdr.u0_ipv4.total_len,
20 | hdr.u0_ipv4.identification,
21 | hdr.u0_ipv4.frag_offset,
22 | hdr.u0_ipv4.flags,
23 | hdr.u0_ipv4.ttl,
24 | hdr.u0_ipv4.protocol,
25 | hdr.u0_ipv4.src_addr,
26 | hdr.u0_ipv4.dst_addr
27 | },
28 | hdr.u0_ipv4.hdr_checksum,
29 | HashAlgorithm.csum16);
30 | #endif // TARGET_BMV2_V1MODEL
31 | }
32 | }
33 |
34 | control dash_egress(inout headers_t hdr,
35 | inout metadata_t meta,
36 | inout standard_metadata_t standard_metadata)
37 | {
38 | apply { }
39 | }
40 |
41 | V1Switch(dash_parser(),
42 | dash_verify_checksum(),
43 | dash_ingress(),
44 | dash_egress(),
45 | dash_compute_checksum(),
46 | dash_deparser()) main;
47 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/dash_dpdk_pna.p4:
--------------------------------------------------------------------------------
1 |
2 | control dash_precontrol(
3 | in headers_t pre_hdr,
4 | inout metadata_t pre_user_meta,
5 | in pna_pre_input_metadata_t istd,
6 | inout pna_pre_output_metadata_t ostd)
7 | {
8 | apply {
9 | }
10 | }
11 |
12 | PNA_NIC(
13 | dash_parser(),
14 | dash_precontrol(),
15 | dash_ingress(),
16 | dash_deparser()) main;
17 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/dash_inbound.p4:
--------------------------------------------------------------------------------
1 | #ifndef _SIRIUS_INBOUND_P4_
2 | #define _SIRIUS_INBOUND_P4_
3 |
4 | #include "dash_headers.p4"
5 | #include "dash_service_tunnel.p4"
6 | #include "dash_acl.p4"
7 | #include "routing_actions/routing_actions.p4"
8 | #include "dash_conntrack.p4"
9 | #include "stages/inbound_routing.p4"
10 |
11 | control inbound(inout headers_t hdr,
12 | inout metadata_t meta)
13 | {
14 | apply {
15 | #ifdef STATEFUL_P4
16 | ConntrackIn.apply(0);
17 | #endif /* STATEFUL_P4 */
18 | #ifdef PNA_CONNTRACK
19 | ConntrackIn.apply(hdr, meta);
20 |
21 | if ((IPv4Address)meta.overlay_data.sip != 0) {
22 | do_action_nat64.apply(hdr, meta);
23 | }
24 | #endif // PNA_CONNTRACK
25 |
26 | /* ACL */
27 | if (!meta.conntrack_data.allow_in) {
28 | acl.apply(hdr, meta);
29 | }
30 |
31 | #ifdef STATEFUL_P4
32 | ConntrackOut.apply(1);
33 | #endif /* STATEFUL_P4 */
34 | #ifdef PNA_CONNTRACK
35 | ConntrackOut.apply(hdr, meta);
36 | #endif //PNA_CONNTRACK
37 |
38 | inbound_routing_stage.apply(hdr, meta);
39 |
40 | meta.routing_actions = dash_routing_actions_t.ENCAP_U0;
41 | do_tunnel_encap(hdr,
42 | meta,
43 | meta.u0_encap_data.underlay_dmac,
44 | meta.u0_encap_data.underlay_smac,
45 | meta.u0_encap_data.underlay_dip,
46 | meta.u0_encap_data.underlay_sip,
47 | dash_encapsulation_t.VXLAN,
48 | meta.u0_encap_data.vni);
49 | }
50 | }
51 |
52 | #endif /* _SIRIUS_INBOUND_P4_ */
53 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/dash_outbound.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_OUTBOUND_P4_
2 | #define _DASH_OUTBOUND_P4_
3 |
4 | #include "dash_headers.p4"
5 | #include "dash_acl.p4"
6 | #include "dash_conntrack.p4"
7 | #include "stages/outbound_routing.p4"
8 | #include "stages/outbound_mapping.p4"
9 | #include "stages/outbound_pre_routing_action_apply.p4"
10 |
11 | control outbound(inout headers_t hdr,
12 | inout metadata_t meta)
13 | {
14 | apply {
15 | #ifdef STATEFUL_P4
16 | ConntrackOut.apply(0);
17 | #endif /* STATEFUL_P4 */
18 |
19 | #ifdef PNA_CONNTRACK
20 | ConntrackOut.apply(hdr, meta);
21 | #endif // PNA_CONNTRACK
22 |
23 | /* ACL */
24 | if (!meta.conntrack_data.allow_out) {
25 | acl.apply(hdr, meta);
26 | }
27 |
28 | #ifdef STATEFUL_P4
29 | ConntrackIn.apply(1);
30 | #endif /* STATEFUL_P4 */
31 |
32 | #ifdef PNA_CONNTRACK
33 | ConntrackIn.apply(hdr, meta);
34 | #endif // PNA_CONNTRACK
35 |
36 | meta.lkup_dst_ip_addr = meta.dst_ip_addr;
37 | meta.is_lkup_dst_ip_v6 = meta.is_overlay_ip_v6;
38 |
39 | outbound_routing_stage.apply(hdr, meta);
40 | outbound_mapping_stage.apply(hdr, meta);
41 |
42 | outbound_pre_routing_action_apply_stage.apply(hdr, meta);
43 | }
44 | }
45 |
46 | #endif /* _DASH_OUTBOUND_P4_ */
47 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/defines.h:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_DEFINES_H_
2 | #define _DASH_DEFINES_H_
3 |
4 | #if defined(TABLE_HERO_SCALE)
5 | #define TABLE_CA_TO_PA_SIZE (8 * 1024 * 1024)
6 | #define TABLE_ROUTING_SIZE (4 * 1024 * 1024)
7 |
8 | #elif defined(TABLE_BABY_HERO_SCALE)
9 | #define TABLE_CA_TO_PA_SIZE (8 * 1024 * 10)
10 | #define TABLE_ROUTING_SIZE (4 * 1024 * 10)
11 |
12 | #else /* default/minimum size */
13 | #define TABLE_CA_TO_PA_SIZE 1024
14 | #define TABLE_ROUTING_SIZE 1024
15 |
16 | #endif
17 |
18 |
19 | #endif /* _DASH_DEFINES_H_ */
20 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/routing_actions/routing_action_nat64.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_ROUTING_ACTION_NAT64_P4_
2 | #define _DASH_ROUTING_ACTION_NAT64_P4_
3 |
4 | action push_action_nat64(
5 | in headers_t hdr,
6 | inout metadata_t meta,
7 | in IPv4Address src,
8 | in IPv4Address dst)
9 | {
10 | meta.routing_actions = meta.routing_actions | dash_routing_actions_t.NAT64;
11 |
12 | meta.overlay_data.is_ipv6 = 0;
13 | meta.overlay_data.sip = (IPv4ORv6Address)src;
14 | meta.overlay_data.dip = (IPv4ORv6Address)dst;
15 | }
16 |
17 | control do_action_nat64(
18 | inout headers_t hdr,
19 | in metadata_t meta)
20 | {
21 | apply {
22 | if (meta.routing_actions & dash_routing_actions_t.NAT64 == 0) {
23 | return;
24 | }
25 |
26 | REQUIRES(meta.overlay_data.is_ipv6 == 0);
27 |
28 | hdr.u0_ipv4.setValid();
29 | hdr.u0_ipv4.version = 4;
30 | hdr.u0_ipv4.ihl = 5;
31 | hdr.u0_ipv4.diffserv = 0;
32 | hdr.u0_ipv4.total_len = hdr.u0_ipv6.payload_length + IPV4_HDR_SIZE;
33 | hdr.u0_ipv4.identification = 1;
34 | hdr.u0_ipv4.flags = 0;
35 | hdr.u0_ipv4.frag_offset = 0;
36 | hdr.u0_ipv4.protocol = hdr.u0_ipv6.next_header;
37 | hdr.u0_ipv4.ttl = hdr.u0_ipv6.hop_limit;
38 | hdr.u0_ipv4.hdr_checksum = 0;
39 | hdr.u0_ipv4.dst_addr = (IPv4Address)meta.overlay_data.dip;
40 | hdr.u0_ipv4.src_addr = (IPv4Address)meta.overlay_data.sip;
41 |
42 | hdr.u0_ipv6.setInvalid();
43 | hdr.u0_ethernet.ether_type = IPV4_ETHTYPE;
44 | }
45 | }
46 |
47 | #endif /* _DASH_ROUTING_ACTION_NAT64_P4_ */
48 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/routing_actions/routing_action_nat_port.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_ROUTING_ACTION_NAT_PORT_P4_
2 | #define _DASH_ROUTING_ACTION_NAT_PORT_P4_
3 |
4 | action push_action_snat_port(
5 | in headers_t hdr,
6 | inout metadata_t meta,
7 | in bit<16> sport)
8 | {
9 | meta.routing_actions = meta.routing_actions | dash_routing_actions_t.SNAT_PORT;
10 | meta.overlay_data.sport = sport;
11 | }
12 |
13 | action push_action_dnat_port(
14 | in headers_t hdr,
15 | inout metadata_t meta,
16 | in bit<16> dport)
17 | {
18 | meta.routing_actions = meta.routing_actions | dash_routing_actions_t.DNAT_PORT;
19 | meta.overlay_data.dport = dport;
20 | }
21 |
22 | control do_action_snat_port(
23 | inout headers_t hdr,
24 | in metadata_t meta)
25 | {
26 | apply {
27 | if (meta.routing_actions & dash_routing_actions_t.SNAT_PORT == 0) {
28 | return;
29 | }
30 |
31 | if (hdr.customer_tcp.isValid()) {
32 | hdr.customer_tcp.src_port = meta.overlay_data.sport;
33 | } else if (hdr.customer_udp.isValid()) {
34 | hdr.customer_udp.src_port = meta.overlay_data.sport;
35 | }
36 | }
37 | }
38 |
39 | control do_action_dnat_port(
40 | inout headers_t hdr,
41 | in metadata_t meta)
42 | {
43 | apply {
44 | if (meta.routing_actions & dash_routing_actions_t.DNAT_PORT == 0) {
45 | return;
46 | }
47 |
48 | if (hdr.customer_tcp.isValid()) {
49 | hdr.customer_tcp.dst_port = meta.overlay_data.dport;
50 | } else if (hdr.customer_udp.isValid()) {
51 | hdr.customer_udp.dst_port = meta.overlay_data.dport;
52 | }
53 | }
54 | }
55 |
56 | #endif /* _DASH_ROUTING_ACTION_NAT_PORT_P4_ */
57 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/routing_actions/routing_action_set_mac.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_ROUTING_ACTION_SET_MAC_P4_
2 | #define _DASH_ROUTING_ACTION_SET_MAC_P4_
3 |
4 | action push_action_set_smac(
5 | in headers_t hdr,
6 | inout metadata_t meta,
7 | in EthernetAddress overlay_dmac)
8 | {
9 | // not used by now
10 | }
11 |
12 | action push_action_set_dmac(
13 | in headers_t hdr,
14 | inout metadata_t meta,
15 | in EthernetAddress overlay_dmac)
16 | {
17 | meta.routing_actions = meta.routing_actions | dash_routing_actions_t.SET_DMAC;
18 | meta.overlay_data.dmac = overlay_dmac;
19 | }
20 |
21 | control do_action_set_smac(
22 | inout headers_t hdr,
23 | inout metadata_t meta)
24 | {
25 | apply {
26 | // not used by now
27 | }
28 | }
29 |
30 | control do_action_set_dmac(
31 | inout headers_t hdr,
32 | inout metadata_t meta)
33 | {
34 | apply {
35 | if (meta.routing_actions & dash_routing_actions_t.SET_DMAC == 0) {
36 | return;
37 | }
38 |
39 | hdr.customer_ethernet.dst_addr = meta.overlay_data.dmac;
40 | }
41 | }
42 |
43 | #endif /* _DASH_ROUTING_ACTION_SET_MAC_P4_ */
44 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/routing_actions/routing_actions.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_ROUTING_ACTIONS_P4_
2 | #define _DASH_ROUTING_ACTIONS_P4_
3 |
4 | #include "routing_action_encap_underlay.p4"
5 | #include "routing_action_set_mac.p4"
6 | #include "routing_action_nat46.p4"
7 | #include "routing_action_nat64.p4"
8 | #include "routing_action_nat_port.p4"
9 |
10 | #endif /* _DASH_ROUTING_ACTIONS_P4_ */
11 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/stages/eni_lookup.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_STAGE_ENI_LOOKUP_P4_
2 | #define _DASH_STAGE_ENI_LOOKUP_P4_
3 |
4 | control eni_lookup_stage(
5 | inout headers_t hdr,
6 | inout metadata_t meta)
7 | {
8 | action set_eni(@SaiVal[type="sai_object_id_t"] bit<16> eni_id) {
9 | meta.eni_id = eni_id;
10 | }
11 |
12 | @SaiTable[name = "eni_ether_address_map", api = "dash_eni", order=0]
13 | table eni_ether_address_map {
14 | key = {
15 | meta.eni_addr : exact @SaiVal[name = "address", type = "sai_mac_t"];
16 | }
17 |
18 | actions = {
19 | set_eni;
20 | @defaultonly deny(meta);
21 | }
22 | const default_action = deny(meta);
23 | }
24 |
25 | apply {
26 | /* Put VM's MAC in the direction agnostic metadata field */
27 | if (meta.eni_mac_type == dash_eni_mac_type_t.SRC_MAC) {
28 | meta.eni_addr = hdr.customer_ethernet.src_addr;
29 | } else {
30 | meta.eni_addr = hdr.customer_ethernet.dst_addr;
31 | }
32 |
33 | if (!eni_ether_address_map.apply().hit) {
34 | UPDATE_COUNTER(eni_miss_drop, 0);
35 |
36 | if (meta.is_fast_path_icmp_flow_redirection_packet) {
37 | UPDATE_COUNTER(port_lb_fast_path_eni_miss_drop, 0);
38 | }
39 | }
40 | }
41 | }
42 |
43 | #endif /* _DASH_STAGE_ENI_LOOKUP_P4_ */
44 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/stages/outbound_pre_routing_action_apply.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_STAGE_OUTBOUND_PRE_ROUTING_ACTION_APPLY_P4_
2 | #define _DASH_STAGE_OUTBOUND_PRE_ROUTING_ACTION_APPLY_P4_
3 |
4 | #include "tunnel_stage.p4"
5 |
6 | #include "outbound_port_map.p4"
7 |
8 | control outbound_pre_routing_action_apply_stage(
9 | inout headers_t hdr,
10 | inout metadata_t meta)
11 | {
12 | apply {
13 | // Outbound pre-routing action apply stage is added here for certain pre processing before applying the final actions.
14 | if (meta.target_stage != dash_pipeline_stage_t.OUTBOUND_PRE_ROUTING_ACTION_APPLY) {
15 | return;
16 | }
17 |
18 | outbound_port_map_stage.apply(hdr, meta);
19 |
20 | tunnel_stage.apply(hdr, meta);
21 |
22 | // Once it is done, move to routing action apply stage.
23 | meta.target_stage = dash_pipeline_stage_t.ROUTING_ACTION_APPLY;
24 | }
25 | }
26 |
27 | #endif /* _DASH_STAGE_OUTBOUND_PRE_ROUTING_ACTION_APPLY_P4_ */
28 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/stages/routing_action_apply.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_STAGE_ACTION_APPLY_P4_
2 | #define _DASH_STAGE_ACTION_APPLY_P4_
3 |
4 | #include "../routing_actions/routing_actions.p4"
5 |
6 | control routing_action_apply(
7 | inout headers_t hdr,
8 | inout metadata_t meta)
9 | {
10 | apply {
11 | do_action_nat46.apply(hdr, meta);
12 | do_action_nat64.apply(hdr, meta);
13 | do_action_snat_port.apply(hdr, meta);
14 | do_action_dnat_port.apply(hdr, meta);
15 | do_action_set_dmac.apply(hdr, meta);
16 |
17 | // Encaps needs to be added after all other transforms, from inner ones to outer ones,
18 | // because it requires the transforms on the inner packet to be finished in order to
19 | // get the correct inner packet size and other informations.
20 | do_action_encap_u0.apply(hdr, meta);
21 | do_action_encap_u1.apply(hdr, meta);
22 | }
23 | }
24 |
25 | #endif /* _DASH_STAGE_ACTION_APPLY_P4_ */
26 |
--------------------------------------------------------------------------------
/dash-pipeline/bmv2/stages/trusted_vni.p4:
--------------------------------------------------------------------------------
1 | #ifndef _DASH_STAGE_TRUSTED_VNI_P4_
2 | #define _DASH_STAGE_TRUSTED_VNI_P4_
3 |
4 | control trusted_vni_stage(
5 | inout headers_t hdr,
6 | inout metadata_t meta)
7 | {
8 | action permit() {}
9 |
10 | @SaiTable[single_match_priority = "true", api = "dash_trusted_vni", order=0, isobject="false"]
11 | table global_trusted_vni {
12 | key = {
13 | meta.rx_encap.vni: range @SaiVal[name = "vni_range"];
14 | }
15 |
16 | actions = {
17 | permit;
18 | }
19 | }
20 |
21 | @SaiTable[single_match_priority = "true", api = "dash_trusted_vni", order=1]
22 | table eni_trusted_vni {
23 | key = {
24 | meta.eni_id : exact @SaiVal[type="sai_object_id_t"];
25 | meta.rx_encap.vni: range @SaiVal[name = "vni_range"];
26 | }
27 |
28 | actions = {
29 | permit;
30 | @defaultonly deny(meta);
31 | }
32 | const default_action = deny(meta);
33 | }
34 |
35 | apply {
36 | if (global_trusted_vni.apply().hit) {
37 | return;
38 | }
39 |
40 | if (!eni_trusted_vni.apply().hit) {
41 | UPDATE_ENI_COUNTER(eni_trusted_vni_entry_miss_drop);
42 | }
43 | }
44 | }
45 |
46 | #endif /* _DASH_STAGE_TRUSTED_VNI_P4_ */
47 |
--------------------------------------------------------------------------------
/dash-pipeline/disable_veth_ipv6.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | echo "Disable IPv6 to suppress Linux control plane noise"
3 | sudo sysctl net.ipv6.conf.veth0.disable_ipv6=1
4 | sudo sysctl net.ipv6.conf.veth0.autoconf=0
5 | sudo sysctl net.ipv6.conf.veth0.accept_ra=0
6 | sudo sysctl net.ipv6.conf.veth0.accept_ra_pinfo=0
7 | sudo sysctl net.ipv6.conf.veth0.router_solicitations=0
8 | sudo sysctl net.ipv6.conf.veth1.disable_ipv6=1
9 | sudo sysctl net.ipv6.conf.veth1.autoconf=0
10 | sudo sysctl net.ipv6.conf.veth1.accept_ra=0
11 | sudo sysctl net.ipv6.conf.veth1.accept_ra_pinfo=0
12 | sudo sysctl net.ipv6.conf.veth1.router_solicitations=0
13 | sudo sysctl net.ipv6.conf.veth2.disable_ipv6=1
14 | sudo sysctl net.ipv6.conf.veth2.autoconf=0
15 | sudo sysctl net.ipv6.conf.veth2.accept_ra=0
16 | sudo sysctl net.ipv6.conf.veth2.accept_ra_pinfo=0
17 | sudo sysctl net.ipv6.conf.veth2.router_solicitations=0
18 | sudo sysctl net.ipv6.conf.veth3.disable_ipv6=1
19 | sudo sysctl net.ipv6.conf.veth3.autoconf=0
20 | sudo sysctl net.ipv6.conf.veth3.accept_ra=0
21 | sudo sysctl net.ipv6.conf.veth3.accept_ra_pinfo=0
22 | sudo sysctl net.ipv6.conf.veth3.router_solicitations=0
23 |
24 | if [ $DPAPP_LINK ]; then
25 | sudo sysctl net.ipv6.conf.$DPAPP_LINK.autoconf=0
26 | sudo sysctl net.ipv6.conf.$DPAPP_LINK.accept_ra=0
27 | sudo sysctl net.ipv6.conf.$DPAPP_LINK.accept_ra_pinfo=0
28 | sudo sysctl net.ipv6.conf.$DPAPP_LINK.router_solicitations=0
29 | fi
30 | if [ $DPAPP_LINK_PEER ]; then
31 | sudo sysctl net.ipv6.conf.$DPAPP_LINK_PEER.disable_ipv6=1
32 | sudo sysctl net.ipv6.conf.$DPAPP_LINK_PEER.autoconf=0
33 | sudo sysctl net.ipv6.conf.$DPAPP_LINK_PEER.accept_ra=0
34 | sudo sysctl net.ipv6.conf.$DPAPP_LINK_PEER.accept_ra_pinfo=0
35 | sudo sysctl net.ipv6.conf.$DPAPP_LINK_PEER.router_solicitations=0
36 | fi
37 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/.dockerignore:
--------------------------------------------------------------------------------
1 | *.bkp
2 | *.log
3 | *.pcap
4 | __pycache__/
5 | .pytest_cache/
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_BMV2_BLDR_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_BMV2_BLDR_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-bmv2-bldr
5 | export DOCKER_BMV2_BLDR_IMG_CTAG?=220819
6 |
7 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_DPAPP_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_DPAPP_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-dpapp-bldr
5 | export DOCKER_DPAPP_IMG_CTAG?=240827
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_GRPC_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_GRPC_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-grpc
5 | export DOCKER_GRPC_IMG_CTAG?=1.43.2
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_P4C_BMV2_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_P4C_BMV2_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-p4c-bmv2
5 | export DOCKER_P4C_BMV2_IMG_CTAG?=220825
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_P4C_DPDK_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_P4C_DPDK_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-p4c-dpdk
5 | export DOCKER_P4C_DPDK_IMG_CTAG?=240201
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_SAITHRIFT_BLDR_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_SAITHRIFT_BLDR_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-saithrift-bldr
5 | export DOCKER_SAITHRIFT_BLDR_IMG_CTAG?=220819
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_SAITHRIFT_CLIENT_BLDR_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_SAITHRIFT_CLIENT_BLDR_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-saithrift-client-bldr
5 | export DOCKER_SAITHRIFT_CLIENT_BLDR_IMG_CTAG?=230523
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/DOCKER_SAI_CHALLENGER_CLIENT_BLDR_IMG.env:
--------------------------------------------------------------------------------
1 | # Define docker image repo/name:tag
2 | # Changing this will cause build/publish to occur in CI actions
3 | export DASH_ACR_REGISTRY=sonicdash.azurecr.io
4 | export DOCKER_SAI_CHALLENGER_CLIENT_BLDR_IMG_NAME=${DASH_ACR_REGISTRY}/dash-saichallenger-client-bldr
5 | export DOCKER_SAI_CHALLENGER_CLIENT_BLDR_IMG_CTAG?=240216
6 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/Dockerfile.grpc1.43.2:
--------------------------------------------------------------------------------
1 | # This Dockerfile creates a simple scratch layer with just gRPC libraries, to copy into other images.
2 | # gRPC is built from source, then the libraries are copied into a scratch image.
3 | #FROM amd64/ubuntu:20.04 as builder
4 | # amd64/ubuntu:20.04 on 2022-07-03
5 | FROM amd64/ubuntu@sha256:b2339eee806d44d6a8adc0a790f824fb71f03366dd754d400316ae5a7e3ece3e as builder
6 | LABEL maintainer="SONIC-DASH Community"
7 | LABEL description="DASH gRPC 1.43.2 docker image, no sources"
8 |
9 | # Configure make to run as many parallel jobs as cores available
10 | ARG available_processors
11 | ARG MAKEFLAGS=-j$available_processors
12 |
13 | ARG CC=gcc
14 | ARG CXX=g++
15 | # Set TZ to avoid interactive installer
16 | ENV TZ=America/Los_Angeles
17 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
18 | ENV GIT_SSL_NO_VERIFY=true
19 |
20 | WORKDIR /
21 | RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
22 | git \
23 | build-essential \
24 | autoconf \
25 | libtool \
26 | pkg-config \
27 | cmake && \
28 | git clone --depth=1 -b v1.43.2 https://github.com/google/grpc.git && \
29 | cd grpc/ && \
30 | git submodule update --init --recursive && \
31 | mkdir -p cmake/build && \
32 | cd cmake/build && \
33 | cmake -DBUILD_SHARED_LIBS=ON -DgRPC_INSTALL=ON --parallel 1 ../.. && \
34 | make && \
35 | make install && \
36 | cd / && \
37 | rm -rf grpc
38 |
39 | # Just copy all libs needed to run bmv2 and build client apps for its P4Runtime etc.
40 | FROM scratch
41 | COPY --from=builder /usr/local/lib/* usr/local/lib/
42 |
43 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/Dockerfile.saichallenger-client:
--------------------------------------------------------------------------------
1 | FROM sonicdash.azurecr.io/dash-saichallenger-client-bldr:240216
2 |
3 | ENV SAI_CHALLENGER_PATH /sai-challenger
4 | ENV DASH_PATH /dash
5 |
6 | # Copy thrift python distro
7 | ADD SAI/rpc/thrift-0.11.0.tar.gz /
8 |
9 | # Copy autogenerated saithrift library built from SAI headers for DASH dataplane
10 | ADD SAI/rpc/saithrift-0.9.tar.gz /
11 |
12 | # Install the python libraries
13 | RUN cd /saithrift-0.9 && \
14 | pip3 install . && \
15 | cd / && \
16 | rm -rf saithrift-0.9 &&\
17 | cd thrift-0.11.0 && \
18 | pip3 install . && \
19 | cd / &&\
20 | rm -rf thrift-0.11.0 && \
21 | cd /SAI/test/ptf && \
22 | pip3 install . && \
23 | ln -s ${DASH_PATH}/test/test-cases/scale/saic ${SAI_CHALLENGER_PATH}/dash_tests
24 |
25 | CMD ["/usr/bin/supervisord"]
26 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/Dockerfile.saichallenger-client-bldr:
--------------------------------------------------------------------------------
1 | # Requires or something
2 | # sc-client:240216
3 | FROM plvisiondevs/sc-client:bullseye-latest
4 |
5 | ADD tests/ /tests/
6 |
7 | # Copy distro PTF submodule and tools from SAI repo
8 | ADD SAI/SAI/test/ptf /SAI/test/ptf
9 |
10 | # Install PTF test framework & test-cases from SAI repo
11 | ADD SAI/SAI/ptf /SAI/ptf/
12 |
13 | # Install dependencies for dpugen==0.2.3
14 | RUN apt-get update -y
15 | RUN apt-get install -y python3-lxml
16 |
17 | # Install the python libraries
18 | RUN python3 -m pip install --upgrade pip
19 | RUN python3 -m pip install setuptools_rust
20 | RUN python3 -m pip install -r /tests/requirements.txt
21 | RUN python3 -m pip install scapy \
22 | dpugen==0.2.3 \
23 | pysubnettree \
24 | macaddress \
25 | munch
26 |
27 | CMD ["/bin/bash"]
28 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/Dockerfile.saithrift-client:
--------------------------------------------------------------------------------
1 |
2 | FROM sonicdash.azurecr.io/dash-saithrift-client-bldr:230523
3 | LABEL maintainer="SONiC-DASH Community "
4 | LABEL description="This Docker image contains the toolchain to run\
5 | the saithrift client and test programs for DASH."
6 |
7 | #
8 | # Install/copy artifacts which can change based on current DASH pipeline code, submodules and test cases
9 | #
10 |
11 | # Copy distro PTF submodule and tools from SAI repo
12 | ADD dash-pipeline/SAI/SAI/test/ptf /SAI/test/ptf
13 | # Install PTF test framework & test-cases from SAI repo
14 | ADD dash-pipeline/SAI/SAI/ptf /SAI/ptf/
15 | # Copy thrift python distro
16 | ADD dash-pipeline/SAI/rpc/thrift-0.11.0.tar.gz /
17 | # Copy autogenerated saithrift library built from SAI headers for DASH dataplane
18 | ADD dash-pipeline/SAI/rpc/saithrift-0.9.tar.gz /
19 | # Install the python libraries
20 | RUN cd /saithrift-0.9 && \
21 | sudo python3 setup.py install && \
22 | cd / && \
23 | sudo rm -rf saithrift-0.9 &&\
24 | cd thrift-0.11.0 && \
25 | sudo python3 setup.py install && \
26 | cd / &&\
27 | sudo rm -rf thrift-0.11.0 && \
28 | cd /SAI/test/ptf && \
29 | sudo python3 setup.py install
30 |
31 | # Copy and install dash pipeline utils
32 | ADD dash-pipeline/utils/ /dash-pipeline-utils
33 | RUN cd /dash-pipeline-utils && \
34 | sudo python3 setup.py bdist_wheel && \
35 | sudo pip install dist/dash_pipeline_utils*.whl
36 |
37 | # Copy distro test-cases into container, making it standalone (doesn't need host FS contents).
38 | # For dev, host directories can be mounted to another container directory to "see" tests in development
39 | ADD test/test-cases/ tests/
40 |
41 | # Copy dash-pipeline tests into container
42 | ADD dash-pipeline/tests/ ci-tests/
43 |
44 | WORKDIR /
45 |
46 | CMD ["/bin/bash"]
47 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/Dockerfile.saithrift-client-bldr:
--------------------------------------------------------------------------------
1 |
2 | #FROM amd64/ubuntu:20.04
3 | # amd64/ubuntu:20.04 on 2022-07-03
4 | FROM amd64/ubuntu@sha256:b2339eee806d44d6a8adc0a790f824fb71f03366dd754d400316ae5a7e3ece3e
5 | LABEL maintainer="SONiC-DASH Community "
6 | LABEL description="This Docker image contains the toolchain to build and install \
7 | the saithrift client and test programs for DASH. It does not contain thrift/saithrift libraries"
8 | ADD requirements.txt /tests/
9 | # ctag 230523
10 |
11 | # Below we build the baseline set of tools to run saithrift client tests
12 | # Contents do not include the thrift and saithrift client libraries, which need
13 | # to be added to form another container which reflects the current DASH sai libraries
14 | # Those contents are built in saithrift-server workflow.
15 | RUN apt update && apt install -y python3 python3-pip sudo && \
16 | sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \
17 | sudo python3 -m pip install -r /tests/requirements.txt && \
18 | sudo pip3 install scapy pysubnettree p4runtime
19 |
20 | WORKDIR /
21 |
22 | ARG user
23 | ARG uid
24 | ARG group
25 | ARG guid
26 | ARG hostname
27 |
28 | ENV BUILD_HOSTNAME $hostname
29 | ENV USER $user
30 |
31 | RUN groupadd -f -r -g $guid $group
32 |
33 | RUN useradd $user -l -u $uid -g $guid -d /var/$user -m -s /bin/bash
34 |
35 | RUN echo "$user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers
36 |
37 | USER $user
38 |
39 | CMD ["/bin/bash"]
40 |
--------------------------------------------------------------------------------
/dash-pipeline/dockerfiles/README.md:
--------------------------------------------------------------------------------
1 | # dockerfiles directory
2 | Dockerfiles are placed here in part to avoid exporting the entire environment of the dash-pipeline directory to the docker builder, `.dockerignore` files notwithstanding.
3 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 |
3 | project(dash-plugin)
4 |
5 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
6 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I /SAI/SAI/inc -I /SAI/SAI/experimental")
8 |
9 | find_package(VPP)
10 |
11 | add_subdirectory(dash)
12 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/Makefile:
--------------------------------------------------------------------------------
1 | SHELL=/bin/bash
2 | BUILD_DIR=build
3 | CMAKE_ARGS=
4 |
5 | ifeq ($(V),1)
6 | CMAKE_ARGS += --verbose
7 | endif
8 |
9 | all: dpapp
10 |
11 | .PHONY:configure install clean
12 |
13 | configure:
14 | @cmake $(CMAKE_ARGS) -G Ninja -S . -B $(BUILD_DIR)
15 |
16 | dpapp: configure
17 | @cmake --build $(BUILD_DIR) $(CMAKE_ARGS)
18 |
19 | clean:
20 | @cmake --build $(BUILD_DIR) $(CMAKE_ARGS) -- clean
21 |
22 | install:
23 | @sudo cmake --build $(BUILD_DIR) $(CMAKE_ARGS) -- install
24 |
25 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/dash/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2018 Cisco and/or its affiliates.
2 | # Licensed under the Apache License, Version 2.0 (the "License");
3 | # you may not use this file except in compliance with the License.
4 | # You may obtain a copy of the License at:
5 | #
6 | # http://www.apache.org/licenses/LICENSE-2.0
7 | #
8 | # Unless required by applicable law or agreed to in writing, software
9 | # distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and
12 | # limitations under the License.
13 |
14 | include_directories(${CMAKE_SOURCE_DIR})
15 |
16 | # for generated API headers:
17 | include_directories(${CMAKE_BINARY_DIR})
18 |
19 | add_vpp_plugin(dash
20 | SOURCES
21 | dash.c
22 | dash_node.c
23 | flow.c
24 | saiapi.c
25 |
26 | MULTIARCH_SOURCES
27 | dash_node.c
28 |
29 | API_FILES
30 | dash.api
31 |
32 | API_TEST_SOURCES
33 | dash_test.c
34 |
35 | COMPONENT vpp-plugin-dash
36 | )
37 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/dash/dash.api:
--------------------------------------------------------------------------------
1 | /* Define a simple binary API to control the feature */
2 |
3 | option version = "0.1.0";
4 | import "vnet/interface_types.api";
5 |
6 | autoreply define dash_enable_disable {
7 | /* Client identifier, set from api_main.my_client_index */
8 | u32 client_index;
9 |
10 | /* Arbitrary context, so client can match reply to request */
11 | u32 context;
12 |
13 | /* Enable / disable the feature */
14 | bool enable_disable;
15 |
16 | /* Interface handle */
17 | vl_api_interface_index_t sw_if_index;
18 | };
19 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/dash/dash.h:
--------------------------------------------------------------------------------
1 | #ifndef __included_dash_h__
2 | #define __included_dash_h__
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #include
13 |
14 | #include
15 | #include
16 |
17 | typedef struct {
18 | /* API message ID base */
19 | u16 msg_id_base;
20 |
21 | /* convenience */
22 | vnet_main_t * vnet_main;
23 |
24 | /* dash pipeline arc index */
25 | u8 feature_arc_index;
26 | } dash_main_t;
27 |
28 | extern dash_main_t dash_main;
29 |
30 | extern vlib_node_registration_t dash_node;
31 |
32 | extern vlib_log_class_registration_t dash_log;
33 |
34 | #define dash_log_err(fmt, ...) \
35 | vlib_log_err (dash_log.class, fmt, ##__VA_ARGS__)
36 |
37 | #define dash_log_warn(fmt, ...) \
38 | vlib_log_warn (dash_log.class, fmt, ##__VA_ARGS__)
39 |
40 | #define dash_log_notice(fmt, ...) \
41 | vlib_log_notice (dash_log.class, fmt, ##__VA_ARGS__)
42 |
43 | #define dash_log_info(fmt, ...) \
44 | vlib_log_info (dash_log.class, fmt, ##__VA_ARGS__)
45 |
46 | #define dash_log_debug(fmt, ...) \
47 | vlib_log_debug (dash_log.class, fmt, ##__VA_ARGS__)
48 |
49 |
50 | #define ASSERT_MSG(expr, message) \
51 | do { \
52 | if (!(expr)) { \
53 | dash_log_err("Assertion failed: (%s), %s:%d %s", \
54 | #expr, __FILE__, __LINE__, message);\
55 | abort(); \
56 | } \
57 | } while (0)
58 |
59 | void dash_sai_init ();
60 | sai_status_t dash_sai_create_flow_entry (const dash_flow_entry_t *flow);
61 | sai_status_t dash_sai_remove_flow_entry (const dash_flow_entry_t *flow);
62 |
63 | #define DASH_PLUGIN_BUILD_VER "1.0"
64 |
65 | #endif /* __included_dash_h__ */
66 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/dpapp.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -m
3 |
4 | [ -d /var/log/vpp ] || mkdir -p /var/log/vpp
5 |
6 | sysctl vm.nr_hugepages=32
7 |
8 | /usr/bin/vpp -c ${1:-/etc/vpp/startup.conf} &
9 | sleep 5
10 |
11 | # Create a host interface which connects p4 bmv2 simple_switch
12 | HOST_INTERFACE=${HOST_INTERFACE:-veth5}
13 | HOST_INTERFACE_MAC=`cat /sys/class/net/$HOST_INTERFACE/address`
14 | vppctl create host-interface name $HOST_INTERFACE hw-addr $HOST_INTERFACE_MAC
15 | vppctl set interface state host-$HOST_INTERFACE up
16 |
17 | # Move vpp to foreground
18 | fg %1
19 |
--------------------------------------------------------------------------------
/dash-pipeline/dpapp/startup.conf:
--------------------------------------------------------------------------------
1 | unix {
2 | nodaemon
3 | log /var/log/vpp/vpp.log
4 | full-coredump
5 | cli-listen /run/vpp/cli.sock
6 | gid vpp
7 | }
8 |
9 | api-trace {
10 | on
11 | }
12 |
13 | api-segment {
14 | gid vpp
15 | }
16 |
17 | socksvr {
18 | default
19 | }
20 |
21 | logging {
22 | default-log-level info
23 | default-syslog-log-level info
24 | }
25 |
26 | cpu {
27 | main-core 1
28 | corelist-workers 2
29 | }
30 |
31 | plugins {
32 | add-path /dash/dash-pipeline/dpapp/build/lib/vpp_plugins
33 | plugin default {disable}
34 | plugin af_packet_plugin.so {enable}
35 | plugin dash_plugin.so {enable}
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/dash-pipeline/images/dockerhub-p4lang-bm-latest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/dash-pipeline/images/dockerhub-p4lang-bm-latest.png
--------------------------------------------------------------------------------
/dash-pipeline/images/git-conditional-actions-skipped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/dash-pipeline/images/git-conditional-actions-skipped.png
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/Makefile:
--------------------------------------------------------------------------------
1 | # Call make in each subdirectory
2 | .ONESHELL:
3 | SHELL = /bin/bash
4 | .SHELLFLAGS += -e
5 | SUBDIRS := $(wildcard */.)
6 |
7 |
8 | define FOREACH
9 | for DIR in $(SUBDIRS); do \
10 | $(MAKE) -C $$DIR $(1); \
11 | done
12 | endef
13 |
14 | all: $(SUBDIRS)
15 | $(call FOREACH,all)
16 |
17 |
18 | clean: $(SUBDIRS)
19 | $(call FOREACH,clean)
20 |
21 |
22 | .PHONY: all $(SUBDIRS)
23 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/README.md:
--------------------------------------------------------------------------------
1 | # libsai tests directory
2 | These tests are written in c++ and are intended to test and demonstrate writing DASH API configuration and management code which links to the `libsai` library for DASH. In particular, these programs use the SAI-to-P4Runtime adaptor layer. As such they require many libraries including gRPC, protobuf, P4 PI layer etc. in addition to `libsai` itself.
3 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/init_switch/.gitignore:
--------------------------------------------------------------------------------
1 | init_switch
2 | *.o
3 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/init_switch/Makefile:
--------------------------------------------------------------------------------
1 |
2 | INC=-I /SAI/SAI/inc -I /SAI/SAI/experimental/
3 | SRC=init_switch.cpp
4 | OBJ=$(SRC:.cpp=.o)
5 |
6 | all: init_switch
7 |
8 | %.o: %.cpp
9 | g++ $(INC) -c $< -o $@
10 |
11 | init_switch: $(OBJ) /SAI/lib/libsai.so
12 | echo "building $@ ..."
13 | g++ $(OBJ) \
14 | -o $@ \
15 | -Wl,-rpath,/SAI/lib \
16 | -L/SAI/lib/ \
17 | -lsai \
18 | -L/usr/local/lib/ \
19 | -lprotobuf \
20 | -lpiprotobuf \
21 | -lpiprotogrpc \
22 | -lgrpc++ \
23 | -g
24 |
25 | clean:
26 | rm -f init_switch *.o
27 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/init_switch/init_switch.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | extern "C" {
4 | #include
5 | }
6 |
7 | // Run this program to indirectly cause simple_switch_grpc to load its P4 pipeline
8 |
9 | int main(int argc, char **argv)
10 | {
11 | // try initialize SAI api, this will load sai library and initialize P4 GRPC
12 |
13 | sai_status_t status = sai_api_initialize(0, nullptr);
14 |
15 | if (status == SAI_STATUS_SUCCESS)
16 | {
17 | std::cout << "sai_api_initialize success" << std::endl;
18 |
19 | return 0;
20 | }
21 |
22 | std::cout << "sai_api_initialize failed: " << status << std::endl;
23 |
24 | return 1;
25 | }
26 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/vnet_out/.gitignore:
--------------------------------------------------------------------------------
1 | vnet_out
2 | *.o
3 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/libsai/vnet_out/Makefile:
--------------------------------------------------------------------------------
1 |
2 | INC=-I /SAI/SAI/inc -I /SAI/SAI/experimental/
3 | SRC=vnet_out.cpp
4 | OBJ=$(SRC:.cpp=.o)
5 |
6 | all: vnet_out
7 |
8 | %.o: %.cpp
9 | g++ $(INC) -c $< -o $@
10 |
11 | vnet_out: $(OBJ) /SAI/lib/libsai.so
12 | echo "building $@ ..."
13 | g++ $(OBJ) \
14 | -o $@ \
15 | -Wl,-rpath,/SAI/lib \
16 | -L/SAI/lib/ \
17 | -lsai \
18 | -L/usr/local/lib/ \
19 | -lprotobuf \
20 | -lpiprotobuf \
21 | -lpiprotogrpc \
22 | -lgrpc++ \
23 | -g
24 |
25 | clean:
26 | rm -f vnet_out *.o
27 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/requirements.txt:
--------------------------------------------------------------------------------
1 | snappi==0.11.14
2 | pytest>=6.0.1
3 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/README.md:
--------------------------------------------------------------------------------
1 | # saithrift tests directory
2 | This directory contains tests for DASH pipeline using python `saithrift` client libraries. The following frameworks are supported; see the corresponding directories:
3 | * [ptf/](ptf) directory - Tests using the [PTF](https://github.com/p4lang/ptf) or Packet test framework, as used in [SAI/ptf](https://github.com/opencomputeproject/SAI/tree/master/ptf) test cases
4 | * [pytest/](pytest/) directory - Tests using the [Pytest](https://docs.pytest.org/en/7.1.x/index.html) testing framework
5 |
6 | The tests use the same thrift and saithrift client libraries and in general the configuration and setup of the DASH data plane will use the same APIs and command sequences. The frameworks differ primarily in how test suites are designed and orchestrated. Each framework has advantages and disadvantages, hence both are supported as first-class citizens.
7 |
8 | In particular the PTF test framework has a significant body of helper libraries which simplify setup. The corollary is that the PTF libraries make a lot of embedded assumptions about the test target, the environment and the data plane SW packet generator (scapy).
9 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/ptf/README.md:
--------------------------------------------------------------------------------
1 | # DASH saithrift PTF Tests
2 | **TODO - Placeholder**
3 |
4 | This directory can contain PTF tests for DASH bmv2. These would supplement standard tests under [SAI/ptf](../../SAI/ptf)
5 |
6 | CI-ready DASH tests are moved to [`test/test-cases/functional/ptf`](../../../../test/test-cases/functional/ptf/)
7 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/ptf/run-saithrift-ptftests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # To be run inside saithrift-client container, assumes SAI repo portions exist under /SAI directory
3 | sudo ptf --test-dir . --pypath /SAI/ptf \
4 | --interface 0@veth1 --interface 1@veth3
5 |
6 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/ptf/thrift/test_thrift_session.py:
--------------------------------------------------------------------------------
1 | from sai_thrift.sai_headers import *
2 | from sai_base_test import *
3 |
4 | class TestSaiThriftSession(SaiHelperSimplified):
5 | """ Test saithrift client connection only"""
6 | def setUp(self):
7 | print ("setUp()")
8 |
9 | def runTest(self):
10 | print ("TestSaiThriftSession OK")
11 |
12 |
13 | def tearDown(self):
14 | print ("tearDown()")
15 |
16 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/pytest/conftest.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from saithrift_rpc_client import SaithriftRpcClient
3 |
4 | myclient = None
5 | @pytest.fixture
6 | def saithrift_client():
7 | global myclient
8 | print ("Called fixture saithrift_client()")
9 | if myclient is None:
10 | myclient = SaithriftRpcClient().client
11 | return myclient
12 |
13 |
14 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/pytest/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | markers =
3 | bmv2: test DASH bmv2 model
4 | saithrift: test DASH using saithrift API
5 | switch: test DASH SAI switch APIs
6 | vnet: test DASH vnet scenarios
7 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/pytest/run-saithrift-pytests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | python3 -m pytest . -s
3 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/pytest/saithrift_rpc_client.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | from thrift.transport import TSocket
4 | from thrift.transport import TTransport
5 | from thrift.protocol import TBinaryProtocol
6 | from sai_thrift import sai_rpc
7 |
8 | THRIFT_PORT = 9092
9 |
10 | class SaithriftRpcClient:
11 | def __init__(self, port=THRIFT_PORT, server = 'localhost'):
12 | self.transport = None
13 | self.port = port
14 | self.server = server
15 | self.createRpcClient()
16 |
17 | def createRpcClient(self):
18 | """
19 | Set up thrift client and contact RPC server
20 | """
21 |
22 | print ("making thrift connection to %s:%d" % (self.server, self.port))
23 | self.transport = TSocket.TSocket(self.server, THRIFT_PORT)
24 | self.transport = TTransport.TBufferedTransport(self.transport)
25 | self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
26 |
27 | self.client = sai_rpc.Client(self.protocol)
28 | self.transport.open()
29 | print ("sai-thrift connection established with %s:%d" % (self.server, self.port))
30 |
31 |
--------------------------------------------------------------------------------
/dash-pipeline/tests/saithrift/pytest/thrift/test_saithrift_session.py:
--------------------------------------------------------------------------------
1 | import pytest
2 |
3 | from saithrift_rpc_client import SaithriftRpcClient
4 |
5 | @pytest.mark.saithrift
6 | @pytest.mark.bmv2
7 | def test_saithrift_session(saithrift_client):
8 | """ Test saithrift client connection only"""
9 | print ("test_saithrift_session OK")
10 |
11 |
12 |
--------------------------------------------------------------------------------
/dash-pipeline/utils/README.md:
--------------------------------------------------------------------------------
1 | # DASH pipeline utils
2 |
3 | ## Overview
4 |
5 | This package includes utils to configure DASH pipeline (bmv2) via p4runtime
6 | directly. It is a supplementary of DASH SAI, which is not doable/proper to do
7 | bmv2 specific configurations.
8 |
9 | ## Usage
10 |
11 | ### internal configuration of bmv2 pipeline
12 |
13 | ```python
14 | neighbor_mac = "xx:xx:xx:xx:xx:xx"
15 | dut_mac = "xx:xx:xx:xx:xx:xx"
16 | internal_config = P4InternalConfigTable(target = "localhost:9559")
17 | internal_config.set(neighbor_mac = neighbor_mac, mac = dut_mac)
18 | internal_config.set(flow_enabled = 1)
19 | internal_config.get()
20 | internal_config.unset()
21 | ```
22 |
23 | ### underlay routing
24 |
25 | ```python
26 | underlay_routing = P4UnderlayRoutingTable(target = "localhost:9559")
27 | underlay_routing.set(ip_prefix = '::10.0.1.0', ip_prefix_len = 120, next_hop_id = 1)
28 | underlay_routing.get(ip_prefix = '::10.0.1.0', ip_prefix_len = 120))
29 | underlay_routing.unset(ip_prefix = '::10.0.1.0', ip_prefix_len = 120))
30 | ```
31 |
--------------------------------------------------------------------------------
/dash-pipeline/utils/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup, find_packages
2 |
3 | setup(
4 | name='dash-pipeline-utils',
5 | version='1.0',
6 | packages=find_packages(),
7 | py_modules = ['dash_pipeline_utils'],
8 | install_requires = [
9 | 'protobuf>=3.20.1',
10 | 'p4runtime'
11 | ],
12 | setup_requires = [
13 | 'wheel'
14 | ],
15 | description='A Python package of dash pipeline utils',
16 | license='Apache 2.0',
17 | author='Junhua Zhai',
18 | author_email='junhua.zhai@outlook.com',
19 | url='https://github.com/sonic-net/DASH/tree/main/dash-pipeline/utils',
20 | )
21 |
--------------------------------------------------------------------------------
/documentation/dataplane/README.md:
--------------------------------------------------------------------------------
1 | # DASH Data plane Documents
2 |
3 | This folder contains DASH data plane design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 | |[dash-update-timing.md](dash-update-timing.md) |Routing, ACL, Mapping Updates (WIP) |
10 | |[dash-config-schema-json.md](dash-config-schema-json.md) |Configuration schema example |
11 |
12 |
13 |
14 | ## Requirements
15 |
16 | | Document | Description |
17 | | ------------------------------------------------------ | ------------------------------------------ |
18 |
--------------------------------------------------------------------------------
/documentation/dataplane/dash-flow-api.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/dataplane/dash-flow-api.pdf
--------------------------------------------------------------------------------
/documentation/dataplane/dash-update-timing.md:
--------------------------------------------------------------------------------
1 | # Routing, ACL, Mapping Updates
2 | ### This information needs a home in documentation somewhere
3 |
4 | Configuration updates are mostly customer driven (ACLs, Routes), and should be very rare.
5 |
6 | **Routes:** Alternately, routes (if a customer is connected to On-Prem via ER GW, etc... for example), can be received and updated every 30 seconds.
7 |
8 | This amounts for majority of routes per ENI, 10K for IPv4, + 10K for IPv6. Thee 10K might be more in the future once CISCO supports more routes from On-Prem.
9 |
10 | The entire goal state will initially be fully plumbed once when the ENI lands. For example, it's possible that every 10 seconds we will change (let's say) 100 mappings per VNET. It depends upon whether the VNET is very large.
11 | We need to support both (removing single route, but also replacing entire route set).
12 |
13 | **Mappings:** Mapping updates (a single mapping) can be a more frequent occurrence. A customer can start/stop the VM, add remove Private Links, VMs can service heal, and the like...
14 | Mappings can be either, meaning an entire mapping set per VNET, or per each mapping.
15 |
16 | **ACLs:** ACLs - entire policy per group; need to be applied in atomic way. The ACL group is sent/updated together, and needs to be replaces in atomic way.
17 |
18 | Atomic means everything at the same time, like if we have 100 rules, those rules work TOGETHER as set of rules
19 |
20 | new ACL policy must be applied as entire set of rules, like a batch, so the new policy must be applied in a way that all those rules gets replaced together, in atomic way, like 1
21 |
22 | If they are replaced one by one, then policy will be in transient state, and rules will not work as customer intended, as customer never intended transient state where some rules are there but some are different
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/documentation/encrypt-gw-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH Encryption Gateway Service Documents
2 |
3 | This folder contains DASH Encryption Gateway Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 |
10 |
11 | ## Requirements
12 |
13 | | Document | Description |
14 | | ------------------------------------------------------ | ------------------------------------------ |
15 |
--------------------------------------------------------------------------------
/documentation/express-route-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH Express Route Gateway Service Documents
2 |
3 | This folder contains DASH Express Route Gateway Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 |
10 |
11 | ## Requirements
12 |
13 | | Document | Description |
14 | | ------------------------------------------------------ | ------------------------------------------ |
15 |
--------------------------------------------------------------------------------
/documentation/general/README.md:
--------------------------------------------------------------------------------
1 | # DASH General Documents
2 |
3 | This folder contains DASH general design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------------------------- | -------------------------------------------------|
9 | | [dash-high-level-design.md](dash-high-level-design.md) | DASH High-Level Architecture and Design |
10 | | [dash-sonic-hld.md](dash-sonic-hld.md) | DASH APIs, orch agent, config and APP DB Schemas |
11 | | [sdn-features-packet-transforms.md](sdn-features-packet-transforms.md) | DASH VNET-to-VNET HLD and Packet Transforms |
12 | | [sdn-pipeline-basic-elements.md](sdn-pipeline-basic-elements.md) | Pipeline basics such as path direction and flow |
13 | | [dash-handling-fragmented-packets.md](dash-handling-fragmented-packets.md)| Handling of packet fragments |
14 | |||
15 |
16 |
17 |
18 | ## Requirements
19 |
20 | | Document | Description |
21 | | ---------------------------------------------------------------------------------- | ------------------------------------------ |
22 | | [dash-general-compliance-requirements.md](dash-general-compliance-requirements.md) | DASH General Compliance Requirements |
23 | | [program-scale-testing-requirement](program-scale-testing-requirements) | DASH scale and performance requirements |
24 |
--------------------------------------------------------------------------------
/documentation/general/dash-general-compliance-requirements.md:
--------------------------------------------------------------------------------
1 | # DASH General Compliance Requirements
2 |
3 | ## DASH Versioning and Configuration Management
4 |
5 | >**TODO** Determine a versioning system for each category as well as the overall configuration of a "release."
6 |
7 | ## Continuous Integration and Test
8 | Continuous integration verifies the correctness of each committed configuration. Workflows can be triggered manually, or automatically (by commits). Success/failure can be criteria for accepting pull requests.
9 |
10 | **TODO** Define objectives and implement automation (Git Actions). The follow non-exhaustive list is just an example of what can be done:
11 |
12 | * Automatically compile/build any source-code files into their artifacts, e.g. executables, docker images, VMs, etc. This verifies an intact code and toolchain configuration.
13 | * Execute compiled artifacts inside CI test runner environments.
14 | * Execute toolchains which produce downstream artifacts which are checked into the repo. An example would be generating DASH overlay `.h` header files from P4 behavior model code.
15 | * Exercise all SAI units tests against a dummy `libsai` implementation to confirm API basic conformance.
16 | * Execute DASH software data planes via P4 behavioral models: run test suites which configure the software Device under Test (DUT) and send traffic to/from the data plane with software traffic testers. See [DASH Testing Using P4 Simulators and SAI Thrift](../test/docs/dash-test-workflow-p4-saithrift.md) for an example workflow.
17 |
18 |
19 | ## Reference Architectures
20 | Reference architectures for test scenarios are described in [test/docs/dash-test-ref-arch.md](../../../test/docs/dash-test-ref-arch.md)
21 |
22 |
--------------------------------------------------------------------------------
/documentation/general/dash-sonic-hld.md:
--------------------------------------------------------------------------------
1 | The contents has been moved to [sonic-net/dash-sonic-hld](https://github.com/sonic-net/SONiC/blob/master/doc/dash/dash-sonic-hld.md)
--------------------------------------------------------------------------------
/documentation/general/data/AppDBMemoryEstimation.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/data/AppDBMemoryEstimation.xlsx
--------------------------------------------------------------------------------
/documentation/general/images/dash-hld-outbound-meter-pipeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/dash-hld-outbound-meter-pipeline.png
--------------------------------------------------------------------------------
/documentation/general/images/dash-words-cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/dash-words-cloud.png
--------------------------------------------------------------------------------
/documentation/general/images/in_slow_path_no_flow_match.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/in_slow_path_no_flow_match.png
--------------------------------------------------------------------------------
/documentation/general/images/inb_fast_path_flow_match.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/inb_fast_path_flow_match.png
--------------------------------------------------------------------------------
/documentation/general/images/inbound_frm_ilb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/inbound_frm_ilb.png
--------------------------------------------------------------------------------
/documentation/general/images/out_fast_path_flow_match.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/out_fast_path_flow_match.png
--------------------------------------------------------------------------------
/documentation/general/images/out_slow_path_pol_eval_no_flow_match.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/out_slow_path_pol_eval_no_flow_match.png
--------------------------------------------------------------------------------
/documentation/general/images/outbound_nat_l4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/outbound_nat_l4.png
--------------------------------------------------------------------------------
/documentation/general/images/private_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/private_link.png
--------------------------------------------------------------------------------
/documentation/general/images/private_link_service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/private_link_service.png
--------------------------------------------------------------------------------
/documentation/general/images/req/[msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/[msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/[msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/[msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/[msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/[msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/cps-streams.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/cps-streams.png
--------------------------------------------------------------------------------
/documentation/general/images/req/learning-streams.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/learning-streams.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-rx-bw-port1-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-rx-bw-port1-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-rx-bw-port1-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-rx-bw-port1-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-rx-pps-64pkt-flow-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-rx-pps-64pkt-flow-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-rx-pps-64pkt-flow-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-rx-pps-64pkt-flow-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-rx-pps-learning-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-rx-pps-learning-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-rx-pps-learning-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-rx-pps-learning-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-tx-bw-port1-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-tx-bw-port1-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-tx-bw-port1-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-tx-bw-port1-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-tx-pps-64pkt-flow-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-tx-pps-64pkt-flow-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-tx-pps-64pkt-flow-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-tx-pps-64pkt-flow-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-tx-pps-learning-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-tx-pps-learning-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-1m-tx-pps-learning-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-1m-tx-pps-learning-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-1-syn-tx-cps-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-1-syn-tx-cps-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-1-syn-tx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-1-syn-tx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-2-syn-ack-rx-cps-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-2-syn-ack-rx-cps-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-2-syn-ack-rx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-2-syn-ack-rx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-3-ack-tx-cps-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-3-ack-tx-cps-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-3-ack-tx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-3-ack-tx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-rx-cps-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-rx-cps-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-rx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-rx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-4-fin-ack-tx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-8v-4m-stream-6-ack-fin-rx-cps-100sec-02.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-lab-ixia-config-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-lab-ixia-config-01.png
--------------------------------------------------------------------------------
/documentation/general/images/req/msft-lab-ixia-config-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/req/msft-lab-ixia-config-02.png
--------------------------------------------------------------------------------
/documentation/general/images/service_tunneling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/service_tunneling.png
--------------------------------------------------------------------------------
/documentation/general/images/vm_to_ilb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/vm_to_ilb.png
--------------------------------------------------------------------------------
/documentation/general/images/vm_to_vm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/vm_to_vm.png
--------------------------------------------------------------------------------
/documentation/general/images/vport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/images/vport.png
--------------------------------------------------------------------------------
/documentation/general/program-scale-testing-requirements/tcp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/program-scale-testing-requirements/tcp.png
--------------------------------------------------------------------------------
/documentation/general/program-scale-testing-requirements/udp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/general/program-scale-testing-requirements/udp.png
--------------------------------------------------------------------------------
/documentation/gnmi/README.md:
--------------------------------------------------------------------------------
1 | # DASH gNMI Documents
2 |
3 | This folder contains DASH gNMI Interface design and requirements documents.
4 |
5 |
6 | ## Design
7 |
8 | | Document | Description |
9 | | ------------------------------------------------------------------ | ------------------------------- |
10 | |[dash-reference-config-example.md](dash-reference-config-example.md)|Reference configuration example |
11 |
12 |
13 |
14 | ## Requirements
15 |
16 | | Document | Description |
17 | | ------------------------------------------------------ | ------------------------------------------ |
18 |
--------------------------------------------------------------------------------
/documentation/high-avail/AMD_Pensando_HA_Overview.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/AMD_Pensando_HA_Overview.pdf
--------------------------------------------------------------------------------
/documentation/high-avail/README.md:
--------------------------------------------------------------------------------
1 | # DASH High-Availability Documents
2 |
3 | This folder contains DASH High Availability design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 | | [high-availability-and-scale.md](high-availability-and-scale.md) | DASH High-Availability and Scale design document |
10 | | [xsight-labs-ha-proposal-v1.md](xsight-labs-ha-proposal-v1.md) | Initial HA proposal document |
11 | | [xsight-labs-ha-proposal-new-ideas.md](xsight-labs-ha-proposal-new-ideas.md)|Addendum to the initial HA proposal (preview)|
12 |
13 |
14 | ## Requirements
15 |
16 | | Document | Description |
17 | | ------------------------------------------------------ | ------------------------------------------ |
18 |
--------------------------------------------------------------------------------
/documentation/high-avail/images/channels.003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/channels.003.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/dp_repl_packet.005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/dp_repl_packet.005.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/dpreplication.004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/dpreplication.004.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/ha_sm.006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/ha_sm.006.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/node_pairing.007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/node_pairing.007.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/planned_switchover.009.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/planned_switchover.009.jpeg
--------------------------------------------------------------------------------
/documentation/high-avail/images/prepemt_flow.010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/prepemt_flow.010.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/terminology.001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/terminology.001.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/topology.002.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/topology.002.jpeg
--------------------------------------------------------------------------------
/documentation/high-avail/images/traffic-flow-has-scale-appliance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/traffic-flow-has-scale-appliance.png
--------------------------------------------------------------------------------
/documentation/high-avail/images/unplanned_switchover.008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/images/unplanned_switchover.008.png
--------------------------------------------------------------------------------
/documentation/high-avail/slides/DASH High Availability.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/high-avail/slides/DASH High Availability.pptx
--------------------------------------------------------------------------------
/documentation/high-avail/slides/README.md:
--------------------------------------------------------------------------------
1 | # DASH High-Availability presentations
2 |
3 | This folder contains DASH High Availability and Scale presentations
4 |
5 | # Contents
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 | | [DASH High Availability.pptx](DASH%20High%20Availability.pptx) | Protocol definition work group |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/documentation/images/README.md:
--------------------------------------------------------------------------------
1 | # Images
2 | The following is the Image folder break-down in sub-folders.
3 |
4 | - [general](general). It contains DASH images applicable to the general doc set.
5 | - [icons](icons). It contains DASH and SONiC icons.
6 |
--------------------------------------------------------------------------------
/documentation/images/icons/DASH_100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/DASH_100.png
--------------------------------------------------------------------------------
/documentation/images/icons/DASH_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/DASH_25.png
--------------------------------------------------------------------------------
/documentation/images/icons/DASH_40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/DASH_40.png
--------------------------------------------------------------------------------
/documentation/images/icons/DASH_60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/DASH_60.png
--------------------------------------------------------------------------------
/documentation/images/icons/DASH_75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/DASH_75.png
--------------------------------------------------------------------------------
/documentation/images/icons/dash-icon-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/dash-icon-large.png
--------------------------------------------------------------------------------
/documentation/images/icons/dash-icon-medium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/dash-icon-medium.png
--------------------------------------------------------------------------------
/documentation/images/icons/dash-icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/dash-icon-small.png
--------------------------------------------------------------------------------
/documentation/images/icons/dash-icon-xlarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/images/icons/dash-icon-xlarge.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH Load Balancer Service Documents
2 |
3 | This folder contains DASH Load Balancer Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 | | [fast-path-icmp-flow-redirection.md](fast-path-icmp-flow-redirection.md) | DASH Load Balancer Fast Path ICMP flow redirection document |
10 |
11 | ## Requirements
12 |
13 | | Document | Description |
14 | | ------------------------------------------------------ | ------------------------------------------ |
15 |
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/ilb-rx-redirect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/ilb-rx-redirect.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/ilb-tx-after-redirect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/ilb-tx-after-redirect.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/ilb-tx-syn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/ilb-tx-syn.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/load-balancer-fast-path-architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/load-balancer-fast-path-architecture.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/pe-tx-syn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/pe-tx-syn.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/pl-rx-redirect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/pl-rx-redirect.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/pl-tx-after-redirect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/pl-tx-after-redirect.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/vip-rx-redirect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/vip-rx-redirect.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/vip-tx-after-redirect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/vip-tx-after-redirect.png
--------------------------------------------------------------------------------
/documentation/load-bal-service/images/vip-tx-syn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/load-bal-service/images/vip-tx-syn.png
--------------------------------------------------------------------------------
/documentation/metering/README.md:
--------------------------------------------------------------------------------
1 | # DASH Metering Documents
2 |
3 | This folder contains DASH Metering design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | --- | --- |
9 | | [Metering](metering.md) | Metering design |
10 |
--------------------------------------------------------------------------------
/documentation/private-link-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH Private Link Service Documents
2 |
3 | This folder contains DASH Private Link Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | --- | --- |
9 | | [Private Link scenario](private-link-service.md) | Private Link |
10 |
--------------------------------------------------------------------------------
/documentation/sai/DASH-apis-rough-draft.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/sai/DASH-apis-rough-draft.xlsx
--------------------------------------------------------------------------------
/documentation/sai/README.md:
--------------------------------------------------------------------------------
1 | # DASH SAI Documents
2 |
3 | This folder contains DASH SAI Interface design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 | | [DASH-apis-rough-draft.xlsx](DASH-apis-rough-draft.xlsx) | Preliminary SAI APIs (**NOTE** - obsolete?) |
10 |
11 | ## Requirements
12 |
13 | | Document | Description |
14 | | ------------------------------------------------------ | ------------------------------------------ |
15 |
--------------------------------------------------------------------------------
/documentation/stpl-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH Service Tunnel & Private Link Service Documents
2 |
3 | This folder contains DASH Service Tunnel & Private Link Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 |
10 |
11 | ## Requirements
12 |
13 | | Document | Description |
14 | | ------------------------------------------------------ | ------------------------------------------ |
15 |
--------------------------------------------------------------------------------
/documentation/vnet-peering-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH VNET Peering Service Documents
2 |
3 | This folder contains DASH VNET Peering Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 |
10 |
11 | ## Requirements
12 |
13 | | Document | Description |
14 | | ------------------------------------------------------ | ------------------------------------------ |
15 |
--------------------------------------------------------------------------------
/documentation/vnet2vnet-service/README.md:
--------------------------------------------------------------------------------
1 | # DASH VNET-to-VNET Service Documents
2 |
3 | This folder contains DASH VNET-to-VNET Service design and requirements documents.
4 |
5 | ## Design
6 |
7 | | Document | Description |
8 | | ------------------------------------------------------ | ------------------------------------------ |
9 | |[VNET to VNET scenario](vnet-to-vnet-service.md)|Implement and test core DASH mechanisms in VM to VM communication in VNET|
10 |
11 |
12 | ## Requirements
13 |
14 | | Document | Description |
15 | | ------------------------------------------------------ | ------------------------------------------ |
16 |
--------------------------------------------------------------------------------
/documentation/vnet2vnet-service/images/packet-processing-pipeline-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/documentation/vnet2vnet-service/images/packet-processing-pipeline-example.png
--------------------------------------------------------------------------------
/images/DASH_in_FNIC_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/images/DASH_in_FNIC_mode.png
--------------------------------------------------------------------------------
/images/DASH_in_VM_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/images/DASH_in_VM_mode.png
--------------------------------------------------------------------------------
/license_custom.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/powered_by_Disaggregated_APIs_for_SONiC_Hosts_Trademark_License .docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/powered_by_Disaggregated_APIs_for_SONiC_Hosts_Trademark_License .docx
--------------------------------------------------------------------------------
/slides/DASH P4 CI Testing Update 2022-07-27.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/DASH P4 CI Testing Update 2022-07-27.pdf
--------------------------------------------------------------------------------
/slides/DASH SAI Generation Improvements (2024-01-17).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/DASH SAI Generation Improvements (2024-01-17).pdf
--------------------------------------------------------------------------------
/slides/DASH SAI PTF Test Framework Demo on Intel-IPU-HW.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/DASH SAI PTF Test Framework Demo on Intel-IPU-HW.pptx
--------------------------------------------------------------------------------
/slides/DASH_P4_CI_Testing_2022-06-08.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/DASH_P4_CI_Testing_2022-06-08.pdf
--------------------------------------------------------------------------------
/slides/SAI_Challenger_Enhancements_for_DASH_Testing_Episode_2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/SAI_Challenger_Enhancements_for_DASH_Testing_Episode_2.pdf
--------------------------------------------------------------------------------
/slides/SAI_Challenger_Enhancements_for_DASH_Testing_Sneak_Preview_2022-09-14.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/SAI_Challenger_Enhancements_for_DASH_Testing_Sneak_Preview_2022-09-14.pdf
--------------------------------------------------------------------------------
/slides/SMART NIC Summit 2023 - DASH-workshop-Keysight.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/SMART NIC Summit 2023 - DASH-workshop-Keysight.pdf
--------------------------------------------------------------------------------
/slides/Srikanth Kandula In Network Transformations for AI_ML.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/Srikanth Kandula In Network Transformations for AI_ML.pdf
--------------------------------------------------------------------------------
/slides/dash-sonic-test-workflow-v2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/dash-sonic-test-workflow-v2.pdf
--------------------------------------------------------------------------------
/slides/dash-sonic-test-workflow-v2.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/dash-sonic-test-workflow-v2.pptx
--------------------------------------------------------------------------------
/slides/dash-sonic-test-workflow-v3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/dash-sonic-test-workflow-v3.pdf
--------------------------------------------------------------------------------
/slides/dash-sonic-test-workflow-v3.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/dash-sonic-test-workflow-v3.pptx
--------------------------------------------------------------------------------
/slides/sharing_acl_statistical_data.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/slides/sharing_acl_statistical_data.pptx
--------------------------------------------------------------------------------
/test/.gitignore:
--------------------------------------------------------------------------------
1 | **/__pycache__
2 | **/*.pyc
3 |
--------------------------------------------------------------------------------
/test/README.md:
--------------------------------------------------------------------------------
1 | # SONiC-DASH Testing
2 | This directory contains documentation, test scripts, test configurations and other artifacts required to test a SONiC-DASH device or devices. The focus is on executable test artifacts, not test requirements.
3 |
4 | For hard requirements, see [main Documentation Table of Contents](../documentation/README.md#contents) and navigate to the particular **requirements** section.
5 |
6 | You can start with the [High-Level Description (HLD) Test Specification](docs/dash-test-HLD.md) or go to the [Test Docs Table of Contents](docs/README.md).
7 |
8 | ## Organization
9 | Please see the structure below:
10 | * [confgen/](confgen) - Dash config generator for Hero test
11 | * [docs/](docs/README.md) - Test documentation
12 | * [environments/](environments) - container definition for running the test cases
13 | * [images/](images) - graphic assets
14 | * [targets/](targets) - target-specific artifacts, sources and documents
15 | * [test-cases/](test-cases) - Directory of test-cases
16 |
--------------------------------------------------------------------------------
/test/docs/dash-ptf-testbed.md:
--------------------------------------------------------------------------------
1 | # DASH Testbed using PTF (Packet Test Framework)
2 | TODO
3 |
--------------------------------------------------------------------------------
/test/docs/testbed/README.md:
--------------------------------------------------------------------------------
1 | # DASH Testbed
2 |
3 | - [Overview](README.testbed.Overview.md)
4 | - Setup
5 | - [Physical Testbed Setup](README.testbed.hardware.md)
6 | - [Setup test environment](README.testbed.software.md)
7 | - [Configuration](README.testbed.Config.md)
8 | - [Running the cases](README.testbed.Cli.md)
9 |
--------------------------------------------------------------------------------
/test/docs/testbed/README.testbed.Cli.md:
--------------------------------------------------------------------------------
1 |
2 | # run tests
3 |
4 | ```
5 | docker run --network host -v $PWD:/dash --mount src=/etc/localtime,target=/etc/localtime,type=bind,readonly -it dash/keysight bash
6 | cd /dash/test
7 |
8 | # Only needed for Stateful tests to configure BGP and VLAN-to-VXLAN
9 | python ./vnet2vnet2/bgp_stateful_config.py
10 | python ./vnet2vnet2/vlan_to_vxlan_stateful_config.py
11 |
12 | # To run all the test cases
13 | pytest ./test-cases
14 | ```
15 |
--------------------------------------------------------------------------------
/test/docs/testbed/README.testbed.Overview.md:
--------------------------------------------------------------------------------
1 | # DASH Testbed Topology
2 |
3 | This repository [DASH/test](../..) contains all the scripts for setting up testbed and running feature/functional tests. Documents under this folder are for explaining the DASH testbed and running tests.
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/docs/testbed/README.testbed.hardware.md:
--------------------------------------------------------------------------------
1 |
2 | ## Physical topology
3 |
4 |
5 | 
6 |
7 | Key components in the physical connection:
8 | * DPU cards
9 | * DPU host server (2+ PCI 4.0 16x slots)
10 | * Hardware-based packet generator with minimum of 2 x 100G ports.
11 |
Example:
12 | * Keysight XGS12-HSL Chassis
13 | * Keysight Novus 100G load module
14 | * Keysight CloudStorm load module (1x for up to 4.5M CPS or 2x for up to 9M CPS)
15 | * 2x 100G switches that can do vlan to vxlan translation. Example: Cisco Nexus 3232C, Accton7816_64X
16 | * Test Server to run the test case and host the test environment[^1]
17 |
18 |
19 | ## Testbed Server[^2] specs
20 | - CPU: 16+ cores (Intel Xeon Scalable gen2+ or AMD EPYC gen2+)
21 | - RAM: 64G+
22 | - Storage: 2T NVMe drive
23 |
24 | [^1]: test server and DPU host server can be one and the same
25 | [^2]: it can also be a VM but nested virtualization will have to be enabled
26 |
--------------------------------------------------------------------------------
/test/docs/testplans/README.md:
--------------------------------------------------------------------------------
1 | # DASH Test Plans
2 |
3 | In this document you will see a summary of the test plans available for DASH testing.
4 |
5 | A test plan template is available [here](https://github.com/sonic-net/SONiC/blob/master/doc/SONiC%20Test%20Plan%20Template.md) for reference.
6 |
7 |
8 | | Test Plan | Description |
9 | |----------|-------------|
10 | | [ACL](acl.md) | Access control list test plan|
11 | | [VNET to VNET](vnet_to_vnet.md) | Describes test plan for testing the mechanisms of VM to VM communication in VNET|
12 |
--------------------------------------------------------------------------------
/test/environments/README.md:
--------------------------------------------------------------------------------
1 | # hardware setup
2 | do the steps in [Prepare Testbed Server](../docs/testbed/README.testbed.software.md) section
3 |
4 | # build container
5 | ```
6 | git clone https://github.com/sonic-net/DASH
7 | docker build --no-cache --tag dash/keysight:latest ./DASH/test/environments/keysight
8 | docker tag dash/keysight:latest dash/keysight:1.0.0
9 | ```
10 |
--------------------------------------------------------------------------------
/test/environments/keysight/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:focal
2 |
3 | ARG DEBIAN_FRONTEND=noninteractive
4 | ENV TZ=US/Pacific
5 |
6 | RUN apt -y update
7 | RUN apt -y upgrade
8 |
9 | RUN apt -y install build-essential
10 | RUN apt -y install git
11 | RUN apt -y install wget
12 |
13 | RUN apt -y install python3
14 | RUN apt -y install python3-setuptools
15 | RUN apt -y install python3-pip
16 |
17 | COPY . /keysight
18 | WORKDIR /keysight
19 |
20 | RUN pip install -r ./requirements.txt
21 |
22 | LABEL author="Mircea Dan Gheorghe"
23 | LABEL version="1.0"
24 | LABEL description="DASH env for Keysight"
25 |
--------------------------------------------------------------------------------
/test/environments/keysight/requirements.txt:
--------------------------------------------------------------------------------
1 | pytest
2 | tabulate
3 | pandas
4 | PyYAML
5 |
6 | # Keysight libs
7 | ixnetwork-restpy
8 | snappi
9 | snappi-ixnetwork
10 | ixload
11 |
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-dummy-north.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-dummy-north.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-dut-config-north.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-dut-config-north.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-dut-config-sai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-dut-config-sai.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-dut-config-sairedis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-dut-config-sairedis.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-manual.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-manual.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-nb-appldb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-nb-appldb.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-options.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-orch-asicdb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-orch-asicdb.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-prereq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-prereq.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-std-test-cases.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-std-test-cases.png
--------------------------------------------------------------------------------
/test/images/dash-test-maturity-stages-syncd-fakesai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/images/dash-test-maturity-stages-syncd-fakesai.png
--------------------------------------------------------------------------------
/test/requirements.txt:
--------------------------------------------------------------------------------
1 | snappi==0.11.14
2 | pytest=>=6.0.1
3 |
--------------------------------------------------------------------------------
/test/targets/README.md:
--------------------------------------------------------------------------------
1 | # Targets Subdirectory
2 | This directory contains device/vendor-specific information used to drive tests, for example device SKUs, capabilities, etc.
3 |
--------------------------------------------------------------------------------
/test/targets/sku/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/targets/sku/__init__.py
--------------------------------------------------------------------------------
/test/targets/sku/sku.py:
--------------------------------------------------------------------------------
1 | import inspect
2 | from pprint import pprint as pp
3 |
4 |
5 | class SkuTest:
6 | def __init__(self, *args, **kwargs):
7 | print("*"*20+"SkuTest"+"*"*20)
8 | self.ip = kwargs['stateless'][0]['dpu'][0]['interfaces'][0][0]
9 | self.user = kwargs["CR"][self.ip]['user']
10 | self.password = kwargs["CR"][self.ip]['password']
11 | print("SN Ip", self.ip)
12 | print("SN User", self.user)
13 | print("SN Password", self.password)
14 |
15 | def configure_target(self, test_data):
16 | print("Configuring Target with Test Data")
17 | pp(test_data)
18 |
--------------------------------------------------------------------------------
/test/test-cases/.gitignore:
--------------------------------------------------------------------------------
1 | **/credentials.py
--------------------------------------------------------------------------------
/test/test-cases/README.md:
--------------------------------------------------------------------------------
1 | # Test Case Directory
2 | This contains a hierarchical set of directories containing DASH test cases organized by category.
3 |
4 | # Contents
5 |
6 | | Folder | Description |
7 | | --- | --- |
8 | | [functional](./functional/) | Tests to verify essential functionality using low-rate traffic (SAI PTF).
9 | | [scale](./scale/) | Tests with high-rate traffic and complex configuration to verify scaling real-world scenarios.
10 |
--------------------------------------------------------------------------------
/test/test-cases/functional/README.md:
--------------------------------------------------------------------------------
1 | # Functional Test Cases
2 | Tests to verify essential functionality using low-rate traffic (SAI PTF).
3 |
4 | ## Contents
5 |
6 | | Folder/File | Description |
7 | | --- | --- |
8 | | [`saidashacl.py`](./ptf/saidashacl.py) | DASH ACL test cases
9 | | [`saidashvnet_sanity.py`](./ptf/saidashvnet_sanity.py) | Basic positive VNET-to-VNET test cases designed for running on BMv2
10 | | [`saidashvnet.py`](./ptf/saidashvnet.py) | More VNET-to-VNET test cases designed to provide a full feature coverage
11 |
12 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/empty_test.py:
--------------------------------------------------------------------------------
1 | # Empty test-case to verify infra
2 | # Delete this when we have some actual tests.
3 | import pytest
4 |
5 | def test_placeholder():
6 | print('test_placeholder')
7 | pass
8 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | markers =
3 | ptf: traffic tests supported by PTF. snappi should work as well.
4 | snappi: traffic tests that requires snappi only.
5 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/run-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PYTHONPATH=. pytest -sv $@
4 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/sai_dpu_client_server_ptf.json:
--------------------------------------------------------------------------------
1 | {
2 | "dpu": [
3 | {
4 | "alias": "dash",
5 | "asic": "generic",
6 | "target": "bmv2",
7 | "sku": null,
8 | "client": {
9 | "type": "thrift",
10 | "config": {
11 | "ip": "127.0.0.1",
12 | "port": "9092"
13 | }
14 | }
15 | }
16 | ],
17 |
18 | "dataplane": [
19 | {
20 | "alias": "ptf",
21 | "type": "ptf",
22 | "mode": "eth",
23 | "port_groups": [
24 | {"alias": 0, "name": "veth1"},
25 | {"alias": 1, "name": "veth2"}
26 | ]
27 | }
28 | ]
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/sai_dpu_client_server_snappi.json:
--------------------------------------------------------------------------------
1 | {
2 | "dpu": [
3 | {
4 | "alias": "dash",
5 | "asic": "generic",
6 | "target": "bmv2",
7 | "sku": null,
8 | "client": {
9 | "type": "thrift",
10 | "config": {
11 | "ip": "127.0.0.1",
12 | "port": "9092"
13 | }
14 | }
15 | }
16 | ],
17 |
18 | "dataplane": [
19 | {
20 | "alias": "ixia",
21 | "type": "snappi",
22 | "mode": "ixia_c",
23 | "controller": "https://127.0.0.1:8443",
24 | "port_groups": [
25 | {"alias": 0, "name": "veth1", "speed": "10G"},
26 | {"alias": 1, "name": "veth3", "speed": "10G"}
27 | ]
28 | }
29 | ]
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/tutorial/run-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Execute Pytest scripts in this directory
3 | # Usage: [SETUP=] ./run_tests.sh [Pytest options...]
4 | #
5 | [ X$SETUP == "X" ] && export SETUP=../sai_dpu_client_server_snappi.json
6 | echo "==> PYTHONPATH=.. pytest -sv --setup $SETUP $@"
7 | PYTHONPATH=.. pytest -sv --setup $SETUP $@
8 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/tutorial/test_sai_vnet_outbound_small_scale_config_via_dpugen_remove.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "outbound_ca_to_pa_#2",
4 | "op": "remove"
5 | },
6 | {
7 | "name": "outbound_ca_to_pa_#1",
8 | "op": "remove"
9 | },
10 | {
11 | "name": "outbound_routing_#6000",
12 | "op": "remove"
13 | },
14 | {
15 | "name": "outbound_routing_#5000",
16 | "op": "remove"
17 | },
18 | {
19 | "name": "eni_ether_address_map_#2",
20 | "op": "remove"
21 | },
22 | {
23 | "name": "eni_ether_address_map_#1",
24 | "op": "remove"
25 | },
26 | {
27 | "name": "eni_#6000",
28 | "op": "remove"
29 | },
30 | {
31 | "name": "eni_#5000",
32 | "op": "remove"
33 | },
34 | {
35 | "name": "rg",
36 | "op": "remove"
37 | },
38 | {
39 | "name": "vnet_#6001",
40 | "op": "remove"
41 | },
42 | {
43 | "name": "vnet_#6000",
44 | "op": "remove"
45 | },
46 | {
47 | "name": "vnet_#5001",
48 | "op": "remove"
49 | },
50 | {
51 | "name": "vnet_#5000",
52 | "op": "remove"
53 | },
54 | {
55 | "name": "direction_lookup_entry_#6000",
56 | "op": "remove"
57 | },
58 | {
59 | "name": "direction_lookup_entry_#5000",
60 | "op": "remove"
61 | },
62 | {
63 | "name": "vip_#1",
64 | "op": "remove"
65 | }
66 | ]
67 |
--------------------------------------------------------------------------------
/test/test-cases/functional/saic/tutorial/test_sai_vnet_vips_config_via_list_comprehension_remove.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "vip_entry#16",
4 | "op": "remove"
5 | },
6 | {
7 | "name": "vip_entry#15",
8 | "op": "remove"
9 | },
10 | {
11 | "name": "vip_entry#14",
12 | "op": "remove"
13 | },
14 | {
15 | "name": "vip_entry#13",
16 | "op": "remove"
17 | },
18 | {
19 | "name": "vip_entry#12",
20 | "op": "remove"
21 | },
22 | {
23 | "name": "vip_entry#11",
24 | "op": "remove"
25 | },
26 | {
27 | "name": "vip_entry#10",
28 | "op": "remove"
29 | },
30 | {
31 | "name": "vip_entry#09",
32 | "op": "remove"
33 | },
34 | {
35 | "name": "vip_entry#08",
36 | "op": "remove"
37 | },
38 | {
39 | "name": "vip_entry#07",
40 | "op": "remove"
41 | },
42 | {
43 | "name": "vip_entry#06",
44 | "op": "remove"
45 | },
46 | {
47 | "name": "vip_entry#05",
48 | "op": "remove"
49 | },
50 | {
51 | "name": "vip_entry#04",
52 | "op": "remove"
53 | },
54 | {
55 | "name": "vip_entry#03",
56 | "op": "remove"
57 | },
58 | {
59 | "name": "vip_entry#02",
60 | "op": "remove"
61 | },
62 | {
63 | "name": "vip_entry#01",
64 | "op": "remove"
65 | }
66 | ]
67 |
--------------------------------------------------------------------------------
/test/test-cases/scale/README.md:
--------------------------------------------------------------------------------
1 | # Scale Test Cases
2 | Tests with high-rate traffic and complex configuration to verify scaling real-world scenarios.
3 |
4 | ## scale
5 |
6 | | Folder/File | Description |
7 | | --- | --- |
8 | | [saic/](saic/README.md) | Scale tests using SAI Challenger test framework
9 | | [vnet2vnet/](vnet2vnet/README.md) | Scale DASH vnet2vnet Tests
10 |
--------------------------------------------------------------------------------
/test/test-cases/scale/credentials.py.template:
--------------------------------------------------------------------------------
1 | # do not commit credentials.py
2 |
3 | CREDENTIALS = {
4 | '10.36.77.101': {'user': 'admin', 'password': 'admin', 'key': '0000000000000000'},
5 | '10.36.77.102': {'user': 'admin', 'password': 'admin', 'key': '0000000000000000'},
6 | '10.36.77.103': {'user': 'admin', 'password': 'admin', 'key': '0000000000000000'},
7 | '10.36.77.104': {'user': 'admin', 'password': 'admin', 'key': '0000000000000000'},
8 | '10.36.77.105': {'user': 'admin', 'password': 'admin', 'key': '0000000000000000'},
9 | '10.36.77.106': {'user': 'admin', 'password': 'admin', 'key': '0000000000000000'},
10 | }
11 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/README.md:
--------------------------------------------------------------------------------
1 | # SAI-Challenger Scale Test Cases
2 | Tests using SAI-Challenger (Pytest-based) framework with high-rate traffic and complex configurations to verify scaling real-world scenarios.
3 |
4 | ## Contents
5 |
6 | | Folder/File | Description |
7 | | --- | --- |
8 | | [DASH configuration specification](README-SAIC-DASH-config-spec.md) | Explains the high-level "DASH" file format to generate scaled configurations e.g. using [dpugen](https://pypi.org/project/dpugen/)
9 | | [tutorial/](tutorial/README.md) | Examples and walk-throughs demonstrating use of SAI Challenger for generating configurations, sending traffic, etc.
10 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonic-net/DASH/8377343f3cd1af9af6eb34fd9d310b6aa2ad667f/test/test-cases/scale/saic/__init__.py
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | markers =
3 | ptf: traffic tests supported by PTF. snappi should work as well.
4 | snappi: traffic tests that requires snappi only.
5 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/run-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PYTHONPATH=. pytest -sv $@
4 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/sai_dpu_client_server_ptf.json:
--------------------------------------------------------------------------------
1 | {
2 | "dpu": [
3 | {
4 | "alias": "dash",
5 | "asic": "generic",
6 | "target": "bmv2",
7 | "sku": null,
8 | "client": {
9 | "type": "thrift",
10 | "config": {
11 | "ip": "127.0.0.1",
12 | "port": "9092"
13 | }
14 | }
15 | }
16 | ],
17 |
18 | "dataplane": [
19 | {
20 | "alias": "ptf",
21 | "type": "ptf",
22 | "mode": "eth",
23 | "port_groups": [
24 | {"alias": 0, "name": "veth1"},
25 | {"alias": 1, "name": "veth2"}
26 | ]
27 | }
28 | ]
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/sai_dpu_client_server_snappi.json:
--------------------------------------------------------------------------------
1 | {
2 | "dpu": [
3 | {
4 | "alias": "dash",
5 | "asic": "generic",
6 | "target": "bmv2",
7 | "sku": null,
8 | "client": {
9 | "type": "thrift",
10 | "config": {
11 | "ip": "127.0.0.1",
12 | "port": "9092"
13 | }
14 | }
15 | }
16 | ],
17 |
18 | "dataplane": [
19 | {
20 | "alias": "ixia",
21 | "type": "snappi",
22 | "mode": "ixia_c",
23 | "controller": "https://127.0.0.1:8443",
24 | "port_groups": [
25 | {"alias": 0, "name": "veth1", "speed": "10G"},
26 | {"alias": 1, "name": "veth3", "speed": "10G"}
27 | ]
28 | }
29 | ]
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/test_config_vnet_outbound.py:
--------------------------------------------------------------------------------
1 | """
2 | Test module with an example of parametrized test case
3 | """
4 | import json
5 | from pathlib import Path
6 |
7 | import pytest
8 |
9 |
10 | # The following test function will be executed twice - against each cfg_type: simple and scale
11 | @pytest.mark.parametrize('cfg_type', ['simple', 'scale'])
12 | def test_config_vnet_outbound_parametrized(dpu, cfg_type):
13 |
14 | # Loading unified SAI commands from file based on cfg_type
15 | current_file_dir = Path(__file__).parent
16 | with (current_file_dir / f'vnet_outbound_setup_commands_{cfg_type}.json').open(mode='r') as config_file:
17 | setup_commands = json.load(config_file)
18 |
19 | try:
20 | # Execute all commands in one shot
21 | result = [*dpu.process_commands(setup_commands)]
22 |
23 | finally:
24 | # The idea of finally here to try remove something if apply failed in the middle...
25 | # In other test suites remove is a part of the separate test case and is always executed.
26 | # This specific function executes a different configuration on each iteration and it's important
27 | # to keep remove commands next to the create ones.
28 |
29 | # Replace op="create" to op="remove"
30 | # Note that the order is reversed.
31 | cleanup_commands = []
32 | for command in reversed(setup_commands):
33 | command['op'] = 'remove'
34 | cleanup_commands.append(command)
35 |
36 | # Execute all remove commands
37 | result = [*dpu.process_commands(cleanup_commands)]
38 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/test_config_vnet_route_bidirectional.py:
--------------------------------------------------------------------------------
1 | import json
2 | from pathlib import Path
3 | from pprint import pprint
4 |
5 | import pytest
6 |
7 | class TestConfigVnetRouting:
8 |
9 | @pytest.fixture(scope="class")
10 | def vnet_in_config(self):
11 | """
12 | Fixture returns the content of the file with SAI configuration commands.
13 | scope=class - The file is loaded once for the whole test class
14 | """
15 | current_file_dir = Path(__file__).parent
16 | with (current_file_dir / 'vnet_route_setup_commands_bidirectional.json').open(mode='r') as config_file:
17 | vnet_route_setup_commands = json.load(config_file)
18 | return vnet_route_setup_commands
19 |
20 | def test_config_vnet_routing_bidirectional_create(self, dpu, vnet_in_config):
21 | """
22 | Apply configuration that is loaded from the file.
23 | """
24 |
25 | results = [*dpu.process_commands(vnet_in_config)]
26 | print('======= SAI commands RETURN values create =======')
27 | pprint(results)
28 | assert all(results), 'Create error'
29 |
30 | def test_config_vnet_routing_bidirectional_remove(self, dpu, vnet_in_config):
31 | """
32 | Remove configuration that is loaded from the file.
33 | """
34 | results = [*dpu.process_commands(vnet_in_config, cleanup=True)]
35 | print("\n======= SAI commands RETURN values remove =======")
36 | pprint(results)
37 | assert all(
38 | [result == 'SAI_STATUS_SUCCESS' for result in results]
39 | ), 'Remove error'
40 |
--------------------------------------------------------------------------------
/test/test-cases/scale/saic/test_config_vnet_route_unidirectional.py:
--------------------------------------------------------------------------------
1 | import json
2 | from pathlib import Path
3 | from pprint import pprint
4 |
5 | import pytest
6 |
7 | class TestConfigVnetRouting:
8 |
9 | @pytest.fixture(scope="class")
10 | def vnet_in_config(self):
11 | """
12 | Fixture returns the content of the file with SAI configuration commands.
13 | scope=class - The file is loaded once for the whole test class
14 | """
15 | current_file_dir = Path(__file__).parent
16 | with (current_file_dir / 'vnet_route_setup_commands_unidirectional.json').open(mode='r') as config_file:
17 | vnet_route_setup_commands = json.load(config_file)
18 | return vnet_route_setup_commands
19 |
20 | def test_config_vnet_routing_unidirectional_create(self, dpu, vnet_in_config):
21 | """
22 | Apply configuration that is loaded from the file.
23 | """
24 |
25 | results = [*dpu.process_commands(vnet_in_config)]
26 | print('======= SAI commands RETURN values create =======')
27 | pprint(results)
28 | assert all(results), 'Create error'
29 |
30 | def test_config_vnet_routing_unidirectional_remove(self, dpu, vnet_in_config):
31 | """
32 | Remove configuration that is loaded from the file.
33 | """
34 | results = [*dpu.process_commands(vnet_in_config, cleanup=True)]
35 | print("\n======= SAI commands RETURN values remove =======")
36 | pprint(results)
37 | assert all(
38 | [result == 'SAI_STATUS_SUCCESS' for result in results]
39 | ), 'Remove error'
40 |
--------------------------------------------------------------------------------
/test/test-cases/scale/testbed.py:
--------------------------------------------------------------------------------
1 | TESTBED = {
2 | 'stateless': [
3 | {
4 | 'server': [
5 | {'addr': '10.36.77.101', 'rest': 443}
6 | ],
7 | 'tgen': [
8 | {
9 | 'type': 'keysight',
10 | 'interfaces': [['10.36.77.102', 1, 1], ['10.36.77.102', 1, 2]]
11 | }
12 | ],
13 | 'dpu': [
14 | {'type': 'sku',
15 | 'interfaces': [['10.36.77.103', 1], ['10.36.77.103', 1]]}
16 | ],
17 | }
18 | ],
19 | 'stateful': [
20 | {
21 | 'server': [{'addr': '10.36.77.107', 'rest': 10010}],
22 | 'tgen': [
23 | {
24 | 'type': 'keysight',
25 | 'interfaces': [['10.36.77.102', 2, 1], ['10.36.77.102', 3, 2]]
26 | }
27 | ],
28 | 'vxlan': [{
29 | 'tgen': [['10.36.77.105', 'Ethernet1'], ['10.36.77.106', 'Ethernet1']],
30 | 'dpu':[['10.36.77.105', 'Ethernet2'], ['10.36.77.106', 'Ethernet2']],
31 | }],
32 | 'dpu': [
33 | {'type': 'sku',
34 | 'interfaces': [['10.36.77.104', 1], ['10.36.77.104', 2]]}
35 | ],
36 | }
37 | ],
38 | }
39 |
--------------------------------------------------------------------------------
/test/test-cases/scale/vnet2vnet/48K-ips/README.md:
--------------------------------------------------------------------------------
1 | The intention of the 48K-IPs test is to evaluate a DPUs performance with an objective of maintaining 6M parallel flows.
2 | - After a Ramp-up period the best CPS is measured.
3 | - Using constraints set to 6M will push the DPU to its limits returning a Max CPS.
4 |
5 |
6 |
7 | *sample output of the 48K-IPs CPS test*
8 | ```
9 | +-------------------------+-------------------------+-------------------------+
10 | | Connect Time min (us) | Connect Time max (us) | Connect Time avg (us) |
11 | |-------------------------+-------------------------+-------------------------|
12 | | 80 | 500 | 350 |
13 | +-------------------------+-------------------------+-------------------------+
14 |
15 | +------+----------------+------------------------+---------------+-----------------+-----------------+
16 | | It | Obtained CPS | HTTP Requests Failed | TCP Retries | TCP Resets TX | TCP Resets RX |
17 | |------+----------------+------------------------+---------------+-----------------+-----------------|
18 | | 1 | 100000 | 0 | 10 | 0 | 0 |
19 | +------+----------------+------------------------+---------------+-----------------+-----------------+
20 | ```
21 |
--------------------------------------------------------------------------------
/test/test-cases/scale/vnet2vnet/utils/__init__.py:
--------------------------------------------------------------------------------
1 | from .common import *
2 |
3 | __all__ = ['*']
4 |
--------------------------------------------------------------------------------
/test/test-cases/utils/README.md:
--------------------------------------------------------------------------------
1 | # utils
2 | This directory contains miscellaneous utilities used in tests.
3 |
--------------------------------------------------------------------------------
/test/third-party/traffic_gen/README.md:
--------------------------------------------------------------------------------
1 | # IXIA-C
2 |
3 | Ixia-c is a modern, powerful and API-driven traffic generator available for free and distributed / deployed as a multi-container application consisting of a controller, a traffic-engine and an app-usage-reporter.
4 | Ixia-c supports client APIs in various languages, most prevalent being [snappi](https://pypi.org/project/snappi/) (Python API).
5 |
6 |
7 | ## Useful links
8 |
9 | * Vendor-neutral [Open Traffic Generator](https://github.com/open-traffic-generator) model and API
10 | * [Ixia-c](https://github.com/open-traffic-generator/ixia-c), a powerful traffic generator based on Open Traffic Generator API
11 | * [Ixia-c Slack support channel](https://github.com/open-traffic-generator/ixia-c/blob/main/docs/support.md)
12 | * [Keysight Elastic Network Generator](https://www.keysight.com/us/en/products/network-test/protocol-load-test/keysight-elastic-network-generator.html), a commercial version of Ixia-c with L3 protocol engine, no restrictions on performance and scalability, priority technical support.
13 |
--------------------------------------------------------------------------------
/test/third-party/traffic_gen/deploy_ixiac.sh:
--------------------------------------------------------------------------------
1 | dir_path="$( dirname ${BASH_SOURCE[0]:-$0})"
2 | echo $dir_path
3 | cd $dir_path
4 | docker compose -f deployment/ixia-c-deployment.yml up -d
5 |
--------------------------------------------------------------------------------
/test/third-party/traffic_gen/deployment/.env:
--------------------------------------------------------------------------------
1 | DOCKER_REGISTRY=ghcr.io/open-traffic-generator
2 | CONTROLLER_VERSION=0.0.1-4064
3 | TRAFFIC_ENGINE_VERSION=1.6.0.35
4 | IFC1=veth1
5 | IFC2=veth3
6 | TCP_PORT_IFC1=5555
7 | TCP_PORT_IFC2=5556
8 | CPU_CORES_IFC1="0"
9 | CPU_CORES_IFC2="1"
10 | OPT_ENABLE_IPv6="No"
11 |
--------------------------------------------------------------------------------
/test/third-party/traffic_gen/deployment/README.md:
--------------------------------------------------------------------------------
1 | # Deploying Ixia-C
2 |
3 | 
4 |
5 |
6 | Deployment is done using `docker compose` and configuration file [ixia-c-deployment.yml](ixia-c-deployment.yml) and by setting up veth pairs (assumed already in-place by the test environment before `docker compose` is called).
7 |
8 | Future considerations
9 | - [Containerlab](https://containerlab.dev/), a CLI for orchestrating and managing container-based networking labs.
10 |
--------------------------------------------------------------------------------
/test/third-party/traffic_gen/deployment/ixia-c-deployment.yml:
--------------------------------------------------------------------------------
1 | services:
2 | controller:
3 | image: ${DOCKER_REGISTRY}/ixia-c-controller:${CONTROLLER_VERSION:-latest}
4 | container_name: ixia-c-controller-${USER}
5 | command: --accept-eula
6 | network_mode: "host"
7 | restart: always
8 | traffic_engine_1:
9 | image: ${DOCKER_REGISTRY}/ixia-c-traffic-engine:${TRAFFIC_ENGINE_VERSION:-latest}
10 | container_name: ixia-c-traffic-engine1-${USER}
11 | network_mode: "host"
12 | restart: always
13 | privileged: true
14 | cpuset: ${CPU_CORES_IFC1:-"0"}
15 | environment:
16 | - OPT_LISTEN_PORT=${TCP_PORT_IFC1:-5555}
17 | - ARG_IFACE_LIST=virtual@af_packet,${IFC1}
18 | - OPT_NO_HUGEPAGES=Yes
19 | - OPT_ENABLE_IPv6=${OPT_ENABLE_IPv6}
20 | traffic_engine_2:
21 | image: ${DOCKER_REGISTRY}/ixia-c-traffic-engine:${TRAFFIC_ENGINE_VERSION:-latest}
22 | container_name: ixia-c-traffic-engine2-${USER}
23 | network_mode: "host"
24 | restart: always
25 | privileged: true
26 | cpuset: ${CPU_CORES_IFC2:-"1"}
27 | environment:
28 | - OPT_LISTEN_PORT=${TCP_PORT_IFC2:-5556}
29 | - ARG_IFACE_LIST=virtual@af_packet,${IFC2}
30 | - OPT_NO_HUGEPAGES=Yes
31 | - OPT_ENABLE_IPv6=${OPT_ENABLE_IPv6}
32 |
--------------------------------------------------------------------------------
/test/third-party/traffic_gen/undeploy_ixiac.sh:
--------------------------------------------------------------------------------
1 | dir_path="$( dirname ${BASH_SOURCE[0]:-$0})"
2 | echo $dir_path
3 | cd $dir_path
4 | docker compose -f deployment/ixia-c-deployment.yml down
5 |
--------------------------------------------------------------------------------