Skip to content

Commit

Permalink
[Mellanox] Enable DSCP remapping by using SAI attribute (#1188)
Browse files Browse the repository at this point in the history
* Enable DSCP remapping by using SAI attribute

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Remove space at the end of line

Signed-off-by: Stephen Sun <stephens@nvidia.com>

---------

Signed-off-by: Stephen Sun <stephens@nvidia.com>
  • Loading branch information
stephenxs authored and StormLiangMS committed Feb 10, 2023
1 parent 82f2cd7 commit 85921af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,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 @@ -207,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 [[ "$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

0 comments on commit 85921af

Please sign in to comment.