-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[baseimage]: support building multi-asic component (#3856)
- 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 <[email protected]> Signed-off-by: Suvarna Meenakshi <[email protected]>
- Loading branch information
1 parent
6185880
commit c948379
Showing
83 changed files
with
5,781 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NUM_ASIC=1 |
3 changes: 3 additions & 0 deletions
3
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/buffers.json.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- set default_topo = 't1' %} | ||
{%- include 'buffers_config.j2' %} | ||
|
45 changes: 45 additions & 0 deletions
45
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/buffers_defaults_def.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
45 changes: 45 additions & 0 deletions
45
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/buffers_defaults_t0.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
45 changes: 45 additions & 0 deletions
45
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/buffers_defaults_t1.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
17 changes: 17 additions & 0 deletions
17
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/pg_profile_lookup.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
33 changes: 33 additions & 0 deletions
33
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/port_config.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
1 change: 1 addition & 0 deletions
1
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/qos.json.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- include 'qos_config.j2' %} |
2 changes: 2 additions & 0 deletions
2
device/virtual/x86_64-kvm_x86_64-r0/msft_multi_asic_vs/0/sai.profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.