Skip to content

Commit

Permalink
[Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribu…
Browse files Browse the repository at this point in the history
…te if corresponding arg passed to syncd

Signed-off-by: Andriy Yurkiv <[email protected]>
  • Loading branch information
ayurkiv-nvda committed Jan 25, 2023
1 parent 402eb14 commit 1804940
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ config_syncd_mlnx()
# Read MAC address
MAC_ADDRESS="$(echo $SYNCD_VARS | jq -r '.mac')"

# Check whether additional MAC feature enabled
ADDITIONAL_MAC="$(echo $SYNCD_VARS | jq -r '.additional_mac')"

# 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 +211,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 [[ "$ADDITIONAL_MAC" == "enable" ]]; then
echo "SAI_ADDITIONAL_MAC_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

0 comments on commit 1804940

Please sign in to comment.