Skip to content
Closed
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
8 changes: 8 additions & 0 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ config_syncd_mlnx()
# Read MAC address
MAC_ADDRESS="$(echo $SYNCD_VARS | jq -r '.mac')"

# Read dual ToR and DSCP remapping information
DUAL_TOR="$(echo $SYNCD_VARS | jq -r '.dual_tor')"
DSCP_REMAPPING="$(echo $SYNCD_VARS | jq -r '.dscp_remapping')"

# Make default sai.profile
if [[ -f $HWSKU_DIR/sai.profile.j2 ]]; then
export RESOURCE_TYPE="$(echo $SYNCD_VARS | jq -r '.resource_type')"
Expand All @@ -208,6 +212,10 @@ config_syncd_mlnx()
echo "DEVICE_MAC_ADDRESS=$MAC_ADDRESS" >> /tmp/sai.profile
echo "SAI_WARM_BOOT_WRITE_FILE=/var/warmboot/" >> /tmp/sai.profile

if [[ "$DUAL_TOR" == "enable" ]] && [[ "$DSCP_REMAPPING" == "enable" ]]; then
echo "SAI_DSCP_REMAPPING_ENABLED=1" >> /tmp/sai.profile
fi

SDK_DUMP_PATH=`cat /tmp/sai.profile|grep "SAI_DUMP_STORE_PATH"|cut -d = -f2`
if [ ! -d "$SDK_DUMP_PATH" ]; then
mkdir -p "$SDK_DUMP_PATH"
Expand Down