Skip to content

Commit d3c8818

Browse files
zzhiyuanabdosi
authored andcommitted
[Arista] Increase switch PCIe timeout for 7060-cx32s (#9248)
Co-authored-by: Zhi Yuan (Carl) Zhao <[email protected]> Why I did it Arista 7060 platform has a rare and unreproduceable PCIe timeout that could possibly be solved with increasing the switch PCIe timeout value. To do this we'll call a script for this platform to increase the PCIe timeout on boot-up. No issues would be expected from the setpci command. From the PCIe spec: "Software is permitted to change the value in this field at any time. For Requests already pending when the Completion Timeout Value is changed, hardware is permitted to use either the new or the old value for the outstanding Requests, and is permitted to base the start time for each Request either on when this value was changed or on when each request was issued. " How I did it Add "platform-init" support in swss docker similar to how "hwsku-init" is called, only this would be for any device belonging to a platform. Then the script would reside in device data folder. Additionally, add pciutils dependency to docker-orchagent so it can run the setpci commands. How to verify it On bootup of an Arista 7060, can execute: lspci -vv -s 01:00.0 | grep -i "devctl2" In order to check that the timeout has changed.
1 parent a90ebfb commit d3c8818

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Increase PCIe timeout value to 210ms
2+
setpci -s01:00.0 CAP_EXP+0x28.B=6
3+
setpci -s01:00.1 CAP_EXP+0x28.B=6

dockers/docker-orchagent/Dockerfile.j2

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ RUN apt-get update && \
2121
libelf1 \
2222
libmnl0 \
2323
bridge-utils \
24+
pciutils \
2425
conntrack
2526

2627
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}

dockers/docker-orchagent/docker-init.sh

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ CFGGEN_PARAMS=" \
1313
"
1414
VLAN=$(sonic-cfggen $CFGGEN_PARAMS)
1515

16+
# Executed platform specific initialization tasks.
17+
if [ -x /usr/share/sonic/platform/platform-init ]; then
18+
/usr/share/sonic/platform/platform-init
19+
fi
20+
1621
# Executed HWSKU specific initialization tasks.
1722
if [ -x /usr/share/sonic/hwsku/hwsku-init ]; then
1823
/usr/share/sonic/hwsku/hwsku-init

0 commit comments

Comments
 (0)