Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nvidia-bluefield] Add support of common sai.profile #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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
Loading