Skip to content

Commit

Permalink
[sonic-utilities/scripts] Fixing FP ports issue
Browse files Browse the repository at this point in the history
This commit fixes the Front Panel Ports not coming up during
cold reboot and traffic being sent at line rate. The root cause
was the PCIe bus error which was caused because of the host
side not doing a gracefull shutdown calling bcm_shutdown and
soc_shutdown. The fix will call the gracefull shutdown of syncd
during reboot which in turns calls the bcm_shutdown and soc_shutdown.
Additionally added the check to make sure the script will run only when
it has root privileges otherwise it will quit.

Verified the fix by running traffic at line rate 40G from Ixia and
rebooted using script multiple times and traffic was successfully
forwarded after every reboot.

Signed-off-by: Harish Venkatraman <Harish_Venkatraman@dell.com>
  • Loading branch information
Harish Venkatraman authored and Harish Venkatraman committed Jun 15, 2018
1 parent e2a3228 commit 94ea615
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/reboot
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#! /bin/bash

# Check root privileges
if [[ "$EUID" -ne 0 ]]
then
echo "Please run as root" >&2
exit 1
fi

function stop_sonic_services()
{
echo "Stopping syncd..."
Expand All @@ -13,8 +20,10 @@ PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
DEVPATH="/usr/share/sonic/device"
REBOOT="platform_reboot"

# Stop syncd gracefully.
stop_sonic_services

if [ -x ${DEVPATH}/${PLATFORM}/${REBOOT} ]; then
stop_sonic_services
sync
sleep 3
echo "Rebooting with platform ${PLATFORM} specific tool ..."
Expand Down

0 comments on commit 94ea615

Please sign in to comment.