Skip to content

Commit 2e47b78

Browse files
nazariiglguohan
authored andcommitted
Remove MAC alignment WA for Mellanox platforms. (#430)
Signed-off-by: Nazarii Hnydyn <[email protected]>
1 parent e1354fe commit 2e47b78

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

syncd/scripts/syncd_init_common.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,12 @@ config_syncd_mlnx()
8888

8989
[ -e /dev/sxdevs/sxcdev ] || ( mkdir -p /dev/sxdevs && mknod /dev/sxdevs/sxcdev c 231 193 )
9090

91-
# Read MAC address and align the last 6 bits.
92-
MAC_ADDRESS=$(sonic-cfggen -d -v DEVICE_METADATA.localhost.mac)
93-
last_byte=$(python -c "print '$MAC_ADDRESS'[-2:]")
94-
aligned_last_byte=$(python -c "print format(int(int('$last_byte', 16) & 0b11000000), '02x')") # put mask and take away the 0x prefix
95-
ALIGNED_MAC_ADDRESS=$(python -c "print '$MAC_ADDRESS'[:-2] + '$aligned_last_byte'") # put aligned byte into the end of MAC
91+
# Read MAC address
92+
MAC_ADDRESS="$(sonic-cfggen -d -v DEVICE_METADATA.localhost.mac)"
9693

9794
# Write MAC address into /tmp/profile file.
9895
cat $HWSKU_DIR/sai.profile > /tmp/sai.profile
99-
echo "DEVICE_MAC_ADDRESS=$ALIGNED_MAC_ADDRESS" >> /tmp/sai.profile
96+
echo "DEVICE_MAC_ADDRESS=$MAC_ADDRESS" >> /tmp/sai.profile
10097
echo "SAI_WARM_BOOT_WRITE_FILE=/var/warmboot/" >> /tmp/sai.profile
10198
}
10299

0 commit comments

Comments
 (0)