From d4975ac68e607f60ab72b2ea6141580ce982d21b Mon Sep 17 00:00:00 2001 From: noaOrMlnx Date: Tue, 4 Feb 2025 16:35:07 +0200 Subject: [PATCH] [Mellanox] Update SN5640 platform to run as chipless - Update platform_wait for SN5640 to start pmon without waiting - Remove requirement for pmon to start after syncd - Disable only syncd and swss features - Set pmon delay to false, so pmon will not wait for port init - Disable xcvrd process inside PMON --- .../pmon_daemon_control.json | 6 ----- .../pmon_daemon_control.json | 6 ----- .../x86_64-nvidia_sn5640-r0/platform_wait | 27 ++++++++++++++++++- .../pmon_daemon_control.json | 2 +- files/build_templates/init_cfg.json.j2 | 6 ++--- files/build_templates/pmon.service.j2 | 2 +- 6 files changed, 31 insertions(+), 18 deletions(-) delete mode 100644 device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C448O16/pmon_daemon_control.json delete mode 100644 device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C512S2/pmon_daemon_control.json mode change 120000 => 100755 device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait diff --git a/device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C448O16/pmon_daemon_control.json b/device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C448O16/pmon_daemon_control.json deleted file mode 100644 index 208fa63ca2..0000000000 --- a/device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C448O16/pmon_daemon_control.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "skip_ledd": true, - "skip_fancontrol": true, - "skip_xcvrd_cmis_mgr": false -} - diff --git a/device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C512S2/pmon_daemon_control.json b/device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C512S2/pmon_daemon_control.json deleted file mode 100644 index 208fa63ca2..0000000000 --- a/device/mellanox/x86_64-nvidia_sn5640-r0/Mellanox-SN5640-C512S2/pmon_daemon_control.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "skip_ledd": true, - "skip_fancontrol": true, - "skip_xcvrd_cmis_mgr": false -} - diff --git a/device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait b/device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait deleted file mode 120000 index 4b30bd4298..0000000000 --- a/device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_wait \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait b/device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait new file mode 100755 index 0000000000..d70261f61e --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5640-r0/platform_wait @@ -0,0 +1,26 @@ +#!/usr/bin/python3 + +# +# Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. +# Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +from sonic_platform.device_data import DeviceDataManager +from sonic_py_common.logger import Logger + +logger = Logger(log_identifier='platform_wait') +logger.log_notice('Nvidia: Set True for PMON dependencies ready') +sys.exit(0) diff --git a/device/mellanox/x86_64-nvidia_sn5640-r0/pmon_daemon_control.json b/device/mellanox/x86_64-nvidia_sn5640-r0/pmon_daemon_control.json index fefdfb3273..325fb3b2bc 100644 --- a/device/mellanox/x86_64-nvidia_sn5640-r0/pmon_daemon_control.json +++ b/device/mellanox/x86_64-nvidia_sn5640-r0/pmon_daemon_control.json @@ -1,6 +1,6 @@ { "skip_ledd": true, "skip_fancontrol": true, - "skip_xcvrd_cmis_mgr": true + "skip_xcvrd": true } diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index 1d1c1817b4..84b9a92e06 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -64,10 +64,10 @@ {%- set features = [("bgp", "{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}disabled{% else %}enabled{% endif %}", false, "enabled"), ("database", "always_enabled", false, "always_enabled"), ("lldp", "enabled", true, "enabled"), - ("pmon", "enabled", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %}False{% else %}True{% endif %}", "enabled"), + ("pmon", "enabled", false, "enabled"), ("snmp", "enabled", true, "enabled"), - ("swss", "enabled", false, "enabled"), - ("syncd", "enabled", false, "enabled")] %} + ("swss", "disabled", false, "disabled"), + ("syncd", "disabled", false, "disabled")] %} {%- if include_router_advertiser == "y" %}{% do features.append(("radv", "enabled", false, "enabled")) %}{% endif %} {%- if include_teamd == "y" %}{% do features.append(("teamd", "{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] %}disabled{% else %}enabled{% endif %}", false, "enabled")) %}{% endif %} {% do features.append(("dhcp_relay", "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] is not in ['ToRRouter', 'EPMS', 'MgmtTsToR', 'MgmtToRRouter', 'BmcMgmtToRRouter']) %}enabled{% else %}disabled{% endif %}", false, "enabled")) %} diff --git a/files/build_templates/pmon.service.j2 b/files/build_templates/pmon.service.j2 index b2cd75ac70..ec080b7159 100644 --- a/files/build_templates/pmon.service.j2 +++ b/files/build_templates/pmon.service.j2 @@ -3,7 +3,7 @@ Description=Platform monitor container Requires=database.service config-setup.service After=database.service config-setup.service {% if sonic_asic_platform == 'mellanox' %} -After=syncd.service +#After=syncd.service {% endif %} BindsTo=sonic.target After=sonic.target