Skip to content

[Mellanox] Fix thermal control bugs#4252

Closed
Junchao-Mellanox wants to merge 47 commits intosonic-net:masterfrom
Junchao-Mellanox:thermal-fix
Closed

[Mellanox] Fix thermal control bugs#4252
Junchao-Mellanox wants to merge 47 commits intosonic-net:masterfrom
Junchao-Mellanox:thermal-fix

Conversation

@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator

- What I did

  1. Fix issue: add PSU fan no matter sysfs exists or not
  2. Fix issue: get fan direction per drawer index instead of per fan index
  3. Fix issue: clarify logs for PSU absence and PSU power off
  4. Add 2100/2010 support to get fan presence status
  5. Fix issue: pmon docker exists on 3800
  6. Add unit test for code changes

- How I did it

- How to verify it

Manually verify and run existing regression cases

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator Author

Depend on sonic-net/sonic-platform-common#78

Kalimuthu-Velappan and others added 6 commits March 11, 2020 20:04
DPKG caching framework provides the infrastructure to cache the sonic module/target .deb files into a local cache by tracking the target dependency files.SONIC build infrastructure is designed as a plugin framework where any new source code can be easily integrated into sonic as a module and that generates output as a .deb file. The source code compilation of a module is completely independent of other modules compilation. Inter module dependency is resolved through build artifacts like header files, libraries, and binaries in the form of Debian packages. For example module A depends on module B. While module A is being built, it uses B's .deb file to install it in the build docker.

The DPKG caching framework provides an infrastructure that caches a module's deb package and restores it back to the build directory if its dependency files are not modified. When a module is compiled for the first time, the generated deb package is stored at the DPKG cache location. On the subsequent build, first, it checks the module dependency file modification. If none of the dependent files is changed, it copies the deb package from the cache location, otherwise, it goes for local compilation and generates the deb package. The modified files should be checked-in to get the newer cache deb package.

This provides a huge improvement in build time and also supports the true incremental build by tracking the dependency files.

- How I did it
It takes two global arguments to enable the DPKG caching, the first one indicates the caching method and the second one describes the location of the cache.
SONIC_DPKG_CACHE_METHOD=cache
SONIC_DPKG_CACHE_SOURCE=

    where  SONIC_DPKG_CACHE_METHOD - Default method is 'cache' for deb package caching
                            none:     no caching
                            cache:    cache from local directory
Dependency file tracking:
Dependency files are tracked for each target in two levels.
1. Common make infrastructure files - rules/config, rules/functions, slave.mk etc.
2. Per module files - files which are specific to modules, Makefile, debian/rules, patch files, etc.

    For example: dependency files for Linux Kernel - src/sonic-linux-kernel,

            SPATH       := $($(LINUX_HEADERS_COMMON)_SRC_PATH)
            DEP_FILES   := $(SONIC_COMMON_FILES_LIST) rules/linux-kernel.mk rules/linux-kernel.dep
            DEP_FILES   += $(SONIC_COMMON_BASE_FILES_LIST)
            SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))

            DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) \
                         $(KERNEL_PROCURE_METHOD) $(KERNEL_CACHE_PATH)

            $(LINUX_HEADERS_COMMON)_CACHE_MODE  := GIT_CONTENT_SHA
            $(LINUX_HEADERS_COMMON)_DEP_FLAGS   := $(DEP_FLAGS)
            $(LINUX_HEADERS_COMMON)_DEP_FILES   := $(DEP_FILES)
            $(LINUX_HEADERS_COMMON)_SMDEP_FILES := $(SMDEP_FILES)
            $(LINUX_HEADERS_COMMON)_SMDEP_PATHS := $(SPATH)
Cache file tracking:
The Cache file is a compressed TAR ball of a module's target DEB file and its derived-target DEB files.
The cache filename is formed with the following format

    FORMAT:
            <module deb filename>.<24 byte of DEP SHA hash >-<24 byte of MOD SHA hash>.tgz
            Eg:
              linux-headers-4.9.0-9-2-common_4.9.168-1+deb9u3_all.deb-23658712fd21bb776fa16f47-c0b63ef593d4a32643bca228.tgz

            < 24-byte DEP SHA value > - the SHA value is derived from all the dependent packages.
            < 24-byte MOD SHA value > - the SHA value is derived from either of the following.
                    GIT_COMMIT_SHA  - SHA value of the last git commit ID if it is a submodule
                    GIT_CONTENT_SHA - SHA value is generated from the content of the target dependency files.
Target Specific rules:
Caching can be enabled/disabled on a global level and also on the per-target level.

            $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \
                    $(call dpkg_depend,$(DEBS_PATH)/%.dep )
            $(HEADER)


            # Load the target deb from DPKG cache
            $(call LOAD_CACHE,$*,$@)


            # Skip building the target if it is already loaded from cache
            if [ -z '$($*_CACHE_LOADED)' ] ; then

                  .....
                 # Rules for Generating the target DEB file.
                  .....

                  # Save the target deb into DPKG cache
                  $(call SAVE_CACHE,$*,$@)
            fi


            $(FOOTER)


    The make rule-'$(call dpkg_depend,$(DEBS_PATH)/%.dep )' checks for target dependency file modification. If it is newer than the target, it will go for re-generation of that target.

    Two main macros 'LOAD_CACHE' and 'SAVE_CACHE' are used for loading and storing the cache contents.
    The 'LOAD_CACHE' macro is used to load the cache file from cache storage and extracts them into the target folder. It is done only if target dependency files are not modified by checking the GIT file status, otherwise, cache loading is skipped and full compilation is performed.
    It also updates the target-specific variable to indicate the cache is loaded or not.
    The 'SAVE_CACHE' macro generates the compressed tarball of the cache file and saves them into cache storage. Saving into the cache storage is protected with a lock.
- How to verify it

    The caching functionality is verified by enabling it in Linux kernel submodule.
    It uses the cache directory as 'target/cache' where Linux cache file gets stored on the first-time build and it is picked from the cache location during the subsequent clean build.
- Description for the changelog
The DPKG caching framework provides the infrastructure to save the module-specific deb file to be cached by tracking the module's dependency files.
If the module's dependency files are not changed, it restores the module deb files from the cache storage.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

DOCUMENT PR:

           sonic-net/SONiC#559
… (sonic-net#4250)

* [Service] Added NAT entry into CONTAINER_FEATURE. Fixes sonic-net#4247.

Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
I added dependencies to support the NAT feature on the virtual switch.

Signed-off-by: Danny Allen <daall@microsoft.com>
stephenxs
stephenxs previously approved these changes Mar 16, 2020
* Build Arista drivers using DPKG_DEB
* Update arista platform submodule
@jleveque
Copy link
Copy Markdown
Contributor

@Junchao-Mellanox: sonic-net/sonic-platform-common#78 has merged. Please update the submodule in this PR.

@keboliu
Copy link
Copy Markdown
Collaborator

keboliu commented Mar 18, 2020

retest this please

lguohan and others added 6 commits March 18, 2020 11:01
setup ntp server to do the test

Signed-off-by: Guohan Lu <lguohan@gmail.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
We believe that the supervisord issue in face of clock rolling backwards
has been addressed. Therefore reverting change 2598 to allow ntp sync
to right clock at the start up time.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
* Fix BFN syncd RPC compilation
* Remove empty line
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
@jleveque
Copy link
Copy Markdown
Contributor

Retest vsimage please

@jleveque
Copy link
Copy Markdown
Contributor

Retest mellanox please

xumia and others added 3 commits March 20, 2020 08:02
* Add cache build flag

* Fix bug
…ntainer (sonic-net#4101)

* fancontrol restart

* Cleanup the default setting for exitcodes

* Remove the unnecessary stopwaitsecs default settin
shilimkarvg and others added 3 commits March 19, 2020 21:43
marvell sonic arm64 uboot fit flattened blob file.
Used by uboot as refered in this change
https://github.com/Azure/sonic-buildimage/pull/4043/files#diff-f6372e5829e59e22aa068273c238ba83

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
* [makefile] make error message clearer with instructions

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator Author

Retest mellanox please

jleveque and others added 15 commits March 19, 2020 23:31
… VLAN interfaces (sonic-net#4229)

- Support parsing egress ACLs from minigraph file specified by the "OutAcl" element
- Support attaching ACLs to VLAN interfaces
Signed-off-by: Ciju Rajan K <crajank@juniper.net>
Signed-off-by: Ashish Bhensdadia <bashish@juniper.net>
Co-authored-by: Ashish Kumar Bhensdadia <ashish@sonic-server.englab.juniper.net>
Conflicts:
	device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
	platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py
Conflicts:
	platform/mellanox/mlnx-platform-api/sonic_platform/psu.py
Conflicts:
	platform/mellanox/mlnx-platform-api/sonic_platform/psu.py
@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator Author

I

mssonicbld added a commit that referenced this pull request Feb 19, 2026
…atically (#25250)

#### Why I did it
src/sonic-utilities
```
* 0315da21 - (HEAD -> 202511, origin/202511) [LACP retry-count] Syntax Fix for Trixie (#4280) (6 hours ago) [Yair Raviv]
* 4420954e - Fix dump port state CLI command crash on multi-asic platforms (#4276) (5 days ago) [mssonicbld]
* a3ad30be - [Mellanox] Add restricted sysfs list for fw control modules (#4202) (13 days ago) [mssonicbld]
* 16390921 - Fix j2 files not getting packaged (#4252) (13 days ago) [mssonicbld]
* 6b9b0dce - [hft]: HFT config/show cli (#4243) (2 weeks ago) [mssonicbld]
* 529b6479 - [sfputil] Fix issue: should not do low power mode or reset for non-present ports (#4241) (2 weeks ago) [mssonicbld]
* ad70c8f2 - Update bash completions for sonic-utilities commands (#4234) (3 weeks ago) [mssonicbld]
* 667f4b32 - [202511][GCU] Update WRED_PROFILE and BUFFER_POOL validators for GCU (#4226) (3 weeks ago) [Dev Ojha]
* 88b3899d - Fix sonic-kdump-config for running commands with pipe (#4220) (3 weeks ago) [mssonicbld]
* e4881b02 - Skip IP range duplicate check in validate_bgp_peer_group for different vnets (#4215) (4 weeks ago) [mssonicbld]
* 9c24925a - Fix syntax and semantic errors in kdump remote feature (#4212) (4 weeks ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Mar 13, 2026
…lly (#25846)

#### Why I did it
src/sonic-swss
```
* 4b8f649 - (HEAD -> master, origin/master, origin/HEAD) Merge pull request #4261 from bibhuprasad-hcl/bibhu_swss_p4_branch14 (2 hours ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log a367ddb - [P4Orch] Remove code associated with old L3 multicast database format. (6 hours ago) [mint570]
|/ 
* f94622a - Optimize memory usage in ResponsePublisher queue (#4328) (7 hours ago) [Santhosh Thodupunoori]
* dc7210f - Merge pull request #4258 from bibhuprasad-hcl/bibhu_swss_p4_branch_11_12_13 (8 hours ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 49df9e7 - [P4Orch]Migrate to use updateMulticastGroupEntries, verifyState to new database schema format, processMulticastGroupEntries and drainMulticastGroupEntries. (13 hours ago) [mint570]
|/ 
* d084258 - Suppressing the ERR logs (#4265) (35 hours ago) [Dhanasekar Rathinavel]
* 6a931d9 - Fix debug flexcounter uninstall to skip non-PHY ports (#4103) (2 days ago) [manish1-arista]
* fa37c5c - [Marvell-Teralynx][PFCWD]: Fix pfc_detect filename to align with asic_type (#3968) (2 days ago) [jithenderkondam]
* 57b12c1 - Merge pull request #4238 from ksravani-hcl/p4orch_g3 (4 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 6b52aae - Add IPv6 src IP as new ternary key field for table ipv6_tunnel_termination_table (6 days ago) [mint570]
|/ 
* e09a0d0 - Merge pull request #4169 from divyagayathri-hcl/ip_multicast_5 (6 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log b96ec61 - [P4Orch] Implement drain, validate and verifyState entry functions in IP multicast table manager. (6 days ago) [mint570]
|/ 
* bebc9e4 - Merge pull request #4163 from divyagayathri-hcl/ip_multicast_3 (6 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 0df5456 - [P4Orch] Implement createIpMulticastEntries, deleteIpMulticastEntries & updateIpMulticastEntries in new IP multicast table manager. (7 days ago) [mint570]
|/ 
* 558a6d8 - Merge pull request #4175 from ksravani-hcl/sws_7 (7 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 45a1e14 - Enable use of SAI L2 multicast and add p4orch mocks (7 days ago) [mint570]
|/ 
* 6daa5ce - Merge pull request #4147 from divyagayathri-hcl/sws_4 (7 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 2ffdab3 - Add TunnelDecapGroupManager (8 days ago) [mint570]
|/ 
* ef37109 - Merge pull request #4082 from divyagayathri-hcl/set_ip_nexthop_and_disable_rewrites (8 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log c1f53c5 - Merge branch 'master' into set_ip_nexthop_and_disable_rewrites (8 days ago) [divyagayathri-hcl]
| |\ 
| |/ 
|/| 
* | e108aec - [DASH] Add support for multiple trusted VNI ranges and values (#4252) (8 days ago) [Lawrence Lee]
* | 5426194 - Merge pull request #4132 from divyagayathri-hcl/18_multicast (9 days ago) [StephenWangGoogle]
|\ \ 
| failure_prs.log skip_prs.log | dc55967 - [P4Orch] Update route manager & verifyState validate functions and to implement drain rout entried to support multicast action. (9 days ago) [mint570]
|/ / 
| failure_prs.log skip_prs.log aba1104 - [P4Orch] Add support for action set_ip_nexthop_and_disable_rewrites in the next hop manager. (10 days ago) [mint570]
|/ 
* 3f77e90 - Merge pull request #4250 from bibhuprasad-hcl/bibhu_swss_p4_branch_8_9_10 (10 days ago) [StephenWangGoogle]
* 179e86f - [P4Orch] Migrate to new schema format for REPLICATION_MULTICAST_TABLE and to use addMulticastGroupEntries and deleteMulticastGroupEntries. (11 days ago) [mint570]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.