Commit Graph

9 Commits

Author SHA1 Message Date
Ciju Rajan K
609cbdd0f3
[Juniper] Platform bug fixes / improvements (#5541)
* [Juniper] Platform bug fixes / improvements

This patch set introduces the following changes for
the two platforms.

 - QFX5210
   - Fixes a driver bug related to reboot notifier
   - Disable pcied
   - Introduces a wrapper script for fast / warm reboots
     for unloading the driver containing reboot handler
   - Support for PSM4 optics in media_settings

 - QFX5200
   - BCM configuration file updates
   - Bug fixes for EM policy
   - Fixes a driver bug related to reboot notifier
   - Introduces a wrapper script for fast / warm reboots
     for unloading the driver containing reboot handler
   - Disable pcied
   - Support for PSM4 optics

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2020-11-10 22:13:23 -08:00
ciju-juniper
46cc6968d7
[Juniper][QFX52xx] Platform fixes/enhancements (#4953)
1) Fixing the issues while applying platform TxCTLE settings in sfputil.py for QFX5200
 2) Adding the support for transceiver dom threshold info in sfputil.py for both  QFX5210 & QFX5200 platforms
 3) Updating the sfputil.py for QFX5210 & QFX5200 platforms
4) Adding a new platform specific command 'show_thresholds' to display the FAN dutycycle percentage for various temperature ranges (for both AFI & AFO QFX5200 systems).

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2020-07-14 14:20:41 -07:00
ciju-juniper
dd4cf912a6
[Juniper][QFX5210] Fixing a few platform issues (#4857)
This patch addresses the following issues:
 1) Platform drivers were not loading in the latest images. Fixed
    the intialization script to make sure that all the drivers are
    loaded.
 2) Getting rid of "pstore: crypto_comp_decompress failed, ret = -22!"
    messages during the kernel boot, after moving to 4.19 kernel. The
    solution is to remove the files under '/sys/fs/pstore' directory.

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2020-06-28 11:11:34 -07:00
ciju-juniper
d1940b2cf4
[Juniper] Re-organizing sonic_platform modules (#4448)
This patch set implements the following:
 - Fixes the conflicts in chassis.py / platform.py in sonic_platfrom
 - Consolidating the common library files in sonic_platform
 - Moving QFX5210 specific drivers to qfx5210/modules
 - Moving Juniper common fpga drivers to common/modules
 - Cleaning up the platform driver files
 - Bug fixes in QFX5210 platform monitor & initialiazation script
 - Fixing the bugs in QFX5210 eeprom parsing

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2020-04-21 02:25:51 -07:00
ciju-juniper
695652c9d1
[platform]: Adding platform support for Juniper QFX5200 (#4376)
This is a 1RU switch with 32 QSFP28 (40G/100G) ports on
Broadcom Tomahawk I chipset. CPU used in QFX5200-32C-S
is Intel Ivy Bridge. The machine has Redundant and
hot-swappable Power Supply (1+1) and also has Redundant
and hot swappable fans (5).

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
Signed-off-by: Ashish Bhensdadia <bashish@juniper.net>
2020-04-16 03:09:32 -07:00
Kalimuthu-Velappan
7d2ebf8116
[build]: support for DPKG local caching (#4117)
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:

           https://github.com/Azure/SONiC/pull/559
2020-03-11 20:04:52 -07:00
ciju-juniper
f126258d5f [Juniper][QFX5210] Platform monitoring updates (#3899)
As part of this commit, there are a few enhancements being
made for EM policy implementation: a) Introduced hysteresis
algorithm to prevent fan hunting b) Reading ASIC temperature
to make decision for fan speed.

As part of the PR# 3599, Workaround for the boot problem
from secondary bios was addressed. When the SONiC image is
upgraded, this resulted in creating multiple entries for
BOOTX64.EFI. To fix the problem, as part of this changeset,
introducing a check to see if there is already an UEFI entry
for BOOTX64.EFI and accordingly creating / skipping the UEFI
entry.

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2019-12-13 09:06:05 -08:00
ciju-juniper
6cb445cb9e [Juniper][QFX5210]Adding the system reboot handler (#3599)
The following changes are done as part of this commit:

- Adding the system reboot handler
- Adding swizzle reset case for the reboot reason
- Workaround for the boot problem from Golden bios
- Adding the logging messages for platform scripts
- EEPROM parsing and library routines
2019-10-19 20:46:32 -07:00
ciju-juniper
fdcb69d048 [devices]: Adding platform support for Juniper QFX5210 (#3270)
This switch has 64 QSFP28 (40G/100G) ports, 2 SFP+ (1G/10G) ports
on Broadcom Tomahawk II chipset. CPU used in QFX5210-64C-S is
Intel Broadwell-DE. The machine has Redundant and hot-swappable
Power Supply (1+1) and also has Redundant and hot swappable fans (3+1).

Signed-off-by: Ciju Rajan K <crajank@juniper.net>
2019-09-06 07:52:45 -07:00