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] Update syncd start to cover changes in SDK initialization process. #4

Closed
wants to merge 1 commit into from
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
17 changes: 12 additions & 5 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ config_syncd_nvidia_bluefield()
{
# Read MAC addresses
base_mac="$(echo $SYNCD_VARS | jq -r '.mac')"
hwsku=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]')
eth0_mac=$(cat /sys/class/net/Ethernet0/address)
eth4_mac=$(cat /sys/class/net/Ethernet4/address)

Expand All @@ -352,21 +353,27 @@ config_syncd_nvidia_bluefield()

CMD_ARGS+=" -l -p /tmp/sai.profile -w 180000000"

echo 4096 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
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"
fi

echo 9216 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
mkdir -p /mnt/huge
mount -t hugetlbfs pagesize=1GB /mnt/huge

devlink dev eswitch set pci/0000:03:00.0 mode legacy
devlink dev eswitch set pci/0000:03:00.1 mode legacy
devlink dev eswitch set pci/0000:03:00.0 mode switchdev
devlink dev eswitch set pci/0000:03:00.1 mode switchdev
devlink dev param set pci/0000:03:00.0 name esw_multiport value 1 cmode runtime
devlink dev param set pci/0000:03:00.1 name esw_multiport value 1 cmode runtime

if [[ $hwsku != *"-C1" ]]; then
devlink dev param set pci/0000:03:00.0 name esw_multiport value 1 cmode runtime
devlink dev param set pci/0000:03:00.1 name esw_multiport value 1 cmode runtime
fi

ethtool -A Ethernet0 rx off tx off
ethtool -A Ethernet4 rx off tx off

mlnx-sf --device 0000:03:00.0 --action create --sfnum 1 --hwaddr ${base_mac} -t
}

config_syncd_xsight()
Expand Down