Skip to content

Commit

Permalink
[nvidia-bluefield] Add support of common sai.profile
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrivantsiv committed Aug 9, 2024
1 parent a988dd1 commit b994a69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ config_syncd_innovium()

config_syncd_nvidia_bluefield()
{
SAI_COMMON_FILE_PATH=/etc/bluefield/sai-common.profile

# Read MAC addresses
base_mac="$(echo $SYNCD_VARS | jq -r '.mac')"
hwsku=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]')
Expand All @@ -356,6 +358,10 @@ config_syncd_nvidia_bluefield()

cp $HWSKU_DIR/sai.profile /tmp/sai.profile

if [ -f $SAI_COMMON_FILE_PATH ]; then
cat $SAI_COMMON_FILE_PATH >> /tmp/sai.profile
fi

# Update sai.profile with MAC_ADDRESS
echo "DEVICE_MAC_ADDRESS=$base_mac" >> /tmp/sai.profile
echo "PORT_1_MAC_ADDRESS=$eth0_mac" >> /tmp/sai.profile
Expand Down

0 comments on commit b994a69

Please sign in to comment.