From fb48f771792749d449c117aee046c813b9cdfb0b Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Fri, 6 Dec 2019 16:08:10 +0000 Subject: [PATCH] [mellanox]: Add new Mellanox-SN3800-D112C8 sku. Signed-off-by: Nazarii Hnydyn --- .../x86_64-mlnx_msn2700-r0/plugins/sfputil.py | 2 +- .../Mellanox-SN3800-D112C8/buffers.json.j2 | 1 + .../buffers_defaults_t0.j2 | 1 + .../buffers_defaults_t1.j2 | 1 + .../pg_profile_lookup.ini | 1 + .../Mellanox-SN3800-D112C8/port_config.ini | 105 ++++++++++++++++++ .../Mellanox-SN3800-D112C8/qos.json.j2 | 1 + .../Mellanox-SN3800-D112C8/sai.profile | 1 + .../Mellanox-SN3800-D112C8/sai_3800.xml | 1 + .../sonic_platform/chassis.py | 2 +- .../mlnx-platform-api/sonic_platform/psu.py | 2 +- .../sonic_platform/thermal.py | 2 +- 12 files changed, 116 insertions(+), 4 deletions(-) create mode 120000 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers.json.j2 create mode 120000 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2 create mode 120000 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2 create mode 120000 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/pg_profile_lookup.ini create mode 100644 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/port_config.ini create mode 120000 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/qos.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai.profile create mode 120000 device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai_3800.xml diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py index 7c4f33f74973..40734349a230 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py @@ -41,7 +41,7 @@ # magic code defnition for port number, qsfp port position of each hwsku # port_position_tuple = (PORT_START, QSFP_PORT_START, PORT_END, PORT_IN_BLOCK, EEPROM_OFFSET) -hwsku_dict = {'ACS-MSN2700': 0, 'Mellanox-SN2700': 0, 'Mellanox-SN2700-D48C8': 0, "LS-SN2700":0, 'ACS-MSN2740': 0, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2010': 3, 'ACS-MSN3700': 0, 'ACS-MSN3700C': 0, 'ACS-MSN3800': 4} +hwsku_dict = {'ACS-MSN2700': 0, 'Mellanox-SN2700': 0, 'Mellanox-SN2700-D48C8': 0, "LS-SN2700":0, 'ACS-MSN2740': 0, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2010': 3, 'ACS-MSN3700': 0, 'ACS-MSN3700C': 0, 'ACS-MSN3800': 4, 'Mellanox-SN3800-D112C8': 4} port_position_tuple_list = [(0, 0, 31, 32, 1), (0, 0, 15, 16, 1), (0, 48, 55, 56, 1), (0, 18, 21, 22, 1), (0, 0, 63, 64, 1)] def log_info(msg, also_print_to_console=False): diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers.json.j2 new file mode 120000 index 000000000000..add8bf8bb7c2 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers.json.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2 new file mode 120000 index 000000000000..85f0b6b6b354 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2 new file mode 120000 index 000000000000..3bb496a5103b --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/pg_profile_lookup.ini new file mode 120000 index 000000000000..252ae8d4149b --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/pg_profile_lookup.ini @@ -0,0 +1 @@ +../../x86_64-mlnx_msn3700-r0/ACS-MSN3700/pg_profile_lookup.ini \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/port_config.ini b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/port_config.ini new file mode 100644 index 000000000000..9559119c7e38 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/port_config.ini @@ -0,0 +1,105 @@ +# name lanes alias index speed fec +Ethernet0 0,1 etp1a 0 50000 none +Ethernet2 2,3 etp1b 0 50000 none +Ethernet4 4,5 etp2a 1 50000 none +Ethernet6 6,7 etp2b 1 50000 none +Ethernet8 8,9 etp3a 2 50000 none +Ethernet10 10,11 etp3b 2 50000 none +Ethernet12 12,13,14,15 etp4 3 50000 none +Ethernet16 16,17 etp5a 4 50000 none +Ethernet18 18,19 etp5b 4 50000 none +Ethernet20 20,21 etp6a 5 50000 none +Ethernet22 22,23 etp6b 5 50000 none +Ethernet24 24,25 etp7a 6 50000 none +Ethernet26 26,27 etp7b 6 50000 none +Ethernet28 28,29,30,31 etp8 7 50000 none +Ethernet32 32,33 etp9a 8 50000 none +Ethernet34 34,35 etp9b 8 50000 none +Ethernet36 36,37 etp10a 9 50000 none +Ethernet38 38,39 etp10b 9 50000 none +Ethernet40 40,41 etp11a 10 50000 none +Ethernet42 42,43 etp11b 10 50000 none +Ethernet44 44,45,46,47 etp12 11 50000 none +Ethernet48 48,49 etp13a 12 50000 none +Ethernet50 50,51 etp13b 12 50000 none +Ethernet52 52,53 etp14a 13 50000 none +Ethernet54 54,55 etp14b 13 50000 none +Ethernet56 56,57 etp15a 14 50000 none +Ethernet58 58,59 etp15b 14 50000 none +Ethernet60 60,61,62,63 etp16 15 50000 none +Ethernet64 64,65 etp17a 16 50000 none +Ethernet66 66,67 etp17b 16 50000 none +Ethernet68 68,69 etp18a 17 50000 none +Ethernet70 70,71 etp18b 17 50000 none +Ethernet72 72,73 etp19a 18 50000 none +Ethernet74 74,75 etp19b 18 50000 none +Ethernet76 76,77,78,79 etp20 19 50000 none +Ethernet80 80,81 etp21a 20 50000 none +Ethernet82 82,83 etp21b 20 50000 none +Ethernet84 84,85 etp22a 21 50000 none +Ethernet86 86,87 etp22b 21 50000 none +Ethernet88 88,89 etp23a 22 50000 none +Ethernet90 90,91 etp23b 22 50000 none +Ethernet92 92,93,94,95 etp24 23 50000 none +Ethernet96 96,97,98,99 etp25 24 100000 rs +Ethernet100 100,101,102,103 etp26 25 100000 rs +Ethernet104 104,105 etp27a 26 50000 none +Ethernet106 106,107 etp27b 26 50000 none +Ethernet108 108,109,110,111 etp28 27 50000 none +Ethernet112 112,113,114,115 etp29 28 100000 rs +Ethernet116 116,117,118,119 etp30 29 100000 rs +Ethernet120 120,121 etp31a 30 50000 none +Ethernet122 122,123 etp31b 30 50000 none +Ethernet124 124,125,126,127 etp32 31 50000 none +Ethernet128 128,129,130,131 etp33 32 100000 rs +Ethernet132 132,133,134,135 etp34 33 100000 rs +Ethernet136 136,137 etp35a 34 50000 none +Ethernet138 138,139 etp35b 34 50000 none +Ethernet140 140,141,142,143 etp36 35 50000 none +Ethernet144 144,145,146,147 etp37 36 100000 rs +Ethernet148 148,149,150,151 etp38 37 100000 rs +Ethernet152 152,153 etp39a 38 50000 none +Ethernet154 154,155 etp39b 38 50000 none +Ethernet156 156,157,158,159 etp40 39 50000 none +Ethernet160 160,161 etp41a 40 50000 none +Ethernet162 162,163 etp41b 40 50000 none +Ethernet164 164,165 etp42a 41 50000 none +Ethernet166 166,167 etp42b 41 50000 none +Ethernet168 168,169 etp43a 42 50000 none +Ethernet170 170,171 etp43b 42 50000 none +Ethernet172 172,173,174,175 etp44 43 50000 none +Ethernet176 176,177 etp45a 44 50000 none +Ethernet178 178,179 etp45b 44 50000 none +Ethernet180 180,181 etp46a 45 50000 none +Ethernet182 182,183 etp46b 45 50000 none +Ethernet184 184,185 etp47a 46 50000 none +Ethernet186 186,187 etp47b 46 50000 none +Ethernet188 188,189,190,191 etp48 47 50000 none +Ethernet192 192,193 etp49a 48 50000 none +Ethernet194 194,195 etp49b 48 50000 none +Ethernet196 196,197 etp50a 49 50000 none +Ethernet198 198,199 etp50b 49 50000 none +Ethernet200 200,201 etp51a 50 50000 none +Ethernet202 202,203 etp51b 50 50000 none +Ethernet204 204,205,206,207 etp52 51 50000 none +Ethernet208 208,209 etp53a 52 50000 none +Ethernet210 210,211 etp53b 52 50000 none +Ethernet212 212,213 etp54a 53 50000 none +Ethernet214 214,215 etp54b 53 50000 none +Ethernet216 216,217 etp55a 54 50000 none +Ethernet218 218,219 etp55b 54 50000 none +Ethernet220 220,221,222,223 etp56 55 50000 none +Ethernet224 224,225 etp57a 56 50000 none +Ethernet226 226,227 etp57b 56 50000 none +Ethernet228 228,229 etp58a 57 50000 none +Ethernet230 230,231 etp58b 57 50000 none +Ethernet232 232,233 etp59a 58 50000 none +Ethernet234 234,235 etp59b 58 50000 none +Ethernet236 236,237,238,239 etp60 59 50000 none +Ethernet240 240,241 etp61a 60 50000 none +Ethernet242 242,243 etp61b 60 50000 none +Ethernet244 244,245 etp62a 61 50000 none +Ethernet246 246,247 etp62b 61 50000 none +Ethernet248 248,249 etp63a 62 50000 none +Ethernet250 250,251 etp63b 62 50000 none +Ethernet252 252,253,254,255 etp64 63 50000 none diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/qos.json.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/qos.json.j2 new file mode 120000 index 000000000000..eccf286dc879 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/qos.json.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai.profile b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai.profile new file mode 100644 index 000000000000..367f6c4e99c0 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_3800.xml diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai_3800.xml b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai_3800.xml new file mode 120000 index 000000000000..686d6298865c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/sai_3800.xml @@ -0,0 +1 @@ +../ACS-MSN3800/sai_3800.xml \ No newline at end of file diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py index 1f9af04319a1..5e8c76ccd617 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py @@ -49,7 +49,7 @@ # magic code defnition for port number, qsfp port position of each hwsku # port_position_tuple = (PORT_START, QSFP_PORT_START, PORT_END, PORT_IN_BLOCK, EEPROM_OFFSET) -hwsku_dict_port = {'ACS-MSN2010': 3, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2700': 0, 'Mellanox-SN2700': 0, 'Mellanox-SN2700-D48C8': 0, 'LS-SN2700':0, 'ACS-MSN2740': 0, 'ACS-MSN3700': 0, 'ACS-MSN3700C': 0, 'ACS-MSN3800': 4} +hwsku_dict_port = {'ACS-MSN2010': 3, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2700': 0, 'Mellanox-SN2700': 0, 'Mellanox-SN2700-D48C8': 0, 'LS-SN2700':0, 'ACS-MSN2740': 0, 'ACS-MSN3700': 0, 'ACS-MSN3700C': 0, 'ACS-MSN3800': 4, 'Mellanox-SN3800-D112C8': 4} port_position_tuple_list = [(0, 0, 31, 32, 1), (0, 0, 15, 16, 1), (0, 48, 55, 56, 1), (0, 18, 21, 22, 1), (0, 0, 63, 64, 1)] class Chassis(ChassisBase): diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py b/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py index 0e4c3fd50f7a..59893f21cd0a 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py @@ -37,7 +37,7 @@ # in most SKUs the file psuX_curr, psuX_volt and psuX_power contain current, voltage and power data respectively. # but there are exceptions which will be handled by the following dictionary -hwsku_dict_psu = {'ACS-MSN3700': 1, 'ACS-MSN3700C': 1, 'ACS-MSN3800': 1} +hwsku_dict_psu = {'ACS-MSN3700': 1, 'ACS-MSN3700C': 1, 'ACS-MSN3800': 1, 'Mellanox-SN3800-D112C8': 1} psu_profile_list = [ # default filename convention { diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py index 8030db19edaf..67fbe3a6b51b 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py @@ -106,7 +106,7 @@ THERMAL_API_GET_HIGH_THRESHOLD ] -hwsku_dict_thermal = {'ACS-MSN2700': 0, 'LS-SN2700':0, 'ACS-MSN2740': 3, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2010': 4, 'ACS-MSN3700': 5, 'ACS-MSN3700C': 6, 'Mellanox-SN2700': 0, 'Mellanox-SN2700-D48C8': 0, 'ACS-MSN3800': 7} +hwsku_dict_thermal = {'ACS-MSN2700': 0, 'LS-SN2700':0, 'ACS-MSN2740': 3, 'ACS-MSN2100': 1, 'ACS-MSN2410': 2, 'ACS-MSN2010': 4, 'ACS-MSN3700': 5, 'ACS-MSN3700C': 6, 'Mellanox-SN2700': 0, 'Mellanox-SN2700-D48C8': 0, 'ACS-MSN3800': 7, 'Mellanox-SN3800-D112C8': 7} thermal_profile_list = [ # 2700 {