Skip to content

Commit b62d018

Browse files
[Marvell][Nokia-M0] Set custom create switch timeout (sonic-net#19928)
* [Marvell] Pass create switch timeout variable to orchagent Change enables orchagent.sh to pass create switch timeout value to orchagent as a command line arument from hwsku. Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
1 parent cc32965 commit b62d018

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/sai.profile

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ mode=1
22
hwId=et6448m
33
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/profile.ini
44
switchProfile=/usr/share/sonic/hwsku/SAI-M0-48x1G-4x10G.xml
5+
createSwitchTimeout=90

dockers/docker-orchagent/orchagent.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22

3+
HWSKU_DIR=/usr/share/sonic/hwsku
34
SWSS_VARS_FILE=/usr/share/sonic/templates/swss_vars.j2
45

56
# Retrieve SWSS vars from sonic-cfggen
@@ -69,6 +70,12 @@ elif [ "$platform" == "nvidia-bluefield" ]; then
6970
elif [ "$platform" == "pensando" ]; then
7071
MAC_ADDRESS=$(ip link property add dev oob_mnic0 altname eth0; ip link show oob_mnic0 | grep ether | awk '{print $2}')
7172
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
73+
elif [ "$platform" == "marvell" ]; then
74+
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
75+
CREATE_SWITCH_TIMEOUT=`cat $HWSKU_DIR/sai.profile | grep "createSwitchTimeout" | cut -d'=' -f 2`
76+
if [[ ! -z $CREATE_SWITCH_TIMEOUT ]]; then
77+
ORCHAGENT_ARGS+=" -t $CREATE_SWITCH_TIMEOUT"
78+
fi
7279
else
7380
# Should we use the fallback MAC in case it is not found in Device.Metadata
7481
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"

0 commit comments

Comments
 (0)