Skip to content

Commit

Permalink
[baseimage]: support building multi-asic component (#3856)
Browse files Browse the repository at this point in the history
- move single instance services into their own folder
- generate Systemd templates for any multi-instance service files in slave.mk
- detect single or multi-instance platform in systemd-sonic-generator based on asic.conf platform specific file.
- update container hostname after creation instead of during creation (docker_image_ctl)
- run Docker containers in a network namespace if specified
- add a service to create a simulated multi-ASIC topology on the virtual switch platform

Signed-off-by: Lawrence Lee <t-lale@microsoft.com>
Signed-off-by: Suvarna Meenakshi <Suvarna.Meenaksh@microsoft.com>
  • Loading branch information
SuvarnaMeenakshi authored and abdosi committed Feb 3, 2020
1 parent 939de3d commit abe7ef7
Show file tree
Hide file tree
Showing 83 changed files with 5,781 additions and 82 deletions.
1 change: 1 addition & 0 deletions device/virtual/x86_64-kvm_x86_64-r0/asic.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NUM_ASIC=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{%- set default_topo = 't1' %}
{%- include 'buffers_config.j2' %}

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{%- set default_cable = '300m' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{% for port_idx in range(0,32) %}
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
{% endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "12766208",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "12766208",
"type": "egress",
"mode": "static"
},
"egress_lossy_pool": {
"size": "7326924",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"1518",
"dynamic_th":"3"
}
},
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{%- set default_cable = '300m' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{% for port_idx in range(0,32) %}
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
{% endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "12766208",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "12766208",
"type": "egress",
"mode": "static"
},
"egress_lossy_pool": {
"size": "7326924",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"1518",
"dynamic_th":"3"
}
},
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{%- set default_cable = '300m' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{% for port_idx in range(0,32) %}
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
{% endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "12766208",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "12766208",
"type": "egress",
"mode": "static"
},
"egress_lossy_pool": {
"size": "7326924",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"1518",
"dynamic_th":"3"
}
},
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
10000 5m 56368 18432 55120 -3 2496
25000 5m 56368 18432 55120 -3 2496
40000 5m 56368 18432 55120 -3 2496
50000 5m 56368 18432 55120 -3 2496
100000 5m 56368 18432 55120 -3 2496
10000 40m 56368 18432 55120 -3 2496
25000 40m 56368 18432 55120 -3 2496
40000 40m 56368 18432 55120 -3 2496
50000 40m 56368 18432 55120 -3 2496
100000 40m 56368 18432 55120 -3 2496
10000 300m 56368 18432 55120 -3 2496
25000 300m 56368 18432 55120 -3 2496
40000 300m 56368 18432 55120 -3 2496
50000 300m 56368 18432 55120 -3 2496
100000 300m 56368 18432 55120 -3 2496
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# name lanes alias index speed
Ethernet0 25,26,27,28 fortyGigE0/0 0 40000
Ethernet4 29,30,31,32 fortyGigE0/4 1 40000
Ethernet8 33,34,35,36 fortyGigE0/8 2 40000
Ethernet12 37,38,39,40 fortyGigE0/12 3 40000
Ethernet16 45,46,47,48 fortyGigE0/16 4 40000
Ethernet20 41,42,43,44 fortyGigE0/20 5 40000
Ethernet24 1,2,3,4 fortyGigE0/24 6 40000
Ethernet28 5,6,7,8 fortyGigE0/28 7 40000
Ethernet32 13,14,15,16 fortyGigE0/32 8 40000
Ethernet36 9,10,11,12 fortyGigE0/36 9 40000
Ethernet40 17,18,19,20 fortyGigE0/40 10 40000
Ethernet44 21,22,23,24 fortyGigE0/44 11 40000
Ethernet48 53,54,55,56 fortyGigE0/48 12 40000
Ethernet52 49,50,51,52 fortyGigE0/52 13 40000
Ethernet56 57,58,59,60 fortyGigE0/56 14 40000
Ethernet60 61,62,63,64 fortyGigE0/60 15 40000
Ethernet64 69,70,71,72 fortyGigE0/64 16 40000
Ethernet68 65,66,67,68 fortyGigE0/68 17 40000
Ethernet72 73,74,75,76 fortyGigE0/72 18 40000
Ethernet76 77,78,79,80 fortyGigE0/76 19 40000
Ethernet80 109,110,111,112 fortyGigE0/80 20 40000
Ethernet84 105,106,107,108 fortyGigE0/84 21 40000
Ethernet88 113,114,115,116 fortyGigE0/88 22 40000
Ethernet92 117,118,119,120 fortyGigE0/92 23 40000
Ethernet96 125,126,127,128 fortyGigE0/96 24 40000
Ethernet100 121,122,123,124 fortyGigE0/100 25 40000
Ethernet104 81,82,83,84 fortyGigE0/104 26 40000
Ethernet108 85,86,87,88 fortyGigE0/108 27 40000
Ethernet112 93,94,95,96 fortyGigE0/112 28 40000
Ethernet116 89,90,91,92 fortyGigE0/116 29 40000
Ethernet120 101,102,103,104 fortyGigE0/120 30 40000
Ethernet124 97,98,99,100 fortyGigE0/124 31 40000
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td2-s6000-32x40G.config.bcm
SAI_NUM_ECMP_MEMBERS=32
Loading

0 comments on commit abe7ef7

Please sign in to comment.