[mlnx]: Add support of Mellanox SN2740 platform. (#786)

- Update SAI (added support of SN2740 profile).
- Update SDK to version 4.2.3130.
- Update FW to version 13.1224.0140.
- Update HW MGMT to version 1.0.0160.
This commit is contained in:
Oleksandr Ivantsiv 2017-07-07 14:26:53 +03:00 committed by Marian Pritsak
parent a74b3a1eb7
commit 96fe120265
16 changed files with 1187 additions and 9 deletions

View File

@ -0,0 +1,33 @@
# name lanes
Ethernet0 0,1,2,3
Ethernet4 4,5,6,7
Ethernet8 8,9,10,11
Ethernet12 12,13,14,15
Ethernet16 16,17,18,19
Ethernet20 20,21,22,23
Ethernet24 24,25,26,27
Ethernet28 28,29,30,31
Ethernet32 32,33,34,35
Ethernet36 36,37,38,39
Ethernet40 40,41,42,43
Ethernet44 44,45,46,47
Ethernet48 48,49,50,51
Ethernet52 52,53,54,55
Ethernet56 56,57,58,59
Ethernet60 60,61,62,63
Ethernet64 64,65,66,67
Ethernet68 68,69,70,71
Ethernet72 72,73,74,75
Ethernet76 76,77,78,79
Ethernet80 80,81,82,83
Ethernet84 84,85,86,87
Ethernet88 88,89,90,91
Ethernet92 92,93,94,95
Ethernet96 96,97,98,99
Ethernet100 100,101,102,103
Ethernet104 104,105,106,107
Ethernet108 108,109,110,111
Ethernet112 112,113,114,115
Ethernet116 116,117,118,119
Ethernet120 120,121,122,123
Ethernet124 124,125,126,127

View File

@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/usr/share/sai_2740.xml

View File

@ -0,0 +1 @@
/etc/mlnx/msn2740

View File

@ -0,0 +1 @@
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax acpi=noirq"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
#!/usr/bin/env python
#############################################################################
# Mellanox
#
# Platform and model specific eeprom subclass, inherits from the base class,
# and provides the followings:
# - the eeprom format definition
# - specific encoder/decoder if there is special need
#############################################################################
try:
import exceptions
import binascii
import time
import optparse
import warnings
import os
import sys
from sonic_eeprom import eeprom_base
from sonic_eeprom import eeprom_tlvinfo
import subprocess
except ImportError, e:
raise ImportError (str(e) + "- required module not found")
class board(eeprom_tlvinfo.TlvInfoDecoder):
_TLV_INFO_MAX_LEN = 256
def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/bsp/eeprom/sys_eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)

View File

@ -0,0 +1,28 @@
#! /usr/bin/python
try:
from sonic_sfp.sfputilbase import sfputilbase
except ImportError, e:
raise ImportError (str(e) + "- required module not found")
class sfputil(sfputilbase):
"""Platform specific sfputil class"""
port_start = 0
port_end = 31
ports_in_block = 32
eeprom_offset = 1
port_to_eeprom_mapping = {}
_qsfp_ports = range(0, ports_in_block + 1)
def __init__(self, port_num):
# Override port_to_eeprom_mapping for class initialization
eeprom_path = '/bsp/qsfp/qsfp{0}'
for x in range(0, self.port_end + 1):
self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
sfputilbase.__init__(self, port_num)

View File

@ -4,7 +4,7 @@
"tunnel_type":"IPINIP",
"src_ip":"{{ minigraph_lo_interfaces[0]['addr'] }}",
"dst_ip":"{{ minigraph_lo_interfaces[0]['addr'] }}",
{% if minigraph_hwsku in [ 'ACS-MSN2700', 'ACS-MSN2410', 'ACS-MSN2100' ] %}
{% if onie_switch_asic == "mlnx" %}
"dscp_mode":"uniform",
"ecn_mode":"standard",
{% else %}

View File

@ -4,7 +4,7 @@
"MIRROR_SESSION_TABLE:everflow": {
"src_ip": "{{ minigraph_lo_interfaces[0]['addr'] }}",
"dst_ip": "{{ erspan_dst[0] }}",
{% if minigraph_hwsku in [ 'ACS-MSN2700', 'ACS-MSN2410', 'ACS-MSN2100' ] %}
{% if onie_switch_asic == "mlnx" %}
"gre_type": "0x6558",
"queue": "1",
{% else %}

View File

@ -48,6 +48,8 @@ elif [ "$HWSKU" == "Arista-7050-QX32" ]; then
SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json "
elif [ "$HWSKU" == "ACS-MSN2700" ]; then
SWSSCONFIG_ARGS+="msn2700.32ports.buffers.json msn2700.32ports.qos.json "
elif [ "$HWSKU" == "ACS-MSN2740" ]; then
SWSSCONFIG_ARGS+="msn2740.32ports.buffers.json msn2740.32ports.qos.json "
fi
for file in $SWSSCONFIG_ARGS; do

View File

@ -20,7 +20,7 @@ debs/{{ deb }}{{' '}}
COPY ["start.sh", "mlnx-fw-upgrade.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["/debs/fw-SPC.mfa", "/etc/mlnx/"]
COPY ["/debs/fw-SPC-*-EVB.mfa", "/etc/mlnx/fw-SPC.mfa"]
## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y

View File

@ -1,7 +1,7 @@
#!/bin/bash
query_retry_count_max="10"
required_fw_version="13.1220.0130"
required_fw_version="13.1224.0140"
fw_file=/etc/mlnx/fw-SPC.mfa
run_or_fail() {

View File

@ -1,5 +1,5 @@
# mellanox firmware
MLNX_FW = fw-SPC.mfa
MLNX_FW = fw-SPC-rel-13_1224_0140-EVB.mfa
$(MLNX_FW)_URL = $(MLNX_SDK_BASE_URL)/$(MLNX_FW)
SONIC_ONLINE_FILES += $(MLNX_FW)

View File

@ -1,6 +1,6 @@
# Mellanox HW Management
MLNX_HW_MANAGEMENT_VERSION = V1.0.0100
MLNX_HW_MANAGEMENT_VERSION = V1.0.0160
export MLNX_HW_MANAGEMENT_VERSION

View File

@ -1,7 +1,7 @@
# Mellanox SAI
MLNX_SAI_VERSION = 161120
MLNX_SAI_REVISION = b57b458ff060adb2b1df629e330431a391a3b83e
MLNX_SAI_REVISION = ba3ccd6de8e5b82fa2cdfc30f9b8b1f1882bfede
export MLNX_SAI_VERSION MLNX_SAI_REVISION

View File

@ -1,5 +1,5 @@
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/35e5e8739bec80c19053b7bb9cf6d083b8144fb5/sdk
MLNX_SDK_VERSION = 4.2.3102
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/ba3ccd6de8e5b82fa2cdfc30f9b8b1f1882bfede/sdk
MLNX_SDK_VERSION = 4.2.3130
MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2) $(SX_ACL_RM) $(SX_COMPLIB) \
$(SX_EXAMPLES) $(SX_GEN_UTILS) $(SX_SCEW) $(SX_SDN_HAL) \
$(SXD_LIBS) $(TESTX)