-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gearbox phy device files and a new physyncd docker to support VS gearbox phy feature #4851
Merged
+1,639
−117
Merged
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
f7253f6
buildimage: Add gearbox phy device files and a new physyncd docker to…
slogan621 39f20a1
remove gearsyncd from critical processes list
slogan621 fb2ccb7
minor change to comments
slogan621 76d0d2d
cleanup startup/shutdown scripts for physyncd, removing platform spec…
slogan621 06ce6fa
minor cleanups in device configs
slogan621 4e14591
use supervisord dependent startup to start services
slogan621 e8958db
more physyncd startup fixes
slogan621 3aa9f32
Revert "more physyncd startup fixes"
slogan621 21af753
changes to support current sonic usage of supervisord in physyncd docker
slogan621 18d6b90
Merge remote-tracking branch 'upstream/master'
slogan621 26ecb37
changes to gearsyncd startup parameters for supervisord
slogan621 c5e7280
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
slogan621 889a98d
backout 26ecb378cb98265a746b1544473848ad3193335e
slogan621 07a4785
Merge remote-tracking branch 'sydlogan/master'
slogan621 86a0c5c
fix perms on physyncd.sh
slogan621 8115362
duplicate portsyncd startup for gearsyncd, they should share same set…
slogan621 ba5cd86
minor changes to orchagent supervisord.conf for gearsyncd
slogan621 79fc081
fix permissions on vs physyncd docker start script
slogan621 910e23e
resolve merge conflict
slogan621 844fc16
Merge branch 'master' into master
sydlogan 7ac845a
rename physyncd to gbsyncd
slogan621 2a6ded4
Dell Force 10 S6000 gearbox config with one in device/virtual/x86_64-…
slogan621 321c923
fix merge conflict
slogan621 ea01eb7
Merge branch 'master' of https://github.com/sydlogan/sonic-buildimage
slogan621 d316ebc
minor edits
slogan621 db2da7f
Merge remote-tracking branch 'upstream/master'
slogan621 387a076
renumber table numbers to accomodate recent rest addition
slogan621 9809b8e
Update docs for virtual x86 KVM to better describe default_sku
slogan621 3cb2055
remove openssl reference, and checks for broadcom platform
slogan621 26f85d4
remove unintended changes to supervisord.conf for swssconfig
slogan621 0b808f3
remove more unintended changes to supervisord.conf for swssconfig
slogan621 be70bfa
fix build commands in README
slogan621 106de40
from stretch to buster
slogan621 2014eea
update iproute2 and libcap2 for buster
slogan621 6eaf960
refactor gbsyncd.sh and syncd.sh
slogan621 d633780
docs for how to change hwsku to use something other than default
slogan621 f3fe3c4
update build templates for new script
slogan621 9f4cc83
Minor edit to fix "show gearbox phys status" command
slogan621 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,70 @@ | ||
# Changing the virtual device | ||
|
||
You can control the hw sku and default factory configuration for the VS image | ||
by modifying the content of the file default_sku. | ||
|
||
The format of default_sku is a single line: | ||
|
||
``` | ||
<hw_key> <default_preset> | ||
``` | ||
|
||
## Allowable values for hw_key | ||
|
||
| hw_key | Device | | ||
| ------ | ------ | | ||
| Force10-S6000 | Dell Force10 S6000| | ||
| brcm_gearbox_vs | Similar to Force10-S6000, but implements a virtual BRCM81724 Gearbox Phy | | ||
|
||
## Allowable values for default_preset | ||
|
||
These include "t1", "l2", and "empty". See the file | ||
sonic-buildimage/src/sonic-config-engine/config_samples.py for details on how | ||
each default_preset value is interpreted. | ||
|
||
# Device Specific Documentation | ||
|
||
For general info on building, see https://github.com/Azure/sonic-buildimage/blob/master/README.md | ||
|
||
# Force-10-S6000 | ||
|
||
This is the default VS for SONiC. To enable, set contents of default_sku to: | ||
|
||
``` | ||
Force10-S6000 t1 | ||
``` | ||
|
||
To build: | ||
|
||
``` | ||
make init | ||
make configure PLATFORM=vs | ||
make target/sonic-vs.img.gz | ||
``` | ||
|
||
# brcm_gearbox_vs | ||
|
||
This sku simulates a device with a Broadcom BRCM81724 gearbox PHY. To enable, | ||
set default_sku to: | ||
|
||
|
||
``` | ||
brcm_gearbox_vs t1 | ||
``` | ||
|
||
To build (same as Force-10-S6000): | ||
|
||
``` | ||
make init | ||
make configure PLATFORM=vs | ||
make target/sonic-vs.img.gz | ||
lguohan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
To verify, install and bring up SONiC. There will be a new gbsyncd docker | ||
which is designed to respond to configuration directed towards the gearbox phy | ||
"switch". swss will create that gearbox switch on startup after detecting the | ||
gearbox is present (this is done by a short lived gearsyncd that runs in the | ||
swss docker). | ||
lguohan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The commands "show gearbox interfaces status" and "show gearbox phys" can be | ||
lguohan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
used to verify the virtual gearbox phy has been created. See https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md#gearbox for details. |
3 changes: 3 additions & 0 deletions
3
device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/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/brcm_gearbox_vs/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/brcm_gearbox_vs/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/brcm_gearbox_vs/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 %} |
32 changes: 32 additions & 0 deletions
32
device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json
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,32 @@ | ||
{ | ||
"CONTEXTS": [ | ||
{ | ||
"guid" : 0, | ||
"name" : "sw0", | ||
"dbAsic" : "ASIC_DB", | ||
"dbCounters" : "COUNTERS_DB", | ||
"dbFlex": "FLEX_COUNTER_DB", | ||
"dbState" : "STATE_DB", | ||
"switches": [ | ||
{ | ||
"index" : 0, | ||
"hwinfo" : "" | ||
} | ||
] | ||
}, | ||
{ | ||
"guid" : 1, | ||
"name" : "phy1", | ||
"dbAsic" : "GB_ASIC_DB", | ||
"dbCounters" : "GB_COUNTERS_DB", | ||
"dbFlex": "GB_FLEX_COUNTER_DB", | ||
"dbState" : "STATE_DB", | ||
"switches": [ | ||
{ | ||
"index" : 1, | ||
"hwinfo" : "" | ||
} | ||
] | ||
} | ||
] | ||
} |
38 changes: 38 additions & 0 deletions
38
device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/gearbox_config.json
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,38 @@ | ||
{ | ||
"phys": [ | ||
{ | ||
"phy_id": 1, | ||
"name": "sesto-1", | ||
"address": "0x1000", | ||
"lib_name": "libsai_phy_sesto-1.so", | ||
"firmware_path": "/tmp/phy-sesto-1.bin", | ||
"config_file": "/usr/share/sonic/hwsku/phy1_config_1.json", | ||
"sai_init_config_file": "/usr/share/sonic/hwsku/sesto-1.bcm", | ||
"phy_access": "mdio", | ||
"bus_id": 0 | ||
} | ||
], | ||
"interfaces": [ | ||
{ | ||
"name": "Ethernet0", | ||
"index": 0, | ||
"phy_id" : 1, | ||
"system_lanes": [200,201], | ||
"line_lanes": [206] | ||
}, | ||
{ | ||
"name": "Ethernet4", | ||
"index": 1, | ||
"phy_id" : 1, | ||
"system_lanes": [202,203], | ||
"line_lanes": [207] | ||
}, | ||
{ | ||
"name": "Ethernet8", | ||
"index": 2, | ||
"phy_id" : 1, | ||
"system_lanes": [204,205], | ||
"line_lanes": [208] | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/lanemap.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,32 @@ | ||
eth1:25,26,27,28 | ||
eth2:29,30,31,32 | ||
eth3:33,34,35,36 | ||
eth4:37,38,39,40 | ||
eth5:45,46,47,48 | ||
eth6:41,42,43,44 | ||
eth7:1,2,3,4 | ||
eth8:5,6,7,8 | ||
eth9:13,14,15,16 | ||
eth10:9,10,11,12 | ||
eth11:17,18,19,20 | ||
eth12:21,22,23,24 | ||
eth13:53,54,55,56 | ||
eth14:49,50,51,52 | ||
eth15:57,58,59,60 | ||
eth16:61,62,63,64 | ||
eth17:69,70,71,72 | ||
eth18:65,66,67,68 | ||
eth19:73,74,75,76 | ||
eth20:77,78,79,80 | ||
eth21:109,110,111,112 | ||
eth22:105,106,107,108 | ||
eth23:113,114,115,116 | ||
eth24:117,118,119,120 | ||
eth25:125,126,127,128 | ||
eth26:121,122,123,124 | ||
eth27:81,82,83,84 | ||
eth28:85,86,87,88 | ||
eth29:93,94,95,96 | ||
eth30:89,90,91,92 | ||
eth31:101,102,103,104 | ||
eth32:97,98,99,100 |
17 changes: 17 additions & 0 deletions
17
device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the link to the instruction for setting up the kvm vs with gearbox enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done