Skip to content

Commit

Permalink
Merge branch 'Azure:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiele authored May 20, 2022
2 parents d956391 + e420737 commit 569c32a
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 12 deletions.
7 changes: 6 additions & 1 deletion doc-github-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ Once a PR has received sufficient review and concerns are satisfied, a designate
Contributors with write access permission or higher have rights to directly edit documents and push changes. This practice should be used very sparingly, and only in the draft stages of documents, or to make trivial changes in documents already in use.

> [!WARNING]
> Direct edits (without proper review phases) to "released" documents short-circuits the normal community process and can result in breaking changes and significant disruption, resulting in potential impact to downstream consumers.
> Direct edits (without proper PR and review) to "released" artifacts short-circuits the normal community process and can result in breaking changes and significant disruption, resulting in potential impact to downstream consumers.
## Avoid Directly Committing New Artifacts
As a corrollary to the hazards of directly editing documents, contributors with write access permission or higher have rights to directly commit new documents. This should be avoided. Skipping the normal PR and review process prevents reviewers from making inline comments against "Files Changed" etc. Only summary comments of the commit itself are possible, which is less useful.

> [!WARNING]
> Direct commits (without proper PR and review) of new artifacts short-circuits the normal community process and should be avoided.
## Use checklists for large issues or PRs

Expand Down
3 changes: 2 additions & 1 deletion documentation/general/design/dash-sonic-hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ metering_bucket = bucket_id ; metering and counter

A high-level module interaction is captured in the following diagram.

![dash-high-level-diagram](./images/dash-high-level-design.svg)
![dash-high-level-diagram](./images/hld/dash-high-level-design.svg)

### 3.3.1 SONiC host containers

Expand Down Expand Up @@ -418,6 +418,7 @@ SONiC for DASH shall have a lite swss initialization without the heavy-lift of e
| | SAI_PORT_ATTR_OPER_SPEED |
| | SAI_PORT_ATTR_OPER_STATUS |
| | SAI_PORT_ATTR_SPEED |
| | SAI_PORT_ATTR_SUPPORTED_SPEED |
| RIF | SAI_ROUTER_INTERFACE_ATTR_ADMIN_V4_STATE |
| | SAI_ROUTER_INTERFACE_ATTR_ADMIN_V6_STATE |
| | SAI_ROUTER_INTERFACE_ATTR_MTU |
Expand Down
15 changes: 14 additions & 1 deletion documentation/high-avail/design/high-availability-and-scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,21 @@ Protocol Requirements:
## Architecture

### High-level architecture of Rack Design for High Availability and Scale
Two architectures are presented. In both cases, communications channels between DPUs are routed through the network.

![hl-arch-rack-design-ha](images/hl-arch-rack-design-ha.png)
* The near-term solution uses separate switches wired to "DASH Appliances" carrying six, 2-port DPUs. For redundancy, each DPU is wired to both switches (one link to each) as shown.
* The longer-term solution uses integrated Smart Switches, containing captive DPUs wired to a main switching ASIC(s); DPU ports are not wired to front panels.


See the following diagrams.

**ToRs + DASH Appliances - HA Cross-wired Configuration**

![dash-ha-appliance](images/dash-ha-appliance.svg)

**Smart ToRs - HA Cross-wired Configuration**

![dash-ha-smart-switch](images/dash-ha-smart-switch.svg)

**Considerations**

Expand Down
4 changes: 4 additions & 0 deletions documentation/high-avail/design/images/dash-ha-appliance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
8 changes: 5 additions & 3 deletions sirius-pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ table_add direction_lookup set_direction 70 => 2
table_add eni_lookup_from_vm outbound.set_eni cc:cc:cc:cc:cc:cc => 7
table_add eni_lookup_to_vm inbound.set_eni c:cc:cc:cc:cc:cc => 7
table_add eni_to_vni set_vni 7 => 9
table_add routing route_vnet 7 0x01010100/24 => 14
table_add ca_to_pa set_tunnel_mapping 14 0x01010102 => 0x02020202 88:88:88:88:88:88 1
table_add ca_to_pa set_tunnel_mapping 14 0x01010103 => 0x02020202 88:88:88:88:88:88 0
table_add routing route_vnet 7 0 0x01010100/24 => 14
table_add ca_to_pa set_tunnel_mapping 14 0 0x01010102 => 0x02020202 88:88:88:88:88:88 1
table_add ca_to_pa set_tunnel_mapping 14 0 0x01010103 => 0x02020202 88:88:88:88:88:88 0
table_add appliance set_appliance 0&&&0 => 77:77:77:77:77:77 66:66:66:66:66:66 0x02020201 0
table_add ca_to_pa set_tunnel_mapping 14 1 0x01010104 => 0x02020202 88:88:88:88:88:88 1
table_add ca_to_pa set_tunnel_mapping 14 1 0x01010105 => 0x02020202 88:88:88:88:88:88 0
```

# Sirius Pipeline P4 Behavior Models
Expand Down
1 change: 1 addition & 0 deletions sirius-pipeline/bmv2/sirius_headers.p4
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
typedef bit<48> EthernetAddress;
typedef bit<32> IPv4Address;
typedef bit<128> IPv6Address;
typedef bit<128> IPv4ORv6Address;

header ethernet_t {
EthernetAddress dst_addr;
Expand Down
2 changes: 2 additions & 0 deletions sirius-pipeline/bmv2/sirius_metadata.p4
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ struct metadata_t {
bit<16> eni;
bit<16> vm_id;
bit<8> appliance_id;
bit<1> is_dst_ip_v6;
IPv4ORv6Address dst_ip_addr;
conntrack_data_t conntrack_data;
}

Expand Down
10 changes: 6 additions & 4 deletions sirius-pipeline/bmv2/sirius_outbound.p4
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ control outbound(inout headers_t hdr,
table routing {
key = {
meta.eni : exact @name("meta.eni:eni");
hdr.ipv4.dst_addr : lpm @name("hdr.ipv4.dst_addr:destination");
meta.is_dst_ip_v6 : exact @name("meta.is_dst_ip_v6:v4_or_v6");
meta.dst_ip_addr : lpm @name("meta.dst_ip_addr:destination");
}

actions = {
Expand Down Expand Up @@ -62,7 +63,8 @@ control outbound(inout headers_t hdr,
key = {
/* Flow for express route */
meta.encap_data.dest_vnet_vni : exact @name("meta.encap_data.dest_vnet_vni:dest_vni");
hdr.ipv4.dst_addr : exact @name("hdr.ipv4.dst_addr:dip");
meta.is_dst_ip_v6 : exact @name("meta.is_dst_ip_v6:v4_or_v6");
meta.dst_ip_addr : exact @name("meta.dst_ip_addr:dip");
}

actions = {
Expand Down Expand Up @@ -107,8 +109,8 @@ control outbound(inout headers_t hdr,
meta.encap_data.underlay_sip,
meta.encap_data.overlay_dmac,
meta.encap_data.vni);
}
}
}
}
}
}

Expand Down
24 changes: 22 additions & 2 deletions sirius-pipeline/bmv2/sirius_parser.p4
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ error {
#define UDP_PORT_VXLAN 4789
#define UDP_PROTO 17
#define TCP_PROTO 6
#define IPV4_ETHTYPE 0x800
#define IPV4_ETHTYPE 0x0800
#define IPV6_ETHTYPE 0x86dd

parser sirius_parser(packet_in packet,
Expand All @@ -22,7 +22,8 @@ parser sirius_parser(packet_in packet,
state start {
packet.extract(hd.ethernet);
transition select(hd.ethernet.ether_type) {
0x0800: parse_ipv4;
IPV4_ETHTYPE: parse_ipv4;
IPV6_ETHTYPE: parse_ipv6;
default: accept;
}
}
Expand All @@ -38,6 +39,15 @@ parser sirius_parser(packet_in packet,
}
}

state parse_ipv6 {
packet.extract(hd.ipv6);
transition select(hd.ipv6.next_header) {
UDP_PROTO: parse_udp;
TCP_PROTO: parse_tcp;
default: accept;
}
}

state parse_udp {
packet.extract(hd.udp);
transition select(hd.udp.dst_port) {
Expand All @@ -60,6 +70,7 @@ parser sirius_parser(packet_in packet,
packet.extract(hd.inner_ethernet);
transition select(hd.ethernet.ether_type) {
IPV4_ETHTYPE: parse_inner_ipv4;
IPV6_ETHTYPE: parse_inner_ipv6;
default: accept;
}
}
Expand All @@ -75,6 +86,15 @@ parser sirius_parser(packet_in packet,
}
}

state parse_inner_ipv6 {
packet.extract(hd.inner_ipv6);
transition select(hd.inner_ipv6.next_header) {
UDP_PROTO: parse_inner_udp;
TCP_PROTO: parse_inner_tcp;
default: accept;
}
}

state parse_inner_tcp {
packet.extract(hd.inner_tcp);
transition accept;
Expand Down
9 changes: 9 additions & 0 deletions sirius-pipeline/bmv2/sirius_pipeline.p4
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ control sirius_ingress(inout headers_t hdr,
inbound_routing.apply();
}

meta.dst_ip_addr = 0;
meta.is_dst_ip_v6 = 0;
if (hdr.ipv6.isValid()) {
meta.dst_ip_addr = hdr.ipv6.dst_addr;
meta.is_dst_ip_v6 = 1;
} else if (hdr.ipv4.isValid()) {
meta.dst_ip_addr = (bit<128>)hdr.ipv4.dst_addr;
}

/* At this point the processing is done on customer headers */

/* Put VM's MAC in the direction agnostic metadata field */
Expand Down

0 comments on commit 569c32a

Please sign in to comment.