Limit reload BCM SDK kmods on syncd start to PikeZ platform (#12971)

Why I did it
Limiting #12804 changes to PikeZ platform only (Arista-720DT-48S). Note that this is a short term workaround for this platform until SDK investigation on SDK init failure on docker syncd restart due to DMA issues is resolved.

How I did it
Retrieve platform name from /host/machine.conf and only reload SDK kmods on Arista-720DT-48S platform.

Signed-off-by: Michael Li <michael.li@broadcom.com>
This commit is contained in:
Michael Li 2022-12-06 17:53:21 -08:00 committed by Ying Xie
parent 7da66c2943
commit 41858170d8

View File

@ -30,13 +30,23 @@ function startplatform() {
if [[ x"$sonic_asic_platform" == x"broadcom" ]]; then
if [[ x"$WARM_BOOT" != x"true" ]]; then
is_bcm0=$(ls /sys/class/net | grep bcm0)
if [[ "$is_bcm0" == "bcm0" ]]; then
debug "stop SDK opennsl-modules ..."
/etc/init.d/opennsl-modules stop
debug "start SDK opennsl-modules ..."
/etc/init.d/opennsl-modules start
debug "started SDK opennsl-modules"
. /host/machine.conf
if [ -n "$aboot_platform" ]; then
platform=$aboot_platform
elif [ -n "$onie_platform" ]; then
platform=$onie_platform
else
platform="unknown"
fi
if [[ x"$platform" == x"x86_64-arista_720dt_48s" ]]; then
is_bcm0=$(ls /sys/class/net | grep bcm0)
if [[ "$is_bcm0" == "bcm0" ]]; then
debug "stop SDK opennsl-modules ..."
/etc/init.d/opennsl-modules stop
debug "start SDK opennsl-modules ..."
/etc/init.d/opennsl-modules start
debug "started SDK opennsl-modules"
fi
fi
fi
fi