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

Reload BCM SDK kmods on syncd start to handle syncd restart issues #12804

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ function startplatform() {
debug "Firmware update procedure ended"
fi

if [[ x"$sonic_asic_platform" == x"broadcom" ]]; then
if [[ x"$WARM_BOOT" != x"true" ]]; then
is_bcm0=$(ls /sys/class/net | grep bcm0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is is_bcm0, this is unclear to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is_bcm0 indicates the presence of the base netdevice created by the BRCM SDK kernel module. If the bcm0 netdevice is present, the BRCM SDK kernel modules are loaded. We only take action to remove and reload the kmods if they are already loaded.

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

if [[ x"$sonic_asic_platform" == x"barefoot" ]]; then
is_usb0=$(ls /sys/class/net | grep usb0)
if [[ "$is_usb0" == "usb0" ]]; then
Expand Down