Skip to content

Commit 359855e

Browse files
author
Shlomi Bitton
committed
Delay LLDP for any boot type except cold boot
1 parent 294bce5 commit 359855e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

files/scripts/syncd.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,19 @@ function startplatform() {
4444
}
4545

4646
function waitplatform() {
47-
47+
4848
if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then
4949
debug "Starting pmon service..."
5050
/bin/systemctl start pmon
5151
debug "Started pmon service"
5252
fi
53+
if [[ x"$BOOT_TYPE" != x"cold" ]]; then
54+
debug "LLDP service is delayed by a timer for better fast/warm boot performance"
55+
else
56+
debug "Starting lldp service..."
57+
/bin/systemctl start lldp
58+
debug "Started lldp service"
59+
fi
5360
}
5461

5562
function stopplatform1() {
@@ -64,7 +71,7 @@ function stopplatform1() {
6471
debug "${TYPE} shutdown syncd process ..."
6572
/usr/bin/docker exec -i syncd$DEV /usr/bin/syncd_request_shutdown --${TYPE}
6673

67-
# wait until syncd quits gracefully or force syncd to exit after
74+
# wait until syncd quits gracefully or force syncd to exit after
6875
# waiting for 20 seconds
6976
start_in_secs=${SECONDS}
7077
end_in_secs=${SECONDS}
@@ -76,7 +83,7 @@ function stopplatform1() {
7683
done
7784

7885
if [[ $((end_in_secs - start_in_secs)) -gt $timer_threshold ]]; then
79-
debug "syncd process in container syncd$DEV did not exit gracefully"
86+
debug "syncd process in container syncd$DEV did not exit gracefully"
8087
fi
8188

8289
/usr/bin/docker exec -i syncd$DEV /bin/sync

0 commit comments

Comments
 (0)