Skip to content

Commit f7253f6

Browse files
committed
buildimage: Add gearbox phy device files and a new physyncd docker to support VS gearbox phy feature
* scripts and configuration needed to support a second syncd docker (physyncd) * physyncd supports gearbox device and phy SAI APIs and runs multiple instances of syncd, one per phy in the device * support for VS target (sonic-sairedis vslib has been extended to support a virtual BCM81724 gearbox PHY). HLD is located at https://github.com/Azure/SONiC/blob/b817a12fd89520d3fd26bbc5897487928e7f6de7/doc/gearbox/gearbox_mgr_design.md **- Why I did it** This work is part of the gearbox phy joint effort between Microsoft and Broadcom, and is based on multi-switch support in sonic-sairedis. **- How I did it** Overall feature was implemented across several projects. The collective pull requests (some in late stages of review at this point): sonic-net/sonic-utilities#931 - CLI (merged) sonic-net/sonic-swss-common#347 - Minor changes (merged) sonic-net/sonic-swss#1321 - gearsyncd, config parsers, changes to orchargent to create gearbox phy on supported systems sonic-net/sonic-sairedis#624 - physyncd, virtual BCM81724 gearbox phy added to vslib **- How to verify it** In a vslib build: root@sonic:/home/admin# show gearbox interfaces status PHY Id Interface MAC Lanes MAC Lane Speed PHY Lanes PHY Lane Speed Line Lanes Line Lane Speed Oper Admin -------- ----------- --------------- ---------------- --------------- ---------------- ------------ ----------------- ------ ------- 1 Ethernet48 121,122,123,124 25G 200,201,202,203 25G 204,205 50G down down 1 Ethernet49 125,126,127,128 25G 206,207,208,209 25G 210,211 50G down down 1 Ethernet50 69,70,71,72 25G 212,213,214,215 25G 216 100G down down In addition, docker ps | grep phy should show a physyncd docker running. Signed-off-by: syd.logan@broadcom.com
1 parent 719c8e6 commit f7253f6

File tree

22 files changed

+985
-1
lines changed

22 files changed

+985
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"CONTEXTS": [
3+
{
4+
"guid" : 0,
5+
"name" : "sw0",
6+
"dbAsic" : "ASIC_DB",
7+
"dbCounters" : "COUNTERS_DB",
8+
"dbFlex": "FLEX_COUNTER_DB",
9+
"dbState" : "STATE_DB",
10+
"switches": [
11+
{
12+
"index" : 0,
13+
"hwinfo" : ""
14+
}
15+
]
16+
},
17+
{
18+
"guid" : 1,
19+
"name" : "phy1",
20+
"dbAsic" : "GB_ASIC_DB",
21+
"dbCounters" : "GB_COUNTERS_DB",
22+
"dbFlex": "GB_FLEX_COUNTER_DB",
23+
"dbState" : "STATE_DB",
24+
"switches": [
25+
{
26+
"index" : 1,
27+
"hwinfo" : ""
28+
}
29+
]
30+
}
31+
]
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"phys": [
3+
{
4+
"phy_id": 1,
5+
"name": "sesto-1",
6+
"address": "0x1000",
7+
"lib_name": "libsai_phy_sesto-1.so",
8+
"firmware_path": "/tmp/phy-sesto-1.bin",
9+
"config_file": "/usr/share/sonic/hwsku/phy1_config_1.json",
10+
"sai_init_config_file": "/usr/share/sonic/hwsku/sesto-1.bcm",
11+
"phy_access": "mdio",
12+
"bus_id": 0
13+
}
14+
],
15+
"interfaces": [
16+
{
17+
"name": "Ethernet0",
18+
"index": 0,
19+
"phy_id" : 1,
20+
"system_lanes": [200,201],
21+
"line_lanes": [206]
22+
},
23+
{
24+
"name": "Ethernet4",
25+
"index": 1,
26+
"phy_id" : 1,
27+
"system_lanes": [202,203],
28+
"line_lanes": [207]
29+
},
30+
{
31+
"name": "Ethernet8",
32+
"index": 2,
33+
"phy_id" : 1,
34+
"system_lanes": [204,205],
35+
"line_lanes": [208]
36+
}
37+
]
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
{
2+
"lanes": [
3+
{
4+
"index": 200,
5+
"local_lane_id": 0,
6+
"system_side": true,
7+
"tx_polarity": 0,
8+
"rx_polarity": 0,
9+
"line_tx_lanemap": 0,
10+
"line_rx_lanemap": 0,
11+
"line_to_system_lanemap": 0,
12+
"mdio_addr": "0x0200"
13+
},
14+
{
15+
"index": 201,
16+
"local_lane_id": 0,
17+
"system_side": true,
18+
"tx_polarity": 0,
19+
"rx_polarity": 0,
20+
"line_tx_lanemap": 0,
21+
"line_rx_lanemap": 0,
22+
"line_to_system_lanemap": 0,
23+
"mdio_addr": "0x0201"
24+
},
25+
{
26+
"index": 202,
27+
"local_lane_id": 0,
28+
"system_side": true,
29+
"tx_polarity": 0,
30+
"rx_polarity": 0,
31+
"line_tx_lanemap": 0,
32+
"line_rx_lanemap": 0,
33+
"line_to_system_lanemap": 0,
34+
"mdio_addr": "0x0202"
35+
},
36+
{
37+
"index": 203,
38+
"local_lane_id": 0,
39+
"system_side": true,
40+
"tx_polarity": 0,
41+
"rx_polarity": 0,
42+
"line_tx_lanemap": 0,
43+
"line_rx_lanemap": 0,
44+
"line_to_system_lanemap": 0,
45+
"mdio_addr": "0x0203"
46+
},
47+
{
48+
"index": 204,
49+
"local_lane_id": 0,
50+
"system_side": false,
51+
"tx_polarity": 0,
52+
"rx_polarity": 0,
53+
"line_tx_lanemap": 0,
54+
"line_rx_lanemap": 0,
55+
"line_to_system_lanemap": 200,
56+
"mdio_addr": "0x0204"
57+
},
58+
{
59+
"index": 205,
60+
"local_lane_id": 0,
61+
"system_side": false,
62+
"tx_polarity": 0,
63+
"rx_polarity": 0,
64+
"line_tx_lanemap": 0,
65+
"line_rx_lanemap": 0,
66+
"line_to_system_lanemap": 202,
67+
"mdio_addr": "0x0205"
68+
},
69+
{
70+
"index": 206,
71+
"local_lane_id": 0,
72+
"system_side": true,
73+
"tx_polarity": 0,
74+
"rx_polarity": 0,
75+
"line_tx_lanemap": 0,
76+
"line_rx_lanemap": 0,
77+
"line_to_system_lanemap": 0,
78+
"mdio_addr": "0x0206"
79+
},
80+
{
81+
"index": 207,
82+
"local_lane_id": 0,
83+
"system_side": false,
84+
"tx_polarity": 0,
85+
"rx_polarity": 0,
86+
"line_tx_lanemap": 0,
87+
"line_rx_lanemap": 0,
88+
"line_to_system_lanemap": 0,
89+
"mdio_addr": "0x0207"
90+
},
91+
{
92+
"index": 208,
93+
"local_lane_id": 0,
94+
"system_side": true,
95+
"tx_polarity": 0,
96+
"rx_polarity": 0,
97+
"line_tx_lanemap": 0,
98+
"line_rx_lanemap": 0,
99+
"line_to_system_lanemap": 0,
100+
"mdio_addr": "0x0208"
101+
}
102+
],
103+
"ports": [
104+
{
105+
"index": 0,
106+
"mdio_addr": "0x2000",
107+
"system_speed": 20000,
108+
"system_fec": "none",
109+
"system_auto_neg": true,
110+
"system_loopback": "none",
111+
"system_training": false,
112+
"line_speed": 40000,
113+
"line_fec": "none",
114+
"line_auto_neg": true,
115+
"line_media_type": "fiber",
116+
"line_intf_type": "none",
117+
"line_loopback": "none",
118+
"line_training": false,
119+
"line_adver_speed": [],
120+
"line_adver_fec": [],
121+
"line_adver_auto_neg": false,
122+
"line_adver_asym_pause": false,
123+
"line_adver_media_type": "fiber"
124+
},
125+
{
126+
"index": 1,
127+
"mdio_addr": "0x3000",
128+
"system_speed": 20000,
129+
"system_fec": "none",
130+
"system_auto_neg": true,
131+
"system_loopback": "none",
132+
"system_training": false,
133+
"line_speed": 40000,
134+
"line_fec": "none",
135+
"line_auto_neg": true,
136+
"line_media_type": "fiber",
137+
"line_intf_type": "none",
138+
"line_loopback": "none",
139+
"line_training": false,
140+
"line_adver_speed": [],
141+
"line_adver_fec": [],
142+
"line_adver_auto_neg": false,
143+
"line_adver_asym_pause": false,
144+
"line_adver_media_type": "fiber"
145+
},
146+
{
147+
"index": 2,
148+
"mdio_addr": "0x4000",
149+
"system_speed": 20000,
150+
"system_fec": "none",
151+
"system_auto_neg": true,
152+
"system_loopback": "none",
153+
"system_training": false,
154+
"line_speed": 40000,
155+
"line_fec": "none",
156+
"line_auto_neg": true,
157+
"line_media_type": "fiber",
158+
"line_intf_type": "none",
159+
"line_loopback": "none",
160+
"line_training": false,
161+
"line_adver_speed": [],
162+
"line_adver_fec": [],
163+
"line_adver_auto_neg": false,
164+
"line_adver_asym_pause": false,
165+
"line_adver_media_type": "fiber"
166+
}
167+
]
168+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"CONTEXTS": [
3+
{
4+
"guid" : 0,
5+
"name" : "sw0",
6+
"dbAsic" : "ASIC_DB",
7+
"dbCounters" : "COUNTERS_DB",
8+
"dbFlex": "FLEX_COUNTER_DB",
9+
"dbState" : "STATE_DB",
10+
"switches": [
11+
{
12+
"index" : 0,
13+
"hwinfo" : ""
14+
}
15+
]
16+
},
17+
{
18+
"guid" : 1,
19+
"name" : "phy1",
20+
"dbAsic" : "GB_ASIC_DB",
21+
"dbCounters" : "GB_COUNTERS_DB",
22+
"dbFlex": "GB_FLEX_COUNTER_DB",
23+
"dbState" : "STATE_DB",
24+
"switches": [
25+
{
26+
"index" : 1,
27+
"hwinfo" : ""
28+
}
29+
]
30+
}
31+
]
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"phys": [
3+
{
4+
"phy_id": 1,
5+
"name": "sesto-1",
6+
"address": "0x1000",
7+
"lib_name": "libsai_phy_sesto-1.so",
8+
"firmware_path": "/tmp/phy-sesto-1.bin",
9+
"config_file": "/usr/share/sonic/hwsku/sesto-1.json",
10+
"sai_init_config_file": "/usr/share/sonic/hwsku/sesto-1.bcm",
11+
"phy_access": "mdio",
12+
"bus_id": 0
13+
}
14+
],
15+
"interfaces": [
16+
{
17+
"name": "Ethernet48",
18+
"index": 49,
19+
"phy_id" : 1,
20+
"system_lanes": [200,201,202,203],
21+
"line_lanes": [204,205]
22+
},
23+
{
24+
"name": "Ethernet49",
25+
"index": 50,
26+
"phy_id" : 1,
27+
"system_lanes": [206,207,208,209],
28+
"line_lanes": [210,211]
29+
},
30+
{
31+
"name": "Ethernet50",
32+
"index": 51,
33+
"phy_id" : 1,
34+
"system_lanes": [212,213,214,215],
35+
"line_lanes": [216]
36+
}
37+
]
38+
}

0 commit comments

Comments
 (0)