Skip to content

Commit

Permalink
Merge branch 'sonic-net:main' into pr-hero-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mgheorghe authored Oct 23, 2024
2 parents 765458a + 1b3590a commit 31bb418
Show file tree
Hide file tree
Showing 15 changed files with 385 additions and 95 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[![DASH-bmv2-CI](https://github.com/sonic-net/DASH/workflows/DASH-BMV2-CI/badge.svg?branch=main)](https://github.com/sonic-net/DASH/actions/workflows/dash-bmv2-ci.yml)
[![Spellcheck](https://github.com/sonic-net/DASH/actions/workflows/dash-md-spellcheck.yml/badge.svg)](https://github.com/sonic-net/DASH/actions/workflows/dash-md-spellcheck.yml)

# SONiC-DASH - Disaggregated API for SONiC Hosts - DRAFT/Work in Progress
# SONiC-DASH - Disaggregated API for SONiC Hosts - extending functionality to stateful workloads!
[DASH YouTube Videos](https://www.youtube.com/channel/UCNE3zNwJqcEyLX9ejKrLtUA)

## SONiC-DASH is a new open source project that will "deliver enterprise network performance to critical cloud applications". The project extends functionality to stateful workloads.
## SONiC-DASH is an open source project with the goal to "deliver enterprise network performance to critical cloud applications". The project extends functionality to stateful workloads. DASH has joined the Linux Foundation to participate in the large communities of developers and users contributing there, and also collaborates with OCP.

We are developing set of APIs and object models describing network services for the cloud, and will work with all cloud providers and enterprise hybrid clouds to develop further functionality. We believe the DASH program describes a comprehensive set of services that are required by the vast majority of clouds. The goal of DASH is to be specific enough for SMART Programmable Technologies to optimize network performance and leverage commodity **hardware** technology to achieve 10x or even 100x stateful connection performance.

The technology has multiple applications such as 1) NIC on a host, 2) a Smart Switch, 3) Network Disaggregation, and 4) high performance Network Appliances. Many technology companies have committed to further developing this new open technology and its community. The best minds and practitioners are actively collaborating to optimize performance of the cloud by extending SONiC to include stateful workloads.

With the development of a Behavioral Model, we hope to push the boundaries of what P4, PNA, BMv2, and P4 DPDK can do, and contribute to shape the future of networking technology. Together these components provide a cohesive environment for developing, validating, and deploying programmable network devices that can operate consistently across different HW and SW platforms. Behavioral models help in understanding, designing, and analyzing the dynamic behavior of a system, ensuring that it meets its functional requirements. We plan to develop scenarios and test cases that verify the system behaves as expected under various conditions. The Behavioral Model can also be used to simulate a system's behavior before actual implementation, helping to identify potential issues early.

Future innovations for in-service software upgrades and ultra-high availability for stateful connections will also be developed with the utmost importance.

Expand All @@ -18,11 +21,12 @@ Visit the [Documentation table of contents](documentation/README.md) for access

For a quick technical deep-dive, please begin with:

1. Peruse the [DASH high level design](documentation/general/dash-high-level-design.md) for an overview of DASH architecture.
1. The [SDN Packet Transforms](documentation/general/sdn-features-packet-transforms.md) document, this facilitates understanding of the program goal and the 7 networking scenarios that Azure has defined.
1. [Program Scale Testing Requirements - Draft](documentation/general/program-scale-testing-requirements-draft.md) for an example of a test to stress DPU/NIC hardware.
1. Peruse the [DASH high level design](documentation/general/dash-high-level-design.md) for an overview of DASH architecture.
2. [SONiC-DASH High Level Design](https://github.com/sonic-net/DASH/blob/main/documentation/general/dash-sonic-hld.md)
3. The [SDN Packet Transforms](documentation/general/sdn-features-packet-transforms.md) document, this facilitates understanding of the program goal and the 7 networking scenarios that Azure has defined.
4. [HERO Test](documentation/general/program-scale-testing-requirements-draft.md) for an example of a test to stress DPU/NIC hardware.

The API and Object Model for VNET<->VNET is in draft; the remaining services will be posted over as we move forward.
The API and Object Model for VNET<->VNET has been posted; the remaining services will be added into the dash-sonic-hld.md as as we move forward.

DASH Testing is covered under the [test/](test/README.md) directory and is a work in progress.

Expand Down
2 changes: 1 addition & 1 deletion dash-pipeline/SAI/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all: copysrc
/bmv2/dash_pipeline.bmv2/dash_pipeline_p4rt.json \
--ir /bmv2/dash_pipeline.bmv2/dash_pipeline_ir.json \
--ignore-tables=underlay_mac,eni_meter,slb_decap \
--sai-spec-dir=/SAI/specs \
--sai-spec-dir=specs \
dash

copysrc:
Expand Down
101 changes: 100 additions & 1 deletion dash-pipeline/SAI/specs/dash_tunnel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sai_apis:
attr_value_field: s32
default: SAI_DASH_ENCAPSULATION_VXLAN
isresourcetype: false
flags: CREATE_AND_SET
flags: CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
Expand All @@ -43,6 +43,32 @@ sai_apis:
attr_value_field: u32
default: '0'
isresourcetype: false
flags: CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_TUNNEL_ATTR_MAX_MEMBER_SIZE
description: Action parameter max member size
type: sai_uint32_t
attr_value_field: u32
default: '1'
isresourcetype: false
flags: CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_TUNNEL_ATTR_SIP
description: Action parameter sip
type: sai_ip_address_t
attr_value_field: ipaddr
default: 0.0.0.0
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
Expand All @@ -59,3 +85,76 @@ sai_apis:
name: default
id: 27891720
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: dash_tunnel_member
description: DASH tunnel member
is_object: true
enums: []
structs: []
attributes:
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_TUNNEL_MEMBER_ATTR_DASH_TUNNEL_ID
description: Action parameter DASH tunnel id
type: sai_object_id_t
attr_value_field: u16
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: SAI_OBJECT_TYPE_DASH_TUNNEL
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_TUNNEL_MEMBER_ATTR_DASH_TUNNEL_NEXT_HOP_ID
description: Action parameter DASH tunnel next hop id
type: sai_object_id_t
attr_value_field: u16
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_AND_SET
object_name: SAI_OBJECT_TYPE_DASH_TUNNEL_NEXT_HOP
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 40012474
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 23738116
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: dash_tunnel_next_hop
description: DASH tunnel next hop
is_object: true
enums: []
structs: []
attributes:
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_TUNNEL_NEXT_HOP_ATTR_DIP
description: Action parameter dip
type: sai_ip_address_t
attr_value_field: ipaddr
default: 0.0.0.0
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 34229686
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 31749609
attr_param_id: {}
32 changes: 17 additions & 15 deletions dash-pipeline/SAI/specs/sai_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ object_types:
- SAI_OBJECT_TYPE_FLOW_ENTRY_BULK_GET_SESSION
- SAI_OBJECT_TYPE_METER_BUCKET_ENTRY
- SAI_OBJECT_TYPE_DASH_APPLIANCE
- SAI_OBJECT_TYPE_DASH_TUNNEL_MEMBER
- SAI_OBJECT_TYPE_DASH_TUNNEL_NEXT_HOP
object_entries:
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
name: direction_lookup_entry
Expand Down Expand Up @@ -485,18 +487,18 @@ port_extenstion: !!python/object:utils.sai_spec.sai_api_extension.SaiApiExtensio
deprecated: false
is_vlan: false
api_groups:
- !inc '/SAI/specs/dash_acl.yaml'
- !inc '/SAI/specs/dash_direction_lookup.yaml'
- !inc '/SAI/specs/dash_eni.yaml'
- !inc '/SAI/specs/dash_ha.yaml'
- !inc '/SAI/specs/dash_inbound_routing.yaml'
- !inc '/SAI/specs/dash_meter.yaml'
- !inc '/SAI/specs/dash_outbound_ca_to_pa.yaml'
- !inc '/SAI/specs/dash_vnet.yaml'
- !inc '/SAI/specs/dash_outbound_routing.yaml'
- !inc '/SAI/specs/dash_pa_validation.yaml'
- !inc '/SAI/specs/route.yaml'
- !inc '/SAI/specs/dash_vip.yaml'
- !inc '/SAI/specs/dash_tunnel.yaml'
- !inc '/SAI/specs/dash_flow.yaml'
- !inc '/SAI/specs/dash_appliance.yaml'
- !inc 'dash_acl.yaml'
- !inc 'dash_direction_lookup.yaml'
- !inc 'dash_eni.yaml'
- !inc 'dash_ha.yaml'
- !inc 'dash_inbound_routing.yaml'
- !inc 'dash_meter.yaml'
- !inc 'dash_outbound_ca_to_pa.yaml'
- !inc 'dash_vnet.yaml'
- !inc 'dash_outbound_routing.yaml'
- !inc 'dash_pa_validation.yaml'
- !inc 'route.yaml'
- !inc 'dash_vip.yaml'
- !inc 'dash_tunnel.yaml'
- !inc 'dash_flow.yaml'
- !inc 'dash_appliance.yaml'
57 changes: 57 additions & 0 deletions dash-pipeline/SAI/src/dashsai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,3 +904,60 @@ std::vector<sai_attribute_t> DashSai::populateDefaultAttributes(

return attrs;
}

sai_status_t DashSai::bulk_create_objects(
_In_ DashSai::sai_create_object_fn create_fn,
_In_ sai_object_id_t switch_id,
_In_ uint32_t object_count,
_In_ const uint32_t *attr_count,
_In_ const sai_attribute_t **attr_list,
_In_ sai_bulk_op_error_mode_t mode,
_Out_ sai_object_id_t *object_id,
_Out_ sai_status_t *object_statuses)
{
sai_status_t agg_status = SAI_STATUS_SUCCESS;

for (uint32_t i = 0; i < object_count; i++)
{
object_statuses[i] = create_fn(&object_id[i], switch_id, attr_count[i], attr_list[i]);

if (object_statuses[i] != SAI_STATUS_SUCCESS)
{
agg_status = SAI_STATUS_FAILURE;
}

if (agg_status == SAI_STATUS_FAILURE && mode == SAI_BULK_OP_ERROR_MODE_STOP_ON_ERROR)
{
return agg_status;
}
}

return agg_status;
}

sai_status_t DashSai::bulk_remove_objects(
_In_ DashSai::sai_remove_object_fn remove_fn,
_In_ uint32_t object_count,
_In_ const sai_object_id_t *object_id,
_In_ sai_bulk_op_error_mode_t mode,
_Out_ sai_status_t *object_statuses)
{
sai_status_t agg_status = SAI_STATUS_SUCCESS;

for (uint32_t i = 0; i < object_count; i++)
{
object_statuses[i] = remove_fn(object_id[i]);

if (object_statuses[i] != SAI_STATUS_SUCCESS)
{
agg_status = SAI_STATUS_FAILURE;
}

if (agg_status == SAI_STATUS_FAILURE && mode == SAI_BULK_OP_ERROR_MODE_STOP_ON_ERROR)
{
return agg_status;
}
}

return agg_status;
}
26 changes: 26 additions & 0 deletions dash-pipeline/SAI/src/dashsai.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,32 @@ namespace dash
_In_ uint32_t attr_count,
_In_ const sai_attribute_t *attr_list);

typedef sai_status_t (*sai_create_object_fn)(
_Out_ sai_object_id_t *object_id,
_In_ sai_object_id_t switch_id,
_In_ uint32_t attr_count,
_In_ const sai_attribute_t *attr_list);

typedef sai_status_t (*sai_remove_object_fn)(
_In_ sai_object_id_t object_id);

static sai_status_t bulk_create_objects(
_In_ sai_create_object_fn create_fn,
_In_ sai_object_id_t switch_id,
_In_ uint32_t object_count,
_In_ const uint32_t *attr_count,
_In_ const sai_attribute_t **attr_list,
_In_ sai_bulk_op_error_mode_t mode,
_Out_ sai_object_id_t *object_id,
_Out_ sai_status_t *object_statuses);

static sai_status_t bulk_remove_objects(
_In_ sai_remove_object_fn remove_fn,
_In_ uint32_t object_count,
_In_ const sai_object_id_t *object_id,
_In_ sai_bulk_op_error_mode_t mode,
_Out_ sai_status_t *object_statuses);

private: // private helper methods

static std::shared_ptr<p4::config::v1::P4Info> parse_p4info(
Expand Down
Loading

0 comments on commit 31bb418

Please sign in to comment.