Skip to content
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
merged 38 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
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 Jun 25, 2020
39f20a1
remove gearsyncd from critical processes list
slogan621 Jun 26, 2020
fb2ccb7
minor change to comments
slogan621 Jun 29, 2020
76d0d2d
cleanup startup/shutdown scripts for physyncd, removing platform spec…
slogan621 Jun 30, 2020
06ce6fa
minor cleanups in device configs
slogan621 Jul 8, 2020
4e14591
use supervisord dependent startup to start services
slogan621 Jul 8, 2020
e8958db
more physyncd startup fixes
slogan621 Jul 10, 2020
3aa9f32
Revert "more physyncd startup fixes"
slogan621 Jul 10, 2020
21af753
changes to support current sonic usage of supervisord in physyncd docker
slogan621 Jul 11, 2020
18d6b90
Merge remote-tracking branch 'upstream/master'
slogan621 Jul 16, 2020
26ecb37
changes to gearsyncd startup parameters for supervisord
slogan621 Jul 29, 2020
c5e7280
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
slogan621 Jul 29, 2020
889a98d
backout 26ecb378cb98265a746b1544473848ad3193335e
slogan621 Jul 31, 2020
07a4785
Merge remote-tracking branch 'sydlogan/master'
slogan621 Aug 2, 2020
86a0c5c
fix perms on physyncd.sh
slogan621 Aug 3, 2020
8115362
duplicate portsyncd startup for gearsyncd, they should share same set…
slogan621 Aug 3, 2020
ba5cd86
minor changes to orchagent supervisord.conf for gearsyncd
slogan621 Aug 4, 2020
79fc081
fix permissions on vs physyncd docker start script
slogan621 Aug 4, 2020
910e23e
resolve merge conflict
slogan621 Aug 24, 2020
844fc16
Merge branch 'master' into master
sydlogan Aug 24, 2020
7ac845a
rename physyncd to gbsyncd
slogan621 Aug 24, 2020
2a6ded4
Dell Force 10 S6000 gearbox config with one in device/virtual/x86_64-…
slogan621 Aug 25, 2020
321c923
fix merge conflict
slogan621 Aug 25, 2020
ea01eb7
Merge branch 'master' of https://github.com/sydlogan/sonic-buildimage
slogan621 Aug 25, 2020
d316ebc
minor edits
slogan621 Aug 25, 2020
db2da7f
Merge remote-tracking branch 'upstream/master'
slogan621 Sep 18, 2020
387a076
renumber table numbers to accomodate recent rest addition
slogan621 Sep 18, 2020
9809b8e
Update docs for virtual x86 KVM to better describe default_sku
slogan621 Sep 19, 2020
3cb2055
remove openssl reference, and checks for broadcom platform
slogan621 Sep 19, 2020
26f85d4
remove unintended changes to supervisord.conf for swssconfig
slogan621 Sep 19, 2020
0b808f3
remove more unintended changes to supervisord.conf for swssconfig
slogan621 Sep 19, 2020
be70bfa
fix build commands in README
slogan621 Sep 19, 2020
106de40
from stretch to buster
slogan621 Sep 19, 2020
2014eea
update iproute2 and libcap2 for buster
slogan621 Sep 19, 2020
6eaf960
refactor gbsyncd.sh and syncd.sh
slogan621 Sep 22, 2020
d633780
docs for how to change hwsku to use something other than default
slogan621 Sep 23, 2020
f3fe3c4
update build templates for new script
slogan621 Sep 23, 2020
9f4cc83
Minor edit to fix "show gearbox phys status" command
slogan621 Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions device/virtual/x86_64-kvm_x86_64-r0/README.md
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.

Copy link
Collaborator

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# 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.
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,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" : ""
}
]
}
]
}
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 device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/lanemap.ini
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
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
Loading