diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index da50e1cb157..67086c9a4b6 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -114,7 +114,7 @@ stages: echo "artifacts$artifacts" cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/target/versions target/ make freeze FREEZE_VERSION_OPTIONS=-r - find files/build/versions + find -L files/build/versions ordered_artifacts=$(echo "$artifacts" | grep -v -E "arm64|armhf" && echo "$artifacts" | grep -E "arm64|armhf") for artifact in $ordered_artifacts do @@ -124,14 +124,14 @@ stages: [[ "$artifact" == *arm64* || "$artifact" == *armhf* ]] && OPTIONS="-d" make freeze FREEZE_VERSION_OPTIONS="$OPTIONS" done - git diff files/build/versions + git diff files/build/versions-public displayName: 'Freeze Versions' - script: | if [ -z "$GIT_USER" ]; then echo "Skipped to send the pull request, GIT_USER not set." exit 0 fi - GIT_STATUS=$(git status --porcelain files/build/versions) + GIT_STATUS=$(git status --porcelain files/build/versions-public) if [ -z "$GIT_STATUS" ]; then echo "Skipped to send the pull request, no version change in files/build/versions" exit 0 @@ -151,8 +151,8 @@ stages: git config user.name $GIT_USER git config credential.https://github.com.username $GIT_USER - git add files/build/versions - git commit -m "[ci/build]: Upgrade SONiC package versions" + git add files/build/versions-public + git commit -s -m "[ci/build]: Upgrade SONiC package versions" git checkout -b $BRANCH_NAME git remote add remote https://github.com/$GIT_USER/$GIT_REPO git push remote HEAD:refs/heads/$BRANCH_NAME -f diff --git a/.azure-pipelines/azure-pipelines-build-alpinevs.yml b/.azure-pipelines/azure-pipelines-build-alpinevs.yml new file mode 100644 index 00000000000..c2592c1f7a8 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-build-alpinevs.yml @@ -0,0 +1,50 @@ +pr: none +trigger: none + + +name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) + +resources: + repositories: + - repository: buildimage + type: github + name: sonic-net/sonic-buildimage + endpoint: sonic-net + ref: master + + +variables: +- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage +- template: .azure-pipelines/template-variables.yml@buildimage +- name: CACHE_MODE + value: rcache +- name: ENABLE_FIPS + value: y +- name: BUILD_BRANCH + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + value: $(System.PullRequest.TargetBranch) + ${{ else }}: + value: $(Build.SourceBranchName) + + +parameters: + - name: SUBMODULE + type: string + default: ' ' + + - name: COMMIT_ID + type: string + default: ' ' + + +stages: + - stage: BuildAlpineVS + pool: sonicso1ES-amd64 + jobs: + - template: azure-pipelines-build.yml + parameters: + buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}' + jobGroups: + - name: alpinevs + SUBMODULE: ${{ parameters.SUBMODULE }} + COMMIT_ID: ${{ parameters.COMMIT_ID }} diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml index 27f15aae579..d018945625f 100644 --- a/.azure-pipelines/azure-pipelines-image-template.yml +++ b/.azure-pipelines/azure-pipelines-image-template.yml @@ -36,7 +36,7 @@ jobs: - script: | [ -n "$OVERRIDE_BUILD_OPTIONS" ] && OVERRIDE_BUILD_OPTIONS=$(OVERRIDE_BUILD_OPTIONS) BUILD_OPTIONS="$(BUILD_OPTIONS) $OVERRIDE_BUILD_OPTIONS" - if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-prestera-armhf|marvell-prestera-arm64|vpp)$"; then + if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-prestera-armhf|marvell-prestera-arm64|vpp|nvidia-bluefield)$"; then CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)" BUILD_OPTIONS="$BUILD_OPTIONS $CACHE_OPTIONS" fi diff --git a/.azure-pipelines/baseline_test/baseline.test.buildimage.yml b/.azure-pipelines/baseline_test/baseline.test.buildimage.yml index 388e25010f1..792e5868689 100644 --- a/.azure-pipelines/baseline_test/baseline.test.buildimage.yml +++ b/.azure-pipelines/baseline_test/baseline.test.buildimage.yml @@ -76,11 +76,10 @@ stages: jobs: - template: .azure-pipelines/pr_test_template.yml@sonic-mgmt parameters: - GLOBAL_PARAMS: - BUILD_REASON: ${{ parameters.BUILD_REASON }} - RETRY_TIMES: ${{ parameters.RETRY_TIMES }} - STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} - TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} + BUILD_REASON: ${{ parameters.BUILD_REASON }} + RETRY_TIMES: ${{ parameters.RETRY_TIMES }} + STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} + TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} CHECKOUT_SONIC_MGMT: ${{ parameters.CHECKOUT_SONIC_MGMT }} - stage: Test_round_2 @@ -90,11 +89,10 @@ stages: jobs: - template: .azure-pipelines/pr_test_template.yml@sonic-mgmt parameters: - GLOBAL_PARAMS: - BUILD_REASON: ${{ parameters.BUILD_REASON }} - RETRY_TIMES: ${{ parameters.RETRY_TIMES }} - STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} - TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} + BUILD_REASON: ${{ parameters.BUILD_REASON }} + RETRY_TIMES: ${{ parameters.RETRY_TIMES }} + STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} + TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} CHECKOUT_SONIC_MGMT: ${{ parameters.CHECKOUT_SONIC_MGMT }} - stage: Test_round_3 @@ -104,11 +102,10 @@ stages: jobs: - template: .azure-pipelines/pr_test_template.yml@sonic-mgmt parameters: - GLOBAL_PARAMS: - BUILD_REASON: ${{ parameters.BUILD_REASON }} - RETRY_TIMES: ${{ parameters.RETRY_TIMES }} - STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} - TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} + BUILD_REASON: ${{ parameters.BUILD_REASON }} + RETRY_TIMES: ${{ parameters.RETRY_TIMES }} + STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} + TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} CHECKOUT_SONIC_MGMT: ${{ parameters.CHECKOUT_SONIC_MGMT }} - stage: Test_round_4 @@ -118,9 +115,8 @@ stages: jobs: - template: .azure-pipelines/pr_test_template.yml@sonic-mgmt parameters: - GLOBAL_PARAMS: - BUILD_REASON: ${{ parameters.BUILD_REASON }} - RETRY_TIMES: ${{ parameters.RETRY_TIMES }} - STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} - TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} + BUILD_REASON: ${{ parameters.BUILD_REASON }} + RETRY_TIMES: ${{ parameters.RETRY_TIMES }} + STOP_ON_FAILURE: ${{ parameters.TEST_PLAN_STOP_ON_FAILURE }} + TEST_PLAN_NUM: ${{ parameters.TEST_PLAN_NUM }} CHECKOUT_SONIC_MGMT: ${{ parameters.CHECKOUT_SONIC_MGMT }} diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index 86fe0e4c892..9bfde00b687 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -53,11 +53,14 @@ jobs: - bash: | set -ex build_options="$(VERSION_CONTROL_OPTIONS)" - image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1) + tags=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 2) + image_tag=$(printf '%s\n' "$tags" | tail -n 1) image_latest=$(echo $(echo $image_tag | awk -F: '{print$1}'):latest) + user_image_tag=$(printf '%s\n' "$tags" | head -n 1) image_branch=$(echo $(echo $image_tag | awk -F: '{print$1}'):$(Build.SourceBranchName)) image_branch_arch=$(echo $(echo $image_tag | awk -F: '{print$1}'):$(Build.SourceBranchName)-${{ parameters.arch }}) docker rmi $image_tag || true + docker rmi $user_image_tag || true if [[ "$(Build.Reason)" =~ [a-zA-Z]*CI ]] && docker pull ${{ parameters.registry_url }}/${image_tag};then exit 0 @@ -70,6 +73,8 @@ jobs: docker tag ${image_tag} ${REGISTRY_SERVER}/${image_tag} docker push ${REGISTRY_SERVER}/${image_tag} + docker tag ${user_image_tag} ${REGISTRY_SERVER}/${user_image_tag} + docker push ${REGISTRY_SERVER}/${user_image_tag} docker tag ${image_tag} ${REGISTRY_SERVER}/${image_branch_arch} docker push ${REGISTRY_SERVER}/${image_branch_arch} if [[ "${{ parameters.arch }}" == "amd64" ]];then diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000000..72eb46397fa --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,107 @@ +# Copilot Instructions for sonic-buildimage + +## Project Overview + +sonic-buildimage is the master build system for SONiC (Software for Open Networking in the Cloud). It produces ONIE-compatible network operating system installer images for network switches across multiple ASIC platforms (Broadcom, Mellanox/NVIDIA, Marvell, etc.). This is the central repo that pulls in all other SONiC components as submodules and builds them into a complete NOS image. + +## Architecture + +``` +sonic-buildimage/ +├── device/ # Platform-specific device configurations and plugins +├── dockers/ # Dockerfile definitions for all SONiC containers +├── files/ # Configuration files, scripts, and templates +├── installer/ # ONIE installer scripts +├── platform/ # Platform-specific build rules and configurations +├── rules/ # Makefile rules for building individual components +├── scripts/ # Build helper scripts +├── sonic-slave-*/ # Build environment container definitions (per Debian version) +├── src/ # Source code and submodules for SONiC components +├── .azure-pipelines/ # CI/CD pipeline definitions +├── Makefile # Top-level build entry point +└── .github/ # GitHub Actions and PR templates +``` + +### Key Concepts +- **Rules system**: Each component has a `.mk` file in `rules/` defining how to build it +- **Docker containers**: SONiC services run in Docker containers defined in `dockers/` +- **Platform abstraction**: `device/` and `platform/` directories abstract hardware differences +- **Build slaves**: Builds run inside Debian-versioned containers (bookworm, bullseye, etc.) +- **Submodules**: Most SONiC components are git submodules under `src/` + +## Language & Style + +- **Primary languages**: Makefile, Shell (bash), Python, Jinja2 templates +- **Makefile style**: Use tabs for indentation in Makefiles (GNU Make requirement) +- **Shell scripts**: Use `#!/bin/bash`, 4-space indentation +- **Python**: Follow PEP 8, 4-space indentation +- **Naming**: Use snake_case for variables and functions in shell/Python; UPPER_CASE for Make variables + +## Build Instructions + +```bash +# Clone with submodules +git clone --recurse-submodules https://github.com/sonic-net/sonic-buildimage.git +cd sonic-buildimage + +# Initialize build environment +make init + +# Configure for a specific platform +make configure PLATFORM=vs # Virtual Switch for testing +# Other platforms: broadcom, mellanox, marvell-teralynx, etc. + +# Build the image +make SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz + +# Build specific component +make target/debs/bookworm/swss_1.0.0_amd64.deb +``` + +### Build Environment Requirements +- Multiple CPU cores, 8+ GiB RAM, 300+ GiB disk +- Docker installed and running +- KVM virtualization support (for some builds) + +## Testing + +- **VS (Virtual Switch)** platform is the primary testing platform +- CI runs on Azure Pipelines (`.azure-pipelines/`) +- Test images are built with `PLATFORM=vs` +- Integration tests run against VS images in sonic-mgmt repo +- Use `pytest.ini` at the root for Python test configuration + +## PR Guidelines + +- **Commit format**: `[component/folder]: Description of changes` +- **Signed-off-by**: All commits MUST include `Signed-off-by: Your Name ` (DCO requirement) +- **CLA**: Sign the Linux Foundation EasyCLA before contributing +- **Single logical change per PR**: Isolate each commit to one component/bugfix/feature +- **Submodule updates**: When updating a submodule, reference the PR in the submodule repo +- **PR description**: Include what changed, why, and how to test + +## Common Patterns + +- **Adding a new package**: Create a `.mk` file in `rules/`, add source in `src/` +- **Adding a Docker container**: Create Dockerfile in `dockers/`, add build rule in `rules/` +- **Platform support**: Add platform config in `device//`, build rules in `platform/` +- **Version pinning**: Dependencies are version-pinned in rules files +- **Build flags**: Use `ENABLE_*` and `INCLUDE_*` variables to toggle features + +## Dependencies + +- All SONiC repos are submodules (sonic-swss, sonic-sairedis, sonic-utilities, etc.) +- Debian base system (bookworm/bullseye) +- Docker for containerized builds +- Azure Pipelines for CI/CD + +## Gotchas + +- **Build times**: Full builds take 2-6 hours; use `SONIC_BUILD_JOBS` to parallelize +- **Disk space**: Builds require 100+ GiB; clean with `make clean` or `make reset` +- **Submodule versions**: Always check that submodule pins are correct before building +- **Docker cache**: Build uses Docker layer caching; `make clean` to force rebuild +- **Branch compatibility**: Component branches must match buildimage branch (e.g., master ↔ master) +- **Make variables**: Many build options are controlled by variables in `rules/config` +- **Platform differences**: Some features are platform-specific; check `rules/config` for `ENABLE_*` flags +- **Do NOT modify files in `src/` directly**: Changes should go to the respective submodule repos diff --git a/.gitmodules b/.gitmodules index 33079fa8d14..7d99999ee9a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -145,3 +145,6 @@ [submodule "src/supervisor"] path = src/supervisor url = https://github.com/Supervisor/supervisor +[submodule "platform/alpinevs"] + path = platform/alpinevs + url = https://github.com/sonic-net/sonic-alpine/ diff --git a/Makefile.work b/Makefile.work index 25976398b67..65f6ad9307b 100644 --- a/Makefile.work +++ b/Makefile.work @@ -65,6 +65,9 @@ # * ENABLE_MULTIDB: Enable multiple redis database instances. # * Default: unset # * Values: y +# * ENABLE_VRF_STRICT: Enable VRF strict mode. +# * Default: unset +# * Values: y ############################################################################### SHELL = /bin/bash @@ -201,12 +204,14 @@ $(shell test -d $(SONIC_VERSION_CACHE_SOURCE) || \ $(shell \ SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \ TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \ - PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ + BUILD_PACKAGES_URL=$(BUILD_PACKAGES_URL) \ DISTRO=$(BLDENV) \ SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \ SONIC_VERSION_CACHE_SOURCE=$(SONIC_VERSION_CACHE_SOURCE) \ DBGOPT='$(DBGOPT)' \ MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \ + BUILD_PUBLIC_URL=$(BUILD_PUBLIC_URL) \ + BUILD_SNAPSHOT_URL=$(BUILD_SNAPSHOT_URL) \ PIP_HTTP_TIMEOUT=$(PIP_HTTP_TIMEOUT) \ scripts/generate_buildinfo_config.sh) @@ -217,6 +222,8 @@ $(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) \ INCLUDE_FIPS=$(INCLUDE_FIPS) \ DOCKER_EXTRA_OPTS=$(DOCKER_EXTRA_OPTS) \ DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) \ + BUILD_PUBLIC_URL=$(BUILD_PUBLIC_URL) \ + BUILD_SNAPSHOT_URL=$(BUILD_SNAPSHOT_URL) \ FIPS_VERSION=$(FIPS_VERSION) \ FIPS_GOLANG_MAIN_VERSION=$(FIPS_GOLANG_MAIN_VERSION) \ FIPS_GOLANG_VERSION=$(FIPS_GOLANG_VERSION) \ @@ -229,16 +236,18 @@ $(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) \ ifeq ($(CROSS_BUILD_ENVIRON), y) $(shell SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \ - MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) scripts/build_mirror_config.sh $(SLAVE_DIR) amd64 $(BLDENV)) + MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) BUILD_SNAPSHOT_URL=$(BUILD_SNAPSHOT_URL) scripts/build_mirror_config.sh $(SLAVE_DIR) amd64 $(BLDENV)) endif $(shell SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \ - MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) scripts/build_mirror_config.sh $(SLAVE_DIR) $(CONFIGURED_ARCH) $(BLDENV)) + MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) BUILD_SNAPSHOT_URL=$(BUILD_SNAPSHOT_URL) scripts/build_mirror_config.sh $(SLAVE_DIR) $(CONFIGURED_ARCH) $(BLDENV)) PREPARE_DOCKER=BUILD_SLAVE=y \ DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) \ SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \ DBGOPT='$(DBGOPT)' \ MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \ + BUILD_PUBLIC_URL=$(BUILD_PUBLIC_URL) \ + BUILD_SNAPSHOT_URL=$(BUILD_SNAPSHOT_URL) \ scripts/prepare_docker_buildinfo.sh \ $(SLAVE_BASE_IMAGE) \ $(SLAVE_DIR)/Dockerfile \ @@ -262,7 +271,7 @@ SLAVE_TAG = $(shell \ $(SLAVE_DIR)/Dockerfile \ $(SLAVE_DIR)/sources.list.* \ $(SLAVE_DIR)/buildinfo/versions/versions-* \ - && echo $(USER)/$(PWD)/$(CONFIGURED_PLATFORM)) \ + && echo $(USER)/$(PWD)/$(CONFIGURED_ARCH)) \ | sha1sum \ | awk '{print substr($$1,0,11);}') @@ -304,10 +313,24 @@ endif # Consider removing the --ulimit flag once nothing older # than Bullseye is being used as a slave container. +# Build container memory limit (set SONIC_BUILD_MEMORY=none to disable). +# Constrains OOM kills to the container instead of the kernel silently +# killing unrelated host processes. +SONIC_BUILD_MEMORY_FLAGS = +ifneq ($(SONIC_BUILD_MEMORY),) +ifneq ($(SONIC_BUILD_MEMORY),none) + SONIC_BUILD_MEMORY_FLAGS += --memory=$(SONIC_BUILD_MEMORY) + ifneq ($(SONIC_BUILD_MEMORY_SWAP),) + SONIC_BUILD_MEMORY_FLAGS += --memory-swap=$(SONIC_BUILD_MEMORY_SWAP) + endif +endif +endif + DOCKER_RUN := docker run --rm=true --privileged --init \ -v $(DOCKER_BUILDER_MOUNT) \ -v "$(DOCKER_LOCKDIR):$(DOCKER_LOCKDIR)" \ -w $(DOCKER_BUILDER_WORKDIR) \ + $(SONIC_BUILD_MEMORY_FLAGS) \ -e "http_proxy=$(http_proxy)" \ -e "https_proxy=$(https_proxy)" \ -e "no_proxy=$(no_proxy)" \ @@ -452,6 +475,8 @@ DOCKER_USER_BUILD = docker build --no-cache \ -f $(SLAVE_DIR)/Dockerfile.user \ $(SLAVE_DIR) $(SPLIT_LOG) $(DOCKER_LOG) +DOCKER_USER_PULL = docker pull \ + $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_PATH)/$(SLAVE_IMAGE):$(SLAVE_TAG) DOCKER_SLAVE_BASE_INSPECT = \ { \ @@ -491,8 +516,24 @@ DOCKER_SLAVE_USER_INSPECT = \ docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null; \ } +DOCKER_SLAVE_USER_PULL_REGISTRY = \ + [ $(ENABLE_DOCKER_BASE_PULL) == y ] && \ + { \ + echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Pulling...; \ + $(DOCKER_USER_PULL); \ + } && \ + { \ + docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_PATH)/$(SLAVE_IMAGE):$(SLAVE_TAG) $(SLAVE_IMAGE):$(SLAVE_TAG) && \ + $(COLLECT_DOCKER); \ + }\ + SONIC_SLAVE_USER_BUILD = \ - { $(DOCKER_SLAVE_USER_INSPECT) } || \ + { \ + $(DOCKER_SLAVE_USER_INSPECT); \ + } || \ + { \ + $(DOCKER_SLAVE_USER_PULL_REGISTRY); \ + } || \ { \ set -o pipefail ; \ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \ @@ -579,6 +620,8 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \ MIRROR_URLS=$(MIRROR_URLS) \ MIRROR_SECURITY_URLS=$(MIRROR_SECURITY_URLS) \ MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \ + BUILD_PUBLIC_URL=$(BUILD_PUBLIC_URL) \ + BUILD_SNAPSHOT_URL=$(BUILD_SNAPSHOT_URL) \ SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \ ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \ SONIC_OS_VERSION=$(SONIC_OS_VERSION) \ @@ -587,6 +630,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \ BUILD_SKIP_TEST=$(BUILD_SKIP_TEST) \ SONIC_PTF_ENV_PY_VER=$(SONIC_PTF_ENV_PY_VER) \ ENABLE_MULTIDB=$(ENABLE_MULTIDB) \ + ENABLE_VRF_STRICT=$(ENABLE_VRF_STRICT) \ $(SONIC_OVERRIDE_BUILD_VARS) .PHONY: sonic-slave-build sonic-slave-bash init reset @@ -608,6 +652,8 @@ endif export MIRROR_URLS export MIRROR_SECURITY_URLS export MIRROR_SNAPSHOT +export BUILD_PUBLIC_URL +export BUILD_SNAPSHOT_URL export SONIC_VERSION_CONTROL_COMPONENTS export PIP_HTTP_TIMEOUT diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 293b85d75dc..dd0edd96d22 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -67,6 +67,12 @@ stages: buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) BUILD_MULTIASIC_KVM=y INCLUDE_DHCP_SERVER=y ${{ variables.VERSION_CONTROL_OPTIONS }}' jobGroups: - name: vs + - template: .azure-pipelines/azure-pipelines-build.yml + parameters: + buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}' + jobGroups: + - name: vpp + continueOnError: true - stage: Build pool: sonicso1ES-amd64 @@ -101,6 +107,10 @@ stages: PLATFORM_NAME: marvell-prestera PLATFORM_ARCH: armhf INCLUDE_RESTAPI: y + - name: nvidia-bluefield + pool: sonicso1ES-arm64 + variables: + PLATFORM_ARCH: arm64 - stage: Test dependsOn: BuildVS @@ -198,5 +208,4 @@ stages: - template: .azure-pipelines/pr_test_template.yml@sonic-mgmt parameters: CHECKOUT_SONIC_MGMT: ${{ parameters.CHECKOUT_SONIC_MGMT }} - GLOBAL_PARAMS: - PTF_MODIFIED: $(PTF_MODIFIED) + PTF_MODIFIED: $(PTF_MODIFIED) diff --git a/build_debian.sh b/build_debian.sh index 1d2db21f5f7..d4c25f89e65 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -244,7 +244,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install docker-ce=${DOCKER_VERSIO install_kubernetes () { local ver="$1" ## Install k8s package from storage - local storage_prefix="https://packages.trafficmanager.net/public/kubernetes" + local storage_prefix="$BUILD_PUBLIC_URL/kubernetes" sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/cri-tools.deb -fsSL \ ${storage_prefix}/cri-tools_${KUBERNETES_CRI_TOOLS_VERSION}_${CONFIGURED_ARCH}.deb sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/kubernetes-cni.deb -fsSL \ @@ -383,6 +383,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in wireless-regdb \ ethtool \ zstd \ + tzdata-legacy \ nvme-cli sudo cp files/initramfs-tools/pzstd $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/pzstd @@ -566,6 +567,13 @@ j2 files/build_templates/default_users.json.j2 | sudo tee $FILESYSTEM_ROOT/etc/s sudo LANG=c chroot $FILESYSTEM_ROOT chmod 600 /etc/sonic/default_users.json sudo LANG=c chroot $FILESYSTEM_ROOT chown root:shadow /etc/sonic/default_users.json +# BMC config info +export bmc_nos_account_username="${BMC_NOS_ACCOUNT_USERNAME}" +export bmc_root_account_default_password="${BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD}" +j2 files/build_templates/bmc_config.json.j2 | sudo tee $FILESYSTEM_ROOT/etc/sonic/bmc_config.json +sudo LANG=c chroot $FILESYSTEM_ROOT chmod 644 /etc/sonic/bmc_config.json +sudo LANG=c chroot $FILESYSTEM_ROOT chown root:root /etc/sonic/bmc_config.json + ## Copy over clean-up script sudo cp ./files/scripts/core_cleanup.py $FILESYSTEM_ROOT/usr/bin/core_cleanup.py @@ -744,9 +752,9 @@ if [[ $TARGET_BOOTLOADER == uboot ]]; then elif [[ $CONFIGURED_ARCH == arm64 ]]; then if [[ $CONFIGURED_PLATFORM == pensando ]]; then ## copy device tree file into boot (XXX: need to compile dtb from dts) - sudo cp -v $FILESYSTEM_ROOT/usr/lib/linux-image-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}/pensando/elba-asic-psci.dtb $FILESYSTEM_ROOT/boot/ - sudo cp -v $FILESYSTEM_ROOT/usr/lib/linux-image-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}/pensando/elba-asic-psci-lipari.dtb $FILESYSTEM_ROOT/boot/ - sudo cp -v $FILESYSTEM_ROOT/usr/lib/linux-image-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}/pensando/elba-asic-psci-mtfuji.dtb $FILESYSTEM_ROOT/boot/ + sudo cp -v $FILESYSTEM_ROOT/usr/lib/linux-image-${LINUX_KERNEL_VERSION}-sonic-${CONFIGURED_ARCH}/pensando/elba-asic-psci.dtb $FILESYSTEM_ROOT/boot/ + sudo cp -v $FILESYSTEM_ROOT/usr/lib/linux-image-${LINUX_KERNEL_VERSION}-sonic-${CONFIGURED_ARCH}/pensando/elba-asic-psci-lipari.dtb $FILESYSTEM_ROOT/boot/ + sudo cp -v $FILESYSTEM_ROOT/usr/lib/linux-image-${LINUX_KERNEL_VERSION}-sonic-${CONFIGURED_ARCH}/pensando/elba-asic-psci-mtfuji.dtb $FILESYSTEM_ROOT/boot/ sudo cp -v $PLATFORM_DIR/pensando/install_file $FILESYSTEM_ROOT/boot/ ## make kernel as gzip file sudo LANG=C chroot $FILESYSTEM_ROOT gzip /boot/${KERNEL_FILE} diff --git a/build_debug_docker_j2.sh b/build_debug_docker_j2.sh index 66bdd290de5..7227b5f6f0d 100755 --- a/build_debug_docker_j2.sh +++ b/build_debug_docker_j2.sh @@ -18,10 +18,12 @@ debs/{{ deb }}{{' '}} {%- endfor -%} debs/ +RUN apt update + RUN dpkg -i \ {% for deb in $2.split(' ') -%} debs/{{ deb }}{{' '}} -{%- endfor %} +{%- endfor %} || apt -y install -f --no-remove {% endif %} {% endif %} @@ -29,7 +31,7 @@ debs/{{ deb }}{{' '}} {% if $3 is defined %} {% if $3|length %} -RUN apt-get update && apt-get install -f -y \ +RUN apt install -f -y \ {% for dbg in $3.split(' ') -%} {{ dbg }}{{' '}} {%- endfor %} diff --git a/build_image.sh b/build_image.sh index 2ef9be09756..687de0db624 100755 --- a/build_image.sh +++ b/build_image.sh @@ -112,6 +112,11 @@ generate_device_list() fi; fi; done + + # Add kvm to the list + if [ "$TARGET_MACHINE" = "alpinevs" ] ; then + echo "x86_64-kvm_x86_64-r0" >> "$platforms_asic"; + fi } if [ "$IMAGE_TYPE" = "onie" ]; then diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffer_ports.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffer_ports.j2 deleted file mode 120000 index 8a4104663fa..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffer_ports.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/buffer_ports.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers.json.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers.json.j2 deleted file mode 120000 index 8dc56adda4e..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/buffers.json.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers_defaults_t0.j2 deleted file mode 120000 index a8f0111ea1f..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers_defaults_t0.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/buffers_defaults_t0.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers_defaults_t1.j2 deleted file mode 120000 index d918c3cfb0d..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/buffers_defaults_t1.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/buffers_defaults_t1.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/hwsku.json deleted file mode 100644 index 63f4a05404e..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/hwsku.json +++ /dev/null @@ -1,776 +0,0 @@ -{ - "interfaces": { - "Ethernet0": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet4": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet8": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet12": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet16": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet20": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet24": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet28": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet32": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet36": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet40": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet44": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet48": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet52": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet56": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet60": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet64": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet68": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet72": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet76": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet80": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet84": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet88": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet92": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet96": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet100": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet104": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet108": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet112": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet116": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet120": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet124": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet128": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet132": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet136": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet140": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet144": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet148": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet152": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet156": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet160": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet164": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet168": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet172": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet176": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet180": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet184": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet188": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet192": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet196": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet200": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet204": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet208": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet212": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet216": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet220": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet224": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet228": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet232": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet236": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet240": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet244": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet248": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet252": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet256": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet260": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet264": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet268": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet272": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet276": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet280": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet284": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet288": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet292": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet296": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet300": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet304": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet308": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet312": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet316": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet320": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet324": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet328": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet332": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet336": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet340": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet344": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet348": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet352": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet356": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet360": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet364": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet368": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet372": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet376": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet380": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet384": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet388": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet392": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet396": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet400": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet404": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet408": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet412": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet416": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet420": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet424": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet428": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet432": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet436": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet440": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet444": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet448": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet452": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet456": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet460": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet464": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet468": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet472": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet476": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet480": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet484": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet488": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet492": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet496": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet500": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet504": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet508": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet512": { - "fec": "none", - "default_brkout_mode": "2x10G(2)" - } - } -} diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/pg_profile_lookup.ini b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/pg_profile_lookup.ini deleted file mode 120000 index 0fc285468b8..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/pg_profile_lookup.ini +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/pg_profile_lookup.ini \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/port_config.ini b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/port_config.ini deleted file mode 100644 index 123aef1ab4b..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/port_config.ini +++ /dev/null @@ -1,131 +0,0 @@ -# name lanes alias index speed fec -Ethernet0 369,370,371,372 etp1a 1 400000 rs -Ethernet4 373,374,375,376 etp1b 1 400000 rs -Ethernet8 385,386,387,388 etp2a 2 400000 rs -Ethernet12 389,390,391,392 etp2b 2 400000 rs -Ethernet16 433,434,435,436 etp3a 3 400000 rs -Ethernet20 437,438,439,440 etp3b 3 400000 rs -Ethernet24 449,450,451,452 etp4a 4 400000 rs -Ethernet28 453,454,455,456 etp4b 4 400000 rs -Ethernet32 305,306,307,308 etp5a 5 400000 rs -Ethernet36 309,310,311,312 etp5b 5 400000 rs -Ethernet40 321,322,323,324 etp6a 6 400000 rs -Ethernet44 325,326,327,328 etp6b 6 400000 rs -Ethernet48 241,242,243,244 etp7a 7 400000 rs -Ethernet52 245,246,247,248 etp7b 7 400000 rs -Ethernet56 265,266,267,268 etp8a 8 400000 rs -Ethernet60 269,270,271,272 etp8b 8 400000 rs -Ethernet64 497,498,499,500 etp9a 9 400000 rs -Ethernet68 501,502,503,504 etp9b 9 400000 rs -Ethernet72 9,10,11,12 etp10a 10 400000 rs -Ethernet76 13,14,15,16 etp10b 10 400000 rs -Ethernet80 193,194,195,196 etp11a 11 400000 rs -Ethernet84 197,198,199,200 etp11b 11 400000 rs -Ethernet88 177,178,179,180 etp12a 12 400000 rs -Ethernet92 181,182,183,184 etp12b 12 400000 rs -Ethernet96 65,66,67,68 etp13a 13 400000 rs -Ethernet100 69,70,71,72 etp13b 13 400000 rs -Ethernet104 49,50,51,52 etp14a 14 400000 rs -Ethernet108 53,54,55,56 etp14b 14 400000 rs -Ethernet112 129,130,131,132 etp15a 15 400000 rs -Ethernet116 133,134,135,136 etp15b 15 400000 rs -Ethernet120 113,114,115,116 etp16a 16 400000 rs -Ethernet124 117,118,119,120 etp16b 16 400000 rs -Ethernet128 101,102,103,104 etp17a 17 400000 rs -Ethernet132 97,98,99,100 etp17b 17 400000 rs -Ethernet136 125,126,127,128 etp17c 17 400000 rs -Ethernet140 121,122,123,124 etp17d 17 400000 rs -Ethernet144 77,78,79,80 etp17e 17 400000 rs -Ethernet148 73,74,75,76 etp17f 17 400000 rs -Ethernet152 109,110,111,112 etp17g 17 400000 rs -Ethernet156 105,106,107,108 etp17h 17 400000 rs -Ethernet160 85,86,87,88 etp17i 17 400000 rs -Ethernet164 81,82,83,84 etp17j 17 400000 rs -Ethernet168 93,94,95,96 etp17k 17 400000 rs -Ethernet172 89,90,91,92 etp17l 17 400000 rs -Ethernet176 189,190,191,192 etp18a 18 400000 rs -Ethernet180 185,186,187,188 etp18b 18 400000 rs -Ethernet184 149,150,151,152 etp18c 18 400000 rs -Ethernet188 157,158,159,160 etp18d 18 400000 rs -Ethernet192 165,166,167,168 etp18e 18 400000 rs -Ethernet196 173,174,175,176 etp18f 18 400000 rs -Ethernet200 153,154,155,156 etp18g 18 400000 rs -Ethernet204 145,146,147,148 etp18h 18 400000 rs -Ethernet208 169,170,171,172 etp18i 18 400000 rs -Ethernet212 161,162,163,164 etp18j 18 400000 rs -Ethernet216 141,142,143,144 etp18k 18 400000 rs -Ethernet220 137,138,139,140 etp18l 18 400000 rs -Ethernet224 37,38,39,40 etp19a 19 400000 rs -Ethernet228 33,34,35,36 etp19b 19 400000 rs -Ethernet232 5,6,7,8 etp19c 19 400000 rs -Ethernet236 1,2,3,4 etp19d 19 400000 rs -Ethernet240 45,46,47,48 etp19e 19 400000 rs -Ethernet244 41,42,43,44 etp19f 19 400000 rs -Ethernet248 21,22,23,24 etp19g 19 400000 rs -Ethernet252 17,18,19,20 etp19h 19 400000 rs -Ethernet256 61,62,63,64 etp19i 19 400000 rs -Ethernet260 57,58,59,60 etp19j 19 400000 rs -Ethernet264 29,30,31,32 etp19k 19 400000 rs -Ethernet268 25,26,27,28 etp19l 19 400000 rs -Ethernet272 253,254,255,256 etp20a 20 400000 rs -Ethernet276 249,250,251,252 etp20b 20 400000 rs -Ethernet280 213,214,215,216 etp20c 20 400000 rs -Ethernet284 221,222,223,224 etp20d 20 400000 rs -Ethernet288 229,230,231,232 etp20e 20 400000 rs -Ethernet292 237,238,239,240 etp20f 20 400000 rs -Ethernet296 217,218,219,220 etp20g 20 400000 rs -Ethernet300 209,210,211,212 etp20h 20 400000 rs -Ethernet304 233,234,235,236 etp20i 20 400000 rs -Ethernet308 225,226,227,228 etp20j 20 400000 rs -Ethernet312 205,206,207,208 etp20k 20 400000 rs -Ethernet316 201,202,203,204 etp20l 20 400000 rs -Ethernet320 485,486,487,488 etp21a 21 400000 rs -Ethernet324 481,482,483,484 etp21b 21 400000 rs -Ethernet328 461,462,463,464 etp21c 21 400000 rs -Ethernet332 457,458,459,460 etp21d 21 400000 rs -Ethernet336 493,494,495,496 etp21e 21 400000 rs -Ethernet340 489,490,491,492 etp21f 21 400000 rs -Ethernet344 469,470,471,472 etp21g 21 400000 rs -Ethernet348 465,466,467,468 etp21h 21 400000 rs -Ethernet352 509,510,511,512 etp21i 21 400000 rs -Ethernet356 505,506,507,508 etp21j 21 400000 rs -Ethernet360 477,478,479,480 etp21k 21 400000 rs -Ethernet364 473,474,475,476 etp21l 21 400000 rs -Ethernet368 317,318,319,320 etp22a 22 400000 rs -Ethernet372 313,314,315,316 etp22b 22 400000 rs -Ethernet376 285,286,287,288 etp22c 22 400000 rs -Ethernet380 277,278,279,280 etp22d 22 400000 rs -Ethernet384 293,294,295,296 etp22e 22 400000 rs -Ethernet388 301,302,303,304 etp22f 22 400000 rs -Ethernet392 273,274,275,276 etp22g 22 400000 rs -Ethernet396 281,282,283,284 etp22h 22 400000 rs -Ethernet400 297,298,299,300 etp22i 22 400000 rs -Ethernet404 289,290,291,292 etp22j 22 400000 rs -Ethernet408 261,262,263,264 etp22k 22 400000 rs -Ethernet412 257,258,259,260 etp22l 22 400000 rs -Ethernet416 421,422,423,424 etp23a 23 400000 rs -Ethernet420 417,418,419,420 etp23b 23 400000 rs -Ethernet424 445,446,447,448 etp23c 23 400000 rs -Ethernet428 441,442,443,444 etp23d 23 400000 rs -Ethernet432 397,398,399,400 etp23e 23 400000 rs -Ethernet436 393,394,395,396 etp23f 23 400000 rs -Ethernet440 429,430,431,432 etp23g 23 400000 rs -Ethernet444 425,426,427,428 etp23h 23 400000 rs -Ethernet448 405,406,407,408 etp23i 23 400000 rs -Ethernet452 401,402,403,404 etp23j 23 400000 rs -Ethernet456 413,414,415,416 etp23k 23 400000 rs -Ethernet460 409,410,411,412 etp23l 23 400000 rs -Ethernet464 381,382,383,384 etp24a 24 400000 rs -Ethernet468 377,378,379,380 etp24b 24 400000 rs -Ethernet472 341,342,343,344 etp24c 24 400000 rs -Ethernet476 349,350,351,352 etp24d 24 400000 rs -Ethernet480 357,358,359,360 etp24e 24 400000 rs -Ethernet484 365,366,367,368 etp24f 24 400000 rs -Ethernet488 345,346,347,348 etp24g 24 400000 rs -Ethernet492 337,338,339,340 etp24h 24 400000 rs -Ethernet496 361,362,363,364 etp24i 24 400000 rs -Ethernet500 353,354,355,356 etp24j 24 400000 rs -Ethernet504 333,334,335,336 etp24k 24 400000 rs -Ethernet508 329,330,331,332 etp24l 24 400000 rs -Ethernet512 513 etp25a 25 10000 none -Ethernet513 514 etp25b 25 10000 none diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/qos.json.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/qos.json.j2 deleted file mode 120000 index 7a121389849..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/qos.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/qos.json.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/sai.profile b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/sai.profile deleted file mode 120000 index 20332651617..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/sai.profile +++ /dev/null @@ -1 +0,0 @@ -../Arista-7060X6-16PE-384C-O128S2/sai.profile \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/th5-a7060x6-16pe-384c.config.bcm b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/th5-a7060x6-16pe-384c.config.bcm deleted file mode 100644 index b846dd8ac28..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-COPPER-LAB/th5-a7060x6-16pe-384c.config.bcm +++ /dev/null @@ -1,2593 +0,0 @@ -# -# $Copyright: (c) 2022 Broadcom. -# Broadcom Proprietary and Confidential. All rights reserved.$ -# -# BCM78900 64x800g port configuration. -# -# configuration yaml file -# device: -# : -# : -# ? -# : -# : -# ... -# : -# : -# : -# : -# ... -# : -# - ---- -bcm_device: - 0: - global: - pktio_mode: 1 - default_cpu_tx_queue: 7 - vlan_flooding_l2mc_num_reserved: 0 - ipv6_lpm_128b_enable: 1 - shared_block_mask_section: uc_bc - skip_protocol_default_entries: 1 - # LTSW uses value 1 for ALPM combined mode - l3_alpm_template: 1 - l3_alpm_hit_skip: 1 - sai_feat_tail_timestamp : 1 - sai_mmu_custom_config : 1 - sai_port_phy_time_sync_en : 1 - sai_field_group_auto_prioritize: 1 - #l3_intf_vlan_split_egress for MTU at L3IF - l3_intf_vlan_split_egress : 1 - pfc_deadlock_seq_control : 1 - sai_tunnel_support: 2 - bcm_tunnel_term_compatible_mode: 1 - l3_ecmp_member_first_lkup_mem_size: 12288 - stat_custom_receive0_management_mode: 1 ---- -device: - 0: - PC_PM_CORE: - ? - PC_PM_ID: 1 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x76543210 - TX_LANE_MAP: 0x76543210 - RX_POLARITY_FLIP: 0x89 - TX_POLARITY_FLIP: 0x55 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 2 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x13025746 - TX_LANE_MAP: 0x64752031 - RX_POLARITY_FLIP: 0x33 - TX_POLARITY_FLIP: 0x66 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 3 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54107632 - TX_LANE_MAP: 0x54107632 - RX_POLARITY_FLIP: 0x5a - TX_POLARITY_FLIP: 0x55 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 4 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x10543276 - TX_LANE_MAP: 0x10543276 - RX_POLARITY_FLIP: 0xaa - TX_POLARITY_FLIP: 0x5a - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 5 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54107632 - TX_LANE_MAP: 0x45037612 - RX_POLARITY_FLIP: 0x16 - TX_POLARITY_FLIP: 0x1e - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 6 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x72034651 - TX_LANE_MAP: 0x30742516 - RX_POLARITY_FLIP: 0xb4 - TX_POLARITY_FLIP: 0x16 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 7 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x57460123 - TX_LANE_MAP: 0x46750132 - RX_POLARITY_FLIP: 0xa6 - TX_POLARITY_FLIP: 0x9c - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 8 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x13026475 - TX_LANE_MAP: 0x74563201 - RX_POLARITY_FLIP: 0x6a - TX_POLARITY_FLIP: 0x63 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 9 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x57460123 - TX_LANE_MAP: 0x46750132 - RX_POLARITY_FLIP: 0xa6 - TX_POLARITY_FLIP: 0x9c - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 10 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54763210 - TX_LANE_MAP: 0x31207546 - RX_POLARITY_FLIP: 0xc6 - TX_POLARITY_FLIP: 0xa9 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 11 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54763210 - TX_LANE_MAP: 0x21307564 - RX_POLARITY_FLIP: 0xc6 - TX_POLARITY_FLIP: 0xaa - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 12 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54763210 - TX_LANE_MAP: 0x31207546 - RX_POLARITY_FLIP: 0xc6 - TX_POLARITY_FLIP: 0xa9 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 13 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54763210 - TX_LANE_MAP: 0x21307564 - RX_POLARITY_FLIP: 0xc6 - TX_POLARITY_FLIP: 0xaa - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 14 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x16543207 - TX_LANE_MAP: 0x70215346 - RX_POLARITY_FLIP: 0xb4 - TX_POLARITY_FLIP: 0xa5 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 15 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1235746 - TX_LANE_MAP: 0x1324675 - RX_POLARITY_FLIP: 0x95 - TX_POLARITY_FLIP: 0x36 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 16 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x54763210 - TX_LANE_MAP: 0x20315746 - RX_POLARITY_FLIP: 0xc6 - TX_POLARITY_FLIP: 0xa5 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 17 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x75640123 - TX_LANE_MAP: 0x64750132 - RX_POLARITY_FLIP: 0x44 - TX_POLARITY_FLIP: 0xc1 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 18 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x23016475 - TX_LANE_MAP: 0x46571023 - RX_POLARITY_FLIP: 0xb1 - TX_POLARITY_FLIP: 0x9d - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 19 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x23014675 - TX_LANE_MAP: 0x46570123 - RX_POLARITY_FLIP: 0xb7 - TX_POLARITY_FLIP: 0x9b - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 20 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x32104675 - TX_LANE_MAP: 0x64750123 - RX_POLARITY_FLIP: 0xf5 - TX_POLARITY_FLIP: 0xe9 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 21 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x32014657 - TX_LANE_MAP: 0x64570132 - RX_POLARITY_FLIP: 0x7d - TX_POLARITY_FLIP: 0x51 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 22 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x32104675 - TX_LANE_MAP: 0x64750123 - RX_POLARITY_FLIP: 0xd7 - TX_POLARITY_FLIP: 0xcb - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 23 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x75640123 - TX_LANE_MAP: 0x64750132 - RX_POLARITY_FLIP: 0x44 - TX_POLARITY_FLIP: 0xc1 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 24 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x32104657 - TX_LANE_MAP: 0x64750132 - RX_POLARITY_FLIP: 0xd7 - TX_POLARITY_FLIP: 0xcb - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 25 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x75640123 - TX_LANE_MAP: 0x64750132 - RX_POLARITY_FLIP: 0x44 - TX_POLARITY_FLIP: 0xc1 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 26 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x23016475 - TX_LANE_MAP: 0x46571023 - RX_POLARITY_FLIP: 0xb1 - TX_POLARITY_FLIP: 0x9d - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 27 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x23014675 - TX_LANE_MAP: 0x46570123 - RX_POLARITY_FLIP: 0xb7 - TX_POLARITY_FLIP: 0x93 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 28 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x65471023 - TX_LANE_MAP: 0x67543210 - RX_POLARITY_FLIP: 0x90 - TX_POLARITY_FLIP: 0x00 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 29 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64572031 - TX_LANE_MAP: 0x64572031 - RX_POLARITY_FLIP: 0x7d - TX_POLARITY_FLIP: 0xc6 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 30 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752013 - TX_LANE_MAP: 0x64752013 - RX_POLARITY_FLIP: 0xa0 - TX_POLARITY_FLIP: 0xf6 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 31 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x31207564 - TX_LANE_MAP: 0x46570213 - RX_POLARITY_FLIP: 0x88 - TX_POLARITY_FLIP: 0x99 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 32 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752031 - TX_LANE_MAP: 0x64752031 - RX_POLARITY_FLIP: 0xa0 - TX_POLARITY_FLIP: 0xf5 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 33 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x20316475 - TX_LANE_MAP: 0x20316475 - RX_POLARITY_FLIP: 0xa - TX_POLARITY_FLIP: 0x5f - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 34 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x57461302 - TX_LANE_MAP: 0x20316475 - RX_POLARITY_FLIP: 0xbb - TX_POLARITY_FLIP: 0x99 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 35 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x2134675 - TX_LANE_MAP: 0x2134675 - RX_POLARITY_FLIP: 0x82 - TX_POLARITY_FLIP: 0x2b - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 36 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x20314675 - TX_LANE_MAP: 0x20314675 - RX_POLARITY_FLIP: 0x7b - TX_POLARITY_FLIP: 0xcc - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 37 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1325674 - TX_LANE_MAP: 0x23017645 - RX_POLARITY_FLIP: 0x18 - TX_POLARITY_FLIP: 0x1e - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 38 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752310 - TX_LANE_MAP: 0x10234675 - RX_POLARITY_FLIP: 0x1b - TX_POLARITY_FLIP: 0x9a - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 39 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1237564 - TX_LANE_MAP: 0x1326475 - RX_POLARITY_FLIP: 0xbb - TX_POLARITY_FLIP: 0xe3 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 40 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752301 - TX_LANE_MAP: 0x10234657 - RX_POLARITY_FLIP: 0x1b - TX_POLARITY_FLIP: 0xd9 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 41 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1237564 - TX_LANE_MAP: 0x1326475 - RX_POLARITY_FLIP: 0xbb - TX_POLARITY_FLIP: 0xe3 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 42 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x46573210 - TX_LANE_MAP: 0x1326475 - RX_POLARITY_FLIP: 0x7d - TX_POLARITY_FLIP: 0xbc - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 43 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x46572310 - TX_LANE_MAP: 0x1324675 - RX_POLARITY_FLIP: 0x7b - TX_POLARITY_FLIP: 0xba - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 44 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752310 - TX_LANE_MAP: 0x10234675 - RX_POLARITY_FLIP: 0x39 - TX_POLARITY_FLIP: 0xf8 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 45 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64572301 - TX_LANE_MAP: 0x10324657 - RX_POLARITY_FLIP: 0xb1 - TX_POLARITY_FLIP: 0x73 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 46 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752310 - TX_LANE_MAP: 0x10234675 - RX_POLARITY_FLIP: 0x1b - TX_POLARITY_FLIP: 0xda - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 47 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1237564 - TX_LANE_MAP: 0x1326475 - RX_POLARITY_FLIP: 0xbb - TX_POLARITY_FLIP: 0xe3 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 48 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x64752301 - TX_LANE_MAP: 0x10234657 - RX_POLARITY_FLIP: 0x1b - TX_POLARITY_FLIP: 0xd9 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 49 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x57460123 - TX_LANE_MAP: 0x46750132 - RX_POLARITY_FLIP: 0xa6 - TX_POLARITY_FLIP: 0x9c - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 50 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x10327564 - TX_LANE_MAP: 0x75463201 - RX_POLARITY_FLIP: 0x6a - TX_POLARITY_FLIP: 0x63 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 51 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1235746 - TX_LANE_MAP: 0x57642310 - RX_POLARITY_FLIP: 0x95 - TX_POLARITY_FLIP: 0x93 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 52 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x10327564 - TX_LANE_MAP: 0x75463201 - RX_POLARITY_FLIP: 0x6a - TX_POLARITY_FLIP: 0x63 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 53 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1235746 - TX_LANE_MAP: 0x57642310 - RX_POLARITY_FLIP: 0x95 - TX_POLARITY_FLIP: 0x93 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 54 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x51437062 - TX_LANE_MAP: 0x27643510 - RX_POLARITY_FLIP: 0x1e - TX_POLARITY_FLIP: 0x17 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 55 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1235746 - TX_LANE_MAP: 0x1324675 - RX_POLARITY_FLIP: 0x95 - TX_POLARITY_FLIP: 0x36 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 56 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x10327564 - TX_LANE_MAP: 0x75463201 - RX_POLARITY_FLIP: 0x6a - TX_POLARITY_FLIP: 0x63 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 57 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x1235746 - TX_LANE_MAP: 0x1324675 - RX_POLARITY_FLIP: 0x95 - TX_POLARITY_FLIP: 0x36 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 58 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x76543210 - TX_LANE_MAP: 0x30215764 - RX_POLARITY_FLIP: 0x36 - TX_POLARITY_FLIP: 0xa6 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 59 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x76543210 - TX_LANE_MAP: 0x30217546 - RX_POLARITY_FLIP: 0x36 - TX_POLARITY_FLIP: 0xe9 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 60 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x10325476 - TX_LANE_MAP: 0x10234576 - RX_POLARITY_FLIP: 0x9e - TX_POLARITY_FLIP: 0x6c - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 61 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x12307654 - TX_LANE_MAP: 0x10325476 - RX_POLARITY_FLIP: 0x55 - TX_POLARITY_FLIP: 0x99 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 62 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x76325410 - TX_LANE_MAP: 0x76325410 - RX_POLARITY_FLIP: 0x5a - TX_POLARITY_FLIP: 0xaa - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 63 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x75643120 - TX_LANE_MAP: 0x2134657 - RX_POLARITY_FLIP: 0xcc - TX_POLARITY_FLIP: 0x66 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 64 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x32107654 - TX_LANE_MAP: 0x32107654 - RX_POLARITY_FLIP: 0x67 - TX_POLARITY_FLIP: 0xaa - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 - ? - PC_PM_ID: 65 - CORE_INDEX: 0 - : - RX_LANE_MAP: 0x00003210 - TX_LANE_MAP: 0x00003210 - RX_POLARITY_FLIP: 0x00 - TX_POLARITY_FLIP: 0x00 - RX_LANE_MAP_AUTO: 0 - TX_LANE_MAP_AUTO: 0 - RX_POLARITY_FLIP_AUTO: 0 - TX_POLARITY_FLIP_AUTO: 0 ---- -device: - 0: - PC_PORT_PHYS_MAP: - ? - PORT_ID: 1 - : - PC_PHYS_PORT_ID: 1 - ? - PORT_ID: 2 - : - PC_PHYS_PORT_ID: 5 - ? - PORT_ID: 3 - : - PC_PHYS_PORT_ID: 9 - ? - PORT_ID: 4 - : - PC_PHYS_PORT_ID: 13 - ? - PORT_ID: 11 - : - PC_PHYS_PORT_ID: 17 - ? - PORT_ID: 12 - : - PC_PHYS_PORT_ID: 21 - ? - PORT_ID: 13 - : - PC_PHYS_PORT_ID: 25 - ? - PORT_ID: 14 - : - PC_PHYS_PORT_ID: 29 - ? - PORT_ID: 22 - : - PC_PHYS_PORT_ID: 33 - ? - PORT_ID: 23 - : - PC_PHYS_PORT_ID: 37 - ? - PORT_ID: 24 - : - PC_PHYS_PORT_ID: 41 - ? - PORT_ID: 25 - : - PC_PHYS_PORT_ID: 45 - ? - PORT_ID: 33 - : - PC_PHYS_PORT_ID: 49 - ? - PORT_ID: 34 - : - PC_PHYS_PORT_ID: 53 - ? - PORT_ID: 35 - : - PC_PHYS_PORT_ID: 57 - ? - PORT_ID: 36 - : - PC_PHYS_PORT_ID: 61 - ? - PORT_ID: 44 - : - PC_PHYS_PORT_ID: 65 - ? - PORT_ID: 45 - : - PC_PHYS_PORT_ID: 69 - ? - PORT_ID: 46 - : - PC_PHYS_PORT_ID: 73 - ? - PORT_ID: 47 - : - PC_PHYS_PORT_ID: 77 - ? - PORT_ID: 55 - : - PC_PHYS_PORT_ID: 81 - ? - PORT_ID: 56 - : - PC_PHYS_PORT_ID: 85 - ? - PORT_ID: 57 - : - PC_PHYS_PORT_ID: 89 - ? - PORT_ID: 58 - : - PC_PHYS_PORT_ID: 93 - ? - PORT_ID: 66 - : - PC_PHYS_PORT_ID: 97 - ? - PORT_ID: 67 - : - PC_PHYS_PORT_ID: 101 - ? - PORT_ID: 68 - : - PC_PHYS_PORT_ID: 105 - ? - PORT_ID: 69 - : - PC_PHYS_PORT_ID: 109 - ? - PORT_ID: 77 - : - PC_PHYS_PORT_ID: 113 - ? - PORT_ID: 78 - : - PC_PHYS_PORT_ID: 117 - ? - PORT_ID: 79 - : - PC_PHYS_PORT_ID: 121 - ? - PORT_ID: 80 - : - PC_PHYS_PORT_ID: 125 - ? - PORT_ID: 88 - : - PC_PHYS_PORT_ID: 129 - ? - PORT_ID: 89 - : - PC_PHYS_PORT_ID: 133 - ? - PORT_ID: 90 - : - PC_PHYS_PORT_ID: 137 - ? - PORT_ID: 91 - : - PC_PHYS_PORT_ID: 141 - ? - PORT_ID: 99 - : - PC_PHYS_PORT_ID: 145 - ? - PORT_ID: 100 - : - PC_PHYS_PORT_ID: 149 - ? - PORT_ID: 101 - : - PC_PHYS_PORT_ID: 153 - ? - PORT_ID: 102 - : - PC_PHYS_PORT_ID: 157 - ? - PORT_ID: 110 - : - PC_PHYS_PORT_ID: 161 - ? - PORT_ID: 111 - : - PC_PHYS_PORT_ID: 165 - ? - PORT_ID: 112 - : - PC_PHYS_PORT_ID: 169 - ? - PORT_ID: 113 - : - PC_PHYS_PORT_ID: 173 - ? - PORT_ID: 121 - : - PC_PHYS_PORT_ID: 177 - ? - PORT_ID: 122 - : - PC_PHYS_PORT_ID: 181 - ? - PORT_ID: 123 - : - PC_PHYS_PORT_ID: 185 - ? - PORT_ID: 124 - : - PC_PHYS_PORT_ID: 189 - ? - PORT_ID: 132 - : - PC_PHYS_PORT_ID: 193 - ? - PORT_ID: 133 - : - PC_PHYS_PORT_ID: 197 - ? - PORT_ID: 134 - : - PC_PHYS_PORT_ID: 201 - ? - PORT_ID: 135 - : - PC_PHYS_PORT_ID: 205 - ? - PORT_ID: 143 - : - PC_PHYS_PORT_ID: 209 - ? - PORT_ID: 144 - : - PC_PHYS_PORT_ID: 213 - ? - PORT_ID: 145 - : - PC_PHYS_PORT_ID: 217 - ? - PORT_ID: 146 - : - PC_PHYS_PORT_ID: 221 - ? - PORT_ID: 154 - : - PC_PHYS_PORT_ID: 225 - ? - PORT_ID: 155 - : - PC_PHYS_PORT_ID: 229 - ? - PORT_ID: 156 - : - PC_PHYS_PORT_ID: 233 - ? - PORT_ID: 157 - : - PC_PHYS_PORT_ID: 237 - ? - PORT_ID: 165 - : - PC_PHYS_PORT_ID: 241 - ? - PORT_ID: 166 - : - PC_PHYS_PORT_ID: 245 - ? - PORT_ID: 167 - : - PC_PHYS_PORT_ID: 249 - ? - PORT_ID: 168 - : - PC_PHYS_PORT_ID: 253 - ? - PORT_ID: 176 - : - PC_PHYS_PORT_ID: 257 - ? - PORT_ID: 177 - : - PC_PHYS_PORT_ID: 261 - ? - PORT_ID: 178 - : - PC_PHYS_PORT_ID: 265 - ? - PORT_ID: 179 - : - PC_PHYS_PORT_ID: 269 - ? - PORT_ID: 187 - : - PC_PHYS_PORT_ID: 273 - ? - PORT_ID: 188 - : - PC_PHYS_PORT_ID: 277 - ? - PORT_ID: 189 - : - PC_PHYS_PORT_ID: 281 - ? - PORT_ID: 190 - : - PC_PHYS_PORT_ID: 285 - ? - PORT_ID: 198 - : - PC_PHYS_PORT_ID: 289 - ? - PORT_ID: 199 - : - PC_PHYS_PORT_ID: 293 - ? - PORT_ID: 200 - : - PC_PHYS_PORT_ID: 297 - ? - PORT_ID: 201 - : - PC_PHYS_PORT_ID: 301 - ? - PORT_ID: 209 - : - PC_PHYS_PORT_ID: 305 - ? - PORT_ID: 210 - : - PC_PHYS_PORT_ID: 309 - ? - PORT_ID: 211 - : - PC_PHYS_PORT_ID: 313 - ? - PORT_ID: 212 - : - PC_PHYS_PORT_ID: 317 - ? - PORT_ID: 220 - : - PC_PHYS_PORT_ID: 321 - ? - PORT_ID: 221 - : - PC_PHYS_PORT_ID: 325 - ? - PORT_ID: 222 - : - PC_PHYS_PORT_ID: 329 - ? - PORT_ID: 223 - : - PC_PHYS_PORT_ID: 333 - ? - PORT_ID: 231 - : - PC_PHYS_PORT_ID: 337 - ? - PORT_ID: 232 - : - PC_PHYS_PORT_ID: 341 - ? - PORT_ID: 233 - : - PC_PHYS_PORT_ID: 345 - ? - PORT_ID: 234 - : - PC_PHYS_PORT_ID: 349 - ? - PORT_ID: 242 - : - PC_PHYS_PORT_ID: 353 - ? - PORT_ID: 243 - : - PC_PHYS_PORT_ID: 357 - ? - PORT_ID: 244 - : - PC_PHYS_PORT_ID: 361 - ? - PORT_ID: 245 - : - PC_PHYS_PORT_ID: 365 - ? - PORT_ID: 253 - : - PC_PHYS_PORT_ID: 369 - ? - PORT_ID: 254 - : - PC_PHYS_PORT_ID: 373 - ? - PORT_ID: 255 - : - PC_PHYS_PORT_ID: 377 - ? - PORT_ID: 256 - : - PC_PHYS_PORT_ID: 381 - ? - PORT_ID: 264 - : - PC_PHYS_PORT_ID: 385 - ? - PORT_ID: 265 - : - PC_PHYS_PORT_ID: 389 - ? - PORT_ID: 266 - : - PC_PHYS_PORT_ID: 393 - ? - PORT_ID: 267 - : - PC_PHYS_PORT_ID: 397 - ? - PORT_ID: 275 - : - PC_PHYS_PORT_ID: 401 - ? - PORT_ID: 276 - : - PC_PHYS_PORT_ID: 405 - ? - PORT_ID: 277 - : - PC_PHYS_PORT_ID: 409 - ? - PORT_ID: 278 - : - PC_PHYS_PORT_ID: 413 - ? - PORT_ID: 286 - : - PC_PHYS_PORT_ID: 417 - ? - PORT_ID: 287 - : - PC_PHYS_PORT_ID: 421 - ? - PORT_ID: 288 - : - PC_PHYS_PORT_ID: 425 - ? - PORT_ID: 289 - : - PC_PHYS_PORT_ID: 429 - ? - PORT_ID: 297 - : - PC_PHYS_PORT_ID: 433 - ? - PORT_ID: 298 - : - PC_PHYS_PORT_ID: 437 - ? - PORT_ID: 299 - : - PC_PHYS_PORT_ID: 441 - ? - PORT_ID: 300 - : - PC_PHYS_PORT_ID: 445 - ? - PORT_ID: 308 - : - PC_PHYS_PORT_ID: 449 - ? - PORT_ID: 309 - : - PC_PHYS_PORT_ID: 453 - ? - PORT_ID: 310 - : - PC_PHYS_PORT_ID: 457 - ? - PORT_ID: 311 - : - PC_PHYS_PORT_ID: 461 - ? - PORT_ID: 319 - : - PC_PHYS_PORT_ID: 465 - ? - PORT_ID: 320 - : - PC_PHYS_PORT_ID: 469 - ? - PORT_ID: 321 - : - PC_PHYS_PORT_ID: 473 - ? - PORT_ID: 322 - : - PC_PHYS_PORT_ID: 477 - ? - PORT_ID: 330 - : - PC_PHYS_PORT_ID: 481 - ? - PORT_ID: 331 - : - PC_PHYS_PORT_ID: 485 - ? - PORT_ID: 332 - : - PC_PHYS_PORT_ID: 489 - ? - PORT_ID: 333 - : - PC_PHYS_PORT_ID: 493 - ? - PORT_ID: 341 - : - PC_PHYS_PORT_ID: 497 - ? - PORT_ID: 342 - : - PC_PHYS_PORT_ID: 501 - ? - PORT_ID: 343 - : - PC_PHYS_PORT_ID: 505 - ? - PORT_ID: 344 - : - PC_PHYS_PORT_ID: 509 - ? - PORT_ID: 76 - : - PC_PHYS_PORT_ID: 513 - ? - PORT_ID: 164 - : - PC_PHYS_PORT_ID: 514 -# ? -# PORT_ID: 274 -# : -# PC_PHYS_PORT_ID: 515 -# ? -# PORT_ID: 186 -# : -# PC_PHYS_PORT_ID: 516 -... ---- -device: - 0: - PC_PORT: - ? - PORT_ID: [[1, 4], - [11, 14], - [22, 25], - [33, 36], - [44, 47], - [55, 58], - [66, 69], - [77, 80], - [88, 91], - [99, 102], - [110, 113], - [121, 124], - [132, 135], - [143, 146], - [154, 157], - [165, 168], - [176, 179], - [187, 190], - [198, 201], - [209, 212], - [220, 223], - [231, 234], - [242, 245], - [253, 256], - [264, 267], - [275, 278], - [286, 289], - [297, 300], - [308, 311], - [319, 322], - [330, 333], - [341, 344]] - : - ENABLE: 0 - SPEED: 400000 - NUM_LANES: 4 - FEC_MODE: PC_FEC_RS544_2XN - MAX_FRAME_SIZE: 9416 - ? -# PORT_ID: [[76, 76], [164, 164], [274, 274], [186, 186]] - PORT_ID: [[76, 76], [164, 164]] - : - ENABLE: 0 - MAX_FRAME_SIZE: 9416 - SPEED: 10000 - NUM_LANES: 1 -... ---- -bcm_device: - 0: - global: - ftem_mem_entries: 65536 - sai_stats_support_mask: 0 - global_flexctr_ing_action_num_reserved: 20 - global_flexctr_ing_pool_num_reserved: 8 - global_flexctr_ing_op_profile_num_reserved: 20 - global_flexctr_ing_group_num_reserved: 2 - global_flexctr_egr_action_num_reserved: 8 - global_flexctr_egr_pool_num_reserved: 5 - global_flexctr_egr_op_profile_num_reserved: 10 - global_flexctr_egr_group_num_reserved: 1 -... ---- -device: - 0: - # Per pipe flex counter configuration - CTR_EFLEX_CONFIG: - CTR_ING_EFLEX_OPERMODE_PIPEUNIQUE: 1 - CTR_ING_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1 - CTR_EGR_EFLEX_OPERMODE_PIPEUNIQUE: 1 - CTR_EGR_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1 - - # IFP mode - FP_CONFIG: - FP_ING_OPERMODE: GLOBAL_PIPE_AWARE -... ---- -device: - 0: - DEVICE_CONFIG: - AUTOLOAD_BOARD_SETTINGS: 0 -... -### Baseline -# Skipping buffer reservation. This means that don't use SDK default setings. ---- -device: - 0: - TM_THD_CONFIG: - MIRROR_ON_DROP_RESERVATION: 0 - SKIP_BUFFER_RESERVATION: 1 - THRESHOLD_MODE: LOSSY_AND_LOSSLESS - - TM_SCHEDULER_CONFIG: - NUM_MC_Q: NUM_MC_Q_4 - -... -# Initialize the various thresholds to zero ---- -# Ingress service pool level initialization -device: - 0: - # Ingress service pool - TM_ING_THD_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_ING_SERVICE_POOL_ID: [[0,3]] - : - COLOR_SPECIFIC_LIMITS: 0 - SHARED_LIMIT_CELLS: 0 - SHARED_RESUME_OFFSET_CELLS: 0 - YELLOW_OFFSET_CELLS: 0 - RED_OFFSET_CELLS: 0 - - # Ingress headroom pool - TM_ING_THD_HEADROOM_POOL: - ? - BUFFER_POOL: [0,1] - TM_HEADROOM_POOL_ID: [[0,3]] - : - LIMIT_CELLS: 0 - -... -# Ingress priority to PG mappings ---- -device: - 0: - # priority to PG mapping for UC traffic, 8 profiles (IDs), 16 priorties - TM_ING_UC_ING_PRI_MAP: - ? - # Profile 0 - TM_ING_UC_ING_PRI_MAP_ID: [0,7] - ING_PRI: [0,15] - : - TM_PRI_GRP_ID: 0 - - # priority to PG mapping for MC traffic, 8 profiles( IDs) 16 priorities - TM_ING_NONUC_ING_PRI_MAP: - ? - # Profile 0 - TM_ING_NONUC_ING_PRI_MAP_ID: [0,7] - ING_PRI: [0,15] - : - TM_PRI_GRP_ID: 0 - - TM_PRI_GRP_POOL_MAP: - ? - TM_PRI_GRP_POOL_MAP_ID: [0,7] - TM_PRI_GRP_ID: [[0,7]] - : - TM_ING_SERVICE_POOL_ID: 0 - TM_HEADROOM_POOL_ID: 0 - - # PFC generation: Priority group(s) - TM_PFC_PRI_TO_PRI_GRP_MAP: - ? - TM_PFC_PRI_TO_PRI_GRP_MAP_ID: [0,7] - PFC_PRI: [0,7] - : - TM_PRI_GRP_ID: 0 - -... -# Egress service pool level initialization -# Output port Thresholds ---- -device: - 0: - # Egress unicast shared pool - TM_EGR_THD_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: [[0,3]] - : - COLOR_SPECIFIC_LIMITS: 0 - SHARED_LIMIT_CELLS: 0 - SHARED_RESUME_LIMIT_CELLS: 0 - YELLOW_SHARED_LIMIT_CELLS: 0 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 0 - RED_SHARED_LIMIT_CELLS: 0 - RED_SHARED_RESUME_LIMIT_CELLS: 0 - - # Egress multicast CQE pool - TM_THD_MC_EGR_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: [[0,3]] - : - COLOR_SPECIFIC_LIMITS: 0 - SHARED_LIMIT_CELLS: 0 - SHARED_RESUME_LIMIT_CELLS: 0 - YELLOW_SHARED_LIMIT_CELLS: 0 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 0 - RED_SHARED_LIMIT_CELLS: 0 - RED_SHARED_RESUME_LIMIT_CELLS: 0 - - TM_THD_DYNAMIC_MARGIN: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: [0,3] - : - MARGIN: [8256,16513,24769,33026,41282,49539,57795,66052,82565,99078] - -... -# Per Port Registers -# Input Port Thresholds ---- -device: - 0: - # Set PG is LOSSLESS, PFC enable bit - TM_ING_PORT_PRI_GRP: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_PRI_GRP_ID: [[0,7]] - : - PFC: 0 - LOSSLESS: 0 - ING_MIN_MODE: USE_PRI_GRP_MIN - - TM_ING_PORT: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - : - # Pause enable bit, - PAUSE: 0 - # Ingress priority profile select, maps to priority group - ING_PRI_MAP_ID: 0 - #Priority group profile select, maps to service pool - PRI_GRP_MAP_ID: 0 - - # Ingress port Level to Service Pool limits - TM_ING_THD_PORT_SERVICE_POOL: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_ING_SERVICE_POOL_ID: [[0,3]] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMIT_CELLS: 0 - RESUME_LIMIT_CELLS: 0 - - # Port level PG limits - TM_ING_THD_PORT_PRI_GRP: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_PRI_GRP_ID: [[0,7]] - : - MIN_GUARANTEE_CELLS: 0 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 0 - RESUME_OFFSET_CELLS: 0 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - HEADROOM_LIMIT_CELLS: 0 - EARLY_PFC_XOFF_OFFSET_CELLS: 0 - EARLY_PFC_XON_OFFSET_CELLS: 0 - EARLY_PFC_FLOOR_CELLS: 0 -... -# Output Port Thresholds -2 -# Per Unicast Queue Thresholds ---- -device: - 0: - TM_EGR_SERVICE_POOL_DYNAMIC: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: [0,3] - : - ADAPTIVE_DYNAMIC: ALPHA_1 - - TM_PORT_UC_Q_TO_SERVICE_POOL: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_UC_Q_ID: [[0,7]] - : - USE_QGROUP_MIN: 0 - - TM_THD_UC_Q: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_UC_Q_ID: [[0,7]] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 0 - - TM_PORT_MC_Q_TO_SERVICE_POOL: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_MC_Q_ID: [[0,3]] - : - USE_QGROUP_MIN: 0 - - TM_THD_MC_Q: - ? - # CPU port, 48 MC queues - PORT_ID: 0 - TM_MC_Q_ID: [[0,47]] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 0 - ? - # uplink, downlink and loopback ports, 2 MC queues - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_MC_Q_ID: [[0,3]] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 0 - - TM_THD_Q_GRP: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - : - UC_Q_GRP_MIN_GUARANTEE_CELLS: 0 - MC_Q_GRP_MIN_GUARANTEE_CELLS: 0 - - TM_EGR_THD_UC_PORT_SERVICE_POOL: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_EGR_SERVICE_POOL_ID: [0,3] - : - COLOR_SPECIFIC_LIMITS: 0 - SHARED_LIMIT_CELLS: 0 - SHARED_RESUME_LIMIT_CELLS: 0 - YELLOW_SHARED_LIMIT_CELLS: 0 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 0 - RED_SHARED_LIMIT_CELLS: 0 - RED_SHARED_RESUME_LIMIT_CELLS: 0 - - TM_EGR_THD_MC_PORT_SERVICE_POOL: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_EGR_SERVICE_POOL_ID: [0,3] - : - COLOR_SPECIFIC_LIMITS: 0 - RED_SHARED_LIMIT_CELLS: 0 - YELLOW_SHARED_LIMIT_CELLS: 0 - SHARED_LIMIT_CELLS: 0 - RED_SHARED_RESUME_LIMIT_CELLS: 0 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 0 - SHARED_RESUME_LIMIT_CELLS: 0 -... -### THDR Limits : initialization ---- -device: - 0: - TM_THD_REPL_Q: - ? - REPL_Q_NUM: [0,6] - : - SHARED_LIMITS: 0 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - RESUME_OFFSET_CELLS: 0 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_DYNAMIC: PERCENTAGE_750 - RED_LIMIT_DYNAMIC: PERCENTAGE_625 - SHARED_LIMIT_PKTS: 0 - DYNAMIC_SHARED_LIMIT_PKTS: 0 - SHARED_LIMIT_DYNAMIC_PKTS: ALPHA_1 - RESUME_OFFSET_PKTS: 0 - COLOR_SPECIFIC_LIMIT_PKTS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMIT_PKTS: 0 - YELLOW_LIMIT_DYNAMIC_PKTS: PERCENTAGE_750 - RED_LIMIT_DYNAMIC_PKTS: PERCENTAGE_625 - MIN_GUARANTEE_CELLS: 0 - MIN_GUARANTEE_PKTS: 0 - - TM_THD_REPL_SERVICE_POOL: - SHARED_LIMIT_CELLS: 0 - SHARED_RESUME_LIMIT_CELLS: 0 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_CELLS: 0 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 0 - RED_SHARED_LIMIT_CELLS: 0 - RED_SHARED_RESUME_LIMIT_CELLS: 0 - SHARED_LIMIT_PKTS: 0 - SHARED_RESUME_LIMIT_PKTS: 0 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_PKTS: 0 - YELLOW_SHARED_RESUME_LIMIT_PKTS: 0 - RED_SHARED_LIMIT_PKTS: 0 - RED_SHARED_RESUME_LIMIT_PKTS: 0 - -... -### Begin MMU ingress threshold settings -### Pools ---- -device: - 0: -# Ingress Service Pool Thresholds - TM_ING_THD_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_ING_SERVICE_POOL_ID: 0 - : - SHARED_LIMIT_CELLS: 269671 - SHARED_RESUME_OFFSET_CELLS: 74 - COLOR_SPECIFIC_LIMITS: 0 - ? - BUFFER_POOL: [0,1] - TM_ING_SERVICE_POOL_ID: 1 - : - SHARED_LIMIT_CELLS: 605 - SHARED_RESUME_OFFSET_CELLS: 74 - COLOR_SPECIFIC_LIMITS: 0 - -# Ingress Headroom Pool Thresholds - TM_ING_THD_HEADROOM_POOL: - ? - BUFFER_POOL: [0,1] - TM_HEADROOM_POOL_ID: 0 - : - LIMIT_CELLS: 43376 - -... ---- -device: - 0: -# UC Traffic Priority to PG mapping - TM_ING_UC_ING_PRI_MAP: - ? - # Profile 0 - TM_ING_UC_ING_PRI_MAP_ID: 0 - ING_PRI: [0, 1, 2, 5, 6, [8,15]] - : - TM_PRI_GRP_ID: 0 - ? - TM_ING_UC_ING_PRI_MAP_ID: 0 - ING_PRI: 3 - : - TM_PRI_GRP_ID: 3 - ? - TM_ING_UC_ING_PRI_MAP_ID: 0 - ING_PRI: 4 - : - TM_PRI_GRP_ID: 4 - ? - TM_ING_UC_ING_PRI_MAP_ID: 0 - ING_PRI: 7 - : - TM_PRI_GRP_ID: 7 - ? - # Profile 1 - TM_ING_UC_ING_PRI_MAP_ID: 1 - ING_PRI: [[0,7]] - : - TM_PRI_GRP_ID: 7 - ? - TM_ING_UC_ING_PRI_MAP_ID: 1 - ING_PRI: [[8,15]] - : - TM_PRI_GRP_ID: 0 - -# MC Traffic Priority to PG mapping - TM_ING_NONUC_ING_PRI_MAP: - ? - # Profile 0 - TM_ING_NONUC_ING_PRI_MAP_ID: 0 - ING_PRI: [0, 1, 2, 5, 6, [8,15]] - : - TM_PRI_GRP_ID: 0 - ? - TM_ING_NONUC_ING_PRI_MAP_ID: 0 - ING_PRI: 3 - : - TM_PRI_GRP_ID: 3 - ? - TM_ING_NONUC_ING_PRI_MAP_ID: 0 - ING_PRI: 4 - : - TM_PRI_GRP_ID: 4 - ? - TM_ING_NONUC_ING_PRI_MAP_ID: 0 - ING_PRI: 7 - : - TM_PRI_GRP_ID: 7 - ? - # Profile 1 - TM_ING_NONUC_ING_PRI_MAP_ID: 1 - ING_PRI: [[0,7]] - : - TM_PRI_GRP_ID: 7 - ? - TM_ING_NONUC_ING_PRI_MAP_ID: 1 - ING_PRI: [[8,15]] - : - TM_PRI_GRP_ID: 0 - -# PG to Headroom Pool Mapping - TM_PRI_GRP_POOL_MAP: - ? - TM_PRI_GRP_POOL_MAP_ID: 0 - TM_PRI_GRP_ID: [[0,6]] - : - TM_HEADROOM_POOL_ID: 0 - ? - TM_PRI_GRP_POOL_MAP_ID: 0 - TM_PRI_GRP_ID: 7 - : - TM_HEADROOM_POOL_ID: 1 - -# PG to Service Pool Mapping - TM_PRI_GRP_POOL_MAP: - ? - TM_PRI_GRP_POOL_MAP_ID: 0 - TM_PRI_GRP_ID: [[0,6]] - : - TM_ING_SERVICE_POOL_ID: 0 - ? - TM_PRI_GRP_POOL_MAP_ID: 0 - TM_PRI_GRP_ID: 7 - : - TM_ING_SERVICE_POOL_ID: 1 - -# Ingress PG to PFC priority mapping -# TM_PFC_PRI_TO_PRI_GRP_MAP is mapped to MMU_THDI_PFCPRI_PG_PROFILE in physical table. There are 8 profiles to configure the PFC to priority group mappings. For exmple, you could map multiple PG to a PFC. This is needed to generate PFC when a PG is hitting the limits. - TM_PFC_PRI_TO_PRI_GRP_MAP: - ? - TM_PFC_PRI_TO_PRI_GRP_MAP_ID: 0 - PFC_PRI: 3 - : - TM_PRI_GRP_ID: 3 - ? - TM_PFC_PRI_TO_PRI_GRP_MAP_ID: 0 - PFC_PRI: 4 - : - TM_PRI_GRP_ID: 4 - -# Per input port PG and flow control configurations -# TM_ING_PORT_PRI_GRP is mapped to MMU_THDI_ING_PORT_CONFIG in physical table - TM_ING_PORT_PRI_GRP: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - TM_PRI_GRP_ID: [3,4] - : - PFC: 1 - LOSSLESS: 1 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - TM_PRI_GRP_ID: [3,4] - : - PFC: 1 - LOSSLESS: 1 - -# ING_PRI_MAP_ID is the ingress priority PG profile select, which maps to the Priority Group -# PRI_GRP_MAP_ID is the Priority Group profile select, which maps to service pool - TM_ING_PORT: - ? - PORT_ID: [0] - : - ING_PRI_MAP_ID: 1 - PRI_GRP_MAP_ID: 0 - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - ING_PRI_MAP_ID: 0 - PRI_GRP_MAP_ID: 0 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - ING_PRI_MAP_ID: 0 - PRI_GRP_MAP_ID: 0 - ? - PORT_ID: [76, 274] - : - ING_PRI_MAP_ID: 1 - PRI_GRP_MAP_ID: 0 - ? - PORT_ID: [21, 43, 65, 87, 109, 131, 153, 175, 197, 219, 241, 263, 285, 307, 329, 351] - : - ING_PRI_MAP_ID: 1 - PRI_GRP_MAP_ID: 0 - -... -###################################### ---- -device: - 0: -# Per input port Service Pool Thresholds - TM_ING_THD_PORT_SERVICE_POOL: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_ING_SERVICE_POOL_ID: [0, 1] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMIT_CELLS: 329816 - RESUME_LIMIT_CELLS: 329816 - -# Per input Port PG Thresholds - TM_ING_THD_PORT_PRI_GRP: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_PRI_GRP_ID: [0, 1, 2, 5, 6, 7] - : - MIN_GUARANTEE_CELLS: 0 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 329816 - HEADROOM_LIMIT_CELLS: 0 - RESUME_OFFSET_CELLS: 0 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - TM_PRI_GRP_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 74 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - RESUME_OFFSET_CELLS: 14 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - HEADROOM_LIMIT_CELLS: 2410 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - TM_PRI_GRP_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 74 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - RESUME_OFFSET_CELLS: 14 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - HEADROOM_LIMIT_CELLS: 1548 - ? - PORT_ID: [76, 274] - TM_PRI_GRP_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 0 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - RESUME_OFFSET_CELLS: 0 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - HEADROOM_LIMIT_CELLS: 0 - ? - PORT_ID: [21, 43, 65, 87, 109, 131, 153, 175, 197, 219, 241, 263, 285, 307, 329, 351] - TM_PRI_GRP_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 0 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - RESUME_OFFSET_CELLS: 0 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - ? - PORT_ID: [0] - TM_PRI_GRP_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 0 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1_4 - RESUME_OFFSET_CELLS: 0 - RESUME_FLOOR_CELLS: 0 - HEADROOM_LIMIT_AUTO: 0 - -... -### Egress Service Pools ---- -device: - 0: -# Setting Q group limit to 0 - TM_THD_Q_GRP: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - : - UC_Q_GRP_MIN_GUARANTEE_CELLS: 0 - MC_Q_GRP_MIN_GUARANTEE_CELLS: 0 - -# Unicast Egress Service Pool Limits - TM_EGR_THD_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: 0 - : - SHARED_LIMIT_CELLS: 269671 - SHARED_RESUME_LIMIT_CELLS: 33699 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_CELLS: 25282 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 25272 - RED_SHARED_LIMIT_CELLS: 21069 - RED_SHARED_RESUME_LIMIT_CELLS: 21059 - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: 1 - : - SHARED_LIMIT_CELLS: 605 - SHARED_RESUME_LIMIT_CELLS: 73 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_CELLS: 57 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 55 - RED_SHARED_LIMIT_CELLS: 48 - RED_SHARED_RESUME_LIMIT_CELLS: 46 -... ---- -device: - 0: -# Multicast Egress Service Pool Limits, CQEs - TM_THD_MC_EGR_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: 0 - : - SHARED_LIMIT_CELLS: 19538 - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: 1 - : - SHARED_LIMIT_CELLS: 605 -... ---- -device: - 0: -# Multicast Egress Service Pool Limits, CQEs - TM_THD_MC_EGR_SERVICE_POOL: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: 0 - : - SHARED_RESUME_LIMIT_CELLS: 2432 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_CELLS: 1832 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 1822 - RED_SHARED_LIMIT_CELLS: 1527 - RED_SHARED_RESUME_LIMIT_CELLS: 1517 - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: 1 - : - SHARED_RESUME_LIMIT_CELLS: 73 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_CELLS: 57 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 55 - RED_SHARED_LIMIT_CELLS: 48 - RED_SHARED_RESUME_LIMIT_CELLS: 46 -... -... -### Adaptive Alpha ---- -device: - 0: - TM_EGR_SERVICE_POOL_DYNAMIC: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: [0] - : - ADAPTIVE_DYNAMIC: ALPHA_1 - - TM_THD_DYNAMIC_MARGIN: - ? - BUFFER_POOL: [0,1] - TM_EGR_SERVICE_POOL_ID: [0] - : - MARGIN: [16513, 33026, 49539, 66052, 82565, 99078, 115591, 132104, 148617, 165130] - -... ---- -device: - 0: - TM_PORT_UC_Q_TO_SERVICE_POOL: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_UC_Q_ID: [0,1,2,5,6] - : - USE_QGROUP_MIN: 0 - TM_EGR_SERVICE_POOL_ID: 0 - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_UC_Q_ID: [3,4] - : - USE_QGROUP_MIN: 0 - TM_EGR_SERVICE_POOL_ID: 0 - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_UC_Q_ID: 7 - : - USE_QGROUP_MIN: 0 - TM_EGR_SERVICE_POOL_ID: 1 - - TM_PORT_MC_Q_TO_SERVICE_POOL: - ? - PORT_ID: [0] - TM_MC_Q_ID: [[0,47]] - : - USE_QGROUP_MIN: 0 - TM_EGR_SERVICE_POOL_ID: 1 - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_MC_Q_ID: [[0,3]] - : - USE_QGROUP_MIN: 0 - TM_EGR_SERVICE_POOL_ID: 0 -... -### Queue Thresholds -###################################### ---- -device: - 0: - TM_THD_UC_Q: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - TM_UC_Q_ID: [0, 1, 2, 5, 6, 7] - : - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_CELLS_STATIC: 0 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - DYNAMIC_GROUP: MID_PRI_GROUP - RESUME_OFFSET_CELLS: 2 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_CELLS_STATIC: 0 - YELLOW_LIMIT_DYNAMIC: PERCENTAGE_750 - RED_LIMIT_CELLS_STATIC: 0 - RED_LIMIT_DYNAMIC: PERCENTAGE_625 - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - TM_UC_Q_ID: [0, 1, 2, 5, 6, 7] - : - MIN_GUARANTEE_CELLS: 7 - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - TM_UC_Q_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMITS: 0 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 329816 - DYNAMIC_GROUP: MID_PRI_GROUP - RESUME_OFFSET_CELLS: 2 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_CELLS_STATIC: 0 - RED_LIMIT_CELLS_STATIC: 0 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - TM_UC_Q_ID: [0, 1, 2, 5, 6, 7] - : - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_CELLS_STATIC: 0 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - DYNAMIC_GROUP: MID_PRI_GROUP - RESUME_OFFSET_CELLS: 2 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_CELLS_STATIC: 0 - YELLOW_LIMIT_DYNAMIC: PERCENTAGE_750 - RED_LIMIT_CELLS_STATIC: 0 - RED_LIMIT_DYNAMIC: PERCENTAGE_625 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - TM_UC_Q_ID: [0, 1, 2, 5, 6, 7] - : - MIN_GUARANTEE_CELLS: 7 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - TM_UC_Q_ID: [3,4] - : - MIN_GUARANTEE_CELLS: 0 - SHARED_LIMITS: 0 - DYNAMIC_SHARED_LIMITS: 0 - SHARED_LIMIT_CELLS_STATIC: 329816 - DYNAMIC_GROUP: MID_PRI_GROUP - RESUME_OFFSET_CELLS: 2 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_CELLS_STATIC: 0 - RED_LIMIT_CELLS_STATIC: 0 - - TM_THD_MC_Q: - ? - PORT_ID: [0] - TM_MC_Q_ID: [[0,47]] - : - MIN_GUARANTEE_CELLS: 7 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1_4 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_DYNAMIC: PERCENTAGE_750 - RED_LIMIT_DYNAMIC: PERCENTAGE_625 - RESUME_OFFSET_CELLS: 2 - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_MC_Q_ID: [[0,3]] - : - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_DYNAMIC: PERCENTAGE_750 - RED_LIMIT_DYNAMIC: PERCENTAGE_625 - RESUME_OFFSET_CELLS: 2 - -# Egress Port Thresholds. - TM_EGR_THD_UC_PORT_SERVICE_POOL: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_EGR_SERVICE_POOL_ID: 0 - : - COLOR_SPECIFIC_LIMITS: 0 - RED_SHARED_LIMIT_CELLS: 21068 - YELLOW_SHARED_LIMIT_CELLS: 25281 - SHARED_LIMIT_CELLS: 269671 - RED_SHARED_RESUME_LIMIT_CELLS: 21066 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 25279 - SHARED_RESUME_LIMIT_CELLS: 33707 - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_EGR_SERVICE_POOL_ID: 1 - : - COLOR_SPECIFIC_LIMITS: 0 - RED_SHARED_LIMIT_CELLS: 47 - YELLOW_SHARED_LIMIT_CELLS: 56 - SHARED_LIMIT_CELLS: 605 - RED_SHARED_RESUME_LIMIT_CELLS: 45 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 54 - SHARED_RESUME_LIMIT_CELLS: 73 - - TM_EGR_THD_MC_PORT_SERVICE_POOL: - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_EGR_SERVICE_POOL_ID: 0 - : - COLOR_SPECIFIC_LIMITS: 0 - RED_SHARED_LIMIT_CELLS: 1526 - YELLOW_SHARED_LIMIT_CELLS: 1831 - SHARED_LIMIT_CELLS: 19538 - RED_SHARED_RESUME_LIMIT_CELLS: 1524 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 1829 - SHARED_RESUME_LIMIT_CELLS: 2440 - ? - PORT_ID: [[0,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - TM_EGR_SERVICE_POOL_ID: 1 - : - COLOR_SPECIFIC_LIMITS: 0 - RED_SHARED_LIMIT_CELLS: 47 - YELLOW_SHARED_LIMIT_CELLS: 56 - SHARED_LIMIT_CELLS: 605 - RED_SHARED_RESUME_LIMIT_CELLS: 45 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 54 - SHARED_RESUME_LIMIT_CELLS: 73 - -... -### PFC mapping ---- -device: - 0: - PC_MAC_CONTROL: - ? - PORT_ID: [[1,4], [11,14], [21,25], [33,36], [43,47], [55,58], [65,69], [76,80], [87,91], [99,102], [109,113], [121,124], [131,135], [143,146], [153,157], [165,168], [175,179], [187,190], [197,201], [209,212], [219,223], [231,234], [241,245], [253,256], [263,267], [274,278], [285,289], [297,300], [307,311], [319,322], [329,333], [341,344], 351] - : - PAUSE_TX: 0 - PAUSE_RX: 0 - - TM_PFC_EGR: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - TM_PFC_PRI_PROFILE_ID: 0 - - TM_PFC_EGR: - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - TM_PFC_PRI_PROFILE_ID: 0 -... ---- -device: - 0: -# TM_PFC_PRI_PROFILE is mapped to MMU_INTFI_PFCRPI_PROFILE in physical table. There are 8 profiles to configure the PFC value to COS/priorities mapping. For example, you could map multiple coses to a PFC. This mapping is needed when receiving PFC frames and stopping queues(coses) according to the PFC frame received. - TM_PFC_PRI_PROFILE: - ? - TM_PFC_PRI_PROFILE_ID: 0 - PFC_PRI: 3 - : - PFC: 1 - COS_LIST: [0, 0, 0, 1, 0, 0, 0, 0, 0, 0] - ? - TM_PFC_PRI_PROFILE_ID: 0 - PFC_PRI: 4 - : - PFC: 1 - COS_LIST: [0, 0, 0, 0, 1, 0, 0, 0, 0, 0] - - -# enable the MAC's PFC controls. - PC_PFC: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - ENABLE_RX: 1 - ENABLE_TX: 1 - - PC_PFC: - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - ENABLE_RX: 1 - ENABLE_TX: 1 -... -### Mirror-on-drop ---- -device: - 0: - TM_MIRROR_ON_DROP_CONTROL: - RESERVED_LIMIT_CELLS: 0 - - TM_MIRROR_ON_DROP_PROFILE: - ? - TM_MIRROR_ON_DROP_PROFILE_ID: 0 - : - PERCENTAGE_0_25: 65535 - PERCENTAGE_25_50: 65535 - PERCENTAGE_50_75: 65535 - PERCENTAGE_75_100: 65535 - INGRESS_LIMIT: 0 - SHARED_LIMIT: 0 - - TM_MIRROR_ON_DROP_DESTINATION: - ? - TM_MIRROR_ON_DROP_DESTINATION_ID: 0 - : - TM_MC_Q_ID: 11 - PORT_ID: 1 -... -### THDR Limits ---- -device: - 0: - TM_THD_REPL_Q: - ? - REPL_Q_NUM: [0,6] - : - SHARED_LIMITS: 1 - DYNAMIC_SHARED_LIMITS: 1 - SHARED_LIMIT_DYNAMIC: ALPHA_1 - RESUME_OFFSET_CELLS: 14 - COLOR_SPECIFIC_LIMITS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMITS: 0 - YELLOW_LIMIT_DYNAMIC: PERCENTAGE_750 - RED_LIMIT_DYNAMIC: PERCENTAGE_625 - SHARED_LIMIT_PKTS: 1 - DYNAMIC_SHARED_LIMIT_PKTS: 1 - SHARED_LIMIT_DYNAMIC_PKTS: ALPHA_1 - RESUME_OFFSET_PKTS: 14 - COLOR_SPECIFIC_LIMIT_PKTS: 0 - COLOR_SPECIFIC_DYNAMIC_LIMIT_PKTS: 0 - YELLOW_LIMIT_DYNAMIC_PKTS: PERCENTAGE_750 - RED_LIMIT_DYNAMIC_PKTS: PERCENTAGE_625 - - TM_THD_REPL_Q: - ? - REPL_Q_NUM: [0,3] - : - MIN_GUARANTEE_CELLS: 0 - MIN_GUARANTEE_PKTS: 0 - ? - REPL_Q_NUM: [4,6] - : - MIN_GUARANTEE_CELLS: 37 - MIN_GUARANTEE_PKTS: 7 - - TM_THD_REPL_SERVICE_POOL: - SHARED_LIMIT_CELLS: 11153 - SHARED_RESUME_LIMIT_CELLS: 11139 - SHARED_LIMIT_PKTS: 3051 - SHARED_RESUME_LIMIT_PKTS: 3037 - COLOR_SPECIFIC_LIMITS: 0 - YELLOW_SHARED_LIMIT_CELLS: 8364 - RED_SHARED_LIMIT_CELLS: 6970 - YELLOW_SHARED_LIMIT_PKTS: 2288 - RED_SHARED_LIMIT_PKTS: 1906 - YELLOW_SHARED_RESUME_LIMIT_CELLS: 8350 - RED_SHARED_RESUME_LIMIT_CELLS: 6956 - YELLOW_SHARED_RESUME_LIMIT_PKTS: 2274 - RED_SHARED_RESUME_LIMIT_PKTS: 1892 - -... -### OBM ---- -device: - 0: - TM_OBM_PORT_PKT_PARSE: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - OUTER_TPID: 1 - HEADER_TYPE: OBM_HEADER_TYPE_ETHERNET - DEFAULT_PKT_PRI: 0 # mapp to obm_lossy_low - - TM_OBM_PORT_PKT_PARSE: - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - OUTER_TPID: 1 - HEADER_TYPE: OBM_HEADER_TYPE_ETHERNET - DEFAULT_PKT_PRI: 0 # mapp to obm_lossy_low - - TM_OBM_PORT_PKT_PRI_TC_MAP: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: 1 - : - TRAFFIC_CLASS: OBM_TC_LOSSLESS0 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: 1 - : - TRAFFIC_CLASS: OBM_TC_LOSSLESS0 - - TM_OBM_PC_PM_PKT_PARSE: - ? - PC_PM_ID: [1,65] - : - OUTER_TPID: 0x8100 - - TM_OBM_THD_PORT: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - THD_AUTO: 0 - MAX_BYTES: 244736 - LOSSY_LOW_MAX_BYTES: 46720 - LOSSY_MAX_BYTES: 53504 - LOSSLESS0_MAX_BYTES: 502528 - LOSSLESS1_MAX_BYTES: 502528 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - THD_AUTO: 0 - MAX_BYTES: 244736 - LOSSY_LOW_MAX_BYTES: 46720 - LOSSY_MAX_BYTES: 53504 - LOSSLESS0_MAX_BYTES: 502528 - LOSSLESS1_MAX_BYTES: 502528 - - TM_OBM_THD_PORT_FLOW_CTRL: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - THD_AUTO: 0 - XOFF_BYTES: 162432 - XON_BYTES: 161920 - LOSSLESS0_XOFF_BYTES: 5184 - LOSSLESS0_XON_BYTES: 4672 - LOSSLESS1_XOFF_BYTES: 5184 - LOSSLESS1_XON_BYTES: 4672 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - THD_AUTO: 0 - XOFF_BYTES: 162432 - XON_BYTES: 161920 - LOSSLESS0_XOFF_BYTES: 5184 - LOSSLESS0_XON_BYTES: 4672 - LOSSLESS1_XOFF_BYTES: 5184 - LOSSLESS1_XON_BYTES: 4672 - - TM_OBM_PORT_FLOW_CTRL: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - : - FLOW_CTRL: 1 - FLOW_CTRL_TYPE: PFC - LOSSLESS0_FLOW_CTRL: 1 - LOSSLESS1_FLOW_CTRL: 0 - COS_BMAP_LOSSLESS0: [0,0,0,1,1,0,0,0] - COS_BMAP_LOSSLESS1: 0 - - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - : - FLOW_CTRL: 1 - FLOW_CTRL_TYPE: PFC - LOSSLESS0_FLOW_CTRL: 1 - LOSSLESS1_FLOW_CTRL: 0 - COS_BMAP_LOSSLESS0: [0,0,0,1,1,0,0,0] - COS_BMAP_LOSSLESS1: 0 - - TM_OBM_PORT_PKT_PRI_TC_MAP: - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: [0,1,2,5,6,7] - : - TRAFFIC_CLASS: OBM_TC_LOSSY_LOW - ? - PORT_ID: [[1,4], [44,47], [88,91], [132,135], [176,179], [220,223], [264,267], [308,311]] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: [3,4] - : - TRAFFIC_CLASS: OBM_TC_LOSSLESS0 - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: [0,1,2,5,6,7] - : - TRAFFIC_CLASS: OBM_TC_LOSSY_LOW - ? - PORT_ID: [[11,14], [22,25], [33,36], [55,58], [66,69], [77,80], [99,102], [110,113], [121,124], [143,146], [154,157], [165,168], [187,190], [198,201], [209,212], [231,234], [242,245], [253,256], [275,278], [286,289], [297,300], [319,322], [330,333], [341,344]] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: [3,4] - : - TRAFFIC_CLASS: OBM_TC_LOSSLESS0 - ? - PORT_ID: [76, 274] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: [0,1,2,5,6,7] - : - TRAFFIC_CLASS: OBM_TC_LOSSY_LOW - ? - PORT_ID: [76, 274] - PKT_PRI_TYPE: PKT_PRI_TYPE_VLAN - PKT_PRI: [3,4] - : - TRAFFIC_CLASS: OBM_TC_LOSSLESS0 -... diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/hwsku.json deleted file mode 100644 index 6c2013a138d..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/hwsku.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "interfaces": { - "Ethernet0": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet4": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet8": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet12": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet16": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet20": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet24": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet28": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet32": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet36": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet40": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet44": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet48": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet52": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet56": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet60": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet64": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet68": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet72": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet76": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet80": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet84": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet88": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet92": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet96": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet100": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet104": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet108": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet112": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet116": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet120": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet124": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet128": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet132": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet136": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet140": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet144": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet148": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet152": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet156": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet160": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet164": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet168": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet172": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet176": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet180": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet184": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet188": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet192": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet196": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet200": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet204": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet208": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet212": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet216": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet220": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet224": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet228": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet232": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet236": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet240": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet244": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet248": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet252": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet256": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet260": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet264": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet268": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet272": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet276": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet280": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet284": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet288": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet292": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet296": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet300": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet304": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet308": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet312": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet316": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet320": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet324": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet328": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet332": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet336": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet340": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet344": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet348": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet352": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet356": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet360": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet364": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet368": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet372": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet376": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet380": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet384": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet388": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet392": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet396": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet400": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet404": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet408": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet412": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet416": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet420": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet424": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet428": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet432": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet436": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet440": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet444": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet448": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet452": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet456": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet460": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet464": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet468": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet472": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet476": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet480": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet484": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet488": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet492": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet496": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet500": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet504": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet508": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet512": { - "fec": "none", - "default_brkout_mode": "2x10G(2)" - } - } -} diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/hwsku.json new file mode 120000 index 00000000000..6a01b06cf91 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/hwsku.json @@ -0,0 +1 @@ +../Arista-7060X6-16PE-384C-O128S2/hwsku.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/port_config.ini b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/port_config.ini deleted file mode 100644 index 123aef1ab4b..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/port_config.ini +++ /dev/null @@ -1,131 +0,0 @@ -# name lanes alias index speed fec -Ethernet0 369,370,371,372 etp1a 1 400000 rs -Ethernet4 373,374,375,376 etp1b 1 400000 rs -Ethernet8 385,386,387,388 etp2a 2 400000 rs -Ethernet12 389,390,391,392 etp2b 2 400000 rs -Ethernet16 433,434,435,436 etp3a 3 400000 rs -Ethernet20 437,438,439,440 etp3b 3 400000 rs -Ethernet24 449,450,451,452 etp4a 4 400000 rs -Ethernet28 453,454,455,456 etp4b 4 400000 rs -Ethernet32 305,306,307,308 etp5a 5 400000 rs -Ethernet36 309,310,311,312 etp5b 5 400000 rs -Ethernet40 321,322,323,324 etp6a 6 400000 rs -Ethernet44 325,326,327,328 etp6b 6 400000 rs -Ethernet48 241,242,243,244 etp7a 7 400000 rs -Ethernet52 245,246,247,248 etp7b 7 400000 rs -Ethernet56 265,266,267,268 etp8a 8 400000 rs -Ethernet60 269,270,271,272 etp8b 8 400000 rs -Ethernet64 497,498,499,500 etp9a 9 400000 rs -Ethernet68 501,502,503,504 etp9b 9 400000 rs -Ethernet72 9,10,11,12 etp10a 10 400000 rs -Ethernet76 13,14,15,16 etp10b 10 400000 rs -Ethernet80 193,194,195,196 etp11a 11 400000 rs -Ethernet84 197,198,199,200 etp11b 11 400000 rs -Ethernet88 177,178,179,180 etp12a 12 400000 rs -Ethernet92 181,182,183,184 etp12b 12 400000 rs -Ethernet96 65,66,67,68 etp13a 13 400000 rs -Ethernet100 69,70,71,72 etp13b 13 400000 rs -Ethernet104 49,50,51,52 etp14a 14 400000 rs -Ethernet108 53,54,55,56 etp14b 14 400000 rs -Ethernet112 129,130,131,132 etp15a 15 400000 rs -Ethernet116 133,134,135,136 etp15b 15 400000 rs -Ethernet120 113,114,115,116 etp16a 16 400000 rs -Ethernet124 117,118,119,120 etp16b 16 400000 rs -Ethernet128 101,102,103,104 etp17a 17 400000 rs -Ethernet132 97,98,99,100 etp17b 17 400000 rs -Ethernet136 125,126,127,128 etp17c 17 400000 rs -Ethernet140 121,122,123,124 etp17d 17 400000 rs -Ethernet144 77,78,79,80 etp17e 17 400000 rs -Ethernet148 73,74,75,76 etp17f 17 400000 rs -Ethernet152 109,110,111,112 etp17g 17 400000 rs -Ethernet156 105,106,107,108 etp17h 17 400000 rs -Ethernet160 85,86,87,88 etp17i 17 400000 rs -Ethernet164 81,82,83,84 etp17j 17 400000 rs -Ethernet168 93,94,95,96 etp17k 17 400000 rs -Ethernet172 89,90,91,92 etp17l 17 400000 rs -Ethernet176 189,190,191,192 etp18a 18 400000 rs -Ethernet180 185,186,187,188 etp18b 18 400000 rs -Ethernet184 149,150,151,152 etp18c 18 400000 rs -Ethernet188 157,158,159,160 etp18d 18 400000 rs -Ethernet192 165,166,167,168 etp18e 18 400000 rs -Ethernet196 173,174,175,176 etp18f 18 400000 rs -Ethernet200 153,154,155,156 etp18g 18 400000 rs -Ethernet204 145,146,147,148 etp18h 18 400000 rs -Ethernet208 169,170,171,172 etp18i 18 400000 rs -Ethernet212 161,162,163,164 etp18j 18 400000 rs -Ethernet216 141,142,143,144 etp18k 18 400000 rs -Ethernet220 137,138,139,140 etp18l 18 400000 rs -Ethernet224 37,38,39,40 etp19a 19 400000 rs -Ethernet228 33,34,35,36 etp19b 19 400000 rs -Ethernet232 5,6,7,8 etp19c 19 400000 rs -Ethernet236 1,2,3,4 etp19d 19 400000 rs -Ethernet240 45,46,47,48 etp19e 19 400000 rs -Ethernet244 41,42,43,44 etp19f 19 400000 rs -Ethernet248 21,22,23,24 etp19g 19 400000 rs -Ethernet252 17,18,19,20 etp19h 19 400000 rs -Ethernet256 61,62,63,64 etp19i 19 400000 rs -Ethernet260 57,58,59,60 etp19j 19 400000 rs -Ethernet264 29,30,31,32 etp19k 19 400000 rs -Ethernet268 25,26,27,28 etp19l 19 400000 rs -Ethernet272 253,254,255,256 etp20a 20 400000 rs -Ethernet276 249,250,251,252 etp20b 20 400000 rs -Ethernet280 213,214,215,216 etp20c 20 400000 rs -Ethernet284 221,222,223,224 etp20d 20 400000 rs -Ethernet288 229,230,231,232 etp20e 20 400000 rs -Ethernet292 237,238,239,240 etp20f 20 400000 rs -Ethernet296 217,218,219,220 etp20g 20 400000 rs -Ethernet300 209,210,211,212 etp20h 20 400000 rs -Ethernet304 233,234,235,236 etp20i 20 400000 rs -Ethernet308 225,226,227,228 etp20j 20 400000 rs -Ethernet312 205,206,207,208 etp20k 20 400000 rs -Ethernet316 201,202,203,204 etp20l 20 400000 rs -Ethernet320 485,486,487,488 etp21a 21 400000 rs -Ethernet324 481,482,483,484 etp21b 21 400000 rs -Ethernet328 461,462,463,464 etp21c 21 400000 rs -Ethernet332 457,458,459,460 etp21d 21 400000 rs -Ethernet336 493,494,495,496 etp21e 21 400000 rs -Ethernet340 489,490,491,492 etp21f 21 400000 rs -Ethernet344 469,470,471,472 etp21g 21 400000 rs -Ethernet348 465,466,467,468 etp21h 21 400000 rs -Ethernet352 509,510,511,512 etp21i 21 400000 rs -Ethernet356 505,506,507,508 etp21j 21 400000 rs -Ethernet360 477,478,479,480 etp21k 21 400000 rs -Ethernet364 473,474,475,476 etp21l 21 400000 rs -Ethernet368 317,318,319,320 etp22a 22 400000 rs -Ethernet372 313,314,315,316 etp22b 22 400000 rs -Ethernet376 285,286,287,288 etp22c 22 400000 rs -Ethernet380 277,278,279,280 etp22d 22 400000 rs -Ethernet384 293,294,295,296 etp22e 22 400000 rs -Ethernet388 301,302,303,304 etp22f 22 400000 rs -Ethernet392 273,274,275,276 etp22g 22 400000 rs -Ethernet396 281,282,283,284 etp22h 22 400000 rs -Ethernet400 297,298,299,300 etp22i 22 400000 rs -Ethernet404 289,290,291,292 etp22j 22 400000 rs -Ethernet408 261,262,263,264 etp22k 22 400000 rs -Ethernet412 257,258,259,260 etp22l 22 400000 rs -Ethernet416 421,422,423,424 etp23a 23 400000 rs -Ethernet420 417,418,419,420 etp23b 23 400000 rs -Ethernet424 445,446,447,448 etp23c 23 400000 rs -Ethernet428 441,442,443,444 etp23d 23 400000 rs -Ethernet432 397,398,399,400 etp23e 23 400000 rs -Ethernet436 393,394,395,396 etp23f 23 400000 rs -Ethernet440 429,430,431,432 etp23g 23 400000 rs -Ethernet444 425,426,427,428 etp23h 23 400000 rs -Ethernet448 405,406,407,408 etp23i 23 400000 rs -Ethernet452 401,402,403,404 etp23j 23 400000 rs -Ethernet456 413,414,415,416 etp23k 23 400000 rs -Ethernet460 409,410,411,412 etp23l 23 400000 rs -Ethernet464 381,382,383,384 etp24a 24 400000 rs -Ethernet468 377,378,379,380 etp24b 24 400000 rs -Ethernet472 341,342,343,344 etp24c 24 400000 rs -Ethernet476 349,350,351,352 etp24d 24 400000 rs -Ethernet480 357,358,359,360 etp24e 24 400000 rs -Ethernet484 365,366,367,368 etp24f 24 400000 rs -Ethernet488 345,346,347,348 etp24g 24 400000 rs -Ethernet492 337,338,339,340 etp24h 24 400000 rs -Ethernet496 361,362,363,364 etp24i 24 400000 rs -Ethernet500 353,354,355,356 etp24j 24 400000 rs -Ethernet504 333,334,335,336 etp24k 24 400000 rs -Ethernet508 329,330,331,332 etp24l 24 400000 rs -Ethernet512 513 etp25a 25 10000 none -Ethernet513 514 etp25b 25 10000 none diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/port_config.ini b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/port_config.ini new file mode 120000 index 00000000000..a303f96fe9d --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-FANOUT/port_config.ini @@ -0,0 +1 @@ +../Arista-7060X6-16PE-384C-O128S2/port_config.ini \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/hwsku.json deleted file mode 100644 index 6c2013a138d..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/hwsku.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "interfaces": { - "Ethernet0": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet4": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet8": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet12": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet16": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet20": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet24": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet28": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet32": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet36": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet40": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet44": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet48": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet52": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet56": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet60": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet64": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet68": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet72": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet76": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet80": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet84": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet88": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet92": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet96": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet100": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet104": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet108": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet112": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet116": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet120": { - "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet124": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" - }, - "Ethernet128": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet132": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet136": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet140": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet144": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet148": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet152": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet156": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet160": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet164": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet168": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet172": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet176": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet180": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet184": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet188": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet192": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet196": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet200": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet204": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet208": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet212": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet216": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet220": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet224": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet228": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet232": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet236": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet240": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet244": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet248": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet252": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet256": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet260": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet264": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet268": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet272": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet276": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet280": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet284": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet288": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet292": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet296": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet300": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet304": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet308": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet312": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet316": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet320": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet324": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet328": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet332": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet336": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet340": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet344": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet348": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet352": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet356": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet360": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet364": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet368": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet372": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet376": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet380": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet384": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet388": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet392": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet396": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet400": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet404": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet408": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet412": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet416": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet420": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet424": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet428": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet432": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet436": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet440": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet444": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet448": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet452": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet456": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet460": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet464": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet468": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet472": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet476": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet480": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet484": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet488": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet492": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet496": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet500": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet504": { - "fec": "rs", - "subport": "1", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet508": { - "fec": "rs", - "subport": "2", - "autoneg": "on", - "default_brkout_mode": "1x400G" - }, - "Ethernet512": { - "fec": "none", - "default_brkout_mode": "2x10G(2)" - } - } -} diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/hwsku.json new file mode 120000 index 00000000000..6a01b06cf91 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/hwsku.json @@ -0,0 +1 @@ +../Arista-7060X6-16PE-384C-O128S2/hwsku.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/port_config.ini b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/port_config.ini deleted file mode 100644 index 123aef1ab4b..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/port_config.ini +++ /dev/null @@ -1,131 +0,0 @@ -# name lanes alias index speed fec -Ethernet0 369,370,371,372 etp1a 1 400000 rs -Ethernet4 373,374,375,376 etp1b 1 400000 rs -Ethernet8 385,386,387,388 etp2a 2 400000 rs -Ethernet12 389,390,391,392 etp2b 2 400000 rs -Ethernet16 433,434,435,436 etp3a 3 400000 rs -Ethernet20 437,438,439,440 etp3b 3 400000 rs -Ethernet24 449,450,451,452 etp4a 4 400000 rs -Ethernet28 453,454,455,456 etp4b 4 400000 rs -Ethernet32 305,306,307,308 etp5a 5 400000 rs -Ethernet36 309,310,311,312 etp5b 5 400000 rs -Ethernet40 321,322,323,324 etp6a 6 400000 rs -Ethernet44 325,326,327,328 etp6b 6 400000 rs -Ethernet48 241,242,243,244 etp7a 7 400000 rs -Ethernet52 245,246,247,248 etp7b 7 400000 rs -Ethernet56 265,266,267,268 etp8a 8 400000 rs -Ethernet60 269,270,271,272 etp8b 8 400000 rs -Ethernet64 497,498,499,500 etp9a 9 400000 rs -Ethernet68 501,502,503,504 etp9b 9 400000 rs -Ethernet72 9,10,11,12 etp10a 10 400000 rs -Ethernet76 13,14,15,16 etp10b 10 400000 rs -Ethernet80 193,194,195,196 etp11a 11 400000 rs -Ethernet84 197,198,199,200 etp11b 11 400000 rs -Ethernet88 177,178,179,180 etp12a 12 400000 rs -Ethernet92 181,182,183,184 etp12b 12 400000 rs -Ethernet96 65,66,67,68 etp13a 13 400000 rs -Ethernet100 69,70,71,72 etp13b 13 400000 rs -Ethernet104 49,50,51,52 etp14a 14 400000 rs -Ethernet108 53,54,55,56 etp14b 14 400000 rs -Ethernet112 129,130,131,132 etp15a 15 400000 rs -Ethernet116 133,134,135,136 etp15b 15 400000 rs -Ethernet120 113,114,115,116 etp16a 16 400000 rs -Ethernet124 117,118,119,120 etp16b 16 400000 rs -Ethernet128 101,102,103,104 etp17a 17 400000 rs -Ethernet132 97,98,99,100 etp17b 17 400000 rs -Ethernet136 125,126,127,128 etp17c 17 400000 rs -Ethernet140 121,122,123,124 etp17d 17 400000 rs -Ethernet144 77,78,79,80 etp17e 17 400000 rs -Ethernet148 73,74,75,76 etp17f 17 400000 rs -Ethernet152 109,110,111,112 etp17g 17 400000 rs -Ethernet156 105,106,107,108 etp17h 17 400000 rs -Ethernet160 85,86,87,88 etp17i 17 400000 rs -Ethernet164 81,82,83,84 etp17j 17 400000 rs -Ethernet168 93,94,95,96 etp17k 17 400000 rs -Ethernet172 89,90,91,92 etp17l 17 400000 rs -Ethernet176 189,190,191,192 etp18a 18 400000 rs -Ethernet180 185,186,187,188 etp18b 18 400000 rs -Ethernet184 149,150,151,152 etp18c 18 400000 rs -Ethernet188 157,158,159,160 etp18d 18 400000 rs -Ethernet192 165,166,167,168 etp18e 18 400000 rs -Ethernet196 173,174,175,176 etp18f 18 400000 rs -Ethernet200 153,154,155,156 etp18g 18 400000 rs -Ethernet204 145,146,147,148 etp18h 18 400000 rs -Ethernet208 169,170,171,172 etp18i 18 400000 rs -Ethernet212 161,162,163,164 etp18j 18 400000 rs -Ethernet216 141,142,143,144 etp18k 18 400000 rs -Ethernet220 137,138,139,140 etp18l 18 400000 rs -Ethernet224 37,38,39,40 etp19a 19 400000 rs -Ethernet228 33,34,35,36 etp19b 19 400000 rs -Ethernet232 5,6,7,8 etp19c 19 400000 rs -Ethernet236 1,2,3,4 etp19d 19 400000 rs -Ethernet240 45,46,47,48 etp19e 19 400000 rs -Ethernet244 41,42,43,44 etp19f 19 400000 rs -Ethernet248 21,22,23,24 etp19g 19 400000 rs -Ethernet252 17,18,19,20 etp19h 19 400000 rs -Ethernet256 61,62,63,64 etp19i 19 400000 rs -Ethernet260 57,58,59,60 etp19j 19 400000 rs -Ethernet264 29,30,31,32 etp19k 19 400000 rs -Ethernet268 25,26,27,28 etp19l 19 400000 rs -Ethernet272 253,254,255,256 etp20a 20 400000 rs -Ethernet276 249,250,251,252 etp20b 20 400000 rs -Ethernet280 213,214,215,216 etp20c 20 400000 rs -Ethernet284 221,222,223,224 etp20d 20 400000 rs -Ethernet288 229,230,231,232 etp20e 20 400000 rs -Ethernet292 237,238,239,240 etp20f 20 400000 rs -Ethernet296 217,218,219,220 etp20g 20 400000 rs -Ethernet300 209,210,211,212 etp20h 20 400000 rs -Ethernet304 233,234,235,236 etp20i 20 400000 rs -Ethernet308 225,226,227,228 etp20j 20 400000 rs -Ethernet312 205,206,207,208 etp20k 20 400000 rs -Ethernet316 201,202,203,204 etp20l 20 400000 rs -Ethernet320 485,486,487,488 etp21a 21 400000 rs -Ethernet324 481,482,483,484 etp21b 21 400000 rs -Ethernet328 461,462,463,464 etp21c 21 400000 rs -Ethernet332 457,458,459,460 etp21d 21 400000 rs -Ethernet336 493,494,495,496 etp21e 21 400000 rs -Ethernet340 489,490,491,492 etp21f 21 400000 rs -Ethernet344 469,470,471,472 etp21g 21 400000 rs -Ethernet348 465,466,467,468 etp21h 21 400000 rs -Ethernet352 509,510,511,512 etp21i 21 400000 rs -Ethernet356 505,506,507,508 etp21j 21 400000 rs -Ethernet360 477,478,479,480 etp21k 21 400000 rs -Ethernet364 473,474,475,476 etp21l 21 400000 rs -Ethernet368 317,318,319,320 etp22a 22 400000 rs -Ethernet372 313,314,315,316 etp22b 22 400000 rs -Ethernet376 285,286,287,288 etp22c 22 400000 rs -Ethernet380 277,278,279,280 etp22d 22 400000 rs -Ethernet384 293,294,295,296 etp22e 22 400000 rs -Ethernet388 301,302,303,304 etp22f 22 400000 rs -Ethernet392 273,274,275,276 etp22g 22 400000 rs -Ethernet396 281,282,283,284 etp22h 22 400000 rs -Ethernet400 297,298,299,300 etp22i 22 400000 rs -Ethernet404 289,290,291,292 etp22j 22 400000 rs -Ethernet408 261,262,263,264 etp22k 22 400000 rs -Ethernet412 257,258,259,260 etp22l 22 400000 rs -Ethernet416 421,422,423,424 etp23a 23 400000 rs -Ethernet420 417,418,419,420 etp23b 23 400000 rs -Ethernet424 445,446,447,448 etp23c 23 400000 rs -Ethernet428 441,442,443,444 etp23d 23 400000 rs -Ethernet432 397,398,399,400 etp23e 23 400000 rs -Ethernet436 393,394,395,396 etp23f 23 400000 rs -Ethernet440 429,430,431,432 etp23g 23 400000 rs -Ethernet444 425,426,427,428 etp23h 23 400000 rs -Ethernet448 405,406,407,408 etp23i 23 400000 rs -Ethernet452 401,402,403,404 etp23j 23 400000 rs -Ethernet456 413,414,415,416 etp23k 23 400000 rs -Ethernet460 409,410,411,412 etp23l 23 400000 rs -Ethernet464 381,382,383,384 etp24a 24 400000 rs -Ethernet468 377,378,379,380 etp24b 24 400000 rs -Ethernet472 341,342,343,344 etp24c 24 400000 rs -Ethernet476 349,350,351,352 etp24d 24 400000 rs -Ethernet480 357,358,359,360 etp24e 24 400000 rs -Ethernet484 365,366,367,368 etp24f 24 400000 rs -Ethernet488 345,346,347,348 etp24g 24 400000 rs -Ethernet492 337,338,339,340 etp24h 24 400000 rs -Ethernet496 361,362,363,364 etp24i 24 400000 rs -Ethernet500 353,354,355,356 etp24j 24 400000 rs -Ethernet504 333,334,335,336 etp24k 24 400000 rs -Ethernet508 329,330,331,332 etp24l 24 400000 rs -Ethernet512 513 etp25a 25 10000 none -Ethernet513 514 etp25b 25 10000 none diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/port_config.ini b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/port_config.ini new file mode 120000 index 00000000000..a303f96fe9d --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2-LAB/port_config.ini @@ -0,0 +1 @@ +../Arista-7060X6-16PE-384C-O128S2/port_config.ini \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2/hwsku.json index 9ead33d4a31..650e51fd88f 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2/hwsku.json +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/Arista-7060X6-16PE-384C-O128S2/hwsku.json @@ -2,737 +2,542 @@ "interfaces": { "Ethernet0": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet4": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet8": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet12": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet16": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet20": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet24": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet28": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet32": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet36": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet40": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet44": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet48": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet52": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet56": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet60": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet64": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet68": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet72": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet76": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet80": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet84": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet88": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet92": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet96": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet100": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet104": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet108": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet112": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet116": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet120": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet124": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet128": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet132": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet136": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet140": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet144": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet148": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet152": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet156": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet160": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet164": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet168": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet172": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet176": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet180": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet184": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet188": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet192": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet196": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet200": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet204": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet208": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet212": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet216": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet220": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet224": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet228": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet232": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet236": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet240": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet244": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet248": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet252": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet256": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet260": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet264": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet268": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet272": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet276": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet280": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet284": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet288": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet292": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet296": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet300": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet304": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet308": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet312": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet316": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet320": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet324": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet328": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet332": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet336": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet340": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet344": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet348": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet352": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet356": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet360": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet364": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet368": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet372": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet376": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet380": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet384": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet388": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet392": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet396": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet400": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet404": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet408": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet412": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet416": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet420": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet424": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet428": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet432": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet436": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet440": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet444": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet448": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet452": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet456": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet460": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet464": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet468": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet472": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet476": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet480": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet484": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet488": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet492": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet496": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet500": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet504": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet508": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/platform.json b/device/arista/x86_64-arista_7060x6_16pe_384c/platform.json index 6f9b6e3af21..4ccb1e3a4aa 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/platform.json +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/platform.json @@ -193,289 +193,161 @@ }, "interfaces": { "Ethernet0": { - "index": "1,1,1,1", - "lanes": "369,370,371,372", + "index": "1,1,1,1,1,1,1,1", + "lanes": "369,370,371,372,373,374,375,376", "breakout_modes": { - "1x400G": [ - "etp1a" - ] - } - }, - "Ethernet4": { - "index": "1,1,1,1", - "lanes": "373,374,375,376", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp1a", "etp1b" ] } }, "Ethernet8": { - "index": "2,2,2,2", - "lanes": "385,386,387,388", + "index": "2,2,2,2,2,2,2,2", + "lanes": "385,386,387,388,389,390,391,392", "breakout_modes": { - "1x400G": [ - "etp2a" - ] - } - }, - "Ethernet12": { - "index": "2,2,2,2", - "lanes": "389,390,391,392", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp2a", "etp2b" ] } }, "Ethernet16": { - "index": "3,3,3,3", - "lanes": "433,434,435,436", + "index": "3,3,3,3,3,3,3,3", + "lanes": "433,434,435,436,437,438,439,440", "breakout_modes": { - "1x400G": [ - "etp3a" - ] - } - }, - "Ethernet20": { - "index": "3,3,3,3", - "lanes": "437,438,439,440", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp3a", "etp3b" ] } }, "Ethernet24": { - "index": "4,4,4,4", - "lanes": "449,450,451,452", + "index": "4,4,4,4,4,4,4,4", + "lanes": "449,450,451,452,453,454,455,456", "breakout_modes": { - "1x400G": [ - "etp4a" - ] - } - }, - "Ethernet28": { - "index": "4,4,4,4", - "lanes": "453,454,455,456", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp4a", "etp4b" ] } }, "Ethernet32": { - "index": "5,5,5,5", - "lanes": "305,306,307,308", + "index": "5,5,5,5,5,5,5,5", + "lanes": "305,306,307,308,309,310,311,312", "breakout_modes": { - "1x400G": [ - "etp5a" - ] - } - }, - "Ethernet36": { - "index": "5,5,5,5", - "lanes": "309,310,311,312", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp5a", "etp5b" ] } }, "Ethernet40": { - "index": "6,6,6,6", - "lanes": "321,322,323,324", + "index": "6,6,6,6,6,6,6,6", + "lanes": "321,322,323,324,325,326,327,328", "breakout_modes": { - "1x400G": [ - "etp6a" - ] - } - }, - "Ethernet44": { - "index": "6,6,6,6", - "lanes": "325,326,327,328", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp6a", "etp6b" ] } }, "Ethernet48": { - "index": "7,7,7,7", - "lanes": "241,242,243,244", + "index": "7,7,7,7,7,7,7,7", + "lanes": "241,242,243,244,245,246,247,248", "breakout_modes": { - "1x400G": [ - "etp7a" - ] - } - }, - "Ethernet52": { - "index": "7,7,7,7", - "lanes": "245,246,247,248", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp7a", "etp7b" ] } }, "Ethernet56": { - "index": "8,8,8,8", - "lanes": "265,266,267,268", + "index": "8,8,8,8,8,8,8,8", + "lanes": "265,266,267,268,269,270,271,272", "breakout_modes": { - "1x400G": [ - "etp8a" - ] - } - }, - "Ethernet60": { - "index": "8,8,8,8", - "lanes": "269,270,271,272", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp8a", "etp8b" ] } }, "Ethernet64": { - "index": "9,9,9,9", - "lanes": "497,498,499,500", + "index": "9,9,9,9,9,9,9,9", + "lanes": "497,498,499,500,501,502,503,504", "breakout_modes": { - "1x400G": [ - "etp9a" - ] - } - }, - "Ethernet68": { - "index": "9,9,9,9", - "lanes": "501,502,503,504", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp9a", "etp9b" ] } }, "Ethernet72": { - "index": "10,10,10,10", - "lanes": "9,10,11,12", + "index": "10,10,10,10,10,10,10,10", + "lanes": "9,10,11,12,13,14,15,16", "breakout_modes": { - "1x400G": [ - "etp10a" - ] - } - }, - "Ethernet76": { - "index": "10,10,10,10", - "lanes": "13,14,15,16", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp10a", "etp10b" ] } }, "Ethernet80": { - "index": "11,11,11,11", - "lanes": "193,194,195,196", + "index": "11,11,11,11,11,11,11,11", + "lanes": "193,194,195,196,197,198,199,200", "breakout_modes": { - "1x400G": [ - "etp11a" - ] - } - }, - "Ethernet84": { - "index": "11,11,11,11", - "lanes": "197,198,199,200", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp11a", "etp11b" ] } }, "Ethernet88": { - "index": "12,12,12,12", - "lanes": "177,178,179,180", + "index": "12,12,12,12,12,12,12,12", + "lanes": "177,178,179,180,181,182,183,184", "breakout_modes": { - "1x400G": [ - "etp12a" - ] - } - }, - "Ethernet92": { - "index": "12,12,12,12", - "lanes": "181,182,183,184", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp12a", "etp12b" ] } }, "Ethernet96": { - "index": "13,13,13,13", - "lanes": "65,66,67,68", + "index": "13,13,13,13,13,13,13,13", + "lanes": "65,66,67,68,69,70,71,72", "breakout_modes": { - "1x400G": [ - "etp13a" - ] - } - }, - "Ethernet100": { - "index": "13,13,13,13", - "lanes": "69,70,71,72", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp13a", "etp13b" ] } }, "Ethernet104": { - "index": "14,14,14,14", - "lanes": "49,50,51,52", + "index": "14,14,14,14,14,14,14,14", + "lanes": "49,50,51,52,53,54,55,56", "breakout_modes": { - "1x400G": [ - "etp14a" - ] - } - }, - "Ethernet108": { - "index": "14,14,14,14", - "lanes": "53,54,55,56", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp14a", "etp14b" ] } }, "Ethernet112": { - "index": "15,15,15,15", - "lanes": "129,130,131,132", + "index": "15,15,15,15,15,15,15,15", + "lanes": "129,130,131,132,133,134,135,136", "breakout_modes": { - "1x400G": [ - "etp15a" - ] - } - }, - "Ethernet116": { - "index": "15,15,15,15", - "lanes": "133,134,135,136", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp15a", "etp15b" ] } }, "Ethernet120": { - "index": "16,16,16,16", - "lanes": "113,114,115,116", + "index": "16,16,16,16,16,16,16,16", + "lanes": "113,114,115,116,117,118,119,120", "breakout_modes": { - "1x400G": [ - "etp16a" - ] - } - }, - "Ethernet124": { - "index": "16,16,16,16", - "lanes": "117,118,119,120", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp16a", "etp16b" ] } diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c/sensors.conf b/device/arista/x86_64-arista_7060x6_16pe_384c/sensors.conf index 2c6337e2308..96aad20cdbd 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c/sensors.conf +++ b/device/arista/x86_64-arista_7060x6_16pe_384c/sensors.conf @@ -1,14 +1,40 @@ +bus "i2c-16" "SCD 0000:03:00.0 SMBus master 1 bus 3" bus "i2c-19" "SCD 0000:06:00.0 SMBus master 0 bus 0" +bus "i2c-35" "SCD 0000:06:00.0 SMBus master 2 bus 4" +bus "i2c-37" "SCD 0000:05:00.0 SMBus master 0 bus 0" + +chip "k10temp-pci-00c3" + label temp1 "Cpu temp sensor" chip "max6581-i2c-19-4d" + label temp1 "Switch Card temp sensor" + label temp2 "TH5 PCB Left" + label temp3 "TH5 PCB Right" + label temp4 "Inlet Ambiant Air" ignore temp5 ignore temp6 + label temp7 "TH5 Diode 1" + label temp8 "TH5 Diode 2" chip "nvme-pci-0400" - # TODO: sensors complaining about tempX_min and tempX_max ignore temp2 ignore temp3 ignore temp4 ignore temp5 ignore temp6 ignore temp7 + +chip "pmbus-i2c-35-10" + label temp1 "Power supply 1 internal sensor" + ignore temp2 + +chip "pmbus-i2c-35-12" + label temp1 "Power supply 2 internal sensor" + ignore temp2 + +chip "tmp75-i2c-16-48" + label temp1 "Outlet" + +chip "tmp75-i2c-37-4a" + label temp1 "Port Card" + diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t0.j2 index 494646ec289..95a3ca75b8c 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t0.j2 +++ b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t0.j2 @@ -5,13 +5,13 @@ {%- macro generate_buffer_pool_and_profiles() %} "BUFFER_POOL": { "ingress_lossless_pool": { - "size": "164075364", + "size": "164110924", "type": "ingress", "mode": "dynamic", "xoff": "20181824" }, "egress_lossless_pool": { - "size": "164075364", + "size": "164110924", "type": "egress", "mode": "static" } @@ -20,7 +20,7 @@ "ingress_lossy_profile": { "pool": "ingress_lossless_pool", "size": "0", - "static_th": "165364160" + "static_th": "82682080" }, "egress_lossy_profile": { "pool": "egress_lossless_pool", @@ -30,7 +30,7 @@ "egress_lossless_profile": { "pool": "egress_lossless_pool", "size": "0", - "static_th": "165364160" + "static_th": "82682080" } }, {%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t1.j2 index 494646ec289..95a3ca75b8c 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t1.j2 +++ b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/buffers_defaults_t1.j2 @@ -5,13 +5,13 @@ {%- macro generate_buffer_pool_and_profiles() %} "BUFFER_POOL": { "ingress_lossless_pool": { - "size": "164075364", + "size": "164110924", "type": "ingress", "mode": "dynamic", "xoff": "20181824" }, "egress_lossless_pool": { - "size": "164075364", + "size": "164110924", "type": "egress", "mode": "static" } @@ -20,7 +20,7 @@ "ingress_lossy_profile": { "pool": "ingress_lossless_pool", "size": "0", - "static_th": "165364160" + "static_th": "82682080" }, "egress_lossy_profile": { "pool": "egress_lossless_pool", @@ -30,7 +30,7 @@ "egress_lossless_profile": { "pool": "egress_lossless_pool", "size": "0", - "static_th": "165364160" + "static_th": "82682080" } }, {%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/hwsku.json index 9ead33d4a31..650e51fd88f 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/hwsku.json +++ b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S2/hwsku.json @@ -2,737 +2,542 @@ "interfaces": { "Ethernet0": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet4": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet8": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet12": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet16": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet20": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet24": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet28": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet32": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet36": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet40": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet44": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet48": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet52": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet56": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet60": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet64": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet68": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet72": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet76": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet80": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet84": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet88": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet92": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet96": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet100": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet104": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet108": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet112": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet116": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet120": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet124": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet128": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet132": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet136": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet140": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet144": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet148": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet152": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet156": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet160": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet164": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet168": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet172": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet176": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet180": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet184": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet188": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet192": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet196": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet200": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet204": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet208": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet212": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet216": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet220": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet224": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet228": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet232": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet236": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet240": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet244": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet248": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet252": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet256": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet260": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet264": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet268": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet272": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet276": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet280": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet284": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet288": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet292": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet296": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet300": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet304": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet308": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet312": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet316": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet320": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet324": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet328": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet332": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet336": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet340": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet344": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet348": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet352": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet356": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet360": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet364": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet368": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet372": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet376": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet380": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet384": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet388": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet392": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet396": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet400": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet404": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet408": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet412": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet416": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet420": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet424": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet428": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet432": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet436": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet440": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet444": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet448": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet452": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet456": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet460": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet464": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet468": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet472": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet476": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet480": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet484": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet488": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet492": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet496": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet500": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet504": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet508": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S4/hwsku.json b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S4/hwsku.json index b68f2f45658..ce52a38fa5a 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S4/hwsku.json +++ b/device/arista/x86_64-arista_7060x6_16pe_384c_b/Arista-7060X6-16PE-384C-B-O128S4/hwsku.json @@ -2,737 +2,542 @@ "interfaces": { "Ethernet0": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet4": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet8": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet12": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet16": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet20": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet24": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet28": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet32": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet36": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet40": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet44": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet48": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet52": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet56": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet60": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet64": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet68": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet72": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet76": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet80": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet84": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet88": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet92": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet96": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet100": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet104": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet108": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet112": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet116": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet120": { "fec": "rs", - "subport": "1", - "default_brkout_mode": "1x400G" - }, - "Ethernet124": { - "fec": "rs", - "subport": "2", - "default_brkout_mode": "1x400G" + "default_brkout_mode": "2x400G" }, "Ethernet128": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet132": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet136": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet140": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet144": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet148": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet152": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet156": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet160": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet164": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet168": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet172": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet176": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet180": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet184": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet188": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet192": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet196": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet200": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet204": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet208": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet212": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet216": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet220": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet224": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet228": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet232": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet236": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet240": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet244": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet248": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet252": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet256": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet260": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet264": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet268": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet272": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet276": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet280": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet284": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet288": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet292": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet296": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet300": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet304": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet308": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet312": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet316": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet320": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet324": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet328": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet332": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet336": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet340": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet344": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet348": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet352": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet356": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet360": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet364": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet368": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet372": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet376": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet380": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet384": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet388": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet392": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet396": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet400": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet404": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet408": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet412": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet416": { "fec": "rs", - "subport": "1", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet420": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet424": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet428": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet432": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet436": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet440": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet444": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet448": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet452": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet456": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet460": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet464": { "fec": "rs", - "subport": "1", - "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet468": { "fec": "rs", - "subport": "2", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet472": { "fec": "rs", - "subport": "3", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet476": { "fec": "rs", - "subport": "4", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet480": { "fec": "rs", - "subport": "5", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet484": { "fec": "rs", - "subport": "6", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet488": { "fec": "rs", - "subport": "7", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet492": { "fec": "rs", - "subport": "8", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet496": { "fec": "rs", - "subport": "9", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet500": { "fec": "rs", - "subport": "10", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet504": { "fec": "rs", - "subport": "11", "autoneg": "on", "default_brkout_mode": "1x400G" }, "Ethernet508": { "fec": "rs", - "subport": "12", "autoneg": "on", "default_brkout_mode": "1x400G" }, diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/platform.json b/device/arista/x86_64-arista_7060x6_16pe_384c_b/platform.json index 2b220eca916..d8eda80d7a2 100644 --- a/device/arista/x86_64-arista_7060x6_16pe_384c_b/platform.json +++ b/device/arista/x86_64-arista_7060x6_16pe_384c_b/platform.json @@ -193,289 +193,161 @@ }, "interfaces": { "Ethernet0": { - "index": "1,1,1,1", - "lanes": "369,370,371,372", + "index": "1,1,1,1,1,1,1,1", + "lanes": "369,370,371,372,373,374,375,376", "breakout_modes": { - "1x400G": [ - "etp1a" - ] - } - }, - "Ethernet4": { - "index": "1,1,1,1", - "lanes": "373,374,375,376", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp1a", "etp1b" ] } }, "Ethernet8": { - "index": "2,2,2,2", - "lanes": "385,386,387,388", + "index": "2,2,2,2,2,2,2,2", + "lanes": "385,386,387,388,389,390,391,392", "breakout_modes": { - "1x400G": [ - "etp2a" - ] - } - }, - "Ethernet12": { - "index": "2,2,2,2", - "lanes": "389,390,391,392", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp2a", "etp2b" ] } }, "Ethernet16": { - "index": "3,3,3,3", - "lanes": "433,434,435,436", + "index": "3,3,3,3,3,3,3,3", + "lanes": "433,434,435,436,437,438,439,440", "breakout_modes": { - "1x400G": [ - "etp3a" - ] - } - }, - "Ethernet20": { - "index": "3,3,3,3", - "lanes": "437,438,439,440", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp3a", "etp3b" ] } }, "Ethernet24": { - "index": "4,4,4,4", - "lanes": "449,450,451,452", + "index": "4,4,4,4,4,4,4,4", + "lanes": "449,450,451,452,453,454,455,456", "breakout_modes": { - "1x400G": [ - "etp4a" - ] - } - }, - "Ethernet28": { - "index": "4,4,4,4", - "lanes": "453,454,455,456", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp4a", "etp4b" ] } }, "Ethernet32": { - "index": "5,5,5,5", - "lanes": "305,306,307,308", + "index": "5,5,5,5,5,5,5,5", + "lanes": "305,306,307,308,309,310,311,312", "breakout_modes": { - "1x400G": [ - "etp5a" - ] - } - }, - "Ethernet36": { - "index": "5,5,5,5", - "lanes": "309,310,311,312", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp5a", "etp5b" ] } }, "Ethernet40": { - "index": "6,6,6,6", - "lanes": "321,322,323,324", + "index": "6,6,6,6,6,6,6,6", + "lanes": "321,322,323,324,325,326,327,328", "breakout_modes": { - "1x400G": [ - "etp6a" - ] - } - }, - "Ethernet44": { - "index": "6,6,6,6", - "lanes": "325,326,327,328", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp6a", "etp6b" ] } }, "Ethernet48": { - "index": "7,7,7,7", - "lanes": "241,242,243,244", + "index": "7,7,7,7,7,7,7,7", + "lanes": "241,242,243,244,245,246,247,248", "breakout_modes": { - "1x400G": [ - "etp7a" - ] - } - }, - "Ethernet52": { - "index": "7,7,7,7", - "lanes": "245,246,247,248", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp7a", "etp7b" ] } }, "Ethernet56": { - "index": "8,8,8,8", - "lanes": "265,266,267,268", + "index": "8,8,8,8,8,8,8,8", + "lanes": "265,266,267,268,269,270,271,272", "breakout_modes": { - "1x400G": [ - "etp8a" - ] - } - }, - "Ethernet60": { - "index": "8,8,8,8", - "lanes": "269,270,271,272", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp8a", "etp8b" ] } }, "Ethernet64": { - "index": "9,9,9,9", - "lanes": "497,498,499,500", + "index": "9,9,9,9,9,9,9,9", + "lanes": "497,498,499,500,501,502,503,504", "breakout_modes": { - "1x400G": [ - "etp9a" - ] - } - }, - "Ethernet68": { - "index": "9,9,9,9", - "lanes": "501,502,503,504", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp9a", "etp9b" ] } }, "Ethernet72": { - "index": "10,10,10,10", - "lanes": "9,10,11,12", + "index": "10,10,10,10,10,10,10,10", + "lanes": "9,10,11,12,13,14,15,16", "breakout_modes": { - "1x400G": [ - "etp10a" - ] - } - }, - "Ethernet76": { - "index": "10,10,10,10", - "lanes": "13,14,15,16", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp10a", "etp10b" ] } }, "Ethernet80": { - "index": "11,11,11,11", - "lanes": "193,194,195,196", + "index": "11,11,11,11,11,11,11,11", + "lanes": "193,194,195,196,197,198,199,200", "breakout_modes": { - "1x400G": [ - "etp11a" - ] - } - }, - "Ethernet84": { - "index": "11,11,11,11", - "lanes": "197,198,199,200", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp11a", "etp11b" ] } }, "Ethernet88": { - "index": "12,12,12,12", - "lanes": "177,178,179,180", + "index": "12,12,12,12,12,12,12,12", + "lanes": "177,178,179,180,181,182,183,184", "breakout_modes": { - "1x400G": [ - "etp12a" - ] - } - }, - "Ethernet92": { - "index": "12,12,12,12", - "lanes": "181,182,183,184", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp12a", "etp12b" ] } }, "Ethernet96": { - "index": "13,13,13,13", - "lanes": "65,66,67,68", + "index": "13,13,13,13,13,13,13,13", + "lanes": "65,66,67,68,69,70,71,72", "breakout_modes": { - "1x400G": [ - "etp13a" - ] - } - }, - "Ethernet100": { - "index": "13,13,13,13", - "lanes": "69,70,71,72", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp13a", "etp13b" ] } }, "Ethernet104": { - "index": "14,14,14,14", - "lanes": "49,50,51,52", + "index": "14,14,14,14,14,14,14,14", + "lanes": "49,50,51,52,53,54,55,56", "breakout_modes": { - "1x400G": [ - "etp14a" - ] - } - }, - "Ethernet108": { - "index": "14,14,14,14", - "lanes": "53,54,55,56", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp14a", "etp14b" ] } }, "Ethernet112": { - "index": "15,15,15,15", - "lanes": "129,130,131,132", + "index": "15,15,15,15,15,15,15,15", + "lanes": "129,130,131,132,133,134,135,136", "breakout_modes": { - "1x400G": [ - "etp15a" - ] - } - }, - "Ethernet116": { - "index": "15,15,15,15", - "lanes": "133,134,135,136", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp15a", "etp15b" ] } }, "Ethernet120": { - "index": "16,16,16,16", - "lanes": "113,114,115,116", + "index": "16,16,16,16,16,16,16,16", + "lanes": "113,114,115,116,117,118,119,120", "breakout_modes": { - "1x400G": [ - "etp16a" - ] - } - }, - "Ethernet124": { - "index": "16,16,16,16", - "lanes": "117,118,119,120", - "breakout_modes": { - "1x400G": [ + "2x400G": [ + "etp16a", "etp16b" ] } diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf b/device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf deleted file mode 100644 index 2c6337e2308..00000000000 --- a/device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf +++ /dev/null @@ -1,14 +0,0 @@ -bus "i2c-19" "SCD 0000:06:00.0 SMBus master 0 bus 0" - -chip "max6581-i2c-19-4d" - ignore temp5 - ignore temp6 - -chip "nvme-pci-0400" - # TODO: sensors complaining about tempX_min and tempX_max - ignore temp2 - ignore temp3 - ignore temp4 - ignore temp5 - ignore temp6 - ignore temp7 diff --git a/device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf b/device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf new file mode 120000 index 00000000000..322a1382b35 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_16pe_384c_b/sensors.conf @@ -0,0 +1 @@ +../x86_64-arista_7060x6_16pe_384c/sensors.conf \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_64pe/platform.json b/device/arista/x86_64-arista_7060x6_64pe/platform.json index 2c32a6ca764..4e92b9ceb12 100644 --- a/device/arista/x86_64-arista_7060x6_64pe/platform.json +++ b/device/arista/x86_64-arista_7060x6_64pe/platform.json @@ -110,6 +110,14 @@ { "name": "Management Card Inlet", "controllable": false + }, + { + "name": "TH5 Diode 1", + "controllable": false + }, + { + "name": "TH5 Diode 2", + "controllable": false } ], "sfps": [ diff --git a/device/arista/x86_64-arista_7060x6_64pe/sensors.conf b/device/arista/x86_64-arista_7060x6_64pe/sensors.conf index a3f85d5aee0..d7a34c17a60 100644 --- a/device/arista/x86_64-arista_7060x6_64pe/sensors.conf +++ b/device/arista/x86_64-arista_7060x6_64pe/sensors.conf @@ -5,8 +5,6 @@ bus "i2c-29" "SCD 0000:03:00.0 SMBus master 1 bus 4" chip "max6581-i2c-25-4d" ignore temp5 ignore temp6 - ignore temp7 - ignore temp8 chip "nvme-pci-0400" # TODO: sensors complaining about tempX_min and tempX_max diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/buffers_defaults_t1.j2 deleted file mode 120000 index d1dfd910aa4..00000000000 --- a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/buffers_defaults_t1.j2 +++ /dev/null @@ -1 +0,0 @@ -buffers_defaults_lt2.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/buffers_defaults_t1.j2 new file mode 100644 index 00000000000..1b7c711dcf5 --- /dev/null +++ b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/buffers_defaults_t1.j2 @@ -0,0 +1,36 @@ +{%- set default_cable = '300m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "147226020", + "type": "ingress", + "mode": "dynamic", + "xoff": "38843712" + }, + "egress_lossless_pool": { + "size": "147226020", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "egress_lossy_profile": { + "pool": "egress_lossless_pool", + "size": "1778", + "dynamic_th": "0" + }, + "egress_lossless_profile": { + "pool": "egress_lossless_pool", + "size": "0", + "static_th": "165364160" + }, + "ingress_lossy_profile": { + "pool": "ingress_lossless_pool", + "size": "0", + "static_th": "165364160" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/pg_profile_lookup.ini b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/pg_profile_lookup.ini index f3dab354716..9e426b1c63a 100644 --- a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32O64/pg_profile_lookup.ini @@ -1,7 +1,8 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset 400000 30m 8636 0 425958 0 3556 -400000 300m 8636 0 1136396 0 3556 +400000 300m 8636 0 839216 0 3556 400000 500m 8636 0 1136396 0 3556 100000 500m 8636 0 1136396 0 3556 800000 5m 8636 0 724662 0 3556 +800000 300m 8636 0 1621536 0 3556 diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/buffers_defaults_t0.j2 index 2b7e960d5d0..d3a81f4c866 100644 --- a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/buffers_defaults_t0.j2 +++ b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/buffers_defaults_t0.j2 @@ -1,4 +1,4 @@ -{%- set default_cable = '5m' %} +{%- set default_cable = '300m' %} {%- include 'buffer_ports.j2' %} @@ -8,7 +8,7 @@ "size": "163961572", "type": "ingress", "mode": "dynamic", - "xoff": "21279104" + "xoff": "40615616" }, "egress_lossless_pool": { "size": "163961572", diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/pg_profile_lookup.ini b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/pg_profile_lookup.ini index 91e851cdf2f..84bcd97120f 100644 --- a/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7060x6_64pe_b/Arista-7060X6-64PE-B-P32V128/pg_profile_lookup.ini @@ -1,4 +1,6 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset -200000 5m 8636 0 224536 0 3556 -800000 40m 8636 0 830580 0 3556 +200000 5m 8636 0 224536 0 3556 +200000 300m 8636 0 452374 0 3556 +800000 40m 8636 0 830580 0 3556 +800000 300m 8636 0 1621536 0 3556 diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/media_settings.json b/device/arista/x86_64-arista_7060x6_64pe_b/media_settings.json index 5236e4450e4..176509c8444 100644 --- a/device/arista/x86_64-arista_7060x6_64pe_b/media_settings.json +++ b/device/arista/x86_64-arista_7060x6_64pe_b/media_settings.json @@ -1,7 +1,7 @@ { "PORT_MEDIA_SETTINGS": { "1": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -62,6 +62,90 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -126,12 +210,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, "2": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -192,6 +372,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, @@ -256,12 +446,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } } }, "3": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -322,76 +534,20 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0x00000000", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0xfffffffc" - }, - "pre2": { - "lane0": "0x00000004", - "lane1": "0x0000000c", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000004", - "lane6": "0x00000008", - "lane7": "0x00000008" }, - "pre1": { - "lane0": "0xffffffd6", - "lane1": "0xffffffda", - "lane2": "0xffffffe2", - "lane3": "0xffffffda", - "lane4": "0xffffffde", - "lane5": "0xffffffda", - "lane6": "0xffffffd6", - "lane7": "0xffffffde" - }, - "main": { - "lane0": "0x0000005c", - "lane1": "0x0000005c", - "lane2": "0x00000054", - "lane3": "0x00000054", - "lane4": "0x00000068", - "lane5": "0x00000060", - "lane6": "0x00000060", - "lane7": "0x00000058" - }, - "post1": { - "lane0": "0xfffffff0", - "lane1": "0xfffffff0", - "lane2": "0xfffffff0", - "lane3": "0xfffffff4", - "lane4": "0xfffffff0", - "lane5": "0xfffffff0", - "lane6": "0xfffffff0", - "lane7": "0xfffffff0" - }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" } } - } - }, - "4": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -452,6 +608,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -463,8 +629,8 @@ "lane2": "0xfffffffc", "lane3": "0xfffffffc", "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", + "lane5": "0x00000000", + "lane6": "0x00000000", "lane7": "0xfffffffc" }, "pre2": { @@ -473,7 +639,7 @@ "lane2": "0x00000008", "lane3": "0x00000008", "lane4": "0x00000008", - "lane5": "0x00000008", + "lane5": "0x00000004", "lane6": "0x00000008", "lane7": "0x00000008" }, @@ -484,7 +650,7 @@ "lane3": "0xffffffda", "lane4": "0xffffffde", "lane5": "0xffffffda", - "lane6": "0xffffffde", + "lane6": "0xffffffd6", "lane7": "0xffffffde" }, "main": { @@ -493,8 +659,8 @@ "lane2": "0x00000054", "lane3": "0x00000054", "lane4": "0x00000068", - "lane5": "0x00000066", - "lane6": "0x00000066", + "lane5": "0x00000060", + "lane6": "0x00000060", "lane7": "0x00000058" }, "post1": { @@ -503,8 +669,8 @@ "lane2": "0xfffffff0", "lane3": "0xfffffff4", "lane4": "0xfffffff0", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", + "lane5": "0xfffffff0", + "lane6": "0xfffffff0", "lane7": "0xfffffff0" }, "post2": { @@ -516,12 +682,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "5": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "4": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -554,16 +742,26 @@ "lane7": "0xffffffe3" }, "main": { - "lane0": "0x0000005d", - "lane1": "0x0000005d", - "lane2": "0x0000005d", - "lane3": "0x0000005d", - "lane4": "0x0000005d", - "lane5": "0x0000005d", - "lane6": "0x0000005d", - "lane7": "0x0000005d" + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" }, "post1": { + "lane0": "0xfffffff8", + "lane1": "0xfffffff8", + "lane2": "0xfffffff8", + "lane3": "0xfffffff8", + "lane4": "0xfffffff8", + "lane5": "0xfffffff8", + "lane6": "0xfffffff8", + "lane7": "0xfffffff8" + }, + "post2": { "lane0": "0xfffffff3", "lane1": "0xfffffff3", "lane2": "0xfffffff3", @@ -573,22 +771,96 @@ "lane6": "0xfffffff3", "lane7": "0xfffffff3" }, - "post2": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe3", + "lane1": "0xffffffe3", + "lane2": "0xffffffe3", + "lane3": "0xffffffe3", + "lane4": "0xffffffe3", + "lane5": "0xffffffe3", + "lane6": "0xffffffe3", + "lane7": "0xffffffe3" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff8", + "lane1": "0xfffffff8", + "lane2": "0xfffffff8", + "lane3": "0xfffffff8", + "lane4": "0xfffffff8", + "lane5": "0xfffffff8", + "lane6": "0xfffffff8", + "lane7": "0xfffffff8" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" } } }, "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { "pre3": { - "lane0": "0xfffffffc", + "lane0": "0x00000000", "lane1": "0xfffffffc", "lane2": "0xfffffffc", "lane3": "0xfffffffc", @@ -598,8 +870,8 @@ "lane7": "0xfffffffc" }, "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", + "lane0": "0x00000004", + "lane1": "0x0000000c", "lane2": "0x00000008", "lane3": "0x00000008", "lane4": "0x00000008", @@ -608,34 +880,34 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane0": "0xffffffd6", + "lane1": "0xffffffda", + "lane2": "0xffffffe2", + "lane3": "0xffffffda", + "lane4": "0xffffffde", + "lane5": "0xffffffda", + "lane6": "0xffffffde", + "lane7": "0xffffffde" }, "main": { - "lane0": "0x00000055", - "lane1": "0x00000055", - "lane2": "0x00000055", - "lane3": "0x00000055", - "lane4": "0x00000055", - "lane5": "0x00000055", - "lane6": "0x00000055", - "lane7": "0x00000055" + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x00000054", + "lane3": "0x00000054", + "lane4": "0x00000068", + "lane5": "0x00000066", + "lane6": "0x00000066", + "lane7": "0x00000058" }, "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffff0", + "lane1": "0xfffffff0", + "lane2": "0xfffffff0", + "lane3": "0xfffffff4", + "lane4": "0xfffffff0", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff0" }, "post2": { "lane0": "0x00000000", @@ -646,12 +918,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "6": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "5": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe3", + "lane1": "0xffffffe3", + "lane2": "0xffffffe3", + "lane3": "0xffffffe3", + "lane4": "0xffffffe3", + "lane5": "0xffffffe3", + "lane6": "0xffffffe3", + "lane7": "0xffffffe3" + }, + "main": { + "lane0": "0x0000005d", + "lane1": "0x0000005d", + "lane2": "0x0000005d", + "lane3": "0x0000005d", + "lane4": "0x0000005d", + "lane5": "0x0000005d", + "lane6": "0x0000005d", + "lane7": "0x0000005d" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -712,6 +1080,16 @@ "lane5": "0xfffffff5", "lane6": "0xfffffff5", "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -776,22 +1154,44 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "7": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "6": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffd", - "lane1": "0xfffffffd", - "lane2": "0xfffffffd", - "lane3": "0xfffffffd", - "lane4": "0xfffffffd", - "lane5": "0xfffffffd", - "lane6": "0xfffffffd", - "lane7": "0xfffffffd" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { "lane0": "0x00000008", @@ -804,24 +1204,24 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" + "lane0": "0xffffffe3", + "lane1": "0xffffffe3", + "lane2": "0xffffffe3", + "lane3": "0xffffffe3", + "lane4": "0xffffffe3", + "lane5": "0xffffffe3", + "lane6": "0xffffffe3", + "lane7": "0xffffffe3" }, "main": { - "lane0": "0x0000005a", - "lane1": "0x0000005a", - "lane2": "0x0000005a", - "lane3": "0x0000005a", - "lane4": "0x0000005a", - "lane5": "0x0000005a", - "lane6": "0x0000005a", - "lane7": "0x0000005a" + "lane0": "0x0000005d", + "lane1": "0x0000005d", + "lane2": "0x0000005d", + "lane3": "0x0000005d", + "lane4": "0x0000005d", + "lane5": "0x0000005d", + "lane6": "0x0000005d", + "lane7": "0x0000005d" }, "post1": { "lane0": "0xfffffff3", @@ -834,17 +1234,101 @@ "lane7": "0xfffffff3" }, "post2": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" - } - } - }, + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe3", + "lane1": "0xffffffe3", + "lane2": "0xffffffe3", + "lane3": "0xffffffe3", + "lane4": "0xffffffe3", + "lane5": "0xffffffe3", + "lane6": "0xffffffe3", + "lane7": "0xffffffe3" + }, + "main": { + "lane0": "0x0000005d", + "lane1": "0x0000005d", + "lane2": "0x0000005d", + "lane3": "0x0000005d", + "lane4": "0x0000005d", + "lane5": "0x0000005d", + "lane6": "0x0000005d", + "lane7": "0x0000005d" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { "pre3": { @@ -906,12 +1390,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "8": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "7": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffd", + "lane1": "0xfffffffd", + "lane2": "0xfffffffd", + "lane3": "0xfffffffd", + "lane4": "0xfffffffd", + "lane5": "0xfffffffd", + "lane6": "0xfffffffd", + "lane7": "0xfffffffd" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x0000005a", + "lane1": "0x0000005a", + "lane2": "0x0000005a", + "lane3": "0x0000005a", + "lane4": "0x0000005a", + "lane5": "0x0000005a", + "lane6": "0x0000005a", + "lane7": "0x0000005a" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffd", @@ -972,6 +1552,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -1036,126 +1626,232 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "9": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "8": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xffffffff", - "lane1": "0xffffffff", - "lane2": "0xffffffff", - "lane3": "0xffffffff", - "lane4": "0xffffffff", - "lane5": "0xffffffff", - "lane6": "0xffffffff", - "lane7": "0xffffffff" + "lane0": "0xfffffffd", + "lane1": "0xfffffffd", + "lane2": "0xfffffffd", + "lane3": "0xfffffffd", + "lane4": "0xfffffffd", + "lane5": "0xfffffffd", + "lane6": "0xfffffffd", + "lane7": "0xfffffffd" }, "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffe6", - "lane1": "0xffffffe6", - "lane2": "0xffffffe6", - "lane3": "0xffffffe6", - "lane4": "0xffffffe6", - "lane5": "0xffffffe6", - "lane6": "0xffffffe6", - "lane7": "0xffffffe6" + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { - "lane0": "0x00000068", - "lane1": "0x00000068", - "lane2": "0x00000068", - "lane3": "0x00000068", - "lane4": "0x00000068", - "lane5": "0x00000068", - "lane6": "0x00000068", - "lane7": "0x00000068" + "lane0": "0x0000005a", + "lane1": "0x0000005a", + "lane2": "0x0000005a", + "lane3": "0x0000005a", + "lane4": "0x0000005a", + "lane5": "0x0000005a", + "lane6": "0x0000005a", + "lane7": "0x0000005a" }, "post1": { - "lane0": "0xfffffffa", - "lane1": "0xfffffffa", - "lane2": "0xfffffffa", - "lane3": "0xfffffffa", - "lane4": "0xfffffffa", - "lane5": "0xfffffffa", - "lane6": "0xfffffffa", - "lane7": "0xfffffffa" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" }, "post2": { - "lane0": "0xfffffff2", - "lane1": "0xfffffff2", - "lane2": "0xfffffff2", - "lane3": "0xfffffff2", - "lane4": "0xfffffff2", - "lane5": "0xfffffff2", - "lane6": "0xfffffff2", - "lane7": "0xfffffff2" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0x00000000", - "lane5": "0x00000000", + "lane0": "0xfffffffd", + "lane1": "0xfffffffd", + "lane2": "0xfffffffd", + "lane3": "0xfffffffd", + "lane4": "0xfffffffd", + "lane5": "0xfffffffd", + "lane6": "0xfffffffd", + "lane7": "0xfffffffd" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x0000005a", + "lane1": "0x0000005a", + "lane2": "0x0000005a", + "lane3": "0x0000005a", + "lane4": "0x0000005a", + "lane5": "0x0000005a", + "lane6": "0x0000005a", + "lane7": "0x0000005a" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", "lane6": "0xfffffffc", "lane7": "0xfffffffc" }, "pre2": { - "lane0": "0x0000000c", + "lane0": "0x00000008", "lane1": "0x00000008", "lane2": "0x00000008", "lane3": "0x00000008", - "lane4": "0x0000000c", + "lane4": "0x00000008", "lane5": "0x00000008", "lane6": "0x00000008", "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffda", - "lane1": "0xffffffe0", - "lane2": "0xffffffda", - "lane3": "0xffffffdc", - "lane4": "0xffffffd6", - "lane5": "0xffffffde", - "lane6": "0xffffffda", - "lane7": "0xffffffdc" + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" }, "main": { - "lane0": "0x00000064", - "lane1": "0x0000005c", - "lane2": "0x00000060", - "lane3": "0x0000005c", - "lane4": "0x0000005c", - "lane5": "0x00000068", - "lane6": "0x00000060", - "lane7": "0x00000068" + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" }, "post1": { - "lane0": "0xfffffff8", - "lane1": "0xfffffff0", - "lane2": "0xfffffff8", - "lane3": "0xfffffff0", - "lane4": "0xfffffff8", - "lane5": "0xfffffff8", - "lane6": "0xfffffff8", - "lane7": "0xfffffff4" + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "post2": { "lane0": "0x00000000", @@ -1166,12 +1862,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "10": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "9": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000068", + "lane1": "0x00000068", + "lane2": "0x00000068", + "lane3": "0x00000068", + "lane4": "0x00000068", + "lane5": "0x00000068", + "lane6": "0x00000068", + "lane7": "0x00000068" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -1232,6 +2024,16 @@ "lane5": "0xfffffff2", "lane6": "0xfffffff2", "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -1296,72 +2098,178 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "11": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "10": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000007", - "lane1": "0x00000007", - "lane2": "0x00000007", - "lane3": "0x00000007", - "lane4": "0x00000007", - "lane5": "0x00000007", - "lane6": "0x00000007", - "lane7": "0x00000007" + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffe5", - "lane1": "0xffffffe5", - "lane2": "0xffffffe5", - "lane3": "0xffffffe5", - "lane4": "0xffffffe5", - "lane5": "0xffffffe5", - "lane6": "0xffffffe5", - "lane7": "0xffffffe5" + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" }, "main": { - "lane0": "0x0000005c", - "lane1": "0x0000005c", - "lane2": "0x0000005c", - "lane3": "0x0000005c", - "lane4": "0x0000005c", - "lane5": "0x0000005c", - "lane6": "0x0000005c", - "lane7": "0x0000005c" - }, + "lane0": "0x00000068", + "lane1": "0x00000068", + "lane2": "0x00000068", + "lane3": "0x00000068", + "lane4": "0x00000068", + "lane5": "0x00000068", + "lane6": "0x00000068", + "lane7": "0x00000068" + }, "post1": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" }, "post2": { - "lane0": "0xfffffff4", - "lane1": "0xfffffff4", - "lane2": "0xfffffff4", - "lane3": "0xfffffff4", - "lane4": "0xfffffff4", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", - "lane7": "0xfffffff4" + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000068", + "lane1": "0x00000068", + "lane2": "0x00000068", + "lane3": "0x00000068", + "lane4": "0x00000068", + "lane5": "0x00000068", + "lane6": "0x00000068", + "lane7": "0x00000068" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -1388,23 +2296,23 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffd6", - "lane1": "0xffffffe4", + "lane0": "0xffffffda", + "lane1": "0xffffffe0", "lane2": "0xffffffda", "lane3": "0xffffffdc", "lane4": "0xffffffd6", "lane5": "0xffffffde", - "lane6": "0xffffffd6", + "lane6": "0xffffffda", "lane7": "0xffffffdc" }, "main": { - "lane0": "0x00000060", - "lane1": "0x00000058", + "lane0": "0x00000064", + "lane1": "0x0000005c", "lane2": "0x00000060", "lane3": "0x0000005c", "lane4": "0x0000005c", "lane5": "0x00000068", - "lane6": "0x0000005c", + "lane6": "0x00000060", "lane7": "0x00000068" }, "post1": { @@ -1426,12 +2334,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "12": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "11": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -1492,6 +2496,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -1524,7 +2538,7 @@ "lane3": "0xffffffdc", "lane4": "0xffffffd6", "lane5": "0xffffffde", - "lane6": "0xffffffdc", + "lane6": "0xffffffd6", "lane7": "0xffffffdc" }, "main": { @@ -1534,7 +2548,7 @@ "lane3": "0x0000005c", "lane4": "0x0000005c", "lane5": "0x00000068", - "lane6": "0x00000068", + "lane6": "0x0000005c", "lane7": "0x00000068" }, "post1": { @@ -1544,7 +2558,7 @@ "lane3": "0xfffffff0", "lane4": "0xfffffff8", "lane5": "0xfffffff8", - "lane6": "0xfffffff4", + "lane6": "0xfffffff8", "lane7": "0xfffffff4" }, "post2": { @@ -1556,12 +2570,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "13": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "12": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -1594,14 +2630,14 @@ "lane7": "0xffffffe5" }, "main": { - "lane0": "0x0000005e", - "lane1": "0x0000005e", - "lane2": "0x0000005e", - "lane3": "0x0000005e", - "lane4": "0x0000005e", - "lane5": "0x0000005e", - "lane6": "0x0000005e", - "lane7": "0x0000005e" + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" }, "post1": { "lane0": "0xfffffff3", @@ -1614,68 +2650,152 @@ "lane7": "0xfffffff3" }, "post2": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffff8", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffff8" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x0000000c", - "lane3": "0x00000008", - "lane4": "0x0000000c", - "lane5": "0x00000008", - "lane6": "0x0000000c", - "lane7": "0x0000000c" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe2", - "lane1": "0xffffffda", - "lane2": "0xffffffe2", - "lane3": "0xffffffde", - "lane4": "0xffffffe2", - "lane5": "0xffffffe6", - "lane6": "0xffffffea", - "lane7": "0xffffffe6" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x00000054", - "lane1": "0x00000060", - "lane2": "0x00000054", - "lane3": "0x00000058", - "lane4": "0x00000050", - "lane5": "0x00000058", - "lane6": "0x00000050", - "lane7": "0x00000054" + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" }, "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { "lane0": "0xfffffffc", - "lane1": "0xfffffff8", + "lane1": "0xfffffffc", "lane2": "0xfffffffc", - "lane3": "0xfffffff4", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffff8", - "lane7": "0xfffffff8" + "lane3": "0xfffffffc", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x0000000c", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x0000000c", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffd6", + "lane1": "0xffffffe4", + "lane2": "0xffffffda", + "lane3": "0xffffffdc", + "lane4": "0xffffffd6", + "lane5": "0xffffffde", + "lane6": "0xffffffdc", + "lane7": "0xffffffdc" + }, + "main": { + "lane0": "0x00000060", + "lane1": "0x00000058", + "lane2": "0x00000060", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x00000068", + "lane6": "0x00000068", + "lane7": "0x00000068" + }, + "post1": { + "lane0": "0xfffffff8", + "lane1": "0xfffffff0", + "lane2": "0xfffffff8", + "lane3": "0xfffffff0", + "lane4": "0xfffffff8", + "lane5": "0xfffffff8", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" }, "post2": { "lane0": "0x00000000", @@ -1686,12 +2806,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "14": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "13": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -1752,76 +2894,20 @@ "lane5": "0xfffffff5", "lane6": "0xfffffff5", "lane7": "0xfffffff5" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffff8", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffff8" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x0000000c", - "lane3": "0x00000008", - "lane4": "0x0000000c", - "lane5": "0x00000008", - "lane6": "0x0000000c", - "lane7": "0x0000000c" - }, - "pre1": { - "lane0": "0xffffffe2", - "lane1": "0xffffffda", - "lane2": "0xffffffe2", - "lane3": "0xffffffde", - "lane4": "0xffffffe2", - "lane5": "0xffffffe6", - "lane6": "0xffffffea", - "lane7": "0xffffffe6" - }, - "main": { - "lane0": "0x00000054", - "lane1": "0x00000060", - "lane2": "0x00000054", - "lane3": "0x00000058", - "lane4": "0x00000050", - "lane5": "0x00000058", - "lane6": "0x00000050", - "lane7": "0x00000054" - }, - "post1": { - "lane0": "0xfffffffc", - "lane1": "0xfffffff8", - "lane2": "0xfffffffc", - "lane3": "0xfffffff4", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffff8", - "lane7": "0xfffffff8" }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } - } - }, - "15": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -1854,16 +2940,26 @@ "lane7": "0xffffffe5" }, "main": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" + "lane0": "0x0000005e", + "lane1": "0x0000005e", + "lane2": "0x0000005e", + "lane3": "0x0000005e", + "lane4": "0x0000005e", + "lane5": "0x0000005e", + "lane6": "0x0000005e", + "lane7": "0x0000005e" }, "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { "lane0": "0xfffffff5", "lane1": "0xfffffff5", "lane2": "0xfffffff5", @@ -1873,15 +2969,15 @@ "lane6": "0xfffffff5", "lane7": "0xfffffff5" }, - "post2": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -1909,23 +3005,23 @@ }, "pre1": { "lane0": "0xffffffe2", - "lane1": "0xffffffde", + "lane1": "0xffffffda", "lane2": "0xffffffe2", "lane3": "0xffffffde", - "lane4": "0xffffffe6", - "lane5": "0xffffffe2", - "lane6": "0xffffffe6", - "lane7": "0xffffffe2" + "lane4": "0xffffffe2", + "lane5": "0xffffffe6", + "lane6": "0xffffffea", + "lane7": "0xffffffe6" }, "main": { "lane0": "0x00000054", - "lane1": "0x00000058", - "lane2": "0x00000050", - "lane3": "0x0000005c", - "lane4": "0x00000054", - "lane5": "0x00000054", + "lane1": "0x00000060", + "lane2": "0x00000054", + "lane3": "0x00000058", + "lane4": "0x00000050", + "lane5": "0x00000058", "lane6": "0x00000050", - "lane7": "0x00000058" + "lane7": "0x00000054" }, "post1": { "lane0": "0xfffffffc", @@ -1946,12 +3042,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "16": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "14": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -1984,16 +3102,26 @@ "lane7": "0xffffffe5" }, "main": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" + "lane0": "0x0000005e", + "lane1": "0x0000005e", + "lane2": "0x0000005e", + "lane3": "0x0000005e", + "lane4": "0x0000005e", + "lane5": "0x0000005e", + "lane6": "0x0000005e", + "lane7": "0x0000005e" }, "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { "lane0": "0xfffffff5", "lane1": "0xfffffff5", "lane2": "0xfffffff5", @@ -2003,7 +3131,61 @@ "lane6": "0xfffffff5", "lane7": "0xfffffff5" }, - "post2": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005e", + "lane1": "0x0000005e", + "lane2": "0x0000005e", + "lane3": "0x0000005e", + "lane4": "0x0000005e", + "lane5": "0x0000005e", + "lane6": "0x0000005e", + "lane7": "0x0000005e" + }, + "post1": { "lane0": "0xfffffff3", "lane1": "0xfffffff3", "lane2": "0xfffffff3", @@ -2012,6 +3194,26 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -2034,28 +3236,28 @@ "lane3": "0x00000008", "lane4": "0x0000000c", "lane5": "0x00000008", - "lane6": "0x00000008", + "lane6": "0x0000000c", "lane7": "0x0000000c" }, "pre1": { "lane0": "0xffffffe2", - "lane1": "0xffffffde", + "lane1": "0xffffffda", "lane2": "0xffffffe2", "lane3": "0xffffffde", - "lane4": "0xffffffe6", - "lane5": "0xffffffe2", - "lane6": "0xffffffe6", - "lane7": "0xffffffe2" + "lane4": "0xffffffe2", + "lane5": "0xffffffe6", + "lane6": "0xffffffea", + "lane7": "0xffffffe6" }, "main": { "lane0": "0x00000054", - "lane1": "0x00000058", - "lane2": "0x00000050", - "lane3": "0x0000005c", - "lane4": "0x00000054", - "lane5": "0x00000054", - "lane6": "0x00000058", - "lane7": "0x00000058" + "lane1": "0x00000060", + "lane2": "0x00000054", + "lane3": "0x00000058", + "lane4": "0x00000050", + "lane5": "0x00000058", + "lane6": "0x00000050", + "lane7": "0x00000054" }, "post1": { "lane0": "0xfffffffc", @@ -2076,202 +3278,178 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "17": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "15": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xffffffff", - "lane1": "0xffffffff", - "lane2": "0xffffffff", - "lane3": "0xffffffff", - "lane4": "0xffffffff", - "lane5": "0xffffffff", - "lane6": "0xffffffff", - "lane7": "0xffffffff" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffea", - "lane1": "0xffffffea", - "lane2": "0xffffffea", - "lane3": "0xffffffea", - "lane4": "0xffffffea", - "lane5": "0xffffffea", - "lane6": "0xffffffea", - "lane7": "0xffffffea" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x0000005c", - "lane1": "0x0000005c", - "lane2": "0x0000005c", - "lane3": "0x0000005c", - "lane4": "0x0000005c", - "lane5": "0x0000005c", - "lane6": "0x0000005c", - "lane7": "0x0000005c" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { - "lane0": "0xfffffff9", - "lane1": "0xfffffff9", - "lane2": "0xfffffff9", - "lane3": "0xfffffff9", - "lane4": "0xfffffff9", - "lane5": "0xfffffff9", - "lane6": "0xfffffff9", - "lane7": "0xfffffff9" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" - }, - "main": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - } - } - } - }, - "18": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { - "speed:100GAUI-1-S|800G.*": { - "pre3": { - "lane0": "0xffffffff", - "lane1": "0xffffffff", - "lane2": "0xffffffff", - "lane3": "0xffffffff", - "lane4": "0xffffffff", - "lane5": "0xffffffff", - "lane6": "0xffffffff", - "lane7": "0xffffffff" - }, - "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "pre1": { - "lane0": "0xffffffea", - "lane1": "0xffffffea", - "lane2": "0xffffffea", - "lane3": "0xffffffea", - "lane4": "0xffffffea", - "lane5": "0xffffffea", - "lane6": "0xffffffea", - "lane7": "0xffffffea" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x0000005c", - "lane1": "0x0000005c", - "lane2": "0x0000005c", - "lane3": "0x0000005c", - "lane4": "0x0000005c", - "lane5": "0x0000005c", - "lane6": "0x0000005c", - "lane7": "0x0000005c" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { - "lane0": "0xfffffff9", - "lane1": "0xfffffff9", - "lane2": "0xfffffff9", - "lane3": "0xfffffff9", - "lane4": "0xfffffff9", - "lane5": "0xfffffff9", - "lane6": "0xfffffff9", - "lane7": "0xfffffff9" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -2280,52 +3458,52 @@ "pre3": { "lane0": "0xfffffffc", "lane1": "0xfffffffc", - "lane2": "0xfffffffc", + "lane2": "0xfffffff8", "lane3": "0xfffffffc", "lane4": "0xfffffffc", "lane5": "0xfffffffc", "lane6": "0xfffffffc", - "lane7": "0xfffffffc" + "lane7": "0xfffffff8" }, "pre2": { "lane0": "0x00000008", "lane1": "0x00000008", - "lane2": "0x00000008", + "lane2": "0x0000000c", "lane3": "0x00000008", - "lane4": "0x00000008", + "lane4": "0x0000000c", "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" + "lane6": "0x0000000c", + "lane7": "0x0000000c" }, "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" + "lane0": "0xffffffe2", + "lane1": "0xffffffde", + "lane2": "0xffffffe2", + "lane3": "0xffffffde", + "lane4": "0xffffffe6", + "lane5": "0xffffffe2", + "lane6": "0xffffffe6", + "lane7": "0xffffffe2" }, "main": { - "lane0": "0x00000050", - "lane1": "0x00000050", + "lane0": "0x00000054", + "lane1": "0x00000058", "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", + "lane3": "0x0000005c", + "lane4": "0x00000054", + "lane5": "0x00000054", "lane6": "0x00000050", - "lane7": "0x00000050" + "lane7": "0x00000058" }, "post1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0xfffffffc", + "lane1": "0xfffffff8", + "lane2": "0xfffffffc", + "lane3": "0xfffffff4", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffff8", + "lane7": "0xfffffff8" }, "post2": { "lane0": "0x00000000", @@ -2336,12 +3514,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "19": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "16": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -2374,14 +3574,14 @@ "lane7": "0xffffffe5" }, "main": { - "lane0": "0x00000060", - "lane1": "0x00000060", - "lane2": "0x00000060", - "lane3": "0x00000060", - "lane4": "0x00000060", - "lane5": "0x00000060", - "lane6": "0x00000060", - "lane7": "0x00000060" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { "lane0": "0xfffffff5", @@ -2402,77 +3602,21 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" - }, - "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" - }, - "main": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" - }, - "post1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - } - } - } - }, - "20": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { - "speed:100GAUI-1-S|800G.*": { + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", "lane1": "0xfffffffe", @@ -2504,14 +3648,14 @@ "lane7": "0xffffffe5" }, "main": { - "lane0": "0x00000060", - "lane1": "0x00000060", - "lane2": "0x00000060", - "lane3": "0x00000060", - "lane4": "0x00000060", - "lane5": "0x00000060", - "lane6": "0x00000060", - "lane7": "0x00000060" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { "lane0": "0xfffffff5", @@ -2532,6 +3676,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -2540,52 +3694,52 @@ "pre3": { "lane0": "0xfffffffc", "lane1": "0xfffffffc", - "lane2": "0xfffffffc", + "lane2": "0xfffffff8", "lane3": "0xfffffffc", "lane4": "0xfffffffc", "lane5": "0xfffffffc", "lane6": "0xfffffffc", - "lane7": "0xfffffffc" + "lane7": "0xfffffff8" }, "pre2": { "lane0": "0x00000008", "lane1": "0x00000008", - "lane2": "0x00000008", + "lane2": "0x0000000c", "lane3": "0x00000008", - "lane4": "0x00000008", + "lane4": "0x0000000c", "lane5": "0x00000008", "lane6": "0x00000008", - "lane7": "0x00000008" + "lane7": "0x0000000c" }, "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" + "lane0": "0xffffffe2", + "lane1": "0xffffffde", + "lane2": "0xffffffe2", + "lane3": "0xffffffde", + "lane4": "0xffffffe6", + "lane5": "0xffffffe2", + "lane6": "0xffffffe6", + "lane7": "0xffffffe2" }, "main": { - "lane0": "0x00000050", - "lane1": "0x00000050", + "lane0": "0x00000054", + "lane1": "0x00000058", "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" + "lane3": "0x0000005c", + "lane4": "0x00000054", + "lane5": "0x00000054", + "lane6": "0x00000058", + "lane7": "0x00000058" }, "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffffc", + "lane1": "0xfffffff8", + "lane2": "0xfffffffc", + "lane3": "0xfffffff4", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffff8", + "lane7": "0xfffffff8" }, "post2": { "lane0": "0x00000000", @@ -2596,12 +3750,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "21": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "17": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -2624,44 +3800,128 @@ "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffe7", - "lane1": "0xffffffe7", - "lane2": "0xffffffe7", - "lane3": "0xffffffe7", - "lane4": "0xffffffe7", - "lane5": "0xffffffe7", - "lane6": "0xffffffe7", - "lane7": "0xffffffe7" + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" }, "main": { - "lane0": "0x00000064", - "lane1": "0x00000064", - "lane2": "0x00000064", - "lane3": "0x00000064", - "lane4": "0x00000064", - "lane5": "0x00000064", - "lane6": "0x00000064", - "lane7": "0x00000064" + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" }, "post1": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" }, "post2": { - "lane0": "0xfffffff4", - "lane1": "0xfffffff4", - "lane2": "0xfffffff4", - "lane3": "0xfffffff4", - "lane4": "0xfffffff4", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", - "lane7": "0xfffffff4" + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" + }, + "main": { + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" + }, + "post1": { + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -2689,17 +3949,17 @@ }, "pre1": { "lane0": "0xffffffe4", - "lane1": "0xffffffec", + "lane1": "0xffffffe4", "lane2": "0xffffffe4", "lane3": "0xffffffe4", - "lane4": "0xffffffe0", + "lane4": "0xffffffe4", "lane5": "0xffffffe4", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { "lane0": "0x00000050", - "lane1": "0x00000054", + "lane1": "0x00000050", "lane2": "0x00000050", "lane3": "0x00000050", "lane4": "0x00000050", @@ -2708,14 +3968,14 @@ "lane7": "0x00000050" }, "post1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "post2": { "lane0": "0x00000000", @@ -2726,12 +3986,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "22": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "18": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -2754,124 +4036,68 @@ "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffe7", - "lane1": "0xffffffe7", - "lane2": "0xffffffe7", - "lane3": "0xffffffe7", - "lane4": "0xffffffe7", - "lane5": "0xffffffe7", - "lane6": "0xffffffe7", - "lane7": "0xffffffe7" - }, - "main": { - "lane0": "0x00000064", - "lane1": "0x00000064", - "lane2": "0x00000064", - "lane3": "0x00000064", - "lane4": "0x00000064", - "lane5": "0x00000064", - "lane6": "0x00000064", - "lane7": "0x00000064" - }, - "post1": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" - }, - "post2": { - "lane0": "0xfffffff4", - "lane1": "0xfffffff4", - "lane2": "0xfffffff4", - "lane3": "0xfffffff4", - "lane4": "0xfffffff4", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", - "lane7": "0xfffffff4" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" - }, - "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffec", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe0", - "lane5": "0xffffffe4", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" }, "main": { - "lane0": "0x00000050", - "lane1": "0x00000054", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" }, "post1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" }, "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } - } - }, - "23": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" }, "pre2": { "lane0": "0x00000006", @@ -2884,44 +4110,54 @@ "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffe8", - "lane1": "0xffffffe8", - "lane2": "0xffffffe8", - "lane3": "0xffffffe8", - "lane4": "0xffffffe8", - "lane5": "0xffffffe8", - "lane6": "0xffffffe8", - "lane7": "0xffffffe8" + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" }, "main": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" + "lane0": "0x0000005c", + "lane1": "0x0000005c", + "lane2": "0x0000005c", + "lane3": "0x0000005c", + "lane4": "0x0000005c", + "lane5": "0x0000005c", + "lane6": "0x0000005c", + "lane7": "0x0000005c" }, "post1": { - "lane0": "0xfffffffa", - "lane1": "0xfffffffa", - "lane2": "0xfffffffa", - "lane3": "0xfffffffa", - "lane4": "0xfffffffa", - "lane5": "0xfffffffa", - "lane6": "0xfffffffa", - "lane7": "0xfffffffa" + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" }, "post2": { - "lane0": "0xfffffff4", - "lane1": "0xfffffff4", - "lane2": "0xfffffff4", - "lane3": "0xfffffff4", - "lane4": "0xfffffff4", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", - "lane7": "0xfffffff4" + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -2986,12 +4222,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "24": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "19": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -3004,54 +4262,138 @@ "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe8", - "lane1": "0xffffffe8", - "lane2": "0xffffffe8", - "lane3": "0xffffffe8", - "lane4": "0xffffffe8", - "lane5": "0xffffffe8", - "lane6": "0xffffffe8", - "lane7": "0xffffffe8" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "post1": { - "lane0": "0xfffffffa", - "lane1": "0xfffffffa", - "lane2": "0xfffffffa", - "lane3": "0xfffffffa", - "lane4": "0xfffffffa", - "lane5": "0xfffffffa", - "lane6": "0xfffffffa", - "lane7": "0xfffffffa" + "lane0": "0x00000060", + "lane1": "0x00000060", + "lane2": "0x00000060", + "lane3": "0x00000060", + "lane4": "0x00000060", + "lane5": "0x00000060", + "lane6": "0x00000060", + "lane7": "0x00000060" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff4", - "lane1": "0xfffffff4", - "lane2": "0xfffffff4", - "lane3": "0xfffffff4", - "lane4": "0xfffffff4", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", - "lane7": "0xfffffff4" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x00000060", + "lane1": "0x00000060", + "lane2": "0x00000060", + "lane3": "0x00000060", + "lane4": "0x00000060", + "lane5": "0x00000060", + "lane6": "0x00000060", + "lane7": "0x00000060" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -3084,8 +4426,8 @@ "lane3": "0xffffffe4", "lane4": "0xffffffe4", "lane5": "0xffffffe4", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { "lane0": "0x00000050", @@ -3116,52 +4458,74 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "25": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "20": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xffffffff", - "lane1": "0xffffffff", - "lane2": "0xffffffff", - "lane3": "0xffffffff", - "lane4": "0xffffffff", - "lane5": "0xffffffff", - "lane6": "0xffffffff", - "lane7": "0xffffffff" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000005", - "lane1": "0x00000005", - "lane2": "0x00000005", - "lane3": "0x00000005", - "lane4": "0x00000005", - "lane5": "0x00000005", - "lane6": "0x00000005", - "lane7": "0x00000005" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffeb", - "lane1": "0xffffffeb", - "lane2": "0xffffffeb", - "lane3": "0xffffffeb", - "lane4": "0xffffffeb", - "lane5": "0xffffffeb", - "lane6": "0xffffffeb", - "lane7": "0xffffffeb" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x00000056", - "lane1": "0x00000056", - "lane2": "0x00000056", - "lane3": "0x00000056", - "lane4": "0x00000056", - "lane5": "0x00000056", - "lane6": "0x00000056", - "lane7": "0x00000056" + "lane0": "0x00000060", + "lane1": "0x00000060", + "lane2": "0x00000060", + "lane3": "0x00000060", + "lane4": "0x00000060", + "lane5": "0x00000060", + "lane6": "0x00000060", + "lane7": "0x00000060" }, "post1": { "lane0": "0xfffffff5", @@ -3174,14 +4538,98 @@ "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x00000060", + "lane1": "0x00000060", + "lane2": "0x00000060", + "lane3": "0x00000060", + "lane4": "0x00000060", + "lane5": "0x00000060", + "lane6": "0x00000060", + "lane7": "0x00000060" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -3208,24 +4656,24 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" + "lane0": "0x00000050", + "lane1": "0x00000050", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" }, "post1": { "lane0": "0x00000000", @@ -3246,12 +4694,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "26": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "21": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -3264,34 +4734,34 @@ "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000005", - "lane1": "0x00000005", - "lane2": "0x00000005", - "lane3": "0x00000005", - "lane4": "0x00000005", - "lane5": "0x00000005", - "lane6": "0x00000005", - "lane7": "0x00000005" + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffeb", - "lane1": "0xffffffeb", - "lane2": "0xffffffeb", - "lane3": "0xffffffeb", - "lane4": "0xffffffeb", - "lane5": "0xffffffeb", - "lane6": "0xffffffeb", - "lane7": "0xffffffeb" + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" }, "main": { - "lane0": "0x00000056", - "lane1": "0x00000056", - "lane2": "0x00000056", - "lane3": "0x00000056", - "lane4": "0x00000056", - "lane5": "0x00000056", - "lane6": "0x00000056", - "lane7": "0x00000056" + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" }, "post1": { "lane0": "0xfffffff5", @@ -3304,14 +4774,98 @@ "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -3338,34 +4892,34 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffec", + "lane0": "0xffffffe4", "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe0", + "lane5": "0xffffffe4", "lane6": "0xffffffec", "lane7": "0xffffffec" }, "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" + "lane0": "0x00000050", + "lane1": "0x00000054", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" }, "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "post2": { "lane0": "0x00000000", @@ -3376,52 +4930,74 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "27": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "22": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000007", - "lane1": "0x00000007", - "lane2": "0x00000007", - "lane3": "0x00000007", - "lane4": "0x00000007", - "lane5": "0x00000007", - "lane6": "0x00000007", - "lane7": "0x00000007" + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffe8", - "lane1": "0xffffffe8", - "lane2": "0xffffffe8", - "lane3": "0xffffffe8", - "lane4": "0xffffffe8", - "lane5": "0xffffffe8", - "lane6": "0xffffffe8", - "lane7": "0xffffffe8" - }, - "main": { - "lane0": "0x00000052", - "lane1": "0x00000052", - "lane2": "0x00000052", - "lane3": "0x00000052", - "lane4": "0x00000052", - "lane5": "0x00000052", - "lane6": "0x00000052", - "lane7": "0x00000052" + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" }, "post1": { "lane0": "0xfffffff5", @@ -3434,14 +5010,98 @@ "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -3468,34 +5128,34 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffec", + "lane0": "0xffffffe4", "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe0", + "lane5": "0xffffffe4", "lane6": "0xffffffec", "lane7": "0xffffffec" }, "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" + "lane0": "0x00000050", + "lane1": "0x00000054", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" }, "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "post2": { "lane0": "0x00000000", @@ -3506,12 +5166,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "28": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "23": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -3524,14 +5206,14 @@ "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000007", - "lane1": "0x00000007", - "lane2": "0x00000007", - "lane3": "0x00000007", - "lane4": "0x00000007", - "lane5": "0x00000007", - "lane6": "0x00000007", - "lane7": "0x00000007" + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" }, "pre1": { "lane0": "0xffffffe8", @@ -3544,63 +5226,2271 @@ "lane7": "0xffffffe8" }, "main": { - "lane0": "0x00000052", - "lane1": "0x00000052", - "lane2": "0x00000052", - "lane3": "0x00000052", - "lane4": "0x00000052", - "lane5": "0x00000052", - "lane6": "0x00000052", - "lane7": "0x00000052" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x00000050", + "lane1": "0x00000050", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" + }, + "post1": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "24": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x00000050", + "lane1": "0x00000050", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" + }, + "post1": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "25": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffeb", + "lane1": "0xffffffeb", + "lane2": "0xffffffeb", + "lane3": "0xffffffeb", + "lane4": "0xffffffeb", + "lane5": "0xffffffeb", + "lane6": "0xffffffeb", + "lane7": "0xffffffeb" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffeb", + "lane1": "0xffffffeb", + "lane2": "0xffffffeb", + "lane3": "0xffffffeb", + "lane4": "0xffffffeb", + "lane5": "0xffffffeb", + "lane6": "0xffffffeb", + "lane7": "0xffffffeb" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "26": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffeb", + "lane1": "0xffffffeb", + "lane2": "0xffffffeb", + "lane3": "0xffffffeb", + "lane4": "0xffffffeb", + "lane5": "0xffffffeb", + "lane6": "0xffffffeb", + "lane7": "0xffffffeb" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffeb", + "lane1": "0xffffffeb", + "lane2": "0xffffffeb", + "lane3": "0xffffffeb", + "lane4": "0xffffffeb", + "lane5": "0xffffffeb", + "lane6": "0xffffffeb", + "lane7": "0xffffffeb" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "27": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000052", + "lane1": "0x00000052", + "lane2": "0x00000052", + "lane3": "0x00000052", + "lane4": "0x00000052", + "lane5": "0x00000052", + "lane6": "0x00000052", + "lane7": "0x00000052" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000052", + "lane1": "0x00000052", + "lane2": "0x00000052", + "lane3": "0x00000052", + "lane4": "0x00000052", + "lane5": "0x00000052", + "lane6": "0x00000052", + "lane7": "0x00000052" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "28": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000052", + "lane1": "0x00000052", + "lane2": "0x00000052", + "lane3": "0x00000052", + "lane4": "0x00000052", + "lane5": "0x00000052", + "lane6": "0x00000052", + "lane7": "0x00000052" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000052", + "lane1": "0x00000052", + "lane2": "0x00000052", + "lane3": "0x00000052", + "lane4": "0x00000052", + "lane5": "0x00000052", + "lane6": "0x00000052", + "lane7": "0x00000052" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "29": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000004", + "lane1": "0x00000004", + "lane2": "0x00000004", + "lane3": "0x00000004", + "lane4": "0x00000004", + "lane5": "0x00000004", + "lane6": "0x00000004", + "lane7": "0x00000004" + }, + "pre1": { + "lane0": "0xffffffed", + "lane1": "0xffffffed", + "lane2": "0xffffffed", + "lane3": "0xffffffed", + "lane4": "0xffffffed", + "lane5": "0xffffffed", + "lane6": "0xffffffed", + "lane7": "0xffffffed" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffffb", + "lane1": "0xfffffffb", + "lane2": "0xfffffffb", + "lane3": "0xfffffffb", + "lane4": "0xfffffffb", + "lane5": "0xfffffffb", + "lane6": "0xfffffffb", + "lane7": "0xfffffffb" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000004", + "lane1": "0x00000004", + "lane2": "0x00000004", + "lane3": "0x00000004", + "lane4": "0x00000004", + "lane5": "0x00000004", + "lane6": "0x00000004", + "lane7": "0x00000004" + }, + "pre1": { + "lane0": "0xffffffed", + "lane1": "0xffffffed", + "lane2": "0xffffffed", + "lane3": "0xffffffed", + "lane4": "0xffffffed", + "lane5": "0xffffffed", + "lane6": "0xffffffed", + "lane7": "0xffffffed" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffffb", + "lane1": "0xfffffffb", + "lane2": "0xfffffffb", + "lane3": "0xfffffffb", + "lane4": "0xfffffffb", + "lane5": "0xfffffffb", + "lane6": "0xfffffffb", + "lane7": "0xfffffffb" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000004", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "30": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000004", + "lane1": "0x00000004", + "lane2": "0x00000004", + "lane3": "0x00000004", + "lane4": "0x00000004", + "lane5": "0x00000004", + "lane6": "0x00000004", + "lane7": "0x00000004" + }, + "pre1": { + "lane0": "0xffffffed", + "lane1": "0xffffffed", + "lane2": "0xffffffed", + "lane3": "0xffffffed", + "lane4": "0xffffffed", + "lane5": "0xffffffed", + "lane6": "0xffffffed", + "lane7": "0xffffffed" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffffb", + "lane1": "0xfffffffb", + "lane2": "0xfffffffb", + "lane3": "0xfffffffb", + "lane4": "0xfffffffb", + "lane5": "0xfffffffb", + "lane6": "0xfffffffb", + "lane7": "0xfffffffb" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000004", + "lane1": "0x00000004", + "lane2": "0x00000004", + "lane3": "0x00000004", + "lane4": "0x00000004", + "lane5": "0x00000004", + "lane6": "0x00000004", + "lane7": "0x00000004" + }, + "pre1": { + "lane0": "0xffffffed", + "lane1": "0xffffffed", + "lane2": "0xffffffed", + "lane3": "0xffffffed", + "lane4": "0xffffffed", + "lane5": "0xffffffed", + "lane6": "0xffffffed", + "lane7": "0xffffffed" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffffb", + "lane1": "0xfffffffb", + "lane2": "0xfffffffb", + "lane3": "0xfffffffb", + "lane4": "0xfffffffb", + "lane5": "0xfffffffb", + "lane6": "0xfffffffb", + "lane7": "0xfffffffb" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffe8", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "31": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" + }, + "main": { + "lane0": "0x0000004e", + "lane1": "0x0000004e", + "lane2": "0x0000004e", + "lane3": "0x0000004e", + "lane4": "0x0000004e", + "lane5": "0x0000004e", + "lane6": "0x0000004e", + "lane7": "0x0000004e" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "32": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe8", + "lane1": "0xffffffe8", + "lane2": "0xffffffe8", + "lane3": "0xffffffe8", + "lane4": "0xffffffe8", + "lane5": "0xffffffe8", + "lane6": "0xffffffe8", + "lane7": "0xffffffe8" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "post2": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { + "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { + "pre3": { + "lane0": "0xfffffffc", + "lane1": "0xfffffffc", + "lane2": "0xfffffffc", + "lane3": "0xfffffffc", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", + "lane6": "0xfffffffc", + "lane7": "0xfffffffc" + }, + "pre2": { + "lane0": "0x00000008", + "lane1": "0x00000008", + "lane2": "0x00000008", + "lane3": "0x00000008", + "lane4": "0x00000008", + "lane5": "0x00000008", + "lane6": "0x00000008", + "lane7": "0x00000008" + }, + "pre1": { + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", "lane3": "0xffffffec", "lane4": "0xffffffec", "lane5": "0xffffffec", @@ -3636,12 +7526,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "29": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "33": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -3654,44 +7566,118 @@ "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" }, "pre1": { - "lane0": "0xffffffed", - "lane1": "0xffffffed", - "lane2": "0xffffffed", - "lane3": "0xffffffed", - "lane4": "0xffffffed", - "lane5": "0xffffffed", - "lane6": "0xffffffed", - "lane7": "0xffffffed" + "lane0": "0xffffffee", + "lane1": "0xffffffee", + "lane2": "0xffffffee", + "lane3": "0xffffffee", + "lane4": "0xffffffee", + "lane5": "0xffffffee", + "lane6": "0xffffffee", + "lane7": "0xffffffee" }, "main": { - "lane0": "0x00000056", - "lane1": "0x00000056", - "lane2": "0x00000056", - "lane3": "0x00000056", - "lane4": "0x00000056", - "lane5": "0x00000056", - "lane6": "0x00000056", - "lane7": "0x00000056" + "lane0": "0x00000059", + "lane1": "0x00000059", + "lane2": "0x00000059", + "lane3": "0x00000059", + "lane4": "0x00000059", + "lane5": "0x00000059", + "lane6": "0x00000059", + "lane7": "0x00000059" }, "post1": { - "lane0": "0xfffffffb", - "lane1": "0xfffffffb", - "lane2": "0xfffffffb", - "lane3": "0xfffffffb", - "lane4": "0xfffffffb", - "lane5": "0xfffffffb", - "lane6": "0xfffffffb", - "lane7": "0xfffffffb" + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffee", + "lane1": "0xffffffee", + "lane2": "0xffffffee", + "lane3": "0xffffffee", + "lane4": "0xffffffee", + "lane5": "0xffffffee", + "lane6": "0xffffffee", + "lane7": "0xffffffee" + }, + "main": { + "lane0": "0x00000059", + "lane1": "0x00000059", + "lane2": "0x00000059", + "lane3": "0x00000059", + "lane4": "0x00000059", + "lane5": "0x00000059", + "lane6": "0x00000059", + "lane7": "0x00000059" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" }, "post2": { "lane0": "0xfffffff7", @@ -3702,6 +7688,16 @@ "lane5": "0xfffffff7", "lane6": "0xfffffff7", "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, @@ -3712,8 +7708,8 @@ "lane1": "0xfffffffc", "lane2": "0xfffffffc", "lane3": "0xfffffffc", - "lane4": "0x00000000", - "lane5": "0x00000000", + "lane4": "0xfffffffc", + "lane5": "0xfffffffc", "lane6": "0xfffffffc", "lane7": "0xfffffffc" }, @@ -3722,7 +7718,7 @@ "lane1": "0x00000008", "lane2": "0x00000008", "lane3": "0x00000008", - "lane4": "0x00000004", + "lane4": "0x00000008", "lane5": "0x00000008", "lane6": "0x00000008", "lane7": "0x00000008" @@ -3766,12 +7762,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "34": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffee", + "lane1": "0xffffffee", + "lane2": "0xffffffee", + "lane3": "0xffffffee", + "lane4": "0xffffffee", + "lane5": "0xffffffee", + "lane6": "0xffffffee", + "lane7": "0xffffffee" + }, + "main": { + "lane0": "0x00000059", + "lane1": "0x00000059", + "lane2": "0x00000059", + "lane3": "0x00000059", + "lane4": "0x00000059", + "lane5": "0x00000059", + "lane6": "0x00000059", + "lane7": "0x00000059" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } - } - }, - "30": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -3784,44 +7876,44 @@ "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" }, "pre1": { - "lane0": "0xffffffed", - "lane1": "0xffffffed", - "lane2": "0xffffffed", - "lane3": "0xffffffed", - "lane4": "0xffffffed", - "lane5": "0xffffffed", - "lane6": "0xffffffed", - "lane7": "0xffffffed" + "lane0": "0xffffffee", + "lane1": "0xffffffee", + "lane2": "0xffffffee", + "lane3": "0xffffffee", + "lane4": "0xffffffee", + "lane5": "0xffffffee", + "lane6": "0xffffffee", + "lane7": "0xffffffee" }, "main": { - "lane0": "0x00000056", - "lane1": "0x00000056", - "lane2": "0x00000056", - "lane3": "0x00000056", - "lane4": "0x00000056", - "lane5": "0x00000056", - "lane6": "0x00000056", - "lane7": "0x00000056" + "lane0": "0x00000059", + "lane1": "0x00000059", + "lane2": "0x00000059", + "lane3": "0x00000059", + "lane4": "0x00000059", + "lane5": "0x00000059", + "lane6": "0x00000059", + "lane7": "0x00000059" }, "post1": { - "lane0": "0xfffffffb", - "lane1": "0xfffffffb", - "lane2": "0xfffffffb", - "lane3": "0xfffffffb", - "lane4": "0xfffffffb", - "lane5": "0xfffffffb", - "lane6": "0xfffffffb", - "lane7": "0xfffffffb" + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" }, "post2": { "lane0": "0xfffffff7", @@ -3832,6 +7924,16 @@ "lane5": "0xfffffff7", "lane6": "0xfffffff7", "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } }, @@ -3863,7 +7965,7 @@ "lane2": "0xffffffec", "lane3": "0xffffffec", "lane4": "0xffffffec", - "lane5": "0xffffffe8", + "lane5": "0xffffffec", "lane6": "0xffffffec", "lane7": "0xffffffec" }, @@ -3896,14 +7998,36 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" + } } }, - "31": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "35": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { - "pre3": { + "pre3": { "lane0": "0xfffffffe", "lane1": "0xfffffffe", "lane2": "0xfffffffe", @@ -3914,24 +8038,24 @@ "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe8", - "lane1": "0xffffffe8", - "lane2": "0xffffffe8", - "lane3": "0xffffffe8", - "lane4": "0xffffffe8", - "lane5": "0xffffffe8", - "lane6": "0xffffffe8", - "lane7": "0xffffffe8" + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" }, "main": { "lane0": "0x00000056", @@ -3944,96 +8068,40 @@ "lane7": "0x00000056" }, "post1": { - "lane0": "0xfffffff7", - "lane1": "0xfffffff7", - "lane2": "0xfffffff7", - "lane3": "0xfffffff7", - "lane4": "0xfffffff7", - "lane5": "0xfffffff7", - "lane6": "0xfffffff7", - "lane7": "0xfffffff7" + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" - }, - "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" - }, - "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } - } - }, - "32": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { - "pre3": { + "pre3": { "lane0": "0xfffffffe", "lane1": "0xfffffffe", "lane2": "0xfffffffe", @@ -4044,24 +8112,24 @@ "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe8", - "lane1": "0xffffffe8", - "lane2": "0xffffffe8", - "lane3": "0xffffffe8", - "lane4": "0xffffffe8", - "lane5": "0xffffffe8", - "lane6": "0xffffffe8", - "lane7": "0xffffffe8" + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" }, "main": { "lane0": "0x00000056", @@ -4074,24 +8142,34 @@ "lane7": "0x00000056" }, "post1": { - "lane0": "0xfffffff7", - "lane1": "0xfffffff7", - "lane2": "0xfffffff7", - "lane3": "0xfffffff7", - "lane4": "0xfffffff7", - "lane5": "0xfffffff7", - "lane6": "0xfffffff7", - "lane7": "0xfffffff7" + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" }, "post2": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -4156,72 +8234,178 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "33": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "36": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xffffffff", - "lane1": "0xffffffff", - "lane2": "0xffffffff", - "lane3": "0xffffffff", - "lane4": "0xffffffff", - "lane5": "0xffffffff", - "lane6": "0xffffffff", - "lane7": "0xffffffff" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000005", - "lane1": "0x00000005", - "lane2": "0x00000005", - "lane3": "0x00000005", - "lane4": "0x00000005", - "lane5": "0x00000005", - "lane6": "0x00000005", - "lane7": "0x00000005" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffee", - "lane1": "0xffffffee", - "lane2": "0xffffffee", - "lane3": "0xffffffee", - "lane4": "0xffffffee", - "lane5": "0xffffffee", - "lane6": "0xffffffee", - "lane7": "0xffffffee" + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" }, "main": { - "lane0": "0x00000059", - "lane1": "0x00000059", - "lane2": "0x00000059", - "lane3": "0x00000059", - "lane4": "0x00000059", - "lane5": "0x00000059", - "lane6": "0x00000059", - "lane7": "0x00000059" + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" }, "post1": { - "lane0": "0xfffffffa", - "lane1": "0xfffffffa", - "lane2": "0xfffffffa", - "lane3": "0xfffffffa", - "lane4": "0xfffffffa", - "lane5": "0xfffffffa", - "lane6": "0xfffffffa", - "lane7": "0xfffffffa" + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" }, "post2": { - "lane0": "0xfffffff7", - "lane1": "0xfffffff7", - "lane2": "0xfffffff7", - "lane3": "0xfffffff7", - "lane4": "0xfffffff7", - "lane5": "0xfffffff7", - "lane6": "0xfffffff7", - "lane7": "0xfffffff7" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000056", + "lane1": "0x00000056", + "lane2": "0x00000056", + "lane3": "0x00000056", + "lane4": "0x00000056", + "lane5": "0x00000056", + "lane6": "0x00000056", + "lane7": "0x00000056" + }, + "post1": { + "lane0": "0xfffffff9", + "lane1": "0xfffffff9", + "lane2": "0xfffffff9", + "lane3": "0xfffffff9", + "lane4": "0xfffffff9", + "lane5": "0xfffffff9", + "lane6": "0xfffffff9", + "lane7": "0xfffffff9" + }, + "post2": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -4286,12 +8470,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "34": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "37": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -4314,34 +8520,108 @@ "lane7": "0x00000005" }, "pre1": { - "lane0": "0xffffffee", - "lane1": "0xffffffee", - "lane2": "0xffffffee", - "lane3": "0xffffffee", - "lane4": "0xffffffee", - "lane5": "0xffffffee", - "lane6": "0xffffffee", - "lane7": "0xffffffee" + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" + }, + "main": { + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" }, "main": { - "lane0": "0x00000059", - "lane1": "0x00000059", - "lane2": "0x00000059", - "lane3": "0x00000059", - "lane4": "0x00000059", - "lane5": "0x00000059", - "lane6": "0x00000059", - "lane7": "0x00000059" + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" }, "post1": { - "lane0": "0xfffffffa", - "lane1": "0xfffffffa", - "lane2": "0xfffffffa", - "lane3": "0xfffffffa", - "lane4": "0xfffffffa", - "lane5": "0xfffffffa", - "lane6": "0xfffffffa", - "lane7": "0xfffffffa" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" }, "post2": { "lane0": "0xfffffff7", @@ -4352,6 +8632,16 @@ "lane5": "0xfffffff7", "lane6": "0xfffffff7", "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -4378,24 +8668,24 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" + "lane0": "0x00000050", + "lane1": "0x00000050", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" }, "post1": { "lane0": "0x00000000", @@ -4416,64 +8706,76 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "35": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "38": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000007", - "lane1": "0x00000007", - "lane2": "0x00000007", - "lane3": "0x00000007", - "lane4": "0x00000007", - "lane5": "0x00000007", - "lane6": "0x00000007", - "lane7": "0x00000007" + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" }, "pre1": { - "lane0": "0xffffffe7", - "lane1": "0xffffffe7", - "lane2": "0xffffffe7", - "lane3": "0xffffffe7", - "lane4": "0xffffffe7", - "lane5": "0xffffffe7", - "lane6": "0xffffffe7", - "lane7": "0xffffffe7" + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" }, "main": { - "lane0": "0x00000056", - "lane1": "0x00000056", - "lane2": "0x00000056", - "lane3": "0x00000056", - "lane4": "0x00000056", - "lane5": "0x00000056", - "lane6": "0x00000056", - "lane7": "0x00000056" + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" }, "post1": { - "lane0": "0xfffffff9", - "lane1": "0xfffffff9", - "lane2": "0xfffffff9", - "lane3": "0xfffffff9", - "lane4": "0xfffffff9", - "lane5": "0xfffffff9", - "lane6": "0xfffffff9", - "lane7": "0xfffffff9" - }, - "post2": { "lane0": "0xfffffff5", "lane1": "0xfffffff5", "lane2": "0xfffffff5", @@ -4482,128 +8784,72 @@ "lane5": "0xfffffff5", "lane6": "0xfffffff5", "lane7": "0xfffffff5" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" - }, - "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" - }, - "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" }, "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } - } - }, - "36": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "pre2": { - "lane0": "0x00000007", - "lane1": "0x00000007", - "lane2": "0x00000007", - "lane3": "0x00000007", - "lane4": "0x00000007", - "lane5": "0x00000007", - "lane6": "0x00000007", - "lane7": "0x00000007" + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" }, "pre1": { - "lane0": "0xffffffe7", - "lane1": "0xffffffe7", - "lane2": "0xffffffe7", - "lane3": "0xffffffe7", - "lane4": "0xffffffe7", - "lane5": "0xffffffe7", - "lane6": "0xffffffe7", - "lane7": "0xffffffe7" + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" }, "main": { - "lane0": "0x00000056", - "lane1": "0x00000056", - "lane2": "0x00000056", - "lane3": "0x00000056", - "lane4": "0x00000056", - "lane5": "0x00000056", - "lane6": "0x00000056", - "lane7": "0x00000056" + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" }, "post1": { - "lane0": "0xfffffff9", - "lane1": "0xfffffff9", - "lane2": "0xfffffff9", - "lane3": "0xfffffff9", - "lane4": "0xfffffff9", - "lane5": "0xfffffff9", - "lane6": "0xfffffff9", - "lane7": "0xfffffff9" - }, - "post2": { "lane0": "0xfffffff5", "lane1": "0xfffffff5", "lane2": "0xfffffff5", @@ -4612,6 +8858,26 @@ "lane5": "0xfffffff5", "lane6": "0xfffffff5", "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -4648,24 +8914,24 @@ "lane7": "0xffffffec" }, "main": { - "lane0": "0x0000004e", - "lane1": "0x0000004e", - "lane2": "0x0000004e", - "lane3": "0x0000004e", - "lane4": "0x0000004e", - "lane5": "0x0000004e", - "lane6": "0x0000004e", - "lane7": "0x0000004e" + "lane0": "0x00000050", + "lane1": "0x00000050", + "lane2": "0x00000050", + "lane3": "0x00000050", + "lane4": "0x00000050", + "lane5": "0x00000050", + "lane6": "0x00000050", + "lane7": "0x00000050" }, "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "post2": { "lane0": "0x00000000", @@ -4676,14 +8942,36 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "37": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "39": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { - "pre3": { + "pre3": { "lane0": "0xffffffff", "lane1": "0xffffffff", "lane2": "0xffffffff", @@ -4742,78 +9030,22 @@ "lane5": "0xfffffff7", "lane6": "0xfffffff7", "lane7": "0xfffffff7" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x00000008", - "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", - "lane6": "0x00000008", - "lane7": "0x00000008" }, - "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" - }, - "main": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x0" } } - } - }, - "38": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { - "pre3": { + "pre3": { "lane0": "0xffffffff", "lane1": "0xffffffff", "lane2": "0xffffffff", @@ -4872,6 +9104,16 @@ "lane5": "0xfffffff7", "lane6": "0xfffffff7", "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x1" } } }, @@ -4898,14 +9140,14 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { "lane0": "0x00000050", @@ -4936,12 +9178,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x0" + } + } + }, + "40": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000005", + "lane1": "0x00000005", + "lane2": "0x00000005", + "lane3": "0x00000005", + "lane4": "0x00000005", + "lane5": "0x00000005", + "lane6": "0x00000005", + "lane7": "0x00000005" + }, + "pre1": { + "lane0": "0xffffffea", + "lane1": "0xffffffea", + "lane2": "0xffffffea", + "lane3": "0xffffffea", + "lane4": "0xffffffea", + "lane5": "0xffffffea", + "lane6": "0xffffffea", + "lane7": "0xffffffea" + }, + "main": { + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff7", + "lane1": "0xfffffff7", + "lane2": "0xfffffff7", + "lane3": "0xfffffff7", + "lane4": "0xfffffff7", + "lane5": "0xfffffff7", + "lane6": "0xfffffff7", + "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } - } - }, - "39": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5002,9 +9340,19 @@ "lane5": "0xfffffff7", "lane6": "0xfffffff7", "lane7": "0xfffffff7" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } - }, + }, "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { "pre3": { @@ -5048,14 +9396,14 @@ "lane7": "0x00000050" }, "post1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "post2": { "lane0": "0x00000000", @@ -5066,12 +9414,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "40": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "41": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5084,54 +9454,138 @@ "lane7": "0xffffffff" }, "pre2": { - "lane0": "0x00000005", - "lane1": "0x00000005", - "lane2": "0x00000005", - "lane3": "0x00000005", - "lane4": "0x00000005", - "lane5": "0x00000005", - "lane6": "0x00000005", - "lane7": "0x00000005" + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffea", - "lane1": "0xffffffea", - "lane2": "0xffffffea", - "lane3": "0xffffffea", - "lane4": "0xffffffea", - "lane5": "0xffffffea", - "lane6": "0xffffffea", - "lane7": "0xffffffea" + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" }, "main": { - "lane0": "0x00000055", - "lane1": "0x00000055", - "lane2": "0x00000055", - "lane3": "0x00000055", - "lane4": "0x00000055", - "lane5": "0x00000055", - "lane6": "0x00000055", - "lane7": "0x00000055" + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" }, "post1": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" }, "post2": { - "lane0": "0xfffffff7", - "lane1": "0xfffffff7", - "lane2": "0xfffffff7", - "lane3": "0xfffffff7", - "lane4": "0xfffffff7", - "lane5": "0xfffffff7", - "lane6": "0xfffffff7", - "lane7": "0xfffffff7" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -5164,7 +9618,7 @@ "lane3": "0xffffffe4", "lane4": "0xffffffe4", "lane5": "0xffffffe4", - "lane6": "0xffffffe4", + "lane6": "0xffffffe2", "lane7": "0xffffffe4" }, "main": { @@ -5174,10 +9628,20 @@ "lane3": "0x00000050", "lane4": "0x00000050", "lane5": "0x00000050", - "lane6": "0x00000050", + "lane6": "0x0000005c", "lane7": "0x00000050" }, "post1": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "post2": { "lane0": "0x00000000", "lane1": "0x00000000", "lane2": "0x00000000", @@ -5187,21 +9651,107 @@ "lane6": "0x00000000", "lane7": "0x00000000" }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "42": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } - } - }, - "41": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5262,6 +9812,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -5294,7 +9854,7 @@ "lane3": "0xffffffe4", "lane4": "0xffffffe4", "lane5": "0xffffffe4", - "lane6": "0xffffffe2", + "lane6": "0xffffffe4", "lane7": "0xffffffe4" }, "main": { @@ -5304,7 +9864,7 @@ "lane3": "0x00000050", "lane4": "0x00000050", "lane5": "0x00000050", - "lane6": "0x0000005c", + "lane6": "0x00000050", "lane7": "0x00000050" }, "post1": { @@ -5326,12 +9886,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "42": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "43": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5392,6 +10048,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -5456,12 +10122,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "43": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "44": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe6", + "lane1": "0xffffffe6", + "lane2": "0xffffffe6", + "lane3": "0xffffffe6", + "lane4": "0xffffffe6", + "lane5": "0xffffffe6", + "lane6": "0xffffffe6", + "lane7": "0xffffffe6" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffff6", + "lane1": "0xfffffff6", + "lane2": "0xfffffff6", + "lane3": "0xfffffff6", + "lane4": "0xfffffff6", + "lane5": "0xfffffff6", + "lane6": "0xfffffff6", + "lane7": "0xfffffff6" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5522,6 +10284,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -5586,12 +10358,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "44": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "45": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5614,44 +10408,128 @@ "lane7": "0x00000006" }, "pre1": { - "lane0": "0xffffffe6", - "lane1": "0xffffffe6", - "lane2": "0xffffffe6", - "lane3": "0xffffffe6", - "lane4": "0xffffffe6", - "lane5": "0xffffffe6", - "lane6": "0xffffffe6", - "lane7": "0xffffffe6" + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" }, "main": { - "lane0": "0x00000064", - "lane1": "0x00000064", - "lane2": "0x00000064", - "lane3": "0x00000064", - "lane4": "0x00000064", - "lane5": "0x00000064", - "lane6": "0x00000064", - "lane7": "0x00000064" + "lane0": "0x00000063", + "lane1": "0x00000063", + "lane2": "0x00000063", + "lane3": "0x00000063", + "lane4": "0x00000063", + "lane5": "0x00000063", + "lane6": "0x00000063", + "lane7": "0x00000063" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000063", + "lane1": "0x00000063", + "lane2": "0x00000063", + "lane3": "0x00000063", + "lane4": "0x00000063", + "lane5": "0x00000063", + "lane6": "0x00000063", + "lane7": "0x00000063" }, "post1": { - "lane0": "0xfffffff6", - "lane1": "0xfffffff6", - "lane2": "0xfffffff6", - "lane3": "0xfffffff6", - "lane4": "0xfffffff6", - "lane5": "0xfffffff6", - "lane6": "0xfffffff6", - "lane7": "0xfffffff6" + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" }, "post2": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -5716,12 +10594,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "45": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "46": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000063", + "lane1": "0x00000063", + "lane2": "0x00000063", + "lane3": "0x00000063", + "lane4": "0x00000063", + "lane5": "0x00000063", + "lane6": "0x00000063", + "lane7": "0x00000063" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5782,6 +10756,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -5846,12 +10830,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "46": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "47": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000063", + "lane1": "0x00000063", + "lane2": "0x00000063", + "lane3": "0x00000063", + "lane4": "0x00000063", + "lane5": "0x00000063", + "lane6": "0x00000063", + "lane7": "0x00000063" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -5912,6 +10992,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -5976,12 +11066,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "47": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "48": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000063", + "lane1": "0x00000063", + "lane2": "0x00000063", + "lane3": "0x00000063", + "lane4": "0x00000063", + "lane5": "0x00000063", + "lane6": "0x00000063", + "lane7": "0x00000063" + }, + "post1": { + "lane0": "0xfffffff5", + "lane1": "0xfffffff5", + "lane2": "0xfffffff5", + "lane3": "0xfffffff5", + "lane4": "0xfffffff5", + "lane5": "0xfffffff5", + "lane6": "0xfffffff5", + "lane7": "0xfffffff5" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -6042,6 +11228,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -6074,7 +11270,7 @@ "lane3": "0xffffffe4", "lane4": "0xffffffe4", "lane5": "0xffffffe4", - "lane6": "0xffffffe4", + "lane6": "0xffffffe8", "lane7": "0xffffffe4" }, "main": { @@ -6088,14 +11284,14 @@ "lane7": "0x00000050" }, "post1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "post2": { "lane0": "0x00000000", @@ -6106,72 +11302,178 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } } }, - "48": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "49": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { - "lane0": "0xffffffff", - "lane1": "0xffffffff", - "lane2": "0xffffffff", - "lane3": "0xffffffff", - "lane4": "0xffffffff", - "lane5": "0xffffffff", - "lane6": "0xffffffff", - "lane7": "0xffffffff" + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" }, "pre2": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe7", - "lane1": "0xffffffe7", - "lane2": "0xffffffe7", - "lane3": "0xffffffe7", - "lane4": "0xffffffe7", - "lane5": "0xffffffe7", - "lane6": "0xffffffe7", - "lane7": "0xffffffe7" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x00000063", - "lane1": "0x00000063", - "lane2": "0x00000063", - "lane3": "0x00000063", - "lane4": "0x00000063", - "lane5": "0x00000063", - "lane6": "0x00000063", - "lane7": "0x00000063" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { - "lane0": "0xfffffff5", - "lane1": "0xfffffff5", - "lane2": "0xfffffff5", - "lane3": "0xfffffff5", - "lane4": "0xfffffff5", - "lane5": "0xfffffff5", - "lane6": "0xfffffff5", - "lane7": "0xfffffff5" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" }, "post2": { - "lane0": "0xfffffff4", - "lane1": "0xfffffff4", - "lane2": "0xfffffff4", - "lane3": "0xfffffff4", - "lane4": "0xfffffff4", - "lane5": "0xfffffff4", - "lane6": "0xfffffff4", - "lane7": "0xfffffff4" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -6198,14 +11500,14 @@ "lane7": "0x00000008" }, "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe8", - "lane7": "0xffffffe4" + "lane0": "0xffffffec", + "lane1": "0xffffffec", + "lane2": "0xffffffec", + "lane3": "0xffffffec", + "lane4": "0xffffffec", + "lane5": "0xffffffec", + "lane6": "0xffffffec", + "lane7": "0xffffffec" }, "main": { "lane0": "0x00000050", @@ -6236,12 +11538,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "49": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "50": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -6302,6 +11700,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -6366,12 +11774,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "50": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "51": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -6432,6 +11936,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -6496,12 +12010,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "51": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "52": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -6562,6 +12172,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -6626,12 +12246,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "52": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "53": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -6654,44 +12296,128 @@ "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe5", - "lane1": "0xffffffe5", - "lane2": "0xffffffe5", - "lane3": "0xffffffe5", - "lane4": "0xffffffe5", - "lane5": "0xffffffe5", - "lane6": "0xffffffe5", - "lane7": "0xffffffe5" + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" }, "main": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" }, "post1": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" }, "post2": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -6728,14 +12454,14 @@ "lane7": "0xffffffec" }, "main": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" + "lane0": "0x00000055", + "lane1": "0x00000055", + "lane2": "0x00000055", + "lane3": "0x00000055", + "lane4": "0x00000055", + "lane5": "0x00000055", + "lane6": "0x00000055", + "lane7": "0x00000055" }, "post1": { "lane0": "0x00000000", @@ -6756,12 +12482,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "53": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "54": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -6822,6 +12644,16 @@ "lane5": "0xfffffff2", "lane6": "0xfffffff2", "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -6886,12 +12718,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "54": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "55": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -6952,6 +12880,16 @@ "lane5": "0xfffffff2", "lane6": "0xfffffff2", "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -7007,21 +12945,117 @@ "lane6": "0x00000000", "lane7": "0x00000000" }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "56": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe4", + "lane1": "0xffffffe4", + "lane2": "0xffffffe4", + "lane3": "0xffffffe4", + "lane4": "0xffffffe4", + "lane5": "0xffffffe4", + "lane6": "0xffffffe4", + "lane7": "0xffffffe4" + }, + "main": { + "lane0": "0x00000064", + "lane1": "0x00000064", + "lane2": "0x00000064", + "lane3": "0x00000064", + "lane4": "0x00000064", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000064" + }, + "post1": { + "lane0": "0xfffffffa", + "lane1": "0xfffffffa", + "lane2": "0xfffffffa", + "lane3": "0xfffffffa", + "lane4": "0xfffffffa", + "lane5": "0xfffffffa", + "lane6": "0xfffffffa", + "lane7": "0xfffffffa" + }, + "post2": { + "lane0": "0xfffffff2", + "lane1": "0xfffffff2", + "lane2": "0xfffffff2", + "lane3": "0xfffffff2", + "lane4": "0xfffffff2", + "lane5": "0xfffffff2", + "lane6": "0xfffffff2", + "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } - } - }, - "55": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -7082,6 +13116,16 @@ "lane5": "0xfffffff2", "lane6": "0xfffffff2", "lane7": "0xfffffff2" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -7146,12 +13190,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, - "56": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "57": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -7174,44 +13240,128 @@ "lane7": "0x00000007" }, "pre1": { - "lane0": "0xffffffe4", - "lane1": "0xffffffe4", - "lane2": "0xffffffe4", - "lane3": "0xffffffe4", - "lane4": "0xffffffe4", - "lane5": "0xffffffe4", - "lane6": "0xffffffe4", - "lane7": "0xffffffe4" + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" }, "main": { - "lane0": "0x00000064", - "lane1": "0x00000064", - "lane2": "0x00000064", - "lane3": "0x00000064", - "lane4": "0x00000064", - "lane5": "0x00000064", - "lane6": "0x00000064", - "lane7": "0x00000064" + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { - "lane0": "0xfffffffa", - "lane1": "0xfffffffa", - "lane2": "0xfffffffa", - "lane3": "0xfffffffa", - "lane4": "0xfffffffa", - "lane5": "0xfffffffa", - "lane6": "0xfffffffa", - "lane7": "0xfffffffa" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" }, "post2": { - "lane0": "0xfffffff2", - "lane1": "0xfffffff2", - "lane2": "0xfffffff2", - "lane3": "0xfffffff2", - "lane4": "0xfffffff2", - "lane5": "0xfffffff2", - "lane6": "0xfffffff2", - "lane7": "0xfffffff2" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -7223,65 +13373,161 @@ "lane2": "0xfffffffc", "lane3": "0xfffffffc", "lane4": "0xfffffffc", - "lane5": "0xfffffffc", - "lane6": "0xfffffffc", - "lane7": "0xfffffffc" + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "pre2": { "lane0": "0x00000008", "lane1": "0x00000008", - "lane2": "0x00000008", + "lane2": "0x0000000c", "lane3": "0x00000008", - "lane4": "0x00000008", - "lane5": "0x00000008", + "lane4": "0x0000000c", + "lane5": "0x0000000c", "lane6": "0x00000008", - "lane7": "0x00000008" + "lane7": "0x00000004" }, "pre1": { - "lane0": "0xffffffec", - "lane1": "0xffffffec", - "lane2": "0xffffffec", - "lane3": "0xffffffec", - "lane4": "0xffffffec", - "lane5": "0xffffffec", - "lane6": "0xffffffec", - "lane7": "0xffffffec" + "lane0": "0xffffffda", + "lane1": "0xffffffda", + "lane2": "0xffffffd6", + "lane3": "0xffffffda", + "lane4": "0xffffffde", + "lane5": "0xffffffd6", + "lane6": "0xffffffd2", + "lane7": "0xffffffd2" }, "main": { - "lane0": "0x00000055", - "lane1": "0x00000055", - "lane2": "0x00000055", - "lane3": "0x00000055", - "lane4": "0x00000055", - "lane5": "0x00000055", - "lane6": "0x00000055", - "lane7": "0x00000055" + "lane0": "0x00000060", + "lane1": "0x00000064", + "lane2": "0x00000060", + "lane3": "0x00000064", + "lane4": "0x0000006c", + "lane5": "0x00000064", + "lane6": "0x00000064", + "lane7": "0x00000068" + }, + "post1": { + "lane0": "0xfffffff8", + "lane1": "0xfffffff4", + "lane2": "0xfffffff8", + "lane3": "0xfffffff4", + "lane4": "0xfffffff8", + "lane5": "0xfffffff4", + "lane6": "0xfffffff8", + "lane7": "0xfffffff8" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "58": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" }, "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" }, "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } - } - }, - "57": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -7342,6 +13588,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x0" } } }, @@ -7406,12 +13662,34 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x1" + } } }, - "58": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "59": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -7472,76 +13750,20 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" - } - } - }, - "PINEWAVE-(L-OS8CNS\\d{3}-NMT|L-OSG8CNS\\d{3}-NMT|L-OH8CNH-NME)": { - "speed:100GAUI-1-L C2M (Annex 120G)|400GAUI-4-L C2M (Annex 120G)|LEI-400G-PAM4-4|LEI-800G-PAM4-8|LEI-200G-PAM4-2|LEI-100G-PAM4-1": { - "pre3": { - "lane0": "0xfffffffc", - "lane1": "0xfffffffc", - "lane2": "0xfffffffc", - "lane3": "0xfffffffc", - "lane4": "0xfffffffc", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre2": { - "lane0": "0x00000008", - "lane1": "0x00000008", - "lane2": "0x0000000c", - "lane3": "0x00000008", - "lane4": "0x0000000c", - "lane5": "0x0000000c", - "lane6": "0x00000008", - "lane7": "0x00000004" - }, - "pre1": { - "lane0": "0xffffffda", - "lane1": "0xffffffda", - "lane2": "0xffffffd6", - "lane3": "0xffffffda", - "lane4": "0xffffffde", - "lane5": "0xffffffd6", - "lane6": "0xffffffd2", - "lane7": "0xffffffd2" - }, - "main": { - "lane0": "0x00000060", - "lane1": "0x00000064", - "lane2": "0x00000060", - "lane3": "0x00000064", - "lane4": "0x0000006c", - "lane5": "0x00000064", - "lane6": "0x00000064", - "lane7": "0x00000068" - }, - "post1": { - "lane0": "0xfffffff8", - "lane1": "0xfffffff4", - "lane2": "0xfffffff8", - "lane3": "0xfffffff4", - "lane4": "0xfffffff8", - "lane5": "0xfffffff4", - "lane6": "0xfffffff8", - "lane7": "0xfffffff8" }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } - } - }, - "59": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -7602,6 +13824,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -7666,12 +13898,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, "60": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xfffffffe", + "lane1": "0xfffffffe", + "lane2": "0xfffffffe", + "lane3": "0xfffffffe", + "lane4": "0xfffffffe", + "lane5": "0xfffffffe", + "lane6": "0xfffffffe", + "lane7": "0xfffffffe" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe5", + "lane1": "0xffffffe5", + "lane2": "0xffffffe5", + "lane3": "0xffffffe5", + "lane4": "0xffffffe5", + "lane5": "0xffffffe5", + "lane6": "0xffffffe5", + "lane7": "0xffffffe5" + }, + "main": { + "lane0": "0x0000005f", + "lane1": "0x0000005f", + "lane2": "0x0000005f", + "lane3": "0x0000005f", + "lane4": "0x0000005f", + "lane5": "0x0000005f", + "lane6": "0x0000005f", + "lane7": "0x0000005f" + }, + "post1": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xfffffffe", @@ -7732,6 +14060,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -7777,31 +14115,127 @@ "lane6": "0x00000064", "lane7": "0x00000068" }, - "post1": { - "lane0": "0xfffffff8", + "post1": { + "lane0": "0xfffffff8", + "lane1": "0xfffffff4", + "lane2": "0xfffffff8", + "lane3": "0xfffffff4", + "lane4": "0xfffffff8", + "lane5": "0xfffffff4", + "lane6": "0xfffffff8", + "lane7": "0xfffffff8" + }, + "post2": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "61": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000061", + "lane1": "0x00000061", + "lane2": "0x00000061", + "lane3": "0x00000061", + "lane4": "0x00000061", + "lane5": "0x00000061", + "lane6": "0x00000061", + "lane7": "0x00000061" + }, + "post1": { + "lane0": "0xfffffff1", + "lane1": "0xfffffff1", + "lane2": "0xfffffff1", + "lane3": "0xfffffff1", + "lane4": "0xfffffff1", + "lane5": "0xfffffff1", + "lane6": "0xfffffff1", + "lane7": "0xfffffff1" + }, + "post2": { + "lane0": "0xfffffff4", "lane1": "0xfffffff4", - "lane2": "0xfffffff8", + "lane2": "0xfffffff4", "lane3": "0xfffffff4", - "lane4": "0xfffffff8", + "lane4": "0xfffffff4", "lane5": "0xfffffff4", - "lane6": "0xfffffff8", - "lane7": "0xfffffff8" + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" }, - "post2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } - } - }, - "61": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -7862,6 +14296,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -7926,12 +14370,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, "62": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000006", + "lane1": "0x00000006", + "lane2": "0x00000006", + "lane3": "0x00000006", + "lane4": "0x00000006", + "lane5": "0x00000006", + "lane6": "0x00000006", + "lane7": "0x00000006" + }, + "pre1": { + "lane0": "0xffffffe7", + "lane1": "0xffffffe7", + "lane2": "0xffffffe7", + "lane3": "0xffffffe7", + "lane4": "0xffffffe7", + "lane5": "0xffffffe7", + "lane6": "0xffffffe7", + "lane7": "0xffffffe7" + }, + "main": { + "lane0": "0x00000061", + "lane1": "0x00000061", + "lane2": "0x00000061", + "lane3": "0x00000061", + "lane4": "0x00000061", + "lane5": "0x00000061", + "lane6": "0x00000061", + "lane7": "0x00000061" + }, + "post1": { + "lane0": "0xfffffff1", + "lane1": "0xfffffff1", + "lane2": "0xfffffff1", + "lane3": "0xfffffff1", + "lane4": "0xfffffff1", + "lane5": "0xfffffff1", + "lane6": "0xfffffff1", + "lane7": "0xfffffff1" + }, + "post2": { + "lane0": "0xfffffff4", + "lane1": "0xfffffff4", + "lane2": "0xfffffff4", + "lane3": "0xfffffff4", + "lane4": "0xfffffff4", + "lane5": "0xfffffff4", + "lane6": "0xfffffff4", + "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -7992,6 +14532,16 @@ "lane5": "0xfffffff4", "lane6": "0xfffffff4", "lane7": "0xfffffff4" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x0", + "lane7": "0x1" } } }, @@ -8056,12 +14606,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x1", + "lane7": "0x0" + } } }, "63": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe3", + "lane1": "0xffffffe3", + "lane2": "0xffffffe3", + "lane3": "0xffffffe3", + "lane4": "0xffffffe3", + "lane5": "0xffffffe3", + "lane6": "0xffffffe3", + "lane7": "0xffffffe3" + }, + "main": { + "lane0": "0x00000062", + "lane1": "0x00000062", + "lane2": "0x00000062", + "lane3": "0x00000062", + "lane4": "0x00000062", + "lane5": "0x00000062", + "lane6": "0x00000062", + "lane7": "0x00000062" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -8104,14 +14750,14 @@ "lane7": "0x00000062" }, "post1": { - "lane0": "0", - "lane1": "0", - "lane2": "0", - "lane3": "0", - "lane4": "0", - "lane5": "0", - "lane6": "0", - "lane7": "0" + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "post2": { "lane0": "0xfffffff3", @@ -8122,6 +14768,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -8186,12 +14842,108 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" + } } }, "64": { - "EOPTOLINK-(EO138HGPCT\\d{2}SL1|EOLO138HG5HSDLC)": { + "EOPTOLINK-(EO138HGPCT\\d{2}SL1)": { + "speed:100GAUI-1-S|800G.*": { + "pre3": { + "lane0": "0xffffffff", + "lane1": "0xffffffff", + "lane2": "0xffffffff", + "lane3": "0xffffffff", + "lane4": "0xffffffff", + "lane5": "0xffffffff", + "lane6": "0xffffffff", + "lane7": "0xffffffff" + }, + "pre2": { + "lane0": "0x00000007", + "lane1": "0x00000007", + "lane2": "0x00000007", + "lane3": "0x00000007", + "lane4": "0x00000007", + "lane5": "0x00000007", + "lane6": "0x00000007", + "lane7": "0x00000007" + }, + "pre1": { + "lane0": "0xffffffe3", + "lane1": "0xffffffe3", + "lane2": "0xffffffe3", + "lane3": "0xffffffe3", + "lane4": "0xffffffe3", + "lane5": "0xffffffe3", + "lane6": "0xffffffe3", + "lane7": "0xffffffe3" + }, + "main": { + "lane0": "0x00000062", + "lane1": "0x00000062", + "lane2": "0x00000062", + "lane3": "0x00000062", + "lane4": "0x00000062", + "lane5": "0x00000062", + "lane6": "0x00000062", + "lane7": "0x00000062" + }, + "post1": { + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" + }, + "post2": { + "lane0": "0xfffffff3", + "lane1": "0xfffffff3", + "lane2": "0xfffffff3", + "lane3": "0xfffffff3", + "lane4": "0xfffffff3", + "lane5": "0xfffffff3", + "lane6": "0xfffffff3", + "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" + } + } + }, + "EOPTOLINK-EOLO138HG5HSDLC": { "speed:100GAUI-1-S|800G.*": { "pre3": { "lane0": "0xffffffff", @@ -8234,14 +14986,14 @@ "lane7": "0x00000062" }, "post1": { - "lane0": "0", - "lane1": "0", - "lane2": "0", - "lane3": "0", - "lane4": "0", - "lane5": "0", - "lane6": "0", - "lane7": "0" + "lane0": "0x00000000", + "lane1": "0x00000000", + "lane2": "0x00000000", + "lane3": "0x00000000", + "lane4": "0x00000000", + "lane5": "0x00000000", + "lane6": "0x00000000", + "lane7": "0x00000000" }, "post2": { "lane0": "0xfffffff3", @@ -8252,6 +15004,16 @@ "lane5": "0xfffffff3", "lane6": "0xfffffff3", "lane7": "0xfffffff3" + }, + "rxpolarity": { + "lane0": "0x1", + "lane1": "0x0", + "lane2": "0x1", + "lane3": "0x0", + "lane4": "0x1", + "lane5": "0x0", + "lane6": "0x1", + "lane7": "0x0" } } }, @@ -8316,8 +15078,30 @@ "lane5": "0x00000000", "lane6": "0x00000000", "lane7": "0x00000000" + }, + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" } } + }, + "Default": { + "rxpolarity": { + "lane0": "0x0", + "lane1": "0x1", + "lane2": "0x0", + "lane3": "0x1", + "lane4": "0x0", + "lane5": "0x1", + "lane6": "0x0", + "lane7": "0x1" + } } } } diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/platform.json b/device/arista/x86_64-arista_7060x6_64pe_b/platform.json index ad649af85e0..6f5f62a0687 100644 --- a/device/arista/x86_64-arista_7060x6_64pe_b/platform.json +++ b/device/arista/x86_64-arista_7060x6_64pe_b/platform.json @@ -118,6 +118,14 @@ { "name": "Management Card Inlet", "controllable": false + }, + { + "name": "TH5 Diode 1", + "controllable": false + }, + { + "name": "TH5 Diode 2", + "controllable": false } ], "sfps": [ diff --git a/device/arista/x86_64-arista_7060x6_64pe_b/sensors.conf b/device/arista/x86_64-arista_7060x6_64pe_b/sensors.conf index 910acc6243e..e5c47b715a9 100644 --- a/device/arista/x86_64-arista_7060x6_64pe_b/sensors.conf +++ b/device/arista/x86_64-arista_7060x6_64pe_b/sensors.conf @@ -5,8 +5,6 @@ bus "i2c-31" "SCD 0000:05:00.0 SMBus master 1 bus 4" chip "max6581-i2c-27-4d" ignore temp5 ignore temp6 - ignore temp7 - ignore temp8 chip "nvme-pci-0400" # TODO: sensors complaining about tempX_min and tempX_max diff --git a/device/arista/x86_64-arista_720dt_48s_mgx/Arista-720DT-48S-MGX-G48S4 b/device/arista/x86_64-arista_720dt_48s_mgx/Arista-720DT-48S-MGX-G48S4 new file mode 120000 index 00000000000..819d710df9a --- /dev/null +++ b/device/arista/x86_64-arista_720dt_48s_mgx/Arista-720DT-48S-MGX-G48S4 @@ -0,0 +1 @@ +../x86_64-arista_720dt_48s/Arista-720DT-48S \ No newline at end of file diff --git a/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml b/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml index 0ac9ff7b784..3cc9ac4a67f 100644 --- a/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml +++ b/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml @@ -1,6 +1,6 @@ - CSDK-B52 + owl400 0 gearbox 2 diff --git a/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/psai.profile b/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/psai.profile index da589793cf0..1de9e3c1bcf 100644 --- a/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/psai.profile +++ b/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/psai.profile @@ -1 +1 @@ -SAI_KEY_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/gearbox_100G_PAM4.xml +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/gearbox_100G_PAM4.xml diff --git a/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/0/jr2p-a7280dra3-36-36x400G.config.bcm b/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/0/jr2p-a7280dra3-36-36x400G.config.bcm index 7b464e74eb5..ce14d611cf5 100644 --- a/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/0/jr2p-a7280dra3-36-36x400G.config.bcm +++ b/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/0/jr2p-a7280dra3-36-36x400G.config.bcm @@ -240,16 +240,16 @@ stable_size=800000000 ######################### ######################### -tm_port_header_type_in_0=INJECTED_2_PP +tm_port_header_type_in_0=INJECTED tm_port_header_type_out_0=CPU -tm_port_header_type_in_200=INJECTED_2_PP +tm_port_header_type_in_200=INJECTED tm_port_header_type_out_200=ETH -tm_port_header_type_in_201=INJECTED_2_PP +tm_port_header_type_in_201=INJECTED tm_port_header_type_out_201=ETH -tm_port_header_type_in_202=INJECTED_2_PP +tm_port_header_type_in_202=INJECTED tm_port_header_type_out_202=ETH -tm_port_header_type_in_203=INJECTED_2_PP +tm_port_header_type_in_203=INJECTED tm_port_header_type_out_203=ETH ### RCY @@ -985,3 +985,4 @@ xflow_macsec_secure_chan_to_num_secure_assoc_decrypt=4 sai_pfc_dlr_init_capability=0 sai_default_cpu_tx_tc=7 sai_disable_srcmacqedstmac_ctrl=1 +sai_lag_default_crc_hash=1 diff --git a/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/1/jr2p-a7280dra3-36-36x400G.config.bcm b/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/1/jr2p-a7280dra3-36-36x400G.config.bcm index 8a93297b40e..587530eb3b3 100644 --- a/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/1/jr2p-a7280dra3-36-36x400G.config.bcm +++ b/device/arista/x86_64-arista_7280dr3a_36/Arista-7280DR3A-36/1/jr2p-a7280dra3-36-36x400G.config.bcm @@ -239,16 +239,16 @@ stable_size=800000000 ######################### ######################### -tm_port_header_type_in_0=INJECTED_2_PP +tm_port_header_type_in_0=INJECTED tm_port_header_type_out_0=CPU -tm_port_header_type_in_200=INJECTED_2_PP +tm_port_header_type_in_200=INJECTED tm_port_header_type_out_200=ETH -tm_port_header_type_in_201=INJECTED_2_PP +tm_port_header_type_in_201=INJECTED tm_port_header_type_out_201=ETH -tm_port_header_type_in_202=INJECTED_2_PP +tm_port_header_type_in_202=INJECTED tm_port_header_type_out_202=ETH -tm_port_header_type_in_203=INJECTED_2_PP +tm_port_header_type_in_203=INJECTED tm_port_header_type_out_203=ETH ### RCY @@ -984,3 +984,4 @@ xflow_macsec_secure_chan_to_num_secure_assoc_decrypt=2 sai_pfc_dlr_init_capability=0 sai_default_cpu_tx_tc=7 sai_disable_srcmacqedstmac_ctrl=1 +sai_lag_default_crc_hash=1 diff --git a/device/arista/x86_64-arista_7280r4_32qf_32df/Arista-7280R4-32QF-32DF-64O/q3d-a7280R4-32QFx400G-32DFx400G.config.bcm b/device/arista/x86_64-arista_7280r4_32qf_32df/Arista-7280R4-32QF-32DF-64O/q3d-a7280R4-32QFx400G-32DFx400G.config.bcm index ddf75c3a593..90d59abdc45 100644 --- a/device/arista/x86_64-arista_7280r4_32qf_32df/Arista-7280R4-32QF-32DF-64O/q3d-a7280R4-32QFx400G-32DFx400G.config.bcm +++ b/device/arista/x86_64-arista_7280r4_32qf_32df/Arista-7280R4-32QF-32DF-64O/q3d-a7280R4-32QFx400G-32DFx400G.config.bcm @@ -419,24 +419,24 @@ stable_size=800000000 ######################### ######################### -tm_port_header_type_in_0=INJECTED_2_PP +tm_port_header_type_in_0=INJECTED tm_port_header_type_out_0=CPU -tm_port_header_type_in_200=INJECTED_2_PP +tm_port_header_type_in_200=INJECTED tm_port_header_type_out_200=ETH -tm_port_header_type_in_201=INJECTED_2_PP +tm_port_header_type_in_201=INJECTED tm_port_header_type_out_201=ETH -tm_port_header_type_in_202=INJECTED_2_PP +tm_port_header_type_in_202=INJECTED tm_port_header_type_out_202=ETH -tm_port_header_type_in_203=INJECTED_2_PP +tm_port_header_type_in_203=INJECTED tm_port_header_type_out_203=ETH -tm_port_header_type_in_204=INJECTED_2_PP +tm_port_header_type_in_204=INJECTED tm_port_header_type_out_204=ETH -tm_port_header_type_in_205=INJECTED_2_PP +tm_port_header_type_in_205=INJECTED tm_port_header_type_out_205=ETH -tm_port_header_type_in_206=INJECTED_2_PP +tm_port_header_type_in_206=INJECTED tm_port_header_type_out_206=ETH -tm_port_header_type_in_207=INJECTED_2_PP +tm_port_header_type_in_207=INJECTED tm_port_header_type_out_207=ETH diff --git a/device/arista/x86_64-arista_7280r4_32qf_32df/sensors.conf b/device/arista/x86_64-arista_7280r4_32qf_32df/sensors.conf index 8ce37496c0c..1e8a379fa41 100644 --- a/device/arista/x86_64-arista_7280r4_32qf_32df/sensors.conf +++ b/device/arista/x86_64-arista_7280r4_32qf_32df/sensors.conf @@ -1,4 +1,7 @@ chip "nvme-pci-0500" + ignore temp2 ignore temp3 ignore temp4 + ignore temp5 + ignore temp6 ignore temp7 diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml index 044ef034a52..dadd6de1364 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml @@ -1,6 +1,6 @@ - CSDK-B52 + owl400 0 gearbox 2 diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile index da589793cf0..1de9e3c1bcf 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile @@ -1 +1 @@ -SAI_KEY_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/gearbox_100G_PAM4.xml +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/gearbox_100G_PAM4.xml diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_lssn2700-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2010-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2010-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2010-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2100-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2410-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/sai.profile b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/sai.profile index d46666d4f40..38a59e2732a 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/sai.profile +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-C28D8/sai.profile @@ -1,3 +1,4 @@ SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_2700_8x50g_28x100g.xml SAI_DEFAULT_SWITCHING_MODE_STORE_FORWARD=1 SAI_NOT_DROP_SIP_DIP_LINK_LOCAL=1 +SAI_KEY_FAST_LINKUP_ENABLED=1 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/sai.profile b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/sai.profile index d57fccbf9b1..5294f51d73a 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/sai.profile +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/sai.profile @@ -1,3 +1,4 @@ SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_2700_48x50g_8x100g.xml SAI_DEFAULT_SWITCHING_MODE_STORE_FORWARD=1 SAI_NOT_DROP_SIP_DIP_LINK_LOCAL=1 +SAI_KEY_FAST_LINKUP_ENABLED=1 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/sai.profile b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/sai.profile index 6b1de1004f4..65eb0ac81b5 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/sai.profile +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/sai.profile @@ -1,3 +1,4 @@ SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_2700.xml SAI_DEFAULT_SWITCHING_MODE_STORE_FORWARD=1 SAI_NOT_DROP_SIP_DIP_LINK_LOCAL=1 +SAI_KEY_FAST_LINKUP_ENABLED=1 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json new file mode 100644 index 00000000000..6feb156714f --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json @@ -0,0 +1,7 @@ +{ + "DEVICE_METADATA": { + "localhost": { + "create_only_config_db_buffers": "true" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook index 134357d320f..7baf0b929b5 100755 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook @@ -1,7 +1,8 @@ #!/bin/bash - -# Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. -# Apache-2.0 +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -14,12 +15,12 @@ # 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. - +# declare -r EXIT_SUCCESS=0 declare -r EXIT_ERROR=1 declare -r PENDING_COMPONENT_FW="/usr/bin/install-pending-fw.py" -declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh" +declare -r FW_UPGRADE_SCRIPT="/usr/local/bin/mlnx-fw-manager" ${FW_UPGRADE_SCRIPT} --upgrade --verbose diff --git a/device/mellanox/x86_64-mlnx_msn2700_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2700_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2700a1-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2700a1-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700a1-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn2740-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3420-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn3420-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3420-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn3700-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3700-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn3700_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3700_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700c-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn3700c-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3700c-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn3800-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn4410-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4600-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn4600-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4600-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn4600c-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O8C48/media_settings.json b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O8C48/media_settings.json index 063f1e6b0ea..099de75ee75 100644 --- a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O8C48/media_settings.json +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O8C48/media_settings.json @@ -1,1294 +1,1968 @@ { - "GLOBAL_MEDIA_SETTINGS": { - "1-32": { - "QSFP-DD-sm_media_interface": { - "speed:100GAUI-2": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } - }, - "speed:200GAUI-4": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } - }, - "speed:400GAUI-8": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } - } - }, - "QSFP-DD-active_cable_media_interface": { - "speed:CAUI-4": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" - }, - "main": { - "lane0": "0x00000033", - "lane1": "0x00000033", - "lane2": "0x00000033", - "lane3": "0x00000033", - "lane4": "0x00000033", - "lane5": "0x00000033", - "lane6": "0x00000033", - "lane7": "0x00000033" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x00000028", - "lane1": "0x00000028", - "lane2": "0x00000028", - "lane3": "0x00000028", - "lane4": "0x00000028", - "lane5": "0x00000028", - "lane6": "0x00000028", - "lane7": "0x00000028" - }, - "ob_m2lp": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "obplev": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" - }, - "obnlev": { - "lane0": "0x00000078", - "lane1": "0x00000078", - "lane2": "0x00000078", - "lane3": "0x00000078", - "lane4": "0x00000078", - "lane5": "0x00000078", - "lane6": "0x00000078", - "lane7": "0x00000078" - }, - "regn_bfm1p": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "regn_bfm1n": { - "lane0": "0x0000008c", - "lane1": "0x0000008c", - "lane2": "0x0000008c", - "lane3": "0x0000008c", - "lane4": "0x0000008c", - "lane5": "0x0000008c", - "lane6": "0x0000008c", - "lane7": "0x0000008c" - } + "GLOBAL_MEDIA_SETTINGS":{ + "1-32":{ + "AOI-ALQA9N\\d{2}ADLA1580":{ + "speed:CAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffff3", + "lane1":"0xfffffff3", + "lane2":"0xfffffff3", + "lane3":"0xfffffff3", + "lane4":"0xfffffff3", + "lane5":"0xfffffff3", + "lane6":"0xfffffff3", + "lane7":"0xfffffff3" + }, + "main":{ + "lane0":"0x00000033", + "lane1":"0x00000033", + "lane2":"0x00000033", + "lane3":"0x00000033", + "lane4":"0x00000033", + "lane5":"0x00000033", + "lane6":"0x00000033", + "lane7":"0x00000033" + }, + "post1":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x00000028", + "lane1":"0x00000028", + "lane2":"0x00000028", + "lane3":"0x00000028", + "lane4":"0x00000028", + "lane5":"0x00000028", + "lane6":"0x00000028", + "lane7":"0x00000028" + }, + "ob_m2lp":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "obplev":{ + "lane0":"0x00000050", + "lane1":"0x00000050", + "lane2":"0x00000050", + "lane3":"0x00000050", + "lane4":"0x00000050", + "lane5":"0x00000050", + "lane6":"0x00000050", + "lane7":"0x00000050" + }, + "obnlev":{ + "lane0":"0x00000078", + "lane1":"0x00000078", + "lane2":"0x00000078", + "lane3":"0x00000078", + "lane4":"0x00000078", + "lane5":"0x00000078", + "lane6":"0x00000078", + "lane7":"0x00000078" + }, + "regn_bfm1p":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "regn_bfm1n":{ + "lane0":"0x0000008c", + "lane1":"0x0000008c", + "lane2":"0x0000008c", + "lane3":"0x0000008c", + "lane4":"0x0000008c", + "lane5":"0x0000008c", + "lane6":"0x0000008c", + "lane7":"0x0000008c" + } + }, + "speed:50GAUI-1":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffc", + "lane1":"0xfffffffc", + "lane2":"0xfffffffc", + "lane3":"0xfffffffc", + "lane4":"0xfffffffc", + "lane5":"0xfffffffc", + "lane6":"0xfffffffc", + "lane7":"0xfffffffc" + }, + "main":{ + "lane0":"0x0000002a", + "lane1":"0x0000002a", + "lane2":"0x0000002a", + "lane3":"0x0000002a", + "lane4":"0x0000002a", + "lane5":"0x0000002a", + "lane6":"0x0000002a", + "lane7":"0x0000002a" + }, + "post1":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + }, + "speed:25GAUI":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffff3", + "lane1":"0xfffffff3", + "lane2":"0xfffffff3", + "lane3":"0xfffffff3", + "lane4":"0xfffffff3", + "lane5":"0xfffffff3", + "lane6":"0xfffffff3", + "lane7":"0xfffffff3" + }, + "main":{ + "lane0":"0x00000033", + "lane1":"0x00000033", + "lane2":"0x00000033", + "lane3":"0x00000033", + "lane4":"0x00000033", + "lane5":"0x00000033", + "lane6":"0x00000033", + "lane7":"0x00000033" + }, + "post1":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x00000028", + "lane1":"0x00000028", + "lane2":"0x00000028", + "lane3":"0x00000028", + "lane4":"0x00000028", + "lane5":"0x00000028", + "lane6":"0x00000028", + "lane7":"0x00000028" + }, + "ob_m2lp":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "obplev":{ + "lane0":"0x00000050", + "lane1":"0x00000050", + "lane2":"0x00000050", + "lane3":"0x00000050", + "lane4":"0x00000050", + "lane5":"0x00000050", + "lane6":"0x00000050", + "lane7":"0x00000050" + }, + "obnlev":{ + "lane0":"0x00000078", + "lane1":"0x00000078", + "lane2":"0x00000078", + "lane3":"0x00000078", + "lane4":"0x00000078", + "lane5":"0x00000078", + "lane6":"0x00000078", + "lane7":"0x00000078" + }, + "regn_bfm1p":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "regn_bfm1n":{ + "lane0":"0x0000008c", + "lane1":"0x0000008c", + "lane2":"0x0000008c", + "lane3":"0x0000008c", + "lane4":"0x0000008c", + "lane5":"0x0000008c", + "lane6":"0x0000008c", + "lane7":"0x0000008c" + } }, - "speed:50GAUI-1": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } + "speed:200GAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffc", + "lane1":"0xfffffffc", + "lane2":"0xfffffffc", + "lane3":"0xfffffffc", + "lane4":"0xfffffffc", + "lane5":"0xfffffffc", + "lane6":"0xfffffffc", + "lane7":"0xfffffffc" + }, + "main":{ + "lane0":"0x0000002a", + "lane1":"0x0000002a", + "lane2":"0x0000002a", + "lane3":"0x0000002a", + "lane4":"0x0000002a", + "lane5":"0x0000002a", + "lane6":"0x0000002a", + "lane7":"0x0000002a" + }, + "post1":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } }, - "speed:25GAUI": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3", - "lane4": "0xfffffff3", - "lane5": "0xfffffff3", - "lane6": "0xfffffff3", - "lane7": "0xfffffff3" - }, - "main": { - "lane0": "0x00000033", - "lane1": "0x00000033", - "lane2": "0x00000033", - "lane3": "0x00000033", - "lane4": "0x00000033", - "lane5": "0x00000033", - "lane6": "0x00000033", - "lane7": "0x00000033" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x00000028", - "lane1": "0x00000028", - "lane2": "0x00000028", - "lane3": "0x00000028", - "lane4": "0x00000028", - "lane5": "0x00000028", - "lane6": "0x00000028", - "lane7": "0x00000028" - }, - "ob_m2lp": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "obplev": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050", - "lane4": "0x00000050", - "lane5": "0x00000050", - "lane6": "0x00000050", - "lane7": "0x00000050" - }, - "obnlev": { - "lane0": "0x00000078", - "lane1": "0x00000078", - "lane2": "0x00000078", - "lane3": "0x00000078", - "lane4": "0x00000078", - "lane5": "0x00000078", - "lane6": "0x00000078", - "lane7": "0x00000078" - }, - "regn_bfm1p": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "regn_bfm1n": { - "lane0": "0x0000008c", - "lane1": "0x0000008c", - "lane2": "0x0000008c", - "lane3": "0x0000008c", - "lane4": "0x0000008c", - "lane5": "0x0000008c", - "lane6": "0x0000008c", - "lane7": "0x0000008c" - } - }, - "speed:200GAUI-4": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } - }, - "speed:100GAUI-2": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } - }, - "speed:400GAUI-8": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000", - "lane4": "0x00000000", - "lane5": "0x00000000", - "lane6": "0x00000000", - "lane7": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe", - "lane4": "0xfffffffe", - "lane5": "0xfffffffe", - "lane6": "0xfffffffe", - "lane7": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020", - "lane4": "0x00000020", - "lane5": "0x00000020", - "lane6": "0x00000020", - "lane7": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006", - "lane4": "0x00000006", - "lane5": "0x00000006", - "lane6": "0x00000006", - "lane7": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f", - "lane4": "0x0000000f", - "lane5": "0x0000000f", - "lane6": "0x0000000f", - "lane7": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c", - "lane4": "0x0000003c", - "lane5": "0x0000003c", - "lane6": "0x0000003c", - "lane7": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004", - "lane4": "0x00000004", - "lane5": "0x00000004", - "lane6": "0x00000004", - "lane7": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069", - "lane4": "0x00000069", - "lane5": "0x00000069", - "lane6": "0x00000069", - "lane7": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f", - "lane4": "0x0000005f", - "lane5": "0x0000005f", - "lane6": "0x0000005f", - "lane7": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e", - "lane4": "0x0000001e", - "lane5": "0x0000001e", - "lane6": "0x0000001e", - "lane7": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa", - "lane4": "0x000000aa", - "lane5": "0x000000aa", - "lane6": "0x000000aa", - "lane7": "0x000000aa" - } - } - }, - "QSFP\\+-active_cable_media_interface": { - "speed:CAUI-4": { - "idriver": { - "lane0": "0x00000028", - "lane1": "0x00000028", - "lane2": "0x00000028", - "lane3": "0x00000028" - }, - "pre1": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3" - }, - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "main": { - "lane0": "0x00000033", - "lane1": "0x00000033", - "lane2": "0x00000033", - "lane3": "0x00000033" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "ob_m2lp": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f" - }, - "obplev": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050" - }, - "obnlev": { - "lane0": "0x00000078", - "lane1": "0x00000078", - "lane2": "0x00000078", - "lane3": "0x00000078" - }, - "regn_bfm1p": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c" - }, - "regn_bfm1n": { - "lane0": "0x0000008c", - "lane1": "0x0000008c", - "lane2": "0x0000008c", - "lane3": "0x0000008c" - } - }, - "speed:200GAUI-4": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa" - } + "speed:100GAUI-2":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffc", + "lane1":"0xfffffffc", + "lane2":"0xfffffffc", + "lane3":"0xfffffffc", + "lane4":"0xfffffffc", + "lane5":"0xfffffffc", + "lane6":"0xfffffffc", + "lane7":"0xfffffffc" + }, + "main":{ + "lane0":"0x0000002a", + "lane1":"0x0000002a", + "lane2":"0x0000002a", + "lane3":"0x0000002a", + "lane4":"0x0000002a", + "lane5":"0x0000002a", + "lane6":"0x0000002a", + "lane7":"0x0000002a" + }, + "post1":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + }, + "speed:400GAUI-8":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffc", + "lane1":"0xfffffffc", + "lane2":"0xfffffffc", + "lane3":"0xfffffffc", + "lane4":"0xfffffffc", + "lane5":"0xfffffffc", + "lane6":"0xfffffffc", + "lane7":"0xfffffffc" + }, + "main":{ + "lane0":"0x0000002a", + "lane1":"0x0000002a", + "lane2":"0x0000002a", + "lane3":"0x0000002a", + "lane4":"0x0000002a", + "lane5":"0x0000002a", + "lane6":"0x0000002a", + "lane7":"0x0000002a" + }, + "post1":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } } - }, - "QSFP\\+C-active_cable_media_interface": { - "speed:CAUI-4": { - "idriver": { - "lane0": "0x00000028", - "lane1": "0x00000028", - "lane2": "0x00000028", - "lane3": "0x00000028" - }, - "pre1": { - "lane0": "0xfffffff3", - "lane1": "0xfffffff3", - "lane2": "0xfffffff3", - "lane3": "0xfffffff3" - }, - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "main": { - "lane0": "0x00000033", - "lane1": "0x00000033", - "lane2": "0x00000033", - "lane3": "0x00000033" - }, - "post1": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "ob_m2lp": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f" - }, - "obplev": { - "lane0": "0x00000050", - "lane1": "0x00000050", - "lane2": "0x00000050", - "lane3": "0x00000050" - }, - "obnlev": { - "lane0": "0x00000078", - "lane1": "0x00000078", - "lane2": "0x00000078", - "lane3": "0x00000078" - }, - "regn_bfm1p": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c" - }, - "regn_bfm1n": { - "lane0": "0x0000008c", - "lane1": "0x0000008c", - "lane2": "0x0000008c", - "lane3": "0x0000008c" + }, + "QSFP-DD-sm_media_interface":{ + "speed:100GAUI-2":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" } }, - "speed:200GAUI-4": { - "pre2": { - "lane0": "0x00000000", - "lane1": "0x00000000", - "lane2": "0x00000000", - "lane3": "0x00000000" - }, - "pre1": { - "lane0": "0xfffffffe", - "lane1": "0xfffffffe", - "lane2": "0xfffffffe", - "lane3": "0xfffffffe" - }, - "main": { - "lane0": "0x00000020", - "lane1": "0x00000020", - "lane2": "0x00000020", - "lane3": "0x00000020" - }, - "post1": { - "lane0": "0x00000006", - "lane1": "0x00000006", - "lane2": "0x00000006", - "lane3": "0x00000006" - }, - "ob_alev_out": { - "lane0": "0x0000000f", - "lane1": "0x0000000f", - "lane2": "0x0000000f", - "lane3": "0x0000000f" - }, - "idriver": { - "lane0": "0x0000003c", - "lane1": "0x0000003c", - "lane2": "0x0000003c", - "lane3": "0x0000003c" - }, - "ob_m2lp": { - "lane0": "0x00000004", - "lane1": "0x00000004", - "lane2": "0x00000004", - "lane3": "0x00000004" - }, - "obplev": { - "lane0": "0x00000069", - "lane1": "0x00000069", - "lane2": "0x00000069", - "lane3": "0x00000069" - }, - "obnlev": { - "lane0": "0x0000005f", - "lane1": "0x0000005f", - "lane2": "0x0000005f", - "lane3": "0x0000005f" - }, - "regn_bfm1p": { - "lane0": "0x0000001e", - "lane1": "0x0000001e", - "lane2": "0x0000001e", - "lane3": "0x0000001e" - }, - "regn_bfm1n": { - "lane0": "0x000000aa", - "lane1": "0x000000aa", - "lane2": "0x000000aa", - "lane3": "0x000000aa" + "speed:200GAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + }, + "speed:400GAUI-8":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + } + }, + "QSFP-DD-active_cable_media_interface":{ + "speed:CAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffff3", + "lane1":"0xfffffff3", + "lane2":"0xfffffff3", + "lane3":"0xfffffff3", + "lane4":"0xfffffff3", + "lane5":"0xfffffff3", + "lane6":"0xfffffff3", + "lane7":"0xfffffff3" + }, + "main":{ + "lane0":"0x00000033", + "lane1":"0x00000033", + "lane2":"0x00000033", + "lane3":"0x00000033", + "lane4":"0x00000033", + "lane5":"0x00000033", + "lane6":"0x00000033", + "lane7":"0x00000033" + }, + "post1":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x00000028", + "lane1":"0x00000028", + "lane2":"0x00000028", + "lane3":"0x00000028", + "lane4":"0x00000028", + "lane5":"0x00000028", + "lane6":"0x00000028", + "lane7":"0x00000028" + }, + "ob_m2lp":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "obplev":{ + "lane0":"0x00000050", + "lane1":"0x00000050", + "lane2":"0x00000050", + "lane3":"0x00000050", + "lane4":"0x00000050", + "lane5":"0x00000050", + "lane6":"0x00000050", + "lane7":"0x00000050" + }, + "obnlev":{ + "lane0":"0x00000078", + "lane1":"0x00000078", + "lane2":"0x00000078", + "lane3":"0x00000078", + "lane4":"0x00000078", + "lane5":"0x00000078", + "lane6":"0x00000078", + "lane7":"0x00000078" + }, + "regn_bfm1p":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "regn_bfm1n":{ + "lane0":"0x0000008c", + "lane1":"0x0000008c", + "lane2":"0x0000008c", + "lane3":"0x0000008c", + "lane4":"0x0000008c", + "lane5":"0x0000008c", + "lane6":"0x0000008c", + "lane7":"0x0000008c" + } + }, + "speed:50GAUI-1":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + }, + "speed:25GAUI":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffff3", + "lane1":"0xfffffff3", + "lane2":"0xfffffff3", + "lane3":"0xfffffff3", + "lane4":"0xfffffff3", + "lane5":"0xfffffff3", + "lane6":"0xfffffff3", + "lane7":"0xfffffff3" + }, + "main":{ + "lane0":"0x00000033", + "lane1":"0x00000033", + "lane2":"0x00000033", + "lane3":"0x00000033", + "lane4":"0x00000033", + "lane5":"0x00000033", + "lane6":"0x00000033", + "lane7":"0x00000033" + }, + "post1":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x00000028", + "lane1":"0x00000028", + "lane2":"0x00000028", + "lane3":"0x00000028", + "lane4":"0x00000028", + "lane5":"0x00000028", + "lane6":"0x00000028", + "lane7":"0x00000028" + }, + "ob_m2lp":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "obplev":{ + "lane0":"0x00000050", + "lane1":"0x00000050", + "lane2":"0x00000050", + "lane3":"0x00000050", + "lane4":"0x00000050", + "lane5":"0x00000050", + "lane6":"0x00000050", + "lane7":"0x00000050" + }, + "obnlev":{ + "lane0":"0x00000078", + "lane1":"0x00000078", + "lane2":"0x00000078", + "lane3":"0x00000078", + "lane4":"0x00000078", + "lane5":"0x00000078", + "lane6":"0x00000078", + "lane7":"0x00000078" + }, + "regn_bfm1p":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "regn_bfm1n":{ + "lane0":"0x0000008c", + "lane1":"0x0000008c", + "lane2":"0x0000008c", + "lane3":"0x0000008c", + "lane4":"0x0000008c", + "lane5":"0x0000008c", + "lane6":"0x0000008c", + "lane7":"0x0000008c" + } + }, + "speed:200GAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + }, + "speed:100GAUI-2":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + }, + "speed:400GAUI-8":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000", + "lane4":"0x00000000", + "lane5":"0x00000000", + "lane6":"0x00000000", + "lane7":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe", + "lane4":"0xfffffffe", + "lane5":"0xfffffffe", + "lane6":"0xfffffffe", + "lane7":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020", + "lane4":"0x00000020", + "lane5":"0x00000020", + "lane6":"0x00000020", + "lane7":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006", + "lane4":"0x00000006", + "lane5":"0x00000006", + "lane6":"0x00000006", + "lane7":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f", + "lane4":"0x0000000f", + "lane5":"0x0000000f", + "lane6":"0x0000000f", + "lane7":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c", + "lane4":"0x0000003c", + "lane5":"0x0000003c", + "lane6":"0x0000003c", + "lane7":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004", + "lane4":"0x00000004", + "lane5":"0x00000004", + "lane6":"0x00000004", + "lane7":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069", + "lane4":"0x00000069", + "lane5":"0x00000069", + "lane6":"0x00000069", + "lane7":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f", + "lane4":"0x0000005f", + "lane5":"0x0000005f", + "lane6":"0x0000005f", + "lane7":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e", + "lane4":"0x0000001e", + "lane5":"0x0000001e", + "lane6":"0x0000001e", + "lane7":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa", + "lane4":"0x000000aa", + "lane5":"0x000000aa", + "lane6":"0x000000aa", + "lane7":"0x000000aa" + } + } + }, + "QSFP\\+-active_cable_media_interface":{ + "speed:CAUI-4":{ + "idriver":{ + "lane0":"0x00000028", + "lane1":"0x00000028", + "lane2":"0x00000028", + "lane3":"0x00000028" + }, + "pre1":{ + "lane0":"0xfffffff3", + "lane1":"0xfffffff3", + "lane2":"0xfffffff3", + "lane3":"0xfffffff3" + }, + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "main":{ + "lane0":"0x00000033", + "lane1":"0x00000033", + "lane2":"0x00000033", + "lane3":"0x00000033" + }, + "post1":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "ob_m2lp":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f" + }, + "obplev":{ + "lane0":"0x00000050", + "lane1":"0x00000050", + "lane2":"0x00000050", + "lane3":"0x00000050" + }, + "obnlev":{ + "lane0":"0x00000078", + "lane1":"0x00000078", + "lane2":"0x00000078", + "lane3":"0x00000078" + }, + "regn_bfm1p":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c" + }, + "regn_bfm1n":{ + "lane0":"0x0000008c", + "lane1":"0x0000008c", + "lane2":"0x0000008c", + "lane3":"0x0000008c" + } + }, + "speed:200GAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa" + } + } + }, + "QSFP\\+C-active_cable_media_interface":{ + "speed:CAUI-4":{ + "idriver":{ + "lane0":"0x00000028", + "lane1":"0x00000028", + "lane2":"0x00000028", + "lane3":"0x00000028" + }, + "pre1":{ + "lane0":"0xfffffff3", + "lane1":"0xfffffff3", + "lane2":"0xfffffff3", + "lane3":"0xfffffff3" + }, + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "main":{ + "lane0":"0x00000033", + "lane1":"0x00000033", + "lane2":"0x00000033", + "lane3":"0x00000033" + }, + "post1":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "ob_m2lp":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f" + }, + "obplev":{ + "lane0":"0x00000050", + "lane1":"0x00000050", + "lane2":"0x00000050", + "lane3":"0x00000050" + }, + "obnlev":{ + "lane0":"0x00000078", + "lane1":"0x00000078", + "lane2":"0x00000078", + "lane3":"0x00000078" + }, + "regn_bfm1p":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c" + }, + "regn_bfm1n":{ + "lane0":"0x0000008c", + "lane1":"0x0000008c", + "lane2":"0x0000008c", + "lane3":"0x0000008c" + } + }, + "speed:200GAUI-4":{ + "pre2":{ + "lane0":"0x00000000", + "lane1":"0x00000000", + "lane2":"0x00000000", + "lane3":"0x00000000" + }, + "pre1":{ + "lane0":"0xfffffffe", + "lane1":"0xfffffffe", + "lane2":"0xfffffffe", + "lane3":"0xfffffffe" + }, + "main":{ + "lane0":"0x00000020", + "lane1":"0x00000020", + "lane2":"0x00000020", + "lane3":"0x00000020" + }, + "post1":{ + "lane0":"0x00000006", + "lane1":"0x00000006", + "lane2":"0x00000006", + "lane3":"0x00000006" + }, + "ob_alev_out":{ + "lane0":"0x0000000f", + "lane1":"0x0000000f", + "lane2":"0x0000000f", + "lane3":"0x0000000f" + }, + "idriver":{ + "lane0":"0x0000003c", + "lane1":"0x0000003c", + "lane2":"0x0000003c", + "lane3":"0x0000003c" + }, + "ob_m2lp":{ + "lane0":"0x00000004", + "lane1":"0x00000004", + "lane2":"0x00000004", + "lane3":"0x00000004" + }, + "obplev":{ + "lane0":"0x00000069", + "lane1":"0x00000069", + "lane2":"0x00000069", + "lane3":"0x00000069" + }, + "obnlev":{ + "lane0":"0x0000005f", + "lane1":"0x0000005f", + "lane2":"0x0000005f", + "lane3":"0x0000005f" + }, + "regn_bfm1p":{ + "lane0":"0x0000001e", + "lane1":"0x0000001e", + "lane2":"0x0000001e", + "lane3":"0x0000001e" + }, + "regn_bfm1n":{ + "lane0":"0x000000aa", + "lane1":"0x000000aa", + "lane2":"0x000000aa", + "lane3":"0x000000aa" } } } - } - } + } + } } diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn4700-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_msn4700_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_x86-r5.0.1400/create_only_config_db_buffers.json b/device/mellanox/x86_64-mlnx_x86-r5.0.1400/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-mlnx_x86-r5.0.1400/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn2201-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn2201-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn2201-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn4280-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn4280-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn4280-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn4280_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn4280_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn4280_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn4800-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn4800-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn4800-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn4800_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn4800_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn4800_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5400-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5400-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5400-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5400_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5400_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5400_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5600-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5600_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5600_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5610n-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5610n-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5610n-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5640-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5640-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5640-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5640_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn5640_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5640_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers.json.j2 b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers.json.j2 new file mode 120000 index 00000000000..add8bf8bb7c --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/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-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_objects.j2 b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_objects.j2 new file mode 100644 index 00000000000..6e74b33aad0 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_objects.j2 @@ -0,0 +1,254 @@ +{# + SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES + Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + SPDX-License-Identifier: 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. +#} + +{# Base on file: https://github.com/nvidia-sonic/sonic-buildimage/blob/master/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_objects.j2 #} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} + "BUFFER_POOL": { + {% if dynamic_mode is not defined and port_names_inactive|length > 0 -%} + "ingress_zero_pool" : { + "mode": "static", + "type": "ingress", + "size": "0" + }, + {% endif -%} + "ingress_lossless_pool": { + {% if dynamic_mode is not defined -%} + "size": "{{ ingress_lossless_pool_size }}", + {% endif -%} + "type": "ingress", + "mode": "dynamic" + }, + "ingress_lossy_pool": { + {% if dynamic_mode is not defined -%} + "size": "{{ ingress_lossy_pool_size }}", + {% endif -%} + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + {% if dynamic_mode is not defined -%} + "size": "{{ egress_lossy_pool_size }}", + {% endif -%} + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + {% if dynamic_mode is not defined and port_names_inactive|length > 0 -%} + "ingress_lossy_pg_zero_profile" : { + "pool":"ingress_zero_pool", + "size":"0", + "static_th":"0" + }, + "ingress_lossless_zero_profile" : { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"-8" + }, + "ingress_lossy_zero_profile" : { + "pool":"ingress_lossy_pool", + "size":"0", + "dynamic_th":"-8" + }, + "egress_lossless_zero_profile" : { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"-8" + }, + "egress_lossy_zero_profile" : { + "pool":"egress_lossy_pool", + "size":"0", + "dynamic_th":"-8" + }, + {% endif -%} + "ingress_lossless_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"1" + }, + "ingress_lossy_port_profile": { + "pool":"ingress_lossy_pool", + "size":"0", + "dynamic_th":"4" + }, + "egress_lossless_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"0", + "dynamic_th":"1" + }, + "q_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"2048", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"ingress_lossy_pool", + "size":"0", + "dynamic_th":"0" + } + }, +{%- endmacro %} + +{%- macro generate_profile_lists(port_names_active, port_names_inactive) %} + "BUFFER_PORT_INGRESS_PROFILE_LIST": { +{% for port in port_names_active.split(',') %} + "{{ port }}": { + "profile_list" : "ingress_lossless_profile,ingress_lossy_port_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +, +{% for port in port_names_inactive.split(',') %} + "{{ port }}": { +{% if dynamic_mode is defined %} + "profile_list" : "ingress_lossless_profile,ingress_lossy_port_profile" +{% else %} + "profile_list" : "ingress_lossless_zero_profile,ingress_lossy_zero_profile" +{% endif %} + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { +{% for port in port_names_active.split(',') %} + "{{ port }}": { + "profile_list" : "egress_lossless_profile,egress_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +, +{% for port in port_names_inactive.split(',') %} + "{{ port }}": { +{% if dynamic_mode is defined %} + "profile_list" : "egress_lossless_profile,egress_lossy_profile" +{% else %} + "profile_list" : "egress_lossless_zero_profile,egress_lossy_zero_profile" +{% endif %} + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} + } +{%- endmacro %} + +{%- macro generate_queue_buffers(port_names_active, port_names_inactive) %} + "BUFFER_QUEUE": { +{% for port in port_names_active.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }, +{% endfor %} +{% for port in port_names_active.split(',') %} + "{{ port }}|0-2": { + "profile" : "q_lossy_profile" + }, +{% endfor %} +{% for port in port_names_active.split(',') %} + "{{ port }}|5-6": { + "profile" : "q_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +, +{% if dynamic_mode is defined %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }, +{% endfor %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|0-2": { + "profile" : "q_lossy_profile" + }, +{% endfor %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|5-6": { + "profile" : "q_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% else %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_zero_profile" + }, +{% endfor %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|0-2": { + "profile" : "q_lossy_profile" + }, +{% endfor %} +{% for port in port_names_inactive.split(',') %} + "{{ port }}|5-6": { + "profile" : "q_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} +{% endif %} + } +{%- endmacro %} + +{%- macro generate_pg_profiles(port_names_active, port_names_inactive) %} + "BUFFER_PG": { +{% for port in port_names_active.split(',') %} +{% if dynamic_mode is defined %} + "{{ port }}|3-4": { + "profile" : "NULL" + }, +{% endif %} + "{{ port }}|0": { + "profile" : "ingress_lossy_profile" + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% if port_names_inactive|length > 0 %} +{%- for port in port_names_inactive.split(',') %} + {%- if loop.first -%},{%- endif -%} +{% if dynamic_mode is defined %} + "{{ port }}|3-4": { + "profile" : "NULL" + }, +{% endif %} + "{{ port }}|0": { +{% if dynamic_mode is defined %} + "profile" : "ingress_lossy_profile" +{% else %} + "profile" : "ingress_lossy_pg_zero_profile" +{% endif %} + }{% if not loop.last %},{% endif %} + +{% endfor %} +{% endif %} + } +{%- endmacro %} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_t0.j2 b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..372cb0a1f43 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_t0.j2 @@ -0,0 +1,40 @@ +{# + SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES + Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + 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. +#} +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '81007616' %} +{% set ingress_lossy_pool_size = '81007616' %} +{% set egress_lossless_pool_size = '224143360' %} +{% set egress_lossy_pool_size = '81007616' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_t1.j2 b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_t1.j2 new file mode 100644 index 00000000000..b6f1c14d46c --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_defaults_t1.j2 @@ -0,0 +1,40 @@ +{# + SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES + Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + 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. +#} +{% set default_cable = '40m' %} +{% set ingress_lossless_pool_size = '60167168' %} +{% set ingress_lossy_pool_size = '60167168' %} +{% set egress_lossless_pool_size = '224143360' %} +{% set egress_lossy_pool_size = '60167168' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_dynamic.json.j2 b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_dynamic.json.j2 new file mode 100644 index 00000000000..c2fcdd98e54 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/buffers_dynamic.json.j2 @@ -0,0 +1,20 @@ +{# + SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES + Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + 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. +#} +{%- set default_topo = 't0' %} +{%- set dynamic_mode = 'true' %} +{%- include 'buffers_config.j2' %} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/create_only_config_db_buffers.json new file mode 100644 index 00000000000..6feb156714f --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/create_only_config_db_buffers.json @@ -0,0 +1,7 @@ +{ + "DEVICE_METADATA": { + "localhost": { + "create_only_config_db_buffers": "true" + } + } +} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/hwsku.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/hwsku.json new file mode 100644 index 00000000000..afd780782d1 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/hwsku.json @@ -0,0 +1,394 @@ +{ + "interfaces": { + "Ethernet0": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet4": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet8": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet12": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet16": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet20": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet24": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet28": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet32": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet36": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet40": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet44": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet48": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet52": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet56": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet60": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet64": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet68": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet72": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet76": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet80": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet84": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet88": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet92": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet96": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet100": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet104": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet108": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet112": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet116": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet120": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet124": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet128": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet132": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet136": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet140": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet144": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet148": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet152": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet156": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet160": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet164": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet168": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet172": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet176": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet180": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet184": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet188": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet192": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet196": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet200": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet204": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet208": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet212": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet216": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet220": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet224": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet228": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet232": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet236": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet240": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet244": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet248": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet252": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet256": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet260": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet264": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet268": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet272": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet276": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet280": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet284": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet288": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet292": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet296": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet300": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet304": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet308": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet312": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet316": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet320": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet324": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet328": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet332": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet336": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet340": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet344": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet348": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet352": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet356": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet360": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet364": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet368": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet372": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet376": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet380": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet384": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet388": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet392": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet396": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet400": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet404": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet408": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet412": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet416": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet420": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet424": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet428": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet432": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet436": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet440": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet444": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet448": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet452": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet456": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet460": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet464": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet468": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet472": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet476": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet480": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet484": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet488": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet492": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet496": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet500": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet504": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet508": { + "default_brkout_mode": "2x800G[400G]" + }, + "Ethernet512": { + "default_brkout_mode": "2x100G" + }, + "Ethernet513": { + "default_brkout_mode": "2x100G" + } + } +} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/pg_profile_lookup.ini b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/pg_profile_lookup.ini new file mode 100644 index 00000000000..c34e27910d4 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/pg_profile_lookup.ini @@ -0,0 +1,33 @@ +## +## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +## Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +## 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. +## +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 63488 43008 20480 0 + 25000 5m 64512 43008 21504 0 + 100000 5m 87040 43008 44032 0 + 200000 5m 91136 43008 48128 0 + 400000 5m 124928 43008 81920 0 + 800000 5m 190464 43008 147456 0 + 100000 40m 91136 43008 48128 0 + 200000 40m 101376 43008 58368 0 + 400000 40m 144384 43008 101376 0 + 800000 40m 229376 43008 186368 0 + 100000 300m 128000 43008 84992 0 + 200000 300m 173056 43008 130048 0 + 400000 300m 287744 43008 244736 0 + 800000 300m 516096 43008 473088 0 diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/port_config.ini b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/port_config.ini new file mode 100644 index 00000000000..6cd473f446c --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/port_config.ini @@ -0,0 +1,148 @@ +## +## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +## Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +## 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. +## +# name lanes alias index speed +Ethernet0 0,1,2,3 etp1a 1 400000 +Ethernet4 4,5,6,7 etp1b 1 400000 +Ethernet8 8,9,10,11 etp2a 2 400000 +Ethernet12 12,13,14,15 etp2b 2 400000 +Ethernet16 16,17,18,19 etp3a 3 400000 +Ethernet20 20,21,22,23 etp3b 3 400000 +Ethernet24 24,25,26,27 etp4a 4 400000 +Ethernet28 28,29,30,31 etp4b 4 400000 +Ethernet32 32,33,34,35 etp5a 5 400000 +Ethernet36 36,37,38,39 etp5b 5 400000 +Ethernet40 40,41,42,43 etp6a 6 400000 +Ethernet44 44,45,46,47 etp6b 6 400000 +Ethernet48 48,49,50,51 etp7a 7 400000 +Ethernet52 52,53,54,55 etp7b 7 400000 +Ethernet56 56,57,58,59 etp8a 8 400000 +Ethernet60 60,61,62,63 etp8b 8 400000 +Ethernet64 64,65,66,67 etp9a 9 400000 +Ethernet68 68,69,70,71 etp9b 9 400000 +Ethernet72 72,73,74,75 etp10a 10 400000 +Ethernet76 76,77,78,79 etp10b 10 400000 +Ethernet80 80,81,82,83 etp11a 11 400000 +Ethernet84 84,85,86,87 etp11b 11 400000 +Ethernet88 88,89,90,91 etp12a 12 400000 +Ethernet92 92,93,94,95 etp12b 12 400000 +Ethernet96 96,97,98,99 etp13a 13 400000 +Ethernet100 100,101,102,103 etp13b 13 400000 +Ethernet104 104,105,106,107 etp14a 14 400000 +Ethernet108 108,109,110,111 etp14b 14 400000 +Ethernet112 112,113,114,115 etp15a 15 400000 +Ethernet116 116,117,118,119 etp15b 15 400000 +Ethernet120 120,121,122,123 etp16a 16 400000 +Ethernet124 124,125,126,127 etp16b 16 400000 +Ethernet128 128,129,130,131 etp17a 17 400000 +Ethernet132 132,133,134,135 etp17b 17 400000 +Ethernet136 136,137,138,139 etp18a 18 400000 +Ethernet140 140,141,142,143 etp18b 18 400000 +Ethernet144 144,145,146,147 etp19a 19 400000 +Ethernet148 148,149,150,151 etp19b 19 400000 +Ethernet152 152,153,154,155 etp20a 20 400000 +Ethernet156 156,157,158,159 etp20b 20 400000 +Ethernet160 160,161,162,163 etp21a 21 400000 +Ethernet164 164,165,166,167 etp21b 21 400000 +Ethernet168 168,169,170,171 etp22a 22 400000 +Ethernet172 172,173,174,175 etp22b 22 400000 +Ethernet176 176,177,178,179 etp23a 23 400000 +Ethernet180 180,181,182,183 etp23b 23 400000 +Ethernet184 184,185,186,187 etp24a 24 400000 +Ethernet188 188,189,190,191 etp24b 24 400000 +Ethernet192 192,193,194,195 etp25a 25 400000 +Ethernet196 196,197,198,199 etp25b 25 400000 +Ethernet200 200,201,202,203 etp26a 26 400000 +Ethernet204 204,205,206,207 etp26b 26 400000 +Ethernet208 208,209,210,211 etp27a 27 400000 +Ethernet212 212,213,214,215 etp27b 27 400000 +Ethernet216 216,217,218,219 etp28a 28 400000 +Ethernet220 220,221,222,223 etp28b 28 400000 +Ethernet224 224,225,226,227 etp29a 29 400000 +Ethernet228 228,229,230,231 etp29b 29 400000 +Ethernet232 232,233,234,235 etp30a 30 400000 +Ethernet236 236,237,238,239 etp30b 30 400000 +Ethernet240 240,241,242,243 etp31a 31 400000 +Ethernet244 244,245,246,247 etp31b 31 400000 +Ethernet248 248,249,250,251 etp32a 32 400000 +Ethernet252 252,253,254,255 etp32b 32 400000 +Ethernet256 256,257,258,259 etp33a 33 400000 +Ethernet260 260,261,262,263 etp33b 33 400000 +Ethernet264 264,265,266,267 etp34a 34 400000 +Ethernet268 268,269,270,271 etp34b 34 400000 +Ethernet272 272,273,274,275 etp35a 35 400000 +Ethernet276 276,277,278,279 etp35b 35 400000 +Ethernet280 280,281,282,283 etp36a 36 400000 +Ethernet284 284,285,286,287 etp36b 36 400000 +Ethernet288 288,289,290,291 etp37a 37 400000 +Ethernet292 292,293,294,295 etp37b 37 400000 +Ethernet296 296,297,298,299 etp38a 38 400000 +Ethernet300 300,301,302,303 etp38b 38 400000 +Ethernet304 304,305,306,307 etp39a 39 400000 +Ethernet308 308,309,310,311 etp39b 39 400000 +Ethernet312 312,313,314,315 etp40a 40 400000 +Ethernet316 316,317,318,319 etp40b 40 400000 +Ethernet320 320,321,322,323 etp41a 41 400000 +Ethernet324 324,325,326,327 etp41b 41 400000 +Ethernet328 328,329,330,331 etp42a 42 400000 +Ethernet332 332,333,334,335 etp42b 42 400000 +Ethernet336 336,337,338,339 etp43a 43 400000 +Ethernet340 340,341,342,343 etp43b 43 400000 +Ethernet344 344,345,346,347 etp44a 44 400000 +Ethernet348 348,349,350,351 etp44b 44 400000 +Ethernet352 352,353,354,355 etp45a 45 400000 +Ethernet356 356,357,358,359 etp45b 45 400000 +Ethernet360 360,361,362,363 etp46a 46 400000 +Ethernet364 364,365,366,367 etp46b 46 400000 +Ethernet368 368,369,370,371 etp47a 47 400000 +Ethernet372 372,373,374,375 etp47b 47 400000 +Ethernet376 376,377,378,379 etp48a 48 400000 +Ethernet380 380,381,382,383 etp48b 48 400000 +Ethernet384 384,385,386,387 etp49a 49 400000 +Ethernet388 388,389,390,391 etp49b 49 400000 +Ethernet392 392,393,394,395 etp50a 50 400000 +Ethernet396 396,397,398,399 etp50b 50 400000 +Ethernet400 400,401,402,403 etp51a 51 400000 +Ethernet404 404,405,406,407 etp51b 51 400000 +Ethernet408 408,409,410,411 etp52a 52 400000 +Ethernet412 412,413,414,415 etp52b 52 400000 +Ethernet416 416,417,418,419 etp53a 53 400000 +Ethernet420 420,421,422,423 etp53b 53 400000 +Ethernet424 424,425,426,427 etp54a 54 400000 +Ethernet428 428,429,430,431 etp54b 54 400000 +Ethernet432 432,433,434,435 etp55a 55 400000 +Ethernet436 436,437,438,439 etp55b 55 400000 +Ethernet440 440,441,442,443 etp56a 56 400000 +Ethernet444 444,445,446,447 etp56b 56 400000 +Ethernet448 448,449,450,451 etp57a 57 400000 +Ethernet452 452,453,454,455 etp57b 57 400000 +Ethernet456 456,457,458,459 etp58a 58 400000 +Ethernet460 460,461,462,463 etp58b 58 400000 +Ethernet464 464,465,466,467 etp59a 59 400000 +Ethernet468 468,469,470,471 etp59b 59 400000 +Ethernet472 472,473,474,475 etp60a 60 400000 +Ethernet476 476,477,478,479 etp60b 60 400000 +Ethernet480 480,481,482,483 etp61a 61 400000 +Ethernet484 484,485,486,487 etp61b 61 400000 +Ethernet488 488,489,490,491 etp62a 62 400000 +Ethernet492 492,493,494,495 etp62b 62 400000 +Ethernet496 496,497,498,499 etp63a 63 400000 +Ethernet500 500,501,502,503 etp63b 63 400000 +Ethernet504 504,505,506,507 etp64a 64 400000 +Ethernet508 508,509,510,511 etp64b 64 400000 +Ethernet514 514 etp65a 65 100000 +Ethernet515 515 etp65b 65 100000 diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/qos.json.j2 b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/qos.json.j2 new file mode 120000 index 00000000000..eccf286dc87 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/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-nvidia_sn6600_ld-r0/ACS-SN6600_LD/sai.profile b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/sai.profile new file mode 100644 index 00000000000..76265ae5171 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_6600.xml diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/sai_6600.xml b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/sai_6600.xml new file mode 100644 index 00000000000..c187c91b94e --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/ACS-SN6600_LD/sai_6600.xml @@ -0,0 +1,559 @@ + + + + + + + + 00:02:03:04:05:00 + + + 1 + + + 65 + + + + + 481 + 8 + 0 + + 7 + + 1536 + 8 + + + 489 + 8 + 1 + 7 + 1536 + 8 + + + 505 + 8 + 2 + 7 + 1536 + 8 + + + 497 + 8 + 3 + 7 + 1536 + 8 + + + 449 + 8 + 4 + 7 + 1536 + 8 + + + 457 + 8 + 5 + 7 + 1536 + 8 + + + 473 + 8 + 6 + 7 + 1536 + 8 + + + 465 + 8 + 7 + 7 + 1536 + 8 + + + 417 + 8 + 8 + 7 + 1536 + 8 + + + 425 + 8 + 9 + 7 + 1536 + 8 + + + 441 + 8 + 10 + 7 + 1536 + 8 + + + 433 + 8 + 11 + 7 + 1536 + 8 + + + 385 + 8 + 12 + 7 + 1536 + 8 + + + 393 + 8 + 13 + 7 + 1536 + 8 + + + 409 + 8 + 14 + 7 + 1536 + 8 + + + 401 + 8 + 15 + 7 + 1536 + 8 + + + 361 + 8 + 16 + 7 + 1536 + 8 + + + 353 + 8 + 17 + 7 + 1536 + 8 + + + 369 + 8 + 18 + 7 + 1536 + 8 + + + 377 + 8 + 19 + 7 + 1536 + 8 + + + 329 + 8 + 20 + 7 + 1536 + 8 + + + 321 + 8 + 21 + 7 + 1536 + 8 + + + 337 + 8 + 22 + 7 + 1536 + 8 + + + 345 + 8 + 23 + 7 + 1536 + 8 + + + 297 + 8 + 24 + 7 + 1536 + 8 + + + 289 + 8 + 25 + 7 + 1536 + 8 + + + 305 + 8 + 26 + 7 + 1536 + 8 + + + 313 + 8 + 27 + 7 + 1536 + 8 + + + 265 + 8 + 28 + 7 + 1536 + 8 + + + 257 + 8 + 29 + 7 + 1536 + 8 + + + 273 + 8 + 30 + 7 + 1536 + 8 + + + 281 + 8 + 31 + 7 + 1536 + 8 + + + 25 + 8 + 32 + 7 + 1536 + 8 + + + 17 + 8 + 33 + 7 + 1536 + 8 + + + 1 + 8 + 34 + 7 + 1536 + 8 + + + 9 + 8 + 35 + 7 + 1536 + 8 + + + 57 + 8 + 36 + 7 + 1536 + 8 + + + 49 + 8 + 37 + 7 + 1536 + 8 + + + 33 + 8 + 38 + 7 + 1536 + 8 + + + 41 + 8 + 39 + 7 + 1536 + 8 + + + 89 + 8 + 40 + 7 + 1536 + 8 + + + 81 + 8 + 41 + 7 + 1536 + 8 + + + 65 + 8 + 42 + 7 + 1536 + 8 + + + 73 + 8 + 43 + 7 + 1536 + 8 + + + 121 + 8 + 44 + 7 + 1536 + 8 + + + 113 + 8 + 45 + 7 + 1536 + 8 + + + 97 + 8 + 46 + 7 + 1536 + 8 + + + 105 + 8 + 47 + 7 + 1536 + 8 + + + 145 + 8 + 48 + 7 + 1536 + 8 + + + 153 + 8 + 49 + 7 + 1536 + 8 + + + 137 + 8 + 50 + 7 + 1536 + 8 + + + 129 + 8 + 51 + 7 + 1536 + 8 + + + 177 + 8 + 52 + 7 + 1536 + 8 + + + 185 + 8 + 53 + 7 + 1536 + 8 + + + 169 + 8 + 54 + 7 + 1536 + 8 + + + 161 + 8 + 55 + 7 + 1536 + 8 + + + 209 + 8 + 56 + 7 + 1536 + 8 + + + 217 + 8 + 57 + 7 + 1536 + 8 + + + 201 + 8 + 58 + 7 + 1536 + 8 + + + 193 + 8 + 59 + 7 + 1536 + 8 + + + 241 + 8 + 60 + 7 + 1536 + 8 + + + 249 + 8 + 61 + 7 + 1536 + 8 + + + 233 + 8 + 62 + 7 + 1536 + 8 + + + 225 + 8 + 63 + 7 + 1536 + 8 + + + 515 + 2 + 64 + 0 + 1536 + 2 + + + 1 + + diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/bmc.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/bmc.json new file mode 100644 index 00000000000..b30023541fc --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/bmc.json @@ -0,0 +1,7 @@ +{ + "bmc_if_name": "usb0", + "bmc_if_addr": "169.254.0.2", + "bmc_addr": "169.254.0.1", + "bmc_net_mask": "255.255.255.252" +} + \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/default_sku b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/default_sku new file mode 100644 index 00000000000..845c032d2fc --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/default_sku @@ -0,0 +1 @@ +ACS-SN6600_LD t1 diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/installer.conf b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/installer.conf new file mode 100644 index 00000000000..cb783508022 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/installer.conf @@ -0,0 +1 @@ +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="libata.force=noncq tpm_tis.interrupts=0 nosgx ima_hash=sha384 amd_iommu=off cpufreq.default_governor=performance" \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pcie.yaml b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pcie.yaml new file mode 100644 index 00000000000..bead1736723 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pcie.yaml @@ -0,0 +1,220 @@ +## +## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +## Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +## SPDX-License-Identifier: 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. +## + +- bus: '00' + dev: '00' + fn: '0' + id: 14b5 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Root + Complex (rev 01)' +- bus: '00' + dev: '00' + fn: '2' + id: 14b6 + name: 'IOMMU: Advanced Micro Devices, Inc. [AMD] Family 17h-19h IOMMU' +- bus: '00' + dev: '01' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: '01' + fn: '1' + id: 14b8 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge' +- bus: '00' + dev: '01' + fn: '2' + id: 14b8 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge' +- bus: '00' + dev: '01' + fn: '3' + id: 14b8 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge' +- bus: '00' + dev: '02' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: '03' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: '04' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: 08 + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: 08 + fn: '1' + id: 14b9 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe + GPP Bridge (rev 10)' +- bus: '00' + dev: 08 + fn: '2' + id: 14b9 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe + GPP Bridge (rev 10)' +- bus: '00' + dev: 08 + fn: '3' + id: 14b9 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe + GPP Bridge (rev 10)' +- bus: '00' + dev: '14' + fn: '0' + id: 790b + name: 'SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)' +- bus: '00' + dev: '14' + fn: '3' + id: 790e + name: 'ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)' +- bus: '00' + dev: '18' + fn: '0' + id: '1679' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 0' +- bus: '00' + dev: '18' + fn: '1' + id: 167a + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 1' +- bus: '00' + dev: '18' + fn: '2' + id: 167b + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 2' +- bus: '00' + dev: '18' + fn: '3' + id: 167c + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 3' +- bus: '00' + dev: '18' + fn: '4' + id: 167d + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 4' +- bus: '00' + dev: '18' + fn: '5' + id: 167e + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 5' +- bus: '00' + dev: '18' + fn: '6' + id: 167f + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 6' +- bus: '00' + dev: '18' + fn: '7' + id: '1680' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 7' +- bus: '03' + dev: '00' + fn: '0' + id: '2268' + name: 'Non-Volatile memory controller: Silicon Motion, Inc. SM2268XT (DRAM-less) + NVMe SSD Controller (rev 10)' +- bus: '04' + dev: '00' + fn: '0' + id: 145a + name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD/ATI] + Dummy Function (absent graphics controller)' +- bus: '04' + dev: '00' + fn: '2' + id: '1649' + name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 19h PSP/CCP' +- bus: '04' + dev: '00' + fn: '3' + id: 161d + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #3' +- bus: '04' + dev: '00' + fn: '4' + id: 161e + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #4' +- bus: '04' + dev: '00' + fn: '5' + id: 15e2 + name: 'Multimedia controller: Advanced Micro Devices, Inc. [AMD] Audio Coprocessor + (rev 60)' +- bus: '04' + dev: '00' + fn: '7' + id: 15e4 + name: 'Signal processing controller: Advanced Micro Devices, Inc. [AMD] Sensor Fusion + Hub' +- bus: '05' + dev: '00' + fn: '0' + id: 145a + name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] + Zeppelin/Raven/Raven2 PCIe Dummy Function (rev a1)' +- bus: '05' + dev: '00' + fn: '2' + id: '1458' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' +- bus: '06' + dev: '00' + fn: '0' + id: 145a + name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] + Zeppelin/Raven/Raven2 PCIe Dummy Function' +- bus: '06' + dev: '00' + fn: '3' + id: 15d6 + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #5' +- bus: '06' + dev: '00' + fn: '4' + id: 15d7 + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #6' diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform.json new file mode 100644 index 00000000000..8eec2204a13 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform.json @@ -0,0 +1,1227 @@ +{ + "chassis": { + "name": "SN6600_LD", + "components": [ + { + "name": "ONIE" + }, + { + "name": "SSD" + }, + { + "name": "BIOS" + }, + { + "name": "CPLD1" + }, + { + "name": "CPLD2" + }, + { + "name": "CPLD3" + }, + { + "name": "CPLD4" + }, + { + "name": "BMC" + } + ], + "fans": [], + "fan_drawers": [], + "psus": [], + "leak_sensors": [ + { + "name": "leakage1" + }, + { + "name": "leakage2" + } + ], + "thermals": [ + { + "name": "ASIC" + }, + { + "name": "CPU Pack Temp" + }, + { + "name": "SODIMM 1 Temp" + }, + { + "name": "SODIMM 2 Temp" + } + ], + "sfps": [ + { + "name": "sfp1", + "thermals": [ + { + "name": "xSFP module 1 Temp" + } + ] + }, + { + "name": "sfp2", + "thermals": [ + { + "name": "xSFP module 2 Temp" + } + ] + }, + { + "name": "sfp3", + "thermals": [ + { + "name": "xSFP module 3 Temp" + } + ] + }, + { + "name": "sfp4", + "thermals": [ + { + "name": "xSFP module 4 Temp" + } + ] + }, + { + "name": "sfp5", + "thermals": [ + { + "name": "xSFP module 5 Temp" + } + ] + }, + { + "name": "sfp6", + "thermals": [ + { + "name": "xSFP module 6 Temp" + } + ] + }, + { + "name": "sfp7", + "thermals": [ + { + "name": "xSFP module 7 Temp" + } + ] + }, + { + "name": "sfp8", + "thermals": [ + { + "name": "xSFP module 8 Temp" + } + ] + }, + { + "name": "sfp9", + "thermals": [ + { + "name": "xSFP module 9 Temp" + } + ] + }, + { + "name": "sfp10", + "thermals": [ + { + "name": "xSFP module 10 Temp" + } + ] + }, + { + "name": "sfp11", + "thermals": [ + { + "name": "xSFP module 11 Temp" + } + ] + }, + { + "name": "sfp12", + "thermals": [ + { + "name": "xSFP module 12 Temp" + } + ] + }, + { + "name": "sfp13", + "thermals": [ + { + "name": "xSFP module 13 Temp" + } + ] + }, + { + "name": "sfp14", + "thermals": [ + { + "name": "xSFP module 14 Temp" + } + ] + }, + { + "name": "sfp15", + "thermals": [ + { + "name": "xSFP module 15 Temp" + } + ] + }, + { + "name": "sfp16", + "thermals": [ + { + "name": "xSFP module 16 Temp" + } + ] + }, + { + "name": "sfp17", + "thermals": [ + { + "name": "xSFP module 17 Temp" + } + ] + }, + { + "name": "sfp18", + "thermals": [ + { + "name": "xSFP module 18 Temp" + } + ] + }, + { + "name": "sfp19", + "thermals": [ + { + "name": "xSFP module 19 Temp" + } + ] + }, + { + "name": "sfp20", + "thermals": [ + { + "name": "xSFP module 20 Temp" + } + ] + }, + { + "name": "sfp21", + "thermals": [ + { + "name": "xSFP module 21 Temp" + } + ] + }, + { + "name": "sfp22", + "thermals": [ + { + "name": "xSFP module 22 Temp" + } + ] + }, + { + "name": "sfp23", + "thermals": [ + { + "name": "xSFP module 23 Temp" + } + ] + }, + { + "name": "sfp24", + "thermals": [ + { + "name": "xSFP module 24 Temp" + } + ] + }, + { + "name": "sfp25", + "thermals": [ + { + "name": "xSFP module 25 Temp" + } + ] + }, + { + "name": "sfp26", + "thermals": [ + { + "name": "xSFP module 26 Temp" + } + ] + }, + { + "name": "sfp27", + "thermals": [ + { + "name": "xSFP module 27 Temp" + } + ] + }, + { + "name": "sfp28", + "thermals": [ + { + "name": "xSFP module 28 Temp" + } + ] + }, + { + "name": "sfp29", + "thermals": [ + { + "name": "xSFP module 29 Temp" + } + ] + }, + { + "name": "sfp30", + "thermals": [ + { + "name": "xSFP module 30 Temp" + } + ] + }, + { + "name": "sfp31", + "thermals": [ + { + "name": "xSFP module 31 Temp" + } + ] + }, + { + "name": "sfp32", + "thermals": [ + { + "name": "xSFP module 32 Temp" + } + ] + }, + { + "name": "sfp33", + "thermals": [ + { + "name": "xSFP module 33 Temp" + } + ] + }, + { + "name": "sfp34", + "thermals": [ + { + "name": "xSFP module 34 Temp" + } + ] + }, + { + "name": "sfp35", + "thermals": [ + { + "name": "xSFP module 35 Temp" + } + ] + }, + { + "name": "sfp36", + "thermals": [ + { + "name": "xSFP module 36 Temp" + } + ] + }, + { + "name": "sfp37", + "thermals": [ + { + "name": "xSFP module 37 Temp" + } + ] + }, + { + "name": "sfp38", + "thermals": [ + { + "name": "xSFP module 38 Temp" + } + ] + }, + { + "name": "sfp39", + "thermals": [ + { + "name": "xSFP module 39 Temp" + } + ] + }, + { + "name": "sfp40", + "thermals": [ + { + "name": "xSFP module 40 Temp" + } + ] + }, + { + "name": "sfp41", + "thermals": [ + { + "name": "xSFP module 41 Temp" + } + ] + }, + { + "name": "sfp42", + "thermals": [ + { + "name": "xSFP module 42 Temp" + } + ] + }, + { + "name": "sfp43", + "thermals": [ + { + "name": "xSFP module 43 Temp" + } + ] + }, + { + "name": "sfp44", + "thermals": [ + { + "name": "xSFP module 44 Temp" + } + ] + }, + { + "name": "sfp45", + "thermals": [ + { + "name": "xSFP module 45 Temp" + } + ] + }, + { + "name": "sfp46", + "thermals": [ + { + "name": "xSFP module 46 Temp" + } + ] + }, + { + "name": "sfp47", + "thermals": [ + { + "name": "xSFP module 47 Temp" + } + ] + }, + { + "name": "sfp48", + "thermals": [ + { + "name": "xSFP module 48 Temp" + } + ] + }, + { + "name": "sfp49", + "thermals": [ + { + "name": "xSFP module 49 Temp" + } + ] + }, + { + "name": "sfp50", + "thermals": [ + { + "name": "xSFP module 50 Temp" + } + ] + }, + { + "name": "sfp51", + "thermals": [ + { + "name": "xSFP module 51 Temp" + } + ] + }, + { + "name": "sfp52", + "thermals": [ + { + "name": "xSFP module 52 Temp" + } + ] + }, + { + "name": "sfp53", + "thermals": [ + { + "name": "xSFP module 53 Temp" + } + ] + }, + { + "name": "sfp54", + "thermals": [ + { + "name": "xSFP module 54 Temp" + } + ] + }, + { + "name": "sfp55", + "thermals": [ + { + "name": "xSFP module 55 Temp" + } + ] + }, + { + "name": "sfp56", + "thermals": [ + { + "name": "xSFP module 56 Temp" + } + ] + }, + { + "name": "sfp57", + "thermals": [ + { + "name": "xSFP module 57 Temp" + } + ] + }, + { + "name": "sfp58", + "thermals": [ + { + "name": "xSFP module 58 Temp" + } + ] + }, + { + "name": "sfp59", + "thermals": [ + { + "name": "xSFP module 59 Temp" + } + ] + }, + { + "name": "sfp60", + "thermals": [ + { + "name": "xSFP module 60 Temp" + } + ] + }, + { + "name": "sfp61", + "thermals": [ + { + "name": "xSFP module 61 Temp" + } + ] + }, + { + "name": "sfp62", + "thermals": [ + { + "name": "xSFP module 62 Temp" + } + ] + }, + { + "name": "sfp63", + "thermals": [ + { + "name": "xSFP module 63 Temp" + } + ] + }, + { + "name": "sfp64", + "thermals": [ + { + "name": "xSFP module 64 Temp" + } + ] + }, + { + "name": "sfp65", + "thermals": [ + { + "name": "xSFP module 65 Temp" + } + ] + } + ] + }, + "interfaces": { + "Ethernet0": { + "index": "1,1,1,1,1,1,1,1", + "lanes": "0,1,2,3,4,5,6,7", + "breakout_modes": { + "1x800G": ["etp1"], + "2x800G[400G]": ["etp1a", "etp1b"], + "4x400G[200G]": ["etp1a", "etp1b", "etp1c", "etp1d"], + "8x200G[100G]": ["etp1a", "etp1b", "etp1c", "etp1d", "etp1e", "etp1f", "etp1g", "etp1h"] + } + }, + "Ethernet8": { + "index": "2,2,2,2,2,2,2,2", + "lanes": "8,9,10,11,12,13,14,15", + "breakout_modes": { + "1x800G": ["etp2"], + "2x800G[400G]": ["etp2a", "etp2b"], + "4x400G[200G]": ["etp2a", "etp2b", "etp2c", "etp2d"], + "8x200G[100G]": ["etp2a", "etp2b", "etp2c", "etp2d", "etp2e", "etp2f", "etp2g", "etp2h"] + } + }, + "Ethernet16": { + "index": "3,3,3,3,3,3,3,3", + "lanes": "16,17,18,19,20,21,22,23", + "breakout_modes": { + "1x800G": ["etp3"], + "2x800G[400G]": ["etp3a", "etp3b"], + "4x400G[200G]": ["etp3a", "etp3b", "etp3c", "etp3d"], + "8x200G[100G]": ["etp3a", "etp3b", "etp3c", "etp3d", "etp3e", "etp3f", "etp3g", "etp3h"] + } + }, + "Ethernet24": { + "index": "4,4,4,4,4,4,4,4", + "lanes": "24,25,26,27,28,29,30,31", + "breakout_modes": { + "1x800G": ["etp4"], + "2x800G[400G]": ["etp4a", "etp4b"], + "4x400G[200G]": ["etp4a", "etp4b", "etp4c", "etp4d"], + "8x200G[100G]": ["etp4a", "etp4b", "etp4c", "etp4d", "etp4e", "etp4f", "etp4g", "etp4h"] + } + }, + "Ethernet32": { + "index": "5,5,5,5,5,5,5,5", + "lanes": "32,33,34,35,36,37,38,39", + "breakout_modes": { + "1x800G": ["etp5"], + "2x800G[400G]": ["etp5a", "etp5b"], + "4x400G[200G]": ["etp5a", "etp5b", "etp5c", "etp5d"], + "8x200G[100G]": ["etp5a", "etp5b", "etp5c", "etp5d", "etp5e", "etp5f", "etp5g", "etp5h"] + } + }, + "Ethernet40": { + "index": "6,6,6,6,6,6,6,6", + "lanes": "40,41,42,43,44,45,46,47", + "breakout_modes": { + "1x800G": ["etp6"], + "2x800G[400G]": ["etp6a", "etp6b"], + "4x400G[200G]": ["etp6a", "etp6b", "etp6c", "etp6d"], + "8x200G[100G]": ["etp6a", "etp6b", "etp6c", "etp6d", "etp6e", "etp6f", "etp6g", "etp6h"] + } + }, + "Ethernet48": { + "index": "7,7,7,7,7,7,7,7", + "lanes": "48,49,50,51,52,53,54,55", + "breakout_modes": { + "1x800G": ["etp7"], + "2x800G[400G]": ["etp7a", "etp7b"], + "4x400G[200G]": ["etp7a", "etp7b", "etp7c", "etp7d"], + "8x200G[100G]": ["etp7a", "etp7b", "etp7c", "etp7d", "etp7e", "etp7f", "etp7g", "etp7h"] + } + }, + "Ethernet56": { + "index": "8,8,8,8,8,8,8,8", + "lanes": "56,57,58,59,60,61,62,63", + "breakout_modes": { + "1x800G": ["etp8"], + "2x800G[400G]": ["etp8a", "etp8b"], + "4x400G[200G]": ["etp8a", "etp8b", "etp8c", "etp8d"], + "8x200G[100G]": ["etp8a", "etp8b", "etp8c", "etp8d", "etp8e", "etp8f", "etp8g", "etp8h"] + } + }, + "Ethernet64": { + "index": "9,9,9,9,9,9,9,9", + "lanes": "64,65,66,67,68,69,70,71", + "breakout_modes": { + "1x800G": ["etp9"], + "2x800G[400G]": ["etp9a", "etp9b"], + "4x400G[200G]": ["etp9a", "etp9b", "etp9c", "etp9d"], + "8x200G[100G]": ["etp9a", "etp9b", "etp9c", "etp9d", "etp9e", "etp9f", "etp9g", "etp9h"] + } + }, + "Ethernet72": { + "index": "10,10,10,10,10,10,10,10", + "lanes": "72,73,74,75,76,77,78,79", + "breakout_modes": { + "1x800G": ["etp10"], + "2x800G[400G]": ["etp10a", "etp10b"], + "4x400G[200G]": ["etp10a", "etp10b", "etp10c", "etp10d"], + "8x200G[100G]": ["etp10a", "etp10b", "etp10c", "etp10d", "etp10e", "etp10f", "etp10g", "etp10h"] + } + }, + "Ethernet80": { + "index": "11,11,11,11,11,11,11,11", + "lanes": "80,81,82,83,84,85,86,87", + "breakout_modes": { + "1x800G": ["etp11"], + "2x800G[400G]": ["etp11a", "etp11b"], + "4x400G[200G]": ["etp11a", "etp11b", "etp11c", "etp11d"], + "8x200G[100G]": ["etp11a", "etp11b", "etp11c", "etp11d", "etp11e", "etp11f", "etp11g", "etp11h"] + } + }, + "Ethernet88": { + "index": "12,12,12,12,12,12,12,12", + "lanes": "88,89,90,91,92,93,94,95", + "breakout_modes": { + "1x800G": ["etp12"], + "2x800G[400G]": ["etp12a", "etp12b"], + "4x400G[200G]": ["etp12a", "etp12b", "etp12c", "etp12d"], + "8x200G[100G]": ["etp12a", "etp12b", "etp12c", "etp12d", "etp12e", "etp12f", "etp12g", "etp12h"] + } + }, + "Ethernet96": { + "index": "13,13,13,13,13,13,13,13", + "lanes": "96,97,98,99,100,101,102,103", + "breakout_modes": { + "1x800G": ["etp13"], + "2x800G[400G]": ["etp13a", "etp13b"], + "4x400G[200G]": ["etp13a", "etp13b", "etp13c", "etp13d"], + "8x200G[100G]": ["etp13a", "etp13b", "etp13c", "etp13d", "etp13e", "etp13f", "etp13g", "etp13h"] + } + }, + "Ethernet104": { + "index": "14,14,14,14,14,14,14,14", + "lanes": "104,105,106,107,108,109,110,111", + "breakout_modes": { + "1x800G": ["etp14"], + "2x800G[400G]": ["etp14a", "etp14b"], + "4x400G[200G]": ["etp14a", "etp14b", "etp14c", "etp14d"], + "8x200G[100G]": ["etp14a", "etp14b", "etp14c", "etp14d", "etp14e", "etp14f", "etp14g", "etp14h"] + } + }, + "Ethernet112": { + "index": "15,15,15,15,15,15,15,15", + "lanes": "112,113,114,115,116,117,118,119", + "breakout_modes": { + "1x800G": ["etp15"], + "2x800G[400G]": ["etp15a", "etp15b"], + "4x400G[200G]": ["etp15a", "etp15b", "etp15c", "etp15d"], + "8x200G[100G]": ["etp15a", "etp15b", "etp15c", "etp15d", "etp15e", "etp15f", "etp15g", "etp15h"] + } + }, + "Ethernet120": { + "index": "16,16,16,16,16,16,16,16", + "lanes": "120,121,122,123,124,125,126,127", + "breakout_modes": { + "1x800G": ["etp16"], + "2x800G[400G]": ["etp16a", "etp16b"], + "4x400G[200G]": ["etp16a", "etp16b", "etp16c", "etp16d"], + "8x200G[100G]": ["etp16a", "etp16b", "etp16c", "etp16d", "etp16e", "etp16f", "etp16g", "etp16h"] + } + }, + "Ethernet128": { + "index": "17,17,17,17,17,17,17,17", + "lanes": "128,129,130,131,132,133,134,135", + "breakout_modes": { + "1x800G": ["etp17"], + "2x800G[400G]": ["etp17a", "etp17b"], + "4x400G[200G]": ["etp17a", "etp17b", "etp17c", "etp17d"], + "8x200G[100G]": ["etp17a", "etp17b", "etp17c", "etp17d", "etp17e", "etp17f", "etp17g", "etp17h"] + } + }, + "Ethernet136": { + "index": "18,18,18,18,18,18,18,18", + "lanes": "136,137,138,139,140,141,142,143", + "breakout_modes": { + "1x800G": ["etp18"], + "2x800G[400G]": ["etp18a", "etp18b"], + "4x400G[200G]": ["etp18a", "etp18b", "etp18c", "etp18d"], + "8x200G[100G]": ["etp18a", "etp18b", "etp18c", "etp18d", "etp18e", "etp18f", "etp18g", "etp18h"] + } + }, + "Ethernet144": { + "index": "19,19,19,19,19,19,19,19", + "lanes": "144,145,146,147,148,149,150,151", + "breakout_modes": { + "1x800G": ["etp19"], + "2x800G[400G]": ["etp19a", "etp19b"], + "4x400G[200G]": ["etp19a", "etp19b", "etp19c", "etp19d"], + "8x200G[100G]": ["etp19a", "etp19b", "etp19c", "etp19d", "etp19e", "etp19f", "etp19g", "etp19h"] + } + }, + "Ethernet152": { + "index": "20,20,20,20,20,20,20,20", + "lanes": "152,153,154,155,156,157,158,159", + "breakout_modes": { + "1x800G": ["etp20"], + "2x800G[400G]": ["etp20a", "etp20b"], + "4x400G[200G]": ["etp20a", "etp20b", "etp20c", "etp20d"], + "8x200G[100G]": ["etp20a", "etp20b", "etp20c", "etp20d", "etp20e", "etp20f", "etp20g", "etp20h"] + } + }, + "Ethernet160": { + "index": "21,21,21,21,21,21,21,21", + "lanes": "160,161,162,163,164,165,166,167", + "breakout_modes": { + "1x800G": ["etp21"], + "2x800G[400G]": ["etp21a", "etp21b"], + "4x400G[200G]": ["etp21a", "etp21b", "etp21c", "etp21d"], + "8x200G[100G]": ["etp21a", "etp21b", "etp21c", "etp21d", "etp21e", "etp21f", "etp21g", "etp21h"] + } + }, + "Ethernet168": { + "index": "22,22,22,22,22,22,22,22", + "lanes": "168,169,170,171,172,173,174,175", + "breakout_modes": { + "1x800G": ["etp22"], + "2x800G[400G]": ["etp22a", "etp22b"], + "4x400G[200G]": ["etp22a", "etp22b", "etp22c", "etp22d"], + "8x200G[100G]": ["etp22a", "etp22b", "etp22c", "etp22d", "etp22e", "etp22f", "etp22g", "etp22h"] + } + }, + "Ethernet176": { + "index": "23,23,23,23,23,23,23,23", + "lanes": "176,177,178,179,180,181,182,183", + "breakout_modes": { + "1x800G": ["etp23"], + "2x800G[400G]": ["etp23a", "etp23b"], + "4x400G[200G]": ["etp23a", "etp23b", "etp23c", "etp23d"], + "8x200G[100G]": ["etp23a", "etp23b", "etp23c", "etp23d", "etp23e", "etp23f", "etp23g", "etp23h"] + } + }, + "Ethernet184": { + "index": "24,24,24,24,24,24,24,24", + "lanes": "184,185,186,187,188,189,190,191", + "breakout_modes": { + "1x800G": ["etp24"], + "2x800G[400G]": ["etp24a", "etp24b"], + "4x400G[200G]": ["etp24a", "etp24b", "etp24c", "etp24d"], + "8x200G[100G]": ["etp24a", "etp24b", "etp24c", "etp24d", "etp24e", "etp24f", "etp24g", "etp24h"] + } + }, + "Ethernet192": { + "index": "25,25,25,25,25,25,25,25", + "lanes": "192,193,194,195,196,197,198,199", + "breakout_modes": { + "1x800G": ["etp25"], + "2x800G[400G]": ["etp25a", "etp25b"], + "4x400G[200G]": ["etp25a", "etp25b", "etp25c", "etp25d"], + "8x200G[100G]": ["etp25a", "etp25b", "etp25c", "etp25d", "etp25e", "etp25f", "etp25g", "etp25h"] + } + }, + "Ethernet200": { + "index": "26,26,26,26,26,26,26,26", + "lanes": "200,201,202,203,204,205,206,207", + "breakout_modes": { + "1x800G": ["etp26"], + "2x800G[400G]": ["etp26a", "etp26b"], + "4x400G[200G]": ["etp26a", "etp26b", "etp26c", "etp26d"], + "8x200G[100G]": ["etp26a", "etp26b", "etp26c", "etp26d", "etp26e", "etp26f", "etp26g", "etp26h"] + } + }, + "Ethernet208": { + "index": "27,27,27,27,27,27,27,27", + "lanes": "208,209,210,211,212,213,214,215", + "breakout_modes": { + "1x800G": ["etp27"], + "2x800G[400G]": ["etp27a", "etp27b"], + "4x400G[200G]": ["etp27a", "etp27b", "etp27c", "etp27d"], + "8x200G[100G]": ["etp27a", "etp27b", "etp27c", "etp27d", "etp27e", "etp27f", "etp27g", "etp27h"] + } + }, + "Ethernet216": { + "index": "28,28,28,28,28,28,28,28", + "lanes": "216,217,218,219,220,221,222,223", + "breakout_modes": { + "1x800G": ["etp28"], + "2x800G[400G]": ["etp28a", "etp28b"], + "4x400G[200G]": ["etp28a", "etp28b", "etp28c", "etp28d"], + "8x200G[100G]": ["etp28a", "etp28b", "etp28c", "etp28d", "etp28e", "etp28f", "etp28g", "etp28h"] + } + }, + "Ethernet224": { + "index": "29,29,29,29,29,29,29,29", + "lanes": "224,225,226,227,228,229,230,231", + "breakout_modes": { + "1x800G": ["etp29"], + "2x800G[400G]": ["etp29a", "etp29b"], + "4x400G[200G]": ["etp29a", "etp29b", "etp29c", "etp29d"], + "8x200G[100G]": ["etp29a", "etp29b", "etp29c", "etp29d", "etp29e", "etp29f", "etp29g", "etp29h"] + } + }, + "Ethernet232": { + "index": "30,30,30,30,30,30,30,30", + "lanes": "232,233,234,235,236,237,238,239", + "breakout_modes": { + "1x800G": ["etp30"], + "2x800G[400G]": ["etp30a", "etp30b"], + "4x400G[200G]": ["etp30a", "etp30b", "etp30c", "etp30d"], + "8x200G[100G]": ["etp30a", "etp30b", "etp30c", "etp30d", "etp30e", "etp30f", "etp30g", "etp30h"] + } + }, + "Ethernet240": { + "index": "31,31,31,31,31,31,31,31", + "lanes": "240,241,242,243,244,245,246,247", + "breakout_modes": { + "1x800G": ["etp31"], + "2x800G[400G]": ["etp31a", "etp31b"], + "4x400G[200G]": ["etp31a", "etp31b", "etp31c", "etp31d"], + "8x200G[100G]": ["etp31a", "etp31b", "etp31c", "etp31d", "etp31e", "etp31f", "etp31g", "etp31h"] + } + }, + "Ethernet248": { + "index": "32,32,32,32,32,32,32,32", + "lanes": "248,249,250,251,252,253,254,255", + "breakout_modes": { + "1x800G": ["etp32"], + "2x800G[400G]": ["etp32a", "etp32b"], + "4x400G[200G]": ["etp32a", "etp32b", "etp32c", "etp32d"], + "8x200G[100G]": ["etp32a", "etp32b", "etp32c", "etp32d", "etp32e", "etp32f", "etp32g", "etp32h"] + } + }, + "Ethernet256": { + "index": "33,33,33,33,33,33,33,33", + "lanes": "256,257,258,259,260,261,262,263", + "breakout_modes": { + "1x800G": ["etp33"], + "2x800G[400G]": ["etp33a", "etp33b"], + "4x400G[200G]": ["etp33a", "etp33b", "etp33c", "etp33d"], + "8x200G[100G]": ["etp33a", "etp33b", "etp33c", "etp33d", "etp33e", "etp33f", "etp33g", "etp33h"] + } + }, + "Ethernet264": { + "index": "34,34,34,34,34,34,34,34", + "lanes": "264,265,266,267,268,269,270,271", + "breakout_modes": { + "1x800G": ["etp34"], + "2x800G[400G]": ["etp34a", "etp34b"], + "4x400G[200G]": ["etp34a", "etp34b", "etp34c", "etp34d"], + "8x200G[100G]": ["etp34a", "etp34b", "etp34c", "etp34d", "etp34e", "etp34f", "etp34g", "etp34h"] + } + }, + "Ethernet272": { + "index": "35,35,35,35,35,35,35,35", + "lanes": "272,273,274,275,276,277,278,279", + "breakout_modes": { + "1x800G": ["etp35"], + "2x800G[400G]": ["etp35a", "etp35b"], + "4x400G[200G]": ["etp35a", "etp35b", "etp35c", "etp35d"], + "8x200G[100G]": ["etp35a", "etp35b", "etp35c", "etp35d", "etp35e", "etp35f", "etp35g", "etp35h"] + } + }, + "Ethernet280": { + "index": "36,36,36,36,36,36,36,36", + "lanes": "280,281,282,283,284,285,286,287", + "breakout_modes": { + "1x800G": ["etp36"], + "2x800G[400G]": ["etp36a", "etp36b"], + "4x400G[200G]": ["etp36a", "etp36b", "etp36c", "etp36d"], + "8x200G[100G]": ["etp36a", "etp36b", "etp36c", "etp36d", "etp36e", "etp36f", "etp36g", "etp36h"] + } + }, + "Ethernet288": { + "index": "37,37,37,37,37,37,37,37", + "lanes": "288,289,290,291,292,293,294,295", + "breakout_modes": { + "1x800G": ["etp37"], + "2x800G[400G]": ["etp37a", "etp37b"], + "4x400G[200G]": ["etp37a", "etp37b", "etp37c", "etp37d"], + "8x200G[100G]": ["etp37a", "etp37b", "etp37c", "etp37d", "etp37e", "etp37f", "etp37g", "etp37h"] + } + }, + "Ethernet296": { + "index": "38,38,38,38,38,38,38,38", + "lanes": "296,297,298,299,300,301,302,303", + "breakout_modes": { + "1x800G": ["etp38"], + "2x800G[400G]": ["etp38a", "etp38b"], + "4x400G[200G]": ["etp38a", "etp38b", "etp38c", "etp38d"], + "8x200G[100G]": ["etp38a", "etp38b", "etp38c", "etp38d", "etp38e", "etp38f", "etp38g", "etp38h"] + } + }, + "Ethernet304": { + "index": "39,39,39,39,39,39,39,39", + "lanes": "304,305,306,307,308,309,310,311", + "breakout_modes": { + "1x800G": ["etp39"], + "2x800G[400G]": ["etp39a", "etp39b"], + "4x400G[200G]": ["etp39a", "etp39b", "etp39c", "etp39d"], + "8x200G[100G]": ["etp39a", "etp39b", "etp39c", "etp39d", "etp39e", "etp39f", "etp39g", "etp39h"] + } + }, + "Ethernet312": { + "index": "40,40,40,40,40,40,40,40", + "lanes": "312,313,314,315,316,317,318,319", + "breakout_modes": { + "1x800G": ["etp40"], + "2x800G[400G]": ["etp40a", "etp40b"], + "4x400G[200G]": ["etp40a", "etp40b", "etp40c", "etp40d"], + "8x200G[100G]": ["etp40a", "etp40b", "etp40c", "etp40d", "etp40e", "etp40f", "etp40g", "etp40h"] + } + }, + "Ethernet320": { + "index": "41,41,41,41,41,41,41,41", + "lanes": "320,321,322,323,324,325,326,327", + "breakout_modes": { + "1x800G": ["etp41"], + "2x800G[400G]": ["etp41a", "etp41b"], + "4x400G[200G]": ["etp41a", "etp41b", "etp41c", "etp41d"], + "8x200G[100G]": ["etp41a", "etp41b", "etp41c", "etp41d", "etp41e", "etp41f", "etp41g", "etp41h"] + } + }, + "Ethernet328": { + "index": "42,42,42,42,42,42,42,42", + "lanes": "328,329,330,331,332,333,334,335", + "breakout_modes": { + "1x800G": ["etp42"], + "2x800G[400G]": ["etp42a", "etp42b"], + "4x400G[200G]": ["etp42a", "etp42b", "etp42c", "etp42d"], + "8x200G[100G]": ["etp42a", "etp42b", "etp42c", "etp42d", "etp42e", "etp42f", "etp42g", "etp42h"] + } + }, + "Ethernet336": { + "index": "43,43,43,43,43,43,43,43", + "lanes": "336,337,338,339,340,341,342,343", + "breakout_modes": { + "1x800G": ["etp43"], + "2x800G[400G]": ["etp43a", "etp43b"], + "4x400G[200G]": ["etp43a", "etp43b", "etp43c", "etp43d"], + "8x200G[100G]": ["etp43a", "etp43b", "etp43c", "etp43d", "etp43e", "etp43f", "etp43g", "etp43h"] + } + }, + "Ethernet344": { + "index": "44,44,44,44,44,44,44,44", + "lanes": "344,345,346,347,348,349,350,351", + "breakout_modes": { + "1x800G": ["etp44"], + "2x800G[400G]": ["etp44a", "etp44b"], + "4x400G[200G]": ["etp44a", "etp44b", "etp44c", "etp44d"], + "8x200G[100G]": ["etp44a", "etp44b", "etp44c", "etp44d", "etp44e", "etp44f", "etp44g", "etp44h"] + } + }, + "Ethernet352": { + "index": "45,45,45,45,45,45,45,45", + "lanes": "352,353,354,355,356,357,358,359", + "breakout_modes": { + "1x800G": ["etp45"], + "2x800G[400G]": ["etp45a", "etp45b"], + "4x400G[200G]": ["etp45a", "etp45b", "etp45c", "etp45d"], + "8x200G[100G]": ["etp45a", "etp45b", "etp45c", "etp45d", "etp45e", "etp45f", "etp45g", "etp45h"] + } + }, + "Ethernet360": { + "index": "46,46,46,46,46,46,46,46", + "lanes": "360,361,362,363,364,365,366,367", + "breakout_modes": { + "1x800G": ["etp46"], + "2x800G[400G]": ["etp46a", "etp46b"], + "4x400G[200G]": ["etp46a", "etp46b", "etp46c", "etp46d"], + "8x200G[100G]": ["etp46a", "etp46b", "etp46c", "etp46d", "etp46e", "etp46f", "etp46g", "etp46h"] + } + }, + "Ethernet368": { + "index": "47,47,47,47,47,47,47,47", + "lanes": "368,369,370,371,372,373,374,375", + "breakout_modes": { + "1x800G": ["etp47"], + "2x800G[400G]": ["etp47a", "etp47b"], + "4x400G[200G]": ["etp47a", "etp47b", "etp47c", "etp47d"], + "8x200G[100G]": ["etp47a", "etp47b", "etp47c", "etp47d", "etp47e", "etp47f", "etp47g", "etp47h"] + } + }, + "Ethernet376": { + "index": "48,48,48,48,48,48,48,48", + "lanes": "376,377,378,379,380,381,382,383", + "breakout_modes": { + "1x800G": ["etp48"], + "2x800G[400G]": ["etp48a", "etp48b"], + "4x400G[200G]": ["etp48a", "etp48b", "etp48c", "etp48d"], + "8x200G[100G]": ["etp48a", "etp48b", "etp48c", "etp48d", "etp48e", "etp48f", "etp48g", "etp48h"] + } + }, + "Ethernet384": { + "index": "49,49,49,49,49,49,49,49", + "lanes": "384,385,386,387,388,389,390,391", + "breakout_modes": { + "1x800G": ["etp49"], + "2x800G[400G]": ["etp49a", "etp49b"], + "4x400G[200G]": ["etp49a", "etp49b", "etp49c", "etp49d"], + "8x200G[100G]": ["etp49a", "etp49b", "etp49c", "etp49d", "etp49e", "etp49f", "etp49g", "etp49h"] + } + }, + "Ethernet392": { + "index": "50,50,50,50,50,50,50,50", + "lanes": "392,393,394,395,396,397,398,399", + "breakout_modes": { + "1x800G": ["etp50"], + "2x800G[400G]": ["etp50a", "etp50b"], + "4x400G[200G]": ["etp50a", "etp50b", "etp50c", "etp50d"], + "8x200G[100G]": ["etp50a", "etp50b", "etp50c", "etp50d", "etp50e", "etp50f", "etp50g", "etp50h"] + } + }, + "Ethernet400": { + "index": "51,51,51,51,51,51,51,51", + "lanes": "400,401,402,403,404,405,406,407", + "breakout_modes": { + "1x800G": ["etp51"], + "2x800G[400G]": ["etp51a", "etp51b"], + "4x400G[200G]": ["etp51a", "etp51b", "etp51c", "etp51d"], + "8x200G[100G]": ["etp51a", "etp51b", "etp51c", "etp51d", "etp51e", "etp51f", "etp51g", "etp51h"] + } + }, + "Ethernet408": { + "index": "52,52,52,52,52,52,52,52", + "lanes": "408,409,410,411,412,413,414,415", + "breakout_modes": { + "1x800G": ["etp52"], + "2x800G[400G]": ["etp52a", "etp52b"], + "4x400G[200G]": ["etp52a", "etp52b", "etp52c", "etp52d"], + "8x200G[100G]": ["etp52a", "etp52b", "etp52c", "etp52d", "etp52e", "etp52f", "etp52g", "etp52h"] + } + }, + "Ethernet416": { + "index": "53,53,53,53,53,53,53,53", + "lanes": "416,417,418,419,420,421,422,423", + "breakout_modes": { + "1x800G": ["etp53"], + "2x800G[400G]": ["etp53a", "etp53b"], + "4x400G[200G]": ["etp53a", "etp53b", "etp53c", "etp53d"], + "8x200G[100G]": ["etp53a", "etp53b", "etp53c", "etp53d", "etp53e", "etp53f", "etp53g", "etp53h"] + } + }, + "Ethernet424": { + "index": "54,54,54,54,54,54,54,54", + "lanes": "424,425,426,427,428,429,430,431", + "breakout_modes": { + "1x800G": ["etp54"], + "2x800G[400G]": ["etp54a", "etp54b"], + "4x400G[200G]": ["etp54a", "etp54b", "etp54c", "etp54d"], + "8x200G[100G]": ["etp54a", "etp54b", "etp54c", "etp54d", "etp54e", "etp54f", "etp54g", "etp54h"] + } + }, + "Ethernet432": { + "index": "55,55,55,55,55,55,55,55", + "lanes": "432,433,434,435,436,437,438,439", + "breakout_modes": { + "1x800G": ["etp55"], + "2x800G[400G]": ["etp55a", "etp55b"], + "4x400G[200G]": ["etp55a", "etp55b", "etp55c", "etp55d"], + "8x200G[100G]": ["etp55a", "etp55b", "etp55c", "etp55d", "etp55e", "etp55f", "etp55g", "etp55h"] + } + }, + "Ethernet440": { + "index": "56,56,56,56,56,56,56,56", + "lanes": "440,441,442,443,444,445,446,447", + "breakout_modes": { + "1x800G": ["etp56"], + "2x800G[400G]": ["etp56a", "etp56b"], + "4x400G[200G]": ["etp56a", "etp56b", "etp56c", "etp56d"], + "8x200G[100G]": ["etp56a", "etp56b", "etp56c", "etp56d", "etp56e", "etp56f", "etp56g", "etp56h"] + } + }, + "Ethernet448": { + "index": "57,57,57,57,57,57,57,57", + "lanes": "448,449,450,451,452,453,454,455", + "breakout_modes": { + "1x800G": ["etp57"], + "2x800G[400G]": ["etp57a", "etp57b"], + "4x400G[200G]": ["etp57a", "etp57b", "etp57c", "etp57d"], + "8x200G[100G]": ["etp57a", "etp57b", "etp57c", "etp57d", "etp57e", "etp57f", "etp57g", "etp57h"] + } + }, + "Ethernet456": { + "index": "58,58,58,58,58,58,58,58", + "lanes": "456,457,458,459,460,461,462,463", + "breakout_modes": { + "1x800G": ["etp58"], + "2x800G[400G]": ["etp58a", "etp58b"], + "4x400G[200G]": ["etp58a", "etp58b", "etp58c", "etp58d"], + "8x200G[100G]": ["etp58a", "etp58b", "etp58c", "etp58d", "etp58e", "etp58f", "etp58g", "etp58h"] + } + }, + "Ethernet464": { + "index": "59,59,59,59,59,59,59,59", + "lanes": "464,465,466,467,468,469,470,471", + "breakout_modes": { + "1x800G": ["etp59"], + "2x800G[400G]": ["etp59a", "etp59b"], + "4x400G[200G]": ["etp59a", "etp59b", "etp59c", "etp59d"], + "8x200G[100G]": ["etp59a", "etp59b", "etp59c", "etp59d", "etp59e", "etp59f", "etp59g", "etp59h"] + } + }, + "Ethernet472": { + "index": "60,60,60,60,60,60,60,60", + "lanes": "472,473,474,475,476,477,478,479", + "breakout_modes": { + "1x800G": ["etp60"], + "2x800G[400G]": ["etp60a", "etp60b"], + "4x400G[200G]": ["etp60a", "etp60b", "etp60c", "etp60d"], + "8x200G[100G]": ["etp60a", "etp60b", "etp60c", "etp60d", "etp60e", "etp60f", "etp60g", "etp60h"] + } + }, + "Ethernet480": { + "index": "61,61,61,61,61,61,61,61", + "lanes": "480,481,482,483,484,485,486,487", + "breakout_modes": { + "1x800G": ["etp61"], + "2x800G[400G]": ["etp61a", "etp61b"], + "4x400G[200G]": ["etp61a", "etp61b", "etp61c", "etp61d"], + "8x200G[100G]": ["etp61a", "etp61b", "etp61c", "etp61d", "etp61e", "etp61f", "etp61g", "etp61h"] + } + }, + "Ethernet488": { + "index": "62,62,62,62,62,62,62,62", + "lanes": "488,489,490,491,492,493,494,495", + "breakout_modes": { + "1x800G": ["etp62"], + "2x800G[400G]": ["etp62a", "etp62b"], + "4x400G[200G]": ["etp62a", "etp62b", "etp62c", "etp62d"], + "8x200G[100G]": ["etp62a", "etp62b", "etp62c", "etp62d", "etp62e", "etp62f", "etp62g", "etp62h"] + } + }, + "Ethernet496": { + "index": "63,63,63,63,63,63,63,63", + "lanes": "496,497,498,499,500,501,502,503", + "breakout_modes": { + "1x800G": ["etp63"], + "2x800G[400G]": ["etp63a", "etp63b"], + "4x400G[200G]": ["etp63a", "etp63b", "etp63c", "etp63d"], + "8x200G[100G]": ["etp63a", "etp63b", "etp63c", "etp63d", "etp63e", "etp63f", "etp63g", "etp63h"] + } + }, + "Ethernet504": { + "index": "64,64,64,64,64,64,64,64", + "lanes": "504,505,506,507,508,509,510,511", + "breakout_modes": { + "1x800G": ["etp64"], + "2x800G[400G]": ["etp64a", "etp64b"], + "4x400G[200G]": ["etp64a", "etp64b", "etp64c", "etp64d"], + "8x200G[100G]": ["etp64a", "etp64b", "etp64c", "etp64d", "etp64e", "etp64f", "etp64g", "etp64h"] + } + }, + "Ethernet512": { + "index": "65,65", + "lanes": "512,513", + "breakout_modes": { + "2x100G": ["etp65a", "etp65b"] + } + } + } +} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_asic b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_asic new file mode 100644 index 00000000000..70c07488555 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_asic @@ -0,0 +1 @@ +mellanox diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_components.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_components.json new file mode 100644 index 00000000000..e3d40ebf64b --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_components.json @@ -0,0 +1,16 @@ +{ + "chassis": { + "SN6600_LD": { + "component": { + "ONIE": { }, + "SSD": { }, + "BIOS": { }, + "CPLD1": { }, + "CPLD2": { }, + "CPLD3": { }, + "CPLD4": { }, + "BMC": {} + } + } + } +} \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_wait b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_wait new file mode 100755 index 00000000000..2f6b63900b9 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_wait @@ -0,0 +1,3 @@ +#!/bin/bash + +sleep 60 \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pmon_daemon_control.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pmon_daemon_control.json new file mode 100644 index 00000000000..ca8217157e9 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pmon_daemon_control.json @@ -0,0 +1,7 @@ +{ + "skip_ledd": true, + "thermalctld": { + "enable_liquid_cooling": true, + "liquid_cooling_update_interval": 0.5 + } +} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pmon_immediate_start b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pmon_immediate_start new file mode 100644 index 00000000000..e69de29bb2d diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pre_reboot_hook b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pre_reboot_hook new file mode 120000 index 00000000000..6fc31078ee8 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/psu_sensors.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/psu_sensors.json new file mode 120000 index 00000000000..5816694317d --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/psu_sensors.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/psu_sensors.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/psu_sensors_conf_updater b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/psu_sensors_conf_updater new file mode 120000 index 00000000000..b9686d838e0 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/psu_sensors_conf_updater @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/psu_sensors_conf_updater \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/system_health_monitoring_config.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/system_health_monitoring_config.json new file mode 100644 index 00000000000..cbe2d9a922a --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/system_health_monitoring_config.json @@ -0,0 +1,12 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": ["psu","fan"], + "user_defined_checkers": [], + "include_devices": ["liquid_cooling"], + "polling_interval": 60, + "led_color": { + "fault": "orange", + "normal": "green", + "booting": "orange_blink" + } +} diff --git a/device/mellanox/x86_64-nvidia_sn6600_ld-r0/thermal_policy.json b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/thermal_policy.json new file mode 120000 index 00000000000..5a25cd87f70 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_ld-r0/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/thermal_policy.json \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn6600_simx-r0/create_only_config_db_buffers.json b/device/mellanox/x86_64-nvidia_sn6600_simx-r0/create_only_config_db_buffers.json new file mode 120000 index 00000000000..87e12387fcd --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn6600_simx-r0/create_only_config_db_buffers.json @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/create_only_config_db_buffers.json \ No newline at end of file diff --git a/device/nexthop/x86_64-nexthop_4010-r0/pddf/pd-plugin.json b/device/nexthop/x86_64-nexthop_4010-r0/pddf/pd-plugin.json index 9180d4c3677..a85140b2a14 100644 --- a/device/nexthop/x86_64-nexthop_4010-r0/pddf/pd-plugin.json +++ b/device/nexthop/x86_64-nexthop_4010-r0/pddf/pd-plugin.json @@ -44,7 +44,9 @@ } } }, - "PSU_FAN_MAX_SPEED": "32500" + "PSU_FAN_MAX_SPEED_MAP": { + "default": "32500" + } }, "FAN": { "present": { diff --git a/device/nexthop/x86_64-nexthop_4010-r0/pddf/pddf-device.json.j2 b/device/nexthop/x86_64-nexthop_4010-r0/pddf/pddf-device.json.j2 index b7cab9e0686..14245a39638 100644 --- a/device/nexthop/x86_64-nexthop_4010-r0/pddf/pddf-device.json.j2 +++ b/device/nexthop/x86_64-nexthop_4010-r0/pddf/pddf-device.json.j2 @@ -1987,8 +1987,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_serial_num", @@ -1996,8 +1995,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "14" + "attr_cmpval": "0x00" }, { "attr_name": "psu_mfr_id", @@ -2005,8 +2003,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "11" + "attr_cmpval": "0x00" }, { "attr_name": "psu_fan_dir", @@ -2014,8 +2011,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_p_out", @@ -2252,8 +2248,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_serial_num", @@ -2261,8 +2256,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "14" + "attr_cmpval": "0x00" }, { "attr_name": "psu_mfr_id", @@ -2270,8 +2264,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "11" + "attr_cmpval": "0x00" }, { "attr_name": "psu_fan_dir", @@ -2279,8 +2272,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_p_out", diff --git a/device/nexthop/x86_64-nexthop_4220-r0/pddf/pd-plugin.json b/device/nexthop/x86_64-nexthop_4220-r0/pddf/pd-plugin.json index cd2e97224ea..2d6bf0648be 100644 --- a/device/nexthop/x86_64-nexthop_4220-r0/pddf/pd-plugin.json +++ b/device/nexthop/x86_64-nexthop_4220-r0/pddf/pd-plugin.json @@ -39,12 +39,17 @@ "psu_fan_dir": { "i2c": { "valmap": { - "TEC5200-54-074NA": "exhaust" + "TEC5200-54-074NA": "exhaust", + "TDPS-5200CB A": "exhaust" } } }, - "PSU_FAN_MAX_SPEED": "29975" - }, + "PSU_FAN_MAX_SPEED_MAP": { + "TEC5200-54-074NA": "29975", + "TDPS-5200CB A": "36000", + "default": "36000" + } + }, "FAN": { "present": { "i2c": { diff --git a/device/nexthop/x86_64-nexthop_4220-r0/pddf/pddf-device.json.j2 b/device/nexthop/x86_64-nexthop_4220-r0/pddf/pddf-device.json.j2 index 683b1e83c3a..53f6b1e80ff 100644 --- a/device/nexthop/x86_64-nexthop_4220-r0/pddf/pddf-device.json.j2 +++ b/device/nexthop/x86_64-nexthop_4220-r0/pddf/pddf-device.json.j2 @@ -1306,10 +1306,10 @@ "attr_list": [ { "attr_name": "psu_present", "attr_devtype": "multifpgapci", "attr_devname": "SWITCHCARD_FPGA", "attr_offset": "0x2c", "attr_mask": "0x400", "attr_cmpval": "0x400","attr_len": "1" }, { "attr_name": "psu_power_good", "attr_devtype": "multifpgapci", "attr_devname": "SWITCHCARD_FPGA", "attr_offset": "0x2c", "attr_mask": "0x1000", "attr_cmpval": "0x1000","attr_len": "1" }, - { "attr_name": "psu_model_name", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "18" }, - { "attr_name": "psu_serial_num", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "21" }, - { "attr_name": "psu_mfr_id", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "5" }, - { "attr_name": "psu_fan_dir", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "18" }, + { "attr_name": "psu_model_name", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00" }, + { "attr_name": "psu_serial_num", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", "attr_cmpval": "0x00" }, + { "attr_name": "psu_mfr_id", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", "attr_cmpval": "0x00" }, + { "attr_name": "psu_fan_dir", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00" }, { "attr_name": "psu_p_out", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x96", "attr_mask": "0x0", "attr_cmpval": "0xff", "attr_len": "2" }, { "attr_name": "psu_v_out", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x8b", "attr_mask": "0x0", "attr_cmpval": "0xff", "attr_data_format": "linear16", "attr_len": "2" }, { "attr_name": "psu_i_out", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x8c", "attr_mask": "0x0", "attr_cmpval": "0xff", "attr_len": "2" }, @@ -1356,10 +1356,10 @@ "attr_list": [ { "attr_name": "psu_present", "attr_devtype": "multifpgapci", "attr_devname": "SWITCHCARD_FPGA", "attr_offset": "0x2c", "attr_mask": "0x800", "attr_cmpval": "0x800","attr_len": "1" }, { "attr_name": "psu_power_good", "attr_devtype": "multifpgapci", "attr_devname": "SWITCHCARD_FPGA", "attr_offset": "0x2c", "attr_mask": "0x2000", "attr_cmpval": "0x2000","attr_len": "1" }, - { "attr_name": "psu_model_name", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "18" }, - { "attr_name": "psu_serial_num", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "21" }, - { "attr_name": "psu_mfr_id", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "3" }, - { "attr_name": "psu_fan_dir", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00", "attr_len": "18" }, + { "attr_name": "psu_model_name", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00" }, + { "attr_name": "psu_serial_num", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", "attr_cmpval": "0x00" }, + { "attr_name": "psu_mfr_id", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", "attr_cmpval": "0x00" }, + { "attr_name": "psu_fan_dir", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", "attr_cmpval": "0x00" }, { "attr_name": "psu_p_out", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x96", "attr_mask": "0x0", "attr_cmpval": "0xff", "attr_len": "2" }, { "attr_name": "psu_v_out", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x8b", "attr_mask": "0x0", "attr_cmpval": "0xff", "attr_data_format": "linear16", "attr_len": "2" }, { "attr_name": "psu_i_out", "attr_devaddr": "0x58", "attr_devtype": "pmbus", "attr_offset": "0x8c", "attr_mask": "0x0", "attr_cmpval": "0xff", "attr_len": "2" }, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/nh5010-default.bcm b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/nh5010-default.bcm index 9cbf34dcc03..14c1b0f212b 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/nh5010-default.bcm +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/nh5010-default.bcm @@ -2264,6 +2264,7 @@ eventor_sbus_dma_channels.BCM8887X=0,24,0,25,1,24,1,25 sai_default_cpu_tx_tc=7 #macsec properties +macsec_fips_enable=1 xflow_macsec_secure_chan_to_num_secure_assoc=4 xflow_macsec_secure_chan_to_num_secure_assoc_encrypt=2 xflow_macsec_secure_chan_to_num_secure_assoc_decrypt=4 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy0_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy0_config.json index ee37cbbd040..cbdf6a798d7 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy0_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy0_config.json @@ -17,12 +17,12 @@ "index": 1, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 2, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy10_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy10_config.json index 3c34abfcf13..5be180ecf32 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy10_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy10_config.json @@ -17,12 +17,12 @@ "index": 21, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 22, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy11_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy11_config.json index 27b9093d3e9..deab788f8ac 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy11_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy11_config.json @@ -17,12 +17,12 @@ "index": 23, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 24, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy12_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy12_config.json index 7a86e2e6cab..56493b2b11a 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy12_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy12_config.json @@ -17,12 +17,12 @@ "index": 25, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 26, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy13_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy13_config.json index 7681ea41225..9a5082b2d33 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy13_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy13_config.json @@ -17,12 +17,12 @@ "index": 27, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 28, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy14_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy14_config.json index baea6786b00..294440876ab 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy14_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy14_config.json @@ -17,12 +17,12 @@ "index": 29, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 30, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy15_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy15_config.json index ceaf8316068..d6730b4983c 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy15_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy15_config.json @@ -17,12 +17,12 @@ "index": 31, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 32, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy1_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy1_config.json index 0b60062de60..83f5a0da05a 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy1_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy1_config.json @@ -17,12 +17,12 @@ "index": 3, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 4, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy2_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy2_config.json index ef24b3a544d..ecc23677138 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy2_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy2_config.json @@ -17,12 +17,12 @@ "index": 5, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 6, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy3_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy3_config.json index d7024a0fe39..9cfced32e73 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy3_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy3_config.json @@ -17,12 +17,12 @@ "index": 7, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 8, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy4_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy4_config.json index 788f2e41eb7..5a98a4de3f3 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy4_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy4_config.json @@ -17,12 +17,12 @@ "index": 9, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 10, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy5_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy5_config.json index 937a78a1076..10037bdf281 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy5_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy5_config.json @@ -17,12 +17,12 @@ "index": 11, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 12, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy6_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy6_config.json index b25a51abd46..1be93eaa2bc 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy6_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy6_config.json @@ -17,12 +17,12 @@ "index": 13, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 14, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy7_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy7_config.json index 300080664f0..be51349612f 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy7_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy7_config.json @@ -17,12 +17,12 @@ "index": 15, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 16, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy8_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy8_config.json index 350994b955a..e94e980540e 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy8_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy8_config.json @@ -17,12 +17,12 @@ "index": 17, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 18, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy9_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy9_config.json index 88c6aa6d205..3414525d2c2 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy9_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/phy9_config.json @@ -17,12 +17,12 @@ "index": 19, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 20, "mdio_addr": "0", "system_speed": 50000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 25000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/port_config.ini b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/port_config.ini index 014dce23d9c..97890f6dd8e 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/port_config.ini +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/port_config.ini @@ -1,68 +1,68 @@ -# name lanes alias index role speed asic_port_name core_id core_port_id num_voq -Ethernet0 96,97 etp1 1 Ext 100000 Eth0 3 1 8 -Ethernet4 100,101 etp2 2 Ext 100000 Eth4 3 5 8 -Ethernet8 104,105 etp3 3 Ext 100000 Eth8 3 9 8 -Ethernet12 108,109 etp4 4 Ext 100000 Eth12 3 13 8 -Ethernet16 112,113 etp5 5 Ext 100000 Eth16 3 17 8 -Ethernet20 116,117 etp6 6 Ext 100000 Eth20 3 21 8 -Ethernet24 120,121 etp7 7 Ext 100000 Eth24 3 25 8 -Ethernet28 124,125 etp8 8 Ext 100000 Eth28 3 29 8 -Ethernet32 56,57 etp9 9 Ext 100000 Eth32 1 25 8 -Ethernet36 60,61 etp10 10 Ext 100000 Eth36 1 29 8 -Ethernet40 48,49 etp11 11 Ext 100000 Eth40 1 17 8 -Ethernet44 52,53 etp12 12 Ext 100000 Eth44 1 21 8 -Ethernet48 40,41 etp13 13 Ext 100000 Eth48 1 9 8 -Ethernet52 44,45 etp14 14 Ext 100000 Eth52 1 13 8 -Ethernet56 32,33 etp15 15 Ext 100000 Eth56 1 1 8 -Ethernet60 36,37 etp16 16 Ext 100000 Eth60 1 5 8 -Ethernet64 128,129 etp17 17 Ext 100000 Eth64 4 1 8 -Ethernet68 132,133 etp18 18 Ext 100000 Eth68 4 5 8 -Ethernet72 136,137 etp19 19 Ext 100000 Eth72 4 9 8 -Ethernet76 140,141 etp20 20 Ext 100000 Eth76 4 13 8 -Ethernet80 144,145 etp21 21 Ext 100000 Eth80 4 17 8 -Ethernet84 148,149 etp22 22 Ext 100000 Eth84 4 21 8 -Ethernet88 152,153 etp23 23 Ext 100000 Eth88 4 25 8 -Ethernet92 156,157 etp24 24 Ext 100000 Eth92 4 29 8 -Ethernet96 216,217 etp25 25 Ext 100000 Eth96 6 25 8 -Ethernet100 220,221 etp26 26 Ext 100000 Eth100 6 29 8 -Ethernet104 208,209 etp27 27 Ext 100000 Eth104 6 17 8 -Ethernet108 212,213 etp28 28 Ext 100000 Eth108 6 21 8 -Ethernet112 200,201 etp29 29 Ext 100000 Eth112 6 9 8 -Ethernet116 204,205 etp30 30 Ext 100000 Eth116 6 13 8 -Ethernet120 192,193 etp31 31 Ext 100000 Eth120 6 1 8 -Ethernet124 196,197 etp32 32 Ext 100000 Eth124 6 5 8 -Ethernet128 64,65,66,67 etp33 33 Ext 400000 Eth128 2 1 8 -Ethernet132 68,69,70,71 etp34 34 Ext 400000 Eth132 2 5 8 -Ethernet136 72,73,74,75 etp35 35 Ext 400000 Eth136 2 9 8 -Ethernet140 76,77,78,79 etp36 36 Ext 400000 Eth140 2 13 8 -Ethernet144 80,81,82,83 etp37 37 Ext 400000 Eth144 2 17 8 -Ethernet148 84,85,86,87 etp38 38 Ext 400000 Eth148 2 21 8 -Ethernet152 88,89,90,91 etp39 39 Ext 400000 Eth152 2 25 8 -Ethernet156 92,93,94,95 etp40 40 Ext 400000 Eth156 2 29 8 -Ethernet160 24,25,26,27 etp41 41 Ext 400000 Eth160 0 25 8 -Ethernet164 28,29,30,31 etp42 42 Ext 400000 Eth164 0 29 8 -Ethernet168 16,17,18,19 etp43 43 Ext 400000 Eth168 0 17 8 -Ethernet172 20,21,22,23 etp44 44 Ext 400000 Eth172 0 21 8 -Ethernet176 8,9,10,11 etp45 45 Ext 400000 Eth176 0 9 8 -Ethernet180 12,13,14,15 etp46 46 Ext 400000 Eth180 0 13 8 -Ethernet184 0,1,2,3 etp47 47 Ext 400000 Eth184 0 1 8 -Ethernet188 4,5,6,7 etp48 48 Ext 400000 Eth188 0 5 8 -Ethernet192 160,161,162,163 etp49 49 Ext 400000 Eth192 5 1 8 -Ethernet196 164,165,166,167 etp50 50 Ext 400000 Eth196 5 5 8 -Ethernet200 168,169,170,171 etp51 51 Ext 400000 Eth200 5 9 8 -Ethernet204 172,173,174,175 etp52 52 Ext 400000 Eth204 5 13 8 -Ethernet208 176,177,178,179 etp53 53 Ext 400000 Eth208 5 17 8 -Ethernet212 180,181,182,183 etp54 54 Ext 400000 Eth212 5 21 8 -Ethernet216 184,185,186,187 etp55 55 Ext 400000 Eth216 5 25 8 -Ethernet220 188,189,190,191 etp56 56 Ext 400000 Eth220 5 29 8 -Ethernet224 248,249,250,251 etp57 57 Ext 400000 Eth224 7 25 8 -Ethernet228 252,253,254,255 etp58 58 Ext 400000 Eth228 7 29 8 -Ethernet232 240,241,242,243 etp59 59 Ext 400000 Eth232 7 17 8 -Ethernet236 244,245,246,247 etp60 60 Ext 400000 Eth236 7 21 8 -Ethernet240 232,233,234,235 etp61 61 Ext 400000 Eth240 7 9 8 -Ethernet244 236,237,238,239 etp62 62 Ext 400000 Eth244 7 13 8 -Ethernet248 224,225,226,227 etp63 63 Ext 400000 Eth248 7 1 8 -Ethernet252 228,229,230,231 etp64 64 Ext 400000 Eth252 7 5 8 -Ethernet256 256,257,258,259 etp65 65 Ext 100000 Eth256 2 33 8 -Ethernet260 260,261,262,263 etp66 66 Ext 100000 Eth260 6 33 8 -Ethernet-Rec0 621 Recirc0 67 Rec 400000 Rcy0 0 221 8 +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq fec +Ethernet0 96,97 etp1 1 Ext 100000 Eth0 3 1 8 rs +Ethernet4 100,101 etp2 2 Ext 100000 Eth4 3 5 8 rs +Ethernet8 104,105 etp3 3 Ext 100000 Eth8 3 9 8 rs +Ethernet12 108,109 etp4 4 Ext 100000 Eth12 3 13 8 rs +Ethernet16 112,113 etp5 5 Ext 100000 Eth16 3 17 8 rs +Ethernet20 116,117 etp6 6 Ext 100000 Eth20 3 21 8 rs +Ethernet24 120,121 etp7 7 Ext 100000 Eth24 3 25 8 rs +Ethernet28 124,125 etp8 8 Ext 100000 Eth28 3 29 8 rs +Ethernet32 56,57 etp9 9 Ext 100000 Eth32 1 25 8 rs +Ethernet36 60,61 etp10 10 Ext 100000 Eth36 1 29 8 rs +Ethernet40 48,49 etp11 11 Ext 100000 Eth40 1 17 8 rs +Ethernet44 52,53 etp12 12 Ext 100000 Eth44 1 21 8 rs +Ethernet48 40,41 etp13 13 Ext 100000 Eth48 1 9 8 rs +Ethernet52 44,45 etp14 14 Ext 100000 Eth52 1 13 8 rs +Ethernet56 32,33 etp15 15 Ext 100000 Eth56 1 1 8 rs +Ethernet60 36,37 etp16 16 Ext 100000 Eth60 1 5 8 rs +Ethernet64 128,129 etp17 17 Ext 100000 Eth64 4 1 8 rs +Ethernet68 132,133 etp18 18 Ext 100000 Eth68 4 5 8 rs +Ethernet72 136,137 etp19 19 Ext 100000 Eth72 4 9 8 rs +Ethernet76 140,141 etp20 20 Ext 100000 Eth76 4 13 8 rs +Ethernet80 144,145 etp21 21 Ext 100000 Eth80 4 17 8 rs +Ethernet84 148,149 etp22 22 Ext 100000 Eth84 4 21 8 rs +Ethernet88 152,153 etp23 23 Ext 100000 Eth88 4 25 8 rs +Ethernet92 156,157 etp24 24 Ext 100000 Eth92 4 29 8 rs +Ethernet96 216,217 etp25 25 Ext 100000 Eth96 6 25 8 rs +Ethernet100 220,221 etp26 26 Ext 100000 Eth100 6 29 8 rs +Ethernet104 208,209 etp27 27 Ext 100000 Eth104 6 17 8 rs +Ethernet108 212,213 etp28 28 Ext 100000 Eth108 6 21 8 rs +Ethernet112 200,201 etp29 29 Ext 100000 Eth112 6 9 8 rs +Ethernet116 204,205 etp30 30 Ext 100000 Eth116 6 13 8 rs +Ethernet120 192,193 etp31 31 Ext 100000 Eth120 6 1 8 rs +Ethernet124 196,197 etp32 32 Ext 100000 Eth124 6 5 8 rs +Ethernet128 64,65,66,67 etp33 33 Ext 400000 Eth128 2 1 8 rs +Ethernet132 68,69,70,71 etp34 34 Ext 400000 Eth132 2 5 8 rs +Ethernet136 72,73,74,75 etp35 35 Ext 400000 Eth136 2 9 8 rs +Ethernet140 76,77,78,79 etp36 36 Ext 400000 Eth140 2 13 8 rs +Ethernet144 80,81,82,83 etp37 37 Ext 400000 Eth144 2 17 8 rs +Ethernet148 84,85,86,87 etp38 38 Ext 400000 Eth148 2 21 8 rs +Ethernet152 88,89,90,91 etp39 39 Ext 400000 Eth152 2 25 8 rs +Ethernet156 92,93,94,95 etp40 40 Ext 400000 Eth156 2 29 8 rs +Ethernet160 24,25,26,27 etp41 41 Ext 400000 Eth160 0 25 8 rs +Ethernet164 28,29,30,31 etp42 42 Ext 400000 Eth164 0 29 8 rs +Ethernet168 16,17,18,19 etp43 43 Ext 400000 Eth168 0 17 8 rs +Ethernet172 20,21,22,23 etp44 44 Ext 400000 Eth172 0 21 8 rs +Ethernet176 8,9,10,11 etp45 45 Ext 400000 Eth176 0 9 8 rs +Ethernet180 12,13,14,15 etp46 46 Ext 400000 Eth180 0 13 8 rs +Ethernet184 0,1,2,3 etp47 47 Ext 400000 Eth184 0 1 8 rs +Ethernet188 4,5,6,7 etp48 48 Ext 400000 Eth188 0 5 8 rs +Ethernet192 160,161,162,163 etp49 49 Ext 400000 Eth192 5 1 8 rs +Ethernet196 164,165,166,167 etp50 50 Ext 400000 Eth196 5 5 8 rs +Ethernet200 168,169,170,171 etp51 51 Ext 400000 Eth200 5 9 8 rs +Ethernet204 172,173,174,175 etp52 52 Ext 400000 Eth204 5 13 8 rs +Ethernet208 176,177,178,179 etp53 53 Ext 400000 Eth208 5 17 8 rs +Ethernet212 180,181,182,183 etp54 54 Ext 400000 Eth212 5 21 8 rs +Ethernet216 184,185,186,187 etp55 55 Ext 400000 Eth216 5 25 8 rs +Ethernet220 188,189,190,191 etp56 56 Ext 400000 Eth220 5 29 8 rs +Ethernet224 248,249,250,251 etp57 57 Ext 400000 Eth224 7 25 8 rs +Ethernet228 252,253,254,255 etp58 58 Ext 400000 Eth228 7 29 8 rs +Ethernet232 240,241,242,243 etp59 59 Ext 400000 Eth232 7 17 8 rs +Ethernet236 244,245,246,247 etp60 60 Ext 400000 Eth236 7 21 8 rs +Ethernet240 232,233,234,235 etp61 61 Ext 400000 Eth240 7 9 8 rs +Ethernet244 236,237,238,239 etp62 62 Ext 400000 Eth244 7 13 8 rs +Ethernet248 224,225,226,227 etp63 63 Ext 400000 Eth248 7 1 8 rs +Ethernet252 228,229,230,231 etp64 64 Ext 400000 Eth252 7 5 8 rs +Ethernet256 256,257,258,259 etp65 65 Ext 100000 Eth256 2 33 8 rs +Ethernet260 260,261,262,263 etp66 66 Ext 100000 Eth260 6 33 8 rs +Ethernet-Rec0 621 Recirc0 67 Rec 400000 Rcy0 0 221 8 none diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 index 82b04ee679e..e59e13a92a9 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/buffers_defaults_t2.j2 @@ -25,17 +25,17 @@ {%- macro generate_buffer_pool_and_profiles() %} "BUFFER_POOL": { "ingress_lossless_pool": { - "size": "56441610000", + "size": "25766440000", "type": "both", "mode": "dynamic", - "xoff": "2822080500" + "xoff": "5301600256" } }, "BUFFER_PROFILE": { "ingress_lossy_profile": { "pool":"ingress_lossless_pool", "size":"0", - "xon_offset": "0", + "xon_offset": "0", "dynamic_th":"0" }, "egress_lossless_profile": { @@ -46,7 +46,7 @@ "egress_lossy_profile": { "pool":"ingress_lossless_pool", "size":"0", - "dynamic_th":"-4" + "dynamic_th":"-6" } }, {%- endmacro %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini index 3c93a65abb5..f66cbdba0e8 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/pg_profile_lookup.ini @@ -1,20 +1,11 @@ # PG lossless profiles. -# speed cable size xon xoff threshold xon_offset -25000 5m 18796 0 612140 0 3556 -25000 40m 18796 0 612140 0 3556 -25000 300m 18796 0 612140 0 3556 -100000 5m 18796 0 612140 0 3556 -100000 40m 18796 0 612140 0 3556 -100000 300m 18796 0 612140 0 3556 -200000 5m 18796 0 612140 0 3556 -200000 40m 18796 0 612140 0 3556 -200000 300m 18796 0 612140 0 3556 -400000 5m 18796 0 612140 0 3556 -400000 40m 18796 0 612140 0 3556 -400000 50m 18796 0 612140 0 3556 -400000 300m 18796 0 612140 0 3556 -400000 2000m 18796 0 612140 0 3556 -400000 120000m 18796 0 612140 0 3556 -800000 5m 18796 0 612140 0 3556 -800000 40m 18796 0 612140 0 3556 -800000 300m 18796 0 612140 0 3556 +# speed cable size xon xoff threshold xon_offset +100000 300m 0 0 98304 -6 363506 +100000 2000m 0 0 376832 -6 363506 +100000 120000m 0 0 19664896 -6 363506 +400000 300m 0 0 351232 -6 1454025 +400000 2000m 0 0 1384448 -6 1454025 +400000 120000m 0 0 82837504 -6 1454025 +800000 300m 0 0 577536 -6 1454025 +800000 2000m 0 0 2801664 -6 1454025 +800000 120000m 0 0 157122560 -6 1454025 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 index b28c251ad53..30474c5f980 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/BALANCED/qos.json.j2 @@ -9,4 +9,24 @@ {%- endfor %} {%- endmacro %} +{%- macro generate_wred_profiles() %} + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "10000000", + "green_min_threshold" : "2000000", + "yellow_max_threshold" : "10000000", + "yellow_min_threshold" : "2000000", + "red_max_threshold" : "10000000", + "red_min_threshold" : "2000000", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, +{%- endmacro %} + {%- include 'qos_config.j2' %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 index 463d5b1bb58..e59e13a92a9 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/buffers_defaults_t2.j2 @@ -2,6 +2,19 @@ {%- include 'buffer_ports.j2' %} +{%- set ports2cable = { + 'torrouter_server' : '300m', + 'leafrouter_torrouter' : '300m', + 'spinerouter_leafrouter' : '2000m', + 'upperspinerouter_spinerouter' : '50m', + 'upperspinerouter_lowerspinerouter' : '50m', + 'regionalhub_upperspinerouter': '120000m', + 'aznghub_upperspinerouter' : '120000m', + 'regionalhub_spinerouter': '120000m', + 'aznghub_spinerouter' : '120000m' + } +-%} + {%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %} {# Generate list of ports #} {%- for port_idx in range(256, 261, 4) %} @@ -11,42 +24,30 @@ {%- macro generate_buffer_pool_and_profiles() %} "BUFFER_POOL": { - "ingress_pool": { - "size": "56441610000", + "ingress_lossless_pool": { + "size": "25766440000", "type": "both", - "mode": "dynamic" + "mode": "dynamic", + "xoff": "5301600256" } }, "BUFFER_PROFILE": { "ingress_lossy_profile": { - "pool":"ingress_pool", + "pool":"ingress_lossless_pool", + "size":"0", + "xon_offset": "0", + "dynamic_th":"0" + }, + "egress_lossless_profile": { + "pool":"ingress_lossless_pool", "size":"0", - "dynamic_th":"3" + "dynamic_th":"-1" }, "egress_lossy_profile": { - "pool":"ingress_pool", + "pool":"ingress_lossless_pool", "size":"0", - "dynamic_th":"3" + "dynamic_th":"-6" } }, {%- endmacro %} -{%- macro generate_pg_profils(port_names_active) %} - "BUFFER_PG": { -{% for port in port_names_active.split(',') %} - "{{ port }}|0-7": { - "profile" : "ingress_lossy_profile" - }{% if not loop.last %},{% endif %} -{% endfor %} - }, -{%- endmacro %} - -{% macro generate_queue_buffers(port_names_active) %} - "BUFFER_QUEUE": { -{% for port in port_names_active.split(',') %} - "{{ port }}|0-7": { - "profile" : "egress_lossy_profile" - }{% if not loop.last %},{% endif %} -{% endfor %} - } -{% endmacro %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/nh5010-default.bcm b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/nh5010-default.bcm index 57634a371a7..7db790567a6 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/nh5010-default.bcm +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/nh5010-default.bcm @@ -2264,6 +2264,7 @@ eventor_sbus_dma_channels.BCM8887X=0,24,0,25,1,24,1,25 sai_default_cpu_tx_tc=7 #macsec properties +macsec_fips_enable=1 xflow_macsec_secure_chan_to_num_secure_assoc=4 xflow_macsec_secure_chan_to_num_secure_assoc_encrypt=2 xflow_macsec_secure_chan_to_num_secure_assoc_decrypt=4 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/pg_profile_lookup.ini b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/pg_profile_lookup.ini new file mode 100644 index 00000000000..f66cbdba0e8 --- /dev/null +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/pg_profile_lookup.ini @@ -0,0 +1,11 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset +100000 300m 0 0 98304 -6 363506 +100000 2000m 0 0 376832 -6 363506 +100000 120000m 0 0 19664896 -6 363506 +400000 300m 0 0 351232 -6 1454025 +400000 2000m 0 0 1384448 -6 1454025 +400000 120000m 0 0 82837504 -6 1454025 +800000 300m 0 0 577536 -6 1454025 +800000 2000m 0 0 2801664 -6 1454025 +800000 120000m 0 0 157122560 -6 1454025 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy0_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy0_config.json index 1f5c14635b7..041bd0e4d91 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy0_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy0_config.json @@ -17,12 +17,12 @@ "index": 1, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 2, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy10_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy10_config.json index 1d2586c9bab..9a97620cc2f 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy10_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy10_config.json @@ -17,12 +17,12 @@ "index": 21, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 22, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy11_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy11_config.json index 0b2aba262bf..30d99bb106d 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy11_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy11_config.json @@ -17,12 +17,12 @@ "index": 23, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 24, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy12_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy12_config.json index 397ea037c53..adafd68eb2a 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy12_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy12_config.json @@ -17,12 +17,12 @@ "index": 25, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 26, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy13_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy13_config.json index f10286d41a7..874876507ba 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy13_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy13_config.json @@ -17,12 +17,12 @@ "index": 27, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 28, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy14_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy14_config.json index 9d12f7af544..df47625bcd9 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy14_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy14_config.json @@ -17,12 +17,12 @@ "index": 29, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 30, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy15_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy15_config.json index b112d087e25..9c450ad30c4 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy15_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy15_config.json @@ -17,12 +17,12 @@ "index": 31, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 32, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy1_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy1_config.json index 2af2d426b3c..71dc17d8350 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy1_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy1_config.json @@ -17,12 +17,12 @@ "index": 3, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 4, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy2_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy2_config.json index 12a676effcc..b02c29549a7 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy2_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy2_config.json @@ -17,12 +17,12 @@ "index": 5, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 6, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy3_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy3_config.json index 2d4b763d1c1..9d982d00fcc 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy3_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy3_config.json @@ -17,12 +17,12 @@ "index": 7, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 8, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy4_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy4_config.json index 790f73e4211..da251681808 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy4_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy4_config.json @@ -17,12 +17,12 @@ "index": 9, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 10, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy5_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy5_config.json index 0985f78e3e0..21d52337cfe 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy5_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy5_config.json @@ -17,12 +17,12 @@ "index": 11, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 12, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy6_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy6_config.json index 8c101dc8366..677f49859dd 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy6_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy6_config.json @@ -17,12 +17,12 @@ "index": 13, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 14, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy7_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy7_config.json index 6aca433a6a7..74f53bb597e 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy7_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy7_config.json @@ -17,12 +17,12 @@ "index": 15, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 16, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy8_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy8_config.json index e24d582c70f..e08b8bb867e 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy8_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy8_config.json @@ -17,12 +17,12 @@ "index": 17, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 18, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy9_config.json b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy9_config.json index 612553a8a25..07e42c6a291 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy9_config.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/phy9_config.json @@ -17,12 +17,12 @@ "index": 19, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, @@ -38,12 +38,12 @@ "index": 20, "mdio_addr": "0", "system_speed": 100000, - "system_fec": "none", + "system_fec": "rs", "system_auto_neg": false, "system_loopback": "none", "system_training": false, "line_speed": 50000, - "line_fec": "none", + "line_fec": "rs", "line_auto_neg": false, "line_loopback": "none", "line_training": false, diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/port_config.ini b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/port_config.ini index 3871a6bb69e..40cbb283879 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/port_config.ini +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/port_config.ini @@ -1,68 +1,68 @@ -# name lanes alias index role speed asic_port_name core_id core_port_id num_voq -Ethernet0 96,97,98,99 etp1 1 Ext 400000 Eth0 3 1 8 -Ethernet4 100,101,102,103 etp2 2 Ext 400000 Eth4 3 5 8 -Ethernet8 104,105,106,107 etp3 3 Ext 400000 Eth8 3 9 8 -Ethernet12 108,109,110,111 etp4 4 Ext 400000 Eth12 3 13 8 -Ethernet16 112,113,114,115 etp5 5 Ext 400000 Eth16 3 17 8 -Ethernet20 116,117,118,119 etp6 6 Ext 400000 Eth20 3 21 8 -Ethernet24 120,121,122,123 etp7 7 Ext 400000 Eth24 3 25 8 -Ethernet28 124,125,126,127 etp8 8 Ext 400000 Eth28 3 29 8 -Ethernet32 56,57,58,59 etp9 9 Ext 400000 Eth32 1 25 8 -Ethernet36 60,61,62,63 etp10 10 Ext 400000 Eth36 1 29 8 -Ethernet40 48,49,50,51 etp11 11 Ext 400000 Eth40 1 17 8 -Ethernet44 52,53,54,55 etp12 12 Ext 400000 Eth44 1 21 8 -Ethernet48 40,41,42,43 etp13 13 Ext 400000 Eth48 1 9 8 -Ethernet52 44,45,46,47 etp14 14 Ext 400000 Eth52 1 13 8 -Ethernet56 32,33,34,35 etp15 15 Ext 400000 Eth56 1 1 8 -Ethernet60 36,37,38,39 etp16 16 Ext 400000 Eth60 1 5 8 -Ethernet64 128,129,130,131 etp17 17 Ext 400000 Eth64 4 1 8 -Ethernet68 132,133,134,135 etp18 18 Ext 400000 Eth68 4 5 8 -Ethernet72 136,137,138,139 etp19 19 Ext 400000 Eth72 4 9 8 -Ethernet76 140,141,142,143 etp20 20 Ext 400000 Eth76 4 13 8 -Ethernet80 144,145,146,147 etp21 21 Ext 400000 Eth80 4 17 8 -Ethernet84 148,149,150,151 etp22 22 Ext 400000 Eth84 4 21 8 -Ethernet88 152,153,154,155 etp23 23 Ext 400000 Eth88 4 25 8 -Ethernet92 156,157,158,159 etp24 24 Ext 400000 Eth92 4 29 8 -Ethernet96 216,217,218,219 etp25 25 Ext 400000 Eth96 6 25 8 -Ethernet100 220,221,222,223 etp26 26 Ext 400000 Eth100 6 29 8 -Ethernet104 208,209,210,211 etp27 27 Ext 400000 Eth104 6 17 8 -Ethernet108 212,213,214,215 etp28 28 Ext 400000 Eth108 6 21 8 -Ethernet112 200,201,202,203 etp29 29 Ext 400000 Eth112 6 9 8 -Ethernet116 204,205,206,207 etp30 30 Ext 400000 Eth116 6 13 8 -Ethernet120 192,193,194,195 etp31 31 Ext 400000 Eth120 6 1 8 -Ethernet124 196,197,198,199 etp32 32 Ext 400000 Eth124 6 5 8 -Ethernet128 64,65,66,67 etp33 33 Ext 400000 Eth128 2 1 8 -Ethernet132 68,69,70,71 etp34 34 Ext 400000 Eth132 2 5 8 -Ethernet136 72,73,74,75 etp35 35 Ext 400000 Eth136 2 9 8 -Ethernet140 76,77,78,79 etp36 36 Ext 400000 Eth140 2 13 8 -Ethernet144 80,81,82,83 etp37 37 Ext 400000 Eth144 2 17 8 -Ethernet148 84,85,86,87 etp38 38 Ext 400000 Eth148 2 21 8 -Ethernet152 88,89,90,91 etp39 39 Ext 400000 Eth152 2 25 8 -Ethernet156 92,93,94,95 etp40 40 Ext 400000 Eth156 2 29 8 -Ethernet160 24,25,26,27 etp41 41 Ext 400000 Eth160 0 25 8 -Ethernet164 28,29,30,31 etp42 42 Ext 400000 Eth164 0 29 8 -Ethernet168 16,17,18,19 etp43 43 Ext 400000 Eth168 0 17 8 -Ethernet172 20,21,22,23 etp44 44 Ext 400000 Eth172 0 21 8 -Ethernet176 8,9,10,11 etp45 45 Ext 400000 Eth176 0 9 8 -Ethernet180 12,13,14,15 etp46 46 Ext 400000 Eth180 0 13 8 -Ethernet184 0,1,2,3 etp47 47 Ext 400000 Eth184 0 1 8 -Ethernet188 4,5,6,7 etp48 48 Ext 400000 Eth188 0 5 8 -Ethernet192 160,161,162,163 etp49 49 Ext 400000 Eth192 5 1 8 -Ethernet196 164,165,166,167 etp50 50 Ext 400000 Eth196 5 5 8 -Ethernet200 168,169,170,171 etp51 51 Ext 400000 Eth200 5 9 8 -Ethernet204 172,173,174,175 etp52 52 Ext 400000 Eth204 5 13 8 -Ethernet208 176,177,178,179 etp53 53 Ext 400000 Eth208 5 17 8 -Ethernet212 180,181,182,183 etp54 54 Ext 400000 Eth212 5 21 8 -Ethernet216 184,185,186,187 etp55 55 Ext 400000 Eth216 5 25 8 -Ethernet220 188,189,190,191 etp56 56 Ext 400000 Eth220 5 29 8 -Ethernet224 248,249,250,251 etp57 57 Ext 400000 Eth224 7 25 8 -Ethernet228 252,253,254,255 etp58 58 Ext 400000 Eth228 7 29 8 -Ethernet232 240,241,242,243 etp59 59 Ext 400000 Eth232 7 17 8 -Ethernet236 244,245,246,247 etp60 60 Ext 400000 Eth236 7 21 8 -Ethernet240 232,233,234,235 etp61 61 Ext 400000 Eth240 7 9 8 -Ethernet244 236,237,238,239 etp62 62 Ext 400000 Eth244 7 13 8 -Ethernet248 224,225,226,227 etp63 63 Ext 400000 Eth248 7 1 8 -Ethernet252 228,229,230,231 etp64 64 Ext 400000 Eth252 7 5 8 -Ethernet256 256,257,258,259 etp65 65 Ext 100000 Eth256 2 33 8 -Ethernet260 260,261,262,263 etp66 66 Ext 100000 Eth260 6 33 8 -Ethernet-Rec0 621 Recirc0 67 Rec 400000 Rcy0 0 221 8 +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq fec +Ethernet0 96,97,98,99 etp1 1 Ext 400000 Eth0 3 1 8 rs +Ethernet4 100,101,102,103 etp2 2 Ext 400000 Eth4 3 5 8 rs +Ethernet8 104,105,106,107 etp3 3 Ext 400000 Eth8 3 9 8 rs +Ethernet12 108,109,110,111 etp4 4 Ext 400000 Eth12 3 13 8 rs +Ethernet16 112,113,114,115 etp5 5 Ext 400000 Eth16 3 17 8 rs +Ethernet20 116,117,118,119 etp6 6 Ext 400000 Eth20 3 21 8 rs +Ethernet24 120,121,122,123 etp7 7 Ext 400000 Eth24 3 25 8 rs +Ethernet28 124,125,126,127 etp8 8 Ext 400000 Eth28 3 29 8 rs +Ethernet32 56,57,58,59 etp9 9 Ext 400000 Eth32 1 25 8 rs +Ethernet36 60,61,62,63 etp10 10 Ext 400000 Eth36 1 29 8 rs +Ethernet40 48,49,50,51 etp11 11 Ext 400000 Eth40 1 17 8 rs +Ethernet44 52,53,54,55 etp12 12 Ext 400000 Eth44 1 21 8 rs +Ethernet48 40,41,42,43 etp13 13 Ext 400000 Eth48 1 9 8 rs +Ethernet52 44,45,46,47 etp14 14 Ext 400000 Eth52 1 13 8 rs +Ethernet56 32,33,34,35 etp15 15 Ext 400000 Eth56 1 1 8 rs +Ethernet60 36,37,38,39 etp16 16 Ext 400000 Eth60 1 5 8 rs +Ethernet64 128,129,130,131 etp17 17 Ext 400000 Eth64 4 1 8 rs +Ethernet68 132,133,134,135 etp18 18 Ext 400000 Eth68 4 5 8 rs +Ethernet72 136,137,138,139 etp19 19 Ext 400000 Eth72 4 9 8 rs +Ethernet76 140,141,142,143 etp20 20 Ext 400000 Eth76 4 13 8 rs +Ethernet80 144,145,146,147 etp21 21 Ext 400000 Eth80 4 17 8 rs +Ethernet84 148,149,150,151 etp22 22 Ext 400000 Eth84 4 21 8 rs +Ethernet88 152,153,154,155 etp23 23 Ext 400000 Eth88 4 25 8 rs +Ethernet92 156,157,158,159 etp24 24 Ext 400000 Eth92 4 29 8 rs +Ethernet96 216,217,218,219 etp25 25 Ext 400000 Eth96 6 25 8 rs +Ethernet100 220,221,222,223 etp26 26 Ext 400000 Eth100 6 29 8 rs +Ethernet104 208,209,210,211 etp27 27 Ext 400000 Eth104 6 17 8 rs +Ethernet108 212,213,214,215 etp28 28 Ext 400000 Eth108 6 21 8 rs +Ethernet112 200,201,202,203 etp29 29 Ext 400000 Eth112 6 9 8 rs +Ethernet116 204,205,206,207 etp30 30 Ext 400000 Eth116 6 13 8 rs +Ethernet120 192,193,194,195 etp31 31 Ext 400000 Eth120 6 1 8 rs +Ethernet124 196,197,198,199 etp32 32 Ext 400000 Eth124 6 5 8 rs +Ethernet128 64,65,66,67 etp33 33 Ext 400000 Eth128 2 1 8 rs +Ethernet132 68,69,70,71 etp34 34 Ext 400000 Eth132 2 5 8 rs +Ethernet136 72,73,74,75 etp35 35 Ext 400000 Eth136 2 9 8 rs +Ethernet140 76,77,78,79 etp36 36 Ext 400000 Eth140 2 13 8 rs +Ethernet144 80,81,82,83 etp37 37 Ext 400000 Eth144 2 17 8 rs +Ethernet148 84,85,86,87 etp38 38 Ext 400000 Eth148 2 21 8 rs +Ethernet152 88,89,90,91 etp39 39 Ext 400000 Eth152 2 25 8 rs +Ethernet156 92,93,94,95 etp40 40 Ext 400000 Eth156 2 29 8 rs +Ethernet160 24,25,26,27 etp41 41 Ext 400000 Eth160 0 25 8 rs +Ethernet164 28,29,30,31 etp42 42 Ext 400000 Eth164 0 29 8 rs +Ethernet168 16,17,18,19 etp43 43 Ext 400000 Eth168 0 17 8 rs +Ethernet172 20,21,22,23 etp44 44 Ext 400000 Eth172 0 21 8 rs +Ethernet176 8,9,10,11 etp45 45 Ext 400000 Eth176 0 9 8 rs +Ethernet180 12,13,14,15 etp46 46 Ext 400000 Eth180 0 13 8 rs +Ethernet184 0,1,2,3 etp47 47 Ext 400000 Eth184 0 1 8 rs +Ethernet188 4,5,6,7 etp48 48 Ext 400000 Eth188 0 5 8 rs +Ethernet192 160,161,162,163 etp49 49 Ext 400000 Eth192 5 1 8 rs +Ethernet196 164,165,166,167 etp50 50 Ext 400000 Eth196 5 5 8 rs +Ethernet200 168,169,170,171 etp51 51 Ext 400000 Eth200 5 9 8 rs +Ethernet204 172,173,174,175 etp52 52 Ext 400000 Eth204 5 13 8 rs +Ethernet208 176,177,178,179 etp53 53 Ext 400000 Eth208 5 17 8 rs +Ethernet212 180,181,182,183 etp54 54 Ext 400000 Eth212 5 21 8 rs +Ethernet216 184,185,186,187 etp55 55 Ext 400000 Eth216 5 25 8 rs +Ethernet220 188,189,190,191 etp56 56 Ext 400000 Eth220 5 29 8 rs +Ethernet224 248,249,250,251 etp57 57 Ext 400000 Eth224 7 25 8 rs +Ethernet228 252,253,254,255 etp58 58 Ext 400000 Eth228 7 29 8 rs +Ethernet232 240,241,242,243 etp59 59 Ext 400000 Eth232 7 17 8 rs +Ethernet236 244,245,246,247 etp60 60 Ext 400000 Eth236 7 21 8 rs +Ethernet240 232,233,234,235 etp61 61 Ext 400000 Eth240 7 9 8 rs +Ethernet244 236,237,238,239 etp62 62 Ext 400000 Eth244 7 13 8 rs +Ethernet248 224,225,226,227 etp63 63 Ext 400000 Eth248 7 1 8 rs +Ethernet252 228,229,230,231 etp64 64 Ext 400000 Eth252 7 5 8 rs +Ethernet256 256,257,258,259 etp65 65 Ext 100000 Eth256 2 33 8 rs +Ethernet260 260,261,262,263 etp66 66 Ext 100000 Eth260 6 33 8 rs +Ethernet-Rec0 621 Recirc0 67 Rec 400000 Rcy0 0 221 8 none diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 index 96566a63792..30474c5f980 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/qos.json.j2 @@ -1,174 +1,7 @@ -{%- macro generate_dscp_to_tc_map_per_sku() -%} - "DSCP_TO_TC_MAP": { - "NH_DEFAULT_DSCP_TO_TC_MAP": { - "0" : "0", - "1" : "0", - "2" : "0", - "3" : "0", - "4" : "0", - "5" : "0", - "6" : "0", - "7" : "0", - "8" : "1", - "9" : "1", - "10": "1", - "11": "1", - "12": "1", - "13": "1", - "14": "1", - "15": "1", - "16": "2", - "17": "2", - "18": "2", - "19": "2", - "20": "2", - "21": "2", - "22": "2", - "23": "2", - "24": "3", - "25": "3", - "26": "3", - "27": "3", - "28": "3", - "29": "3", - "30": "3", - "31": "3", - "32": "4", - "33": "4", - "34": "4", - "35": "4", - "36": "4", - "37": "4", - "38": "4", - "39": "4", - "40": "5", - "41": "5", - "42": "5", - "43": "5", - "44": "5", - "45": "5", - "46": "5", - "47": "5", - "48": "6", - "49": "6", - "50": "6", - "51": "6", - "52": "6", - "53": "6", - "54": "6", - "55": "6", - "56": "7", - "57": "7", - "58": "7", - "59": "7", - "60": "7", - "61": "7", - "62": "7", - "63": "7" - } - }, -{%- endmacro -%} - {%- macro generate_global_dscp_to_tc_map() %} {# This is an empty macro since the global DSCP_TO_TC map is not required #} {%- endmacro %} -{%- macro generate_tc_to_queue_map_per_sku() -%} - "TC_TO_QUEUE_MAP": { - "NH_DEFAULT_TC_TO_QUEUE_MAP": { - "0": "0", - "1": "1", - "2": "2", - "3": "3", - "4": "4", - "5": "5", - "6": "6", - "7": "7" - } - }, -{%- endmacro -%} - -{%- macro generate_tc_to_pg_map_per_sku() -%} - "TC_TO_PRIORITY_GROUP_MAP": { - "NH_DEFAULT_TC_TO_PRI_GROUP_MAP": { - "0": "0", - "1": "1", - "2": "2", - "3": "3", - "4": "4", - "5": "5", - "6": "6", - "7": "7" - } - }, -{%- endmacro -%} - -{%- macro generate_port_qos_map(port_names_active) -%} - "PORT_QOS_MAP": { -{% for port in port_names_active.split(',') %} - "{{ port }}": { - "dscp_to_tc_map" : "NH_DEFAULT_DSCP_TO_TC_MAP", - "tc_to_queue_map" : "NH_DEFAULT_TC_TO_QUEUE_MAP", - "tc_to_pg_map" : "NH_DEFAULT_TC_TO_PRI_GROUP_MAP" - }{% if not loop.last %},{% endif %} -{% endfor %} - }, -{%- endmacro -%} - -{%- macro generate_scheduler_per_sku() -%} - "SCHEDULER": { - "scheduler.0": { - "type" : "DWRR", - "weight": "20" - }, - "scheduler.1": { - "type" : "DWRR", - "weight": "30" - }, - "scheduler.2": { - "type" : "DWRR", - "weight": "50" - }, - "scheduler.3": { - "cir": "2000000000", - "meter_type": "bytes", - "pir": "2000000000", - "type": "STRICT" - } - }, -{%- endmacro -%} - -{%- macro generate_single_queue_per_sku(port) -%} - "{{ port }}|0": { - "scheduler": "scheduler.0" - }, - "{{ port }}|1": { - "scheduler": "scheduler.0" - }, - "{{ port }}|2": { - "scheduler": "scheduler.1" - }, - "{{ port }}|3": { - "scheduler": "scheduler.2" - }, - "{{ port }}|4": { - "scheduler": "scheduler.2" - }, - "{{ port }}|5": { - "scheduler": "scheduler.2" - }, - "{{ port }}|6": { - "scheduler": "scheduler.3" - }, - "{{ port }}|7": { - "scheduler": "scheduler.3" - } -{%- endmacro -%} - -{%- macro generate_wred_profiles() %} -{# wred is disabled #} -{%- endmacro %} - {%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %} {# Generate list of ports #} {%- for port_idx in range(256, 261, 4) %} @@ -176,4 +9,24 @@ {%- endfor %} {%- endmacro %} +{%- macro generate_wred_profiles() %} + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "10000000", + "green_min_threshold" : "2000000", + "yellow_max_threshold" : "10000000", + "yellow_min_threshold" : "2000000", + "red_max_threshold" : "10000000", + "red_min_threshold" : "2000000", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, +{%- endmacro %} + {%- include 'qos_config.j2' %} diff --git a/device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/media_settings.json b/device/nexthop/x86_64-nexthop_5010-r0/media_settings.json similarity index 100% rename from device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O64/media_settings.json rename to device/nexthop/x86_64-nexthop_5010-r0/media_settings.json diff --git a/device/nexthop/x86_64-nexthop_5010-r0/pcie-variables.yaml b/device/nexthop/x86_64-nexthop_5010-r0/pcie-variables.yaml index 45edfefd7dc..edc0db9582b 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/pcie-variables.yaml +++ b/device/nexthop/x86_64-nexthop_5010-r0/pcie-variables.yaml @@ -29,6 +29,26 @@ - name: "amd_soc_group_3_bus" lookup_command: "setpci -s 00:08.3 0x19.b" +# Commands to retrieve ASIC device ID info + +- name: "asic_1_device_id" + lookup_command: > + ID=$(setpci -s $(setpci -s 00:01.2 0x19.b):00.0 0x02.W); + if [ "$ID" = "8870" ]; then + echo "8870"; + else + echo "8872"; + fi + +- name: "asic_2_device_id" + lookup_command: > + ID=$(setpci -s $(setpci -s 00:02.3 0x19.b):00.0 0x02.W); + if [ "$ID" = "8870" ]; then + echo "8870"; + else + echo "8872"; + fi + # Commands to retrieve the PCIe address for each device. # Strings in pddf-device.json.j2 matching "{{}}"" will be replaced with # the result of the lookup_command, to generate /usr/share/sonic/platform/pddf/pddf-device.json. diff --git a/device/nexthop/x86_64-nexthop_5010-r0/pcie.yaml.j2 b/device/nexthop/x86_64-nexthop_5010-r0/pcie.yaml.j2 index a99df0da55c..63dd2e16e33 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/pcie.yaml.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/pcie.yaml.j2 @@ -95,8 +95,8 @@ - bus: '{{asic_1_bus}}' dev: '00' fn: '0' - id: '8870' - name: 'Ethernet controller: Broadcom Inc. and subsidiaries Device 8870 (rev 02)' + id: '{{asic_1_device_id}}' + name: 'Ethernet controller: Broadcom Inc. and subsidiaries Device {{asic_1_device_id}} (rev 02)' - bus: '{{cpu_card_fpga_bus}}' dev: '00' fn: '0' @@ -110,8 +110,8 @@ - bus: '{{asic_2_bus}}' dev: '00' fn: '0' - id: '8870' - name: 'Ethernet controller: Broadcom Inc. and subsidiaries Device 8870 (rev 02)' + id: '{{asic_2_device_id}}' + name: 'Ethernet controller: Broadcom Inc. and subsidiaries Device {{asic_2_device_id}} (rev 02)' - bus: '{{nvme_bus}}' dev: '00' fn: '0' diff --git a/device/nexthop/x86_64-nexthop_5010-r0/pddf/pd-plugin.json b/device/nexthop/x86_64-nexthop_5010-r0/pddf/pd-plugin.json index d260b308595..edbe9efcc52 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/pddf/pd-plugin.json +++ b/device/nexthop/x86_64-nexthop_5010-r0/pddf/pd-plugin.json @@ -324,11 +324,15 @@ "i2c": { "valmap": { "D1U74T-W-3200-12-HB4C": "exhaust", - "D1U74T-W-3200-12-HB4T": "exhaust" + "D1U74T-W-3200-12-HB4TC": "exhaust", + "CSU3200AT-3-3M0": "exhaust" } } }, - "PSU_FAN_MAX_SPEED": "37000" + "PSU_FAN_MAX_SPEED_MAP": { + "CSU3200AT-3-3M0": "33000", + "default": "37000" + } }, "FAN": { "present": { diff --git a/device/nexthop/x86_64-nexthop_5010-r0/pddf/pddf-device.json.j2 b/device/nexthop/x86_64-nexthop_5010-r0/pddf/pddf-device.json.j2 index 3671c4637be..92be2756d7f 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/pddf/pddf-device.json.j2 +++ b/device/nexthop/x86_64-nexthop_5010-r0/pddf/pddf-device.json.j2 @@ -2666,8 +2666,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_serial_num", @@ -2675,8 +2674,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "14" + "attr_cmpval": "0x00" }, { "attr_name": "psu_mfr_id", @@ -2684,8 +2682,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "11" + "attr_cmpval": "0x00" }, { "attr_name": "psu_fan_dir", @@ -2693,8 +2690,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_p_out", @@ -2931,8 +2927,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_serial_num", @@ -2940,8 +2935,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9e", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "14" + "attr_cmpval": "0x00" }, { "attr_name": "psu_mfr_id", @@ -2949,8 +2943,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x99", "attr_mask": "0x0", - "attr_cmpval": "0x00", - "attr_len": "11" + "attr_cmpval": "0x00" }, { "attr_name": "psu_fan_dir", @@ -2958,8 +2951,7 @@ "attr_devtype": "pmbus", "attr_offset": "0x9a", "attr_mask": "0x0", - "attr_cmpval": "0xff", - "attr_len": "23" + "attr_cmpval": "0xff" }, { "attr_name": "psu_p_out", @@ -13721,11 +13713,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in3_max_alarm" + "drv_attr_name": "in3_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in3_min_alarm" + "drv_attr_name": "in3_lcrit" } ] } @@ -14367,11 +14359,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in1_max_alarm" + "drv_attr_name": "in1_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in1_min_alarm" + "drv_attr_name": "in1_lcrit" } ] } @@ -14402,11 +14394,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in2_max_alarm" + "drv_attr_name": "in2_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in2_min_alarm" + "drv_attr_name": "in2_lcrit" } ] } @@ -14437,11 +14429,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in3_max_alarm" + "drv_attr_name": "in3_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in3_min_alarm" + "drv_attr_name": "in3_lcrit" } ] } @@ -14472,11 +14464,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in4_max_alarm" + "drv_attr_name": "in4_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in4_min_alarm" + "drv_attr_name": "in4_lcrit" } ] } @@ -14507,11 +14499,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in5_max_alarm" + "drv_attr_name": "in5_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in5_min_alarm" + "drv_attr_name": "in5_lcrit" } ] } @@ -14542,11 +14534,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in6_max_alarm" + "drv_attr_name": "in6_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in6_min_alarm" + "drv_attr_name": "in6_lcrit" } ] } @@ -14577,11 +14569,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in7_max_alarm" + "drv_attr_name": "in7_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in7_min_alarm" + "drv_attr_name": "in7_lcrit" } ] } @@ -14612,11 +14604,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in8_max_alarm" + "drv_attr_name": "in8_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in8_min_alarm" + "drv_attr_name": "in8_lcrit" } ] } @@ -14647,11 +14639,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in9_max_alarm" + "drv_attr_name": "in9_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in9_min_alarm" + "drv_attr_name": "in9_lcrit" } ] } @@ -14682,11 +14674,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in10_max_alarm" + "drv_attr_name": "in10_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in10_min_alarm" + "drv_attr_name": "in10_lcrit" } ] } @@ -14717,11 +14709,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in11_max_alarm" + "drv_attr_name": "in11_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in11_min_alarm" + "drv_attr_name": "in11_lcrit" } ] } @@ -14752,11 +14744,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in12_max_alarm" + "drv_attr_name": "in12_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in12_min_alarm" + "drv_attr_name": "in12_lcrit" } ] } @@ -14787,11 +14779,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in13_max_alarm" + "drv_attr_name": "in13_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in13_min_alarm" + "drv_attr_name": "in13_lcrit" } ] } @@ -14822,11 +14814,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in14_max_alarm" + "drv_attr_name": "in14_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in14_min_alarm" + "drv_attr_name": "in14_lcrit" } ] } @@ -15928,11 +15920,11 @@ }, { "attr_name": "volt1_crit_high_threshold", - "drv_attr_name": "in3_max_alarm" + "drv_attr_name": "in3_crit" }, { "attr_name": "volt1_crit_low_threshold", - "drv_attr_name": "in3_min_alarm" + "drv_attr_name": "in3_lcrit" } ] } diff --git a/device/nexthop/x86_64-nexthop_5010-r0/sensors.conf b/device/nexthop/x86_64-nexthop_5010-r0/sensors.conf index 5cf77a15ebd..343ec1404a4 100644 --- a/device/nexthop/x86_64-nexthop_5010-r0/sensors.conf +++ b/device/nexthop/x86_64-nexthop_5010-r0/sensors.conf @@ -21,20 +21,20 @@ chip "nh_tmp468-i2c-10-48" # crit: used for fan algo set temp2_crit 55 set temp2_max 56 - set temp3_crit 45 + set temp3_crit 50 set temp3_max 65 - set temp4_crit 100 - set temp4_max 105 - set temp5_crit 100 - set temp5_max 105 - set temp6_crit 110 - set temp6_max 115 - set temp7_crit 95 - set temp7_max 100 - set temp8_crit 115 - set temp8_max 120 - set temp9_crit 115 - set temp9_max 120 + set temp4_crit 108 + set temp4_max 112 + set temp5_crit 108 + set temp5_max 112 + set temp6_crit 115 + set temp6_max 122 + set temp7_crit 108 + set temp7_max 112 + set temp8_crit 108 + set temp8_max 112 + set temp9_crit 108 + set temp9_max 112 chip "nh_tmp468-i2c-10-49" ignore temp1 @@ -53,20 +53,20 @@ chip "nh_tmp468-i2c-10-49" # crit: used for fan algo set temp2_crit 55 set temp2_max 56 - set temp3_crit 45 + set temp3_crit 50 set temp3_max 65 - set temp4_crit 100 - set temp4_max 105 - set temp5_crit 100 - set temp5_max 105 - set temp6_crit 110 - set temp6_max 115 - set temp7_crit 95 - set temp7_max 100 - set temp8_crit 115 - set temp8_max 120 - set temp9_crit 115 - set temp9_max 120 + set temp4_crit 108 + set temp4_max 112 + set temp5_crit 108 + set temp5_max 112 + set temp6_crit 115 + set temp6_max 122 + set temp7_crit 108 + set temp7_max 112 + set temp8_crit 108 + set temp8_max 112 + set temp9_crit 108 + set temp9_max 112 chip "nh_tmp464-i2c-10-4a" label temp2 "Mezz Card Left Rear" @@ -79,11 +79,11 @@ chip "nh_tmp464-i2c-10-4a" # crit: used for fan algo set temp2_crit 55 set temp2_max 56 - set temp3_crit 45 + set temp3_crit 50 set temp3_max 65 set temp4_crit 55 set temp4_max 56 - set temp5_crit 45 + set temp5_crit 50 set temp5_max 65 ignore temp6 diff --git a/device/nexthop/x86_64-nexthop_5010-r0/services.conf b/device/nexthop/x86_64-nexthop_5010-r0/services.conf new file mode 100644 index 00000000000..f674fd88c82 --- /dev/null +++ b/device/nexthop/x86_64-nexthop_5010-r0/services.conf @@ -0,0 +1 @@ +startup_tsa_tsb.service \ No newline at end of file diff --git a/device/nexthop/x86_64-nexthop_5010-r0/startup-tsa-tsb.conf b/device/nexthop/x86_64-nexthop_5010-r0/startup-tsa-tsb.conf new file mode 100644 index 00000000000..71428197494 --- /dev/null +++ b/device/nexthop/x86_64-nexthop_5010-r0/startup-tsa-tsb.conf @@ -0,0 +1 @@ +STARTUP_TSB_TIMER=900 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 index 6e998cb8a37..8c637bb7d79 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.md5 @@ -1 +1 @@ -4130a4ca246a30a82f69bdef7c971f1d \ No newline at end of file +8cfeef60310fb484b32b90d48cc464a7 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml index e9ca1109f1e..0676b2bbf76 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-Board-AC5X-xb.xml @@ -1,5 +1,5 @@ - + @@ -201,6 +201,12 @@ Ethernet Transceiver Ethernet Transceiver 9 + + alaska-CUX3520 + Specifies PHY identifier CUX3520, Integrated Octal 10/100/1000/2.5G/5G/10GBASE-T +Ethernet Transceiver + 10 + physical-port-num-type diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 index d9a2ca3084f..dcc5d932b49 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.md5 @@ -1 +1 @@ -5a9092f68a3a43ced5cc1585aa47e813 \ No newline at end of file +ead7612c7d259573ee3f5ba1b2f01b20 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml index 5e6c450b250..720e006f724 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-L1-AC5X-xb.xml @@ -1,5 +1,5 @@ - + @@ -156,6 +156,11 @@ 54 + + 2500BASE_X + 2.5G + 55 + NA diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 index 00b6068a4ad..e801cd54d41 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.md5 @@ -1 +1 @@ -c13419ca649e9e414df0cbea6c73df29 \ No newline at end of file +253862790c08ab4daf4b919e8cba6257 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml index 967c387bc18..f7e03b174b0 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/ASK-PP-AC5X-xb.xml @@ -1,5 +1,5 @@ - + diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 index d60e04a18fc..9fa6bd44971 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.md5 @@ -1 +1 @@ -0bc31702ef865bc96664fa917a8ab34d \ No newline at end of file +d406841ddbda9465e55c222120e52399 \ No newline at end of file diff --git a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml index b1042ff5ca5..59ec5f4f60f 100644 --- a/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml +++ b/device/nokia/arm64-nokia_ixs7215_52xb-r0/Nokia-7215-A1/SAI-AC5X-xb.xml @@ -1,5 +1,5 @@ - + @@ -51,6 +51,21 @@ 1 + + CounterFormat-type + enumeration + Router In Drop Reason Feature Options + + COALESCED_COUNTER + Coalesced/Combined Counter for Packets and Bytes + 0 + + + SEPERATE_COUNTER + Seperate Counter for Packets and Bytes {Consumes additional hardware resources} + 1 + + Feature-enable enumeration @@ -187,6 +202,14 @@ 1 + + mac-address-type + string + The mac-address type represents an IEEE 802 MAC address. +The canonical representation uses lowercase characters. +In the value set and its semantics, this type is equivalent +to the MacAddress textual convention of the SMIv2. + ASIC_AC5X ASK-Board-AC5X-xb.xml @@ -464,6 +487,11 @@ 0 ROUTE_BLACKHOLE + + COALESCED_COUNTER + Disabled + Enabled + Disabled Disabled @@ -474,6 +502,9 @@ Disabled + Disabled + Disabled + Disabled control-acl diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.md5 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.md5 index 9db80ae2eac..9d9ceebf999 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.md5 +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.md5 @@ -1 +1 @@ -ac909596c36db38f054afef94853181a \ No newline at end of file +9bd67b52d5ed7b0727019437f7128d31 \ No newline at end of file diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.xml b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.xml index fc4cb355e9c..2766e44a1b1 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.xml +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-Board-M0-48x1G-4x10G.xml @@ -1,5 +1,5 @@ - + @@ -202,8 +202,8 @@ Ethernet Transceiver 9 - alaska-88E3520 - Specifies PHY identifier 88E3520, Integrated Octal 10/100/1000/2.5G/5G/10GBASE-T + alaska-CUX3520 + Specifies PHY identifier CUX3520, Integrated Octal 10/100/1000/2.5G/5G/10GBASE-T Ethernet Transceiver 10 diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.md5 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.md5 index 53c109f7df1..c7dfdadd1b8 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.md5 +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.md5 @@ -1 +1 @@ -d5b258128948285d93f60c468e5cab30 \ No newline at end of file +fbaef82d6312ec5f2b51ffae820f6299 \ No newline at end of file diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.xml b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.xml index 6280e3d718f..b431a3bbcbe 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.xml +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D0-48x1G-4x10G.xml @@ -1,5 +1,5 @@ - + diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.md5 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.md5 index 61b42fc6c9a..c81c0605304 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.md5 +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.md5 @@ -1 +1 @@ -a7fc359c8a059bd5af78bb341735b65c \ No newline at end of file +185fff11f2408a0f4e414c01e943d7d1 \ No newline at end of file diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.xml b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.xml index 3ce00adfc88..1f2c5ceb513 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.xml +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-L1-M0-D1-48x1G-4x10G.xml @@ -1,5 +1,5 @@ - + diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.md5 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.md5 index 7bd0eb55f81..6bbf106c94f 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.md5 +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.md5 @@ -1 +1 @@ -147ef20e020688a6d5e98e8dacce0f1b \ No newline at end of file +528031093f87a1d24a75bbcdd9b50784 \ No newline at end of file diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.xml b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.xml index a5716ff8fa5..f4b7ed4030f 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.xml +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/ASK-PP-M0-48x1G-4x10G.xml @@ -1,5 +1,5 @@ - + @@ -629,7 +629,7 @@ true true - 511 + 31 FLEX true diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.md5 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.md5 index b0d5d0b8cda..c702025034e 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.md5 +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.md5 @@ -1 +1 @@ -2ebbba24dec1a92005817fe4eb494244 \ No newline at end of file +6cdbabff245969174293360a017f074f \ No newline at end of file diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.xml b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.xml index 5f124b73f34..a709f5b2fe6 100644 --- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.xml +++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/SAI-M0-48x1G-4x10G.xml @@ -1,5 +1,5 @@ - + @@ -493,6 +493,8 @@ to the MacAddress textual convention of the SMIv2. Disabled Disabled + Disabled + Disabled \ No newline at end of file diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffer_ports.j2 b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffer_ports.j2 new file mode 100755 index 00000000000..25a254905a5 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffer_ports.j2 @@ -0,0 +1,7 @@ +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0, 512, 8) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} + {%- endfor %} + {% if PORT_ALL.append("Ethernet513") %}{% endif %} +{%- endmacro %} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers.json.j2 b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers.json.j2 new file mode 100755 index 00000000000..0b1cb2c541b --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't1' %} +{%- include 'buffers_config.j2' %} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers_defaults_t0.j2 b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers_defaults_t0.j2 new file mode 100755 index 00000000000..e28dd965a51 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers_defaults_t0.j2 @@ -0,0 +1,36 @@ +{%- set default_cable = '5m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "161176208", + "type": "ingress", + "mode": "dynamic", + "xoff": "29520896" + }, + "egress_lossless_pool": { + "size": "161176208", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"-1" + }, + "egress_lossy_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"-4" + }, + "egress_lossless_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers_defaults_t1.j2 b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers_defaults_t1.j2 new file mode 100755 index 00000000000..e28dd965a51 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/buffers_defaults_t1.j2 @@ -0,0 +1,36 @@ +{%- set default_cable = '5m' %} + +{%- include 'buffer_ports.j2' %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "161176208", + "type": "ingress", + "mode": "dynamic", + "xoff": "29520896" + }, + "egress_lossless_pool": { + "size": "161176208", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"-1" + }, + "egress_lossy_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"-4" + }, + "egress_lossless_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/h6-64.yml b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/h6-64.yml new file mode 100644 index 00000000000..78528c17a33 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/h6-64.yml @@ -0,0 +1,1218 @@ +# $Copyright: Broadcom Ltd.$ +# +# BCM78914 64x1600g port configuration. +# +# configuration yaml file +# device: +# : +#
: +# ? +# : +# : +# ... +# : +# : +# : +# : +# ... +# : +# + +--- +bcm_device: + 0: + global: + pktio_mode: 1 + vlan_flooding_l2mc_num_reserved: 0 + ipv6_lpm_128b_enable: 1 + shared_block_mask_section: uc_bc + skip_protocol_default_entries: 1 + # LTSW uses value 1 for ALPM combined mode + l3_alpm_template: 1 + l3_alpm_hit_skip: 1 + sai_feat_tail_timestamp : 0 + sai_port_phy_time_sync_en : 1 + sai_field_group_auto_prioritize: 1 + #l3_intf_vlan_split_egress for MTU at L3IF + l3_intf_vlan_split_egress : 1 + pfc_deadlock_seq_control : 1 + sai_tunnel_support: 1 + bcm_tunnel_term_compatible_mode: 1 + l3_ecmp_member_first_lkup_mem_size: 32768 + #enable port queue drop stats + sai_stats_support_mask: 0 + #disable vxlan tunnel stats + sai_stats_disable_mask: 0x200 + #For PPIU Mode, Set resources for counters in global mode counters like ACL, etc + global_flexctr_ing_action_num_reserved: 20 + global_flexctr_ing_pool_num_reserved: 8 + global_flexctr_ing_op_profile_num_reserved: 20 + global_flexctr_ing_group_num_reserved: 2 + global_flexctr_egr_action_num_reserved: 8 + global_flexctr_egr_pool_num_reserved: 5 + global_flexctr_egr_op_profile_num_reserved: 10 + global_flexctr_egr_group_num_reserved: 1 + l3_alpm_large_vrf_mode: 1 + l3_ecmp_member_secondary_mem_size: 8192 + stat_custom_receive0_management_mode: 1 +--- +device: + 0: + PC_PM_CORE: + ? + PC_PM_ID: 1 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x47536210 + TX_LANE_MAP: 0x35142706 + RX_POLARITY_FLIP: 0x4a + TX_POLARITY_FLIP: 0xc6 + ? + PC_PM_ID: 2 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x70615342 + TX_LANE_MAP: 0x51437026 + RX_POLARITY_FLIP: 0x75 + TX_POLARITY_FLIP: 0xca + ? + PC_PM_ID: 3 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x30216475 + TX_LANE_MAP: 0x76541032 + RX_POLARITY_FLIP: 0x07 + TX_POLARITY_FLIP: 0x56 + ? + PC_PM_ID: 4 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x24350671 + TX_LANE_MAP: 0x06541732 + RX_POLARITY_FLIP: 0x07 + TX_POLARITY_FLIP: 0x70 + ? + PC_PM_ID: 8 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x57614302 + TX_LANE_MAP: 0x26371504 + RX_POLARITY_FLIP: 0x2f + TX_POLARITY_FLIP: 0x9b + ? + PC_PM_ID: 7 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x72406153 + TX_LANE_MAP: 0x63725014 + RX_POLARITY_FLIP: 0xbc + TX_POLARITY_FLIP: 0x61 + ? + PC_PM_ID: 6 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x12304576 + TX_LANE_MAP: 0x54673021 + RX_POLARITY_FLIP: 0x64 + TX_POLARITY_FLIP: 0xa7 + ? + PC_PM_ID: 5 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x24371560 + TX_LANE_MAP: 0x27543601 + RX_POLARITY_FLIP: 0xff + TX_POLARITY_FLIP: 0x84 + ? + PC_PM_ID: 9 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x75406132 + TX_LANE_MAP: 0x36072514 + RX_POLARITY_FLIP: 0x27 + TX_POLARITY_FLIP: 0xb1 + ? + PC_PM_ID: 10 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x41605273 + TX_LANE_MAP: 0x53426107 + RX_POLARITY_FLIP: 0xe3 + TX_POLARITY_FLIP: 0x33 + ? + PC_PM_ID: 11 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x21306745 + TX_LANE_MAP: 0x67543120 + RX_POLARITY_FLIP: 0x91 + TX_POLARITY_FLIP: 0xac + ? + PC_PM_ID: 12 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x37251640 + TX_LANE_MAP: 0x17543620 + RX_POLARITY_FLIP: 0x64 + TX_POLARITY_FLIP: 0x06 + ? + PC_PM_ID: 16 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x57614302 + TX_LANE_MAP: 0x26371504 + RX_POLARITY_FLIP: 0x2f + TX_POLARITY_FLIP: 0x93 + ? + PC_PM_ID: 15 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x72406153 + TX_LANE_MAP: 0x63725014 + RX_POLARITY_FLIP: 0xbc + TX_POLARITY_FLIP: 0x63 + ? + PC_PM_ID: 14 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x12304576 + TX_LANE_MAP: 0x54673021 + RX_POLARITY_FLIP: 0x64 + TX_POLARITY_FLIP: 0xa6 + ? + PC_PM_ID: 13 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x35162470 + TX_LANE_MAP: 0x04673521 + RX_POLARITY_FLIP: 0x9d + TX_POLARITY_FLIP: 0x0c + ? + PC_PM_ID: 17 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x74526301 + TX_LANE_MAP: 0x25340617 + RX_POLARITY_FLIP: 0x98 + TX_POLARITY_FLIP: 0x33 + ? + PC_PM_ID: 18 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x41605273 + TX_LANE_MAP: 0x53426107 + RX_POLARITY_FLIP: 0xe3 + TX_POLARITY_FLIP: 0x33 + ? + PC_PM_ID: 19 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x21306745 + TX_LANE_MAP: 0x67543120 + RX_POLARITY_FLIP: 0x91 + TX_POLARITY_FLIP: 0xac + ? + PC_PM_ID: 20 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x37251640 + TX_LANE_MAP: 0x17543620 + RX_POLARITY_FLIP: 0x64 + TX_POLARITY_FLIP: 0x06 + ? + PC_PM_ID: 24 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x57614302 + TX_LANE_MAP: 0x26371504 + RX_POLARITY_FLIP: 0x2f + TX_POLARITY_FLIP: 0x93 + ? + PC_PM_ID: 23 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x72406153 + TX_LANE_MAP: 0x63725014 + RX_POLARITY_FLIP: 0xbc + TX_POLARITY_FLIP: 0x63 + ? + PC_PM_ID: 22 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x12304576 + TX_LANE_MAP: 0x54673021 + RX_POLARITY_FLIP: 0x64 + TX_POLARITY_FLIP: 0xa6 + ? + PC_PM_ID: 21 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x24371560 + TX_LANE_MAP: 0x27543601 + RX_POLARITY_FLIP: 0xff + TX_POLARITY_FLIP: 0x84 + ? + PC_PM_ID: 25 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x75406132 + TX_LANE_MAP: 0x36072514 + RX_POLARITY_FLIP: 0x27 + TX_POLARITY_FLIP: 0xb1 + ? + PC_PM_ID: 26 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x41605273 + TX_LANE_MAP: 0x53426107 + RX_POLARITY_FLIP: 0xe3 + TX_POLARITY_FLIP: 0x37 + ? + PC_PM_ID: 27 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x21306745 + TX_LANE_MAP: 0x67543120 + RX_POLARITY_FLIP: 0x91 + TX_POLARITY_FLIP: 0xa8 + ? + PC_PM_ID: 28 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x37251640 + TX_LANE_MAP: 0x17543620 + RX_POLARITY_FLIP: 0x64 + TX_POLARITY_FLIP: 0x86 + ? + PC_PM_ID: 32 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x56417032 + TX_LANE_MAP: 0x17360524 + RX_POLARITY_FLIP: 0xb5 + TX_POLARITY_FLIP: 0x13 + ? + PC_PM_ID: 31 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x62734150 + TX_LANE_MAP: 0x73615204 + RX_POLARITY_FLIP: 0x8a + TX_POLARITY_FLIP: 0x63 + ? + PC_PM_ID: 30 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x12037564 + TX_LANE_MAP: 0x54763210 + RX_POLARITY_FLIP: 0xf8 + TX_POLARITY_FLIP: 0xa6 + ? + PC_PM_ID: 29 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x05142763 + TX_LANE_MAP: 0x24763510 + RX_POLARITY_FLIP: 0xf8 + TX_POLARITY_FLIP: 0x0c + ? + PC_PM_ID: 33 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x47536210 + TX_LANE_MAP: 0x35142706 + RX_POLARITY_FLIP: 0x02 + TX_POLARITY_FLIP: 0xc6 + ? + PC_PM_ID: 34 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x70615342 + TX_LANE_MAP: 0x51437026 + RX_POLARITY_FLIP: 0xd5 + TX_POLARITY_FLIP: 0xca + ? + PC_PM_ID: 35 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x30216475 + TX_LANE_MAP: 0x76541032 + RX_POLARITY_FLIP: 0x0d + TX_POLARITY_FLIP: 0x56 + ? + PC_PM_ID: 36 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x24350671 + TX_LANE_MAP: 0x06541732 + RX_POLARITY_FLIP: 0x01 + TX_POLARITY_FLIP: 0x70 + ? + PC_PM_ID: 40 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x56704123 + TX_LANE_MAP: 0x36271504 + RX_POLARITY_FLIP: 0xc7 + TX_POLARITY_FLIP: 0x6e + ? + PC_PM_ID: 39 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x63427051 + TX_LANE_MAP: 0x62735014 + RX_POLARITY_FLIP: 0x16 + TX_POLARITY_FLIP: 0x98 + ? + PC_PM_ID: 38 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x03124567 + TX_LANE_MAP: 0x54672031 + RX_POLARITY_FLIP: 0x6b + TX_POLARITY_FLIP: 0x5d + ? + PC_PM_ID: 37 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x24371560 + TX_LANE_MAP: 0x27543601 + RX_POLARITY_FLIP: 0x30 + TX_POLARITY_FLIP: 0x7b + ? + PC_PM_ID: 41 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x75406132 + TX_LANE_MAP: 0x36072514 + RX_POLARITY_FLIP: 0x5a + TX_POLARITY_FLIP: 0x4e + ? + PC_PM_ID: 42 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x43715062 + TX_LANE_MAP: 0x52436107 + RX_POLARITY_FLIP: 0x49 + TX_POLARITY_FLIP: 0xca + ? + PC_PM_ID: 43 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x03217645 + TX_LANE_MAP: 0x67542130 + RX_POLARITY_FLIP: 0x9e + TX_POLARITY_FLIP: 0x56 + ? + PC_PM_ID: 44 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x26053741 + TX_LANE_MAP: 0x17542630 + RX_POLARITY_FLIP: 0x32 + TX_POLARITY_FLIP: 0x78 + ? + PC_PM_ID: 48 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x56704123 + TX_LANE_MAP: 0x36271504 + RX_POLARITY_FLIP: 0xc7 + TX_POLARITY_FLIP: 0x66 + ? + PC_PM_ID: 47 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x63427051 + TX_LANE_MAP: 0x62735014 + RX_POLARITY_FLIP: 0x16 + TX_POLARITY_FLIP: 0x9a + ? + PC_PM_ID: 46 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x03124567 + TX_LANE_MAP: 0x54672031 + RX_POLARITY_FLIP: 0x6b + TX_POLARITY_FLIP: 0x5c + ? + PC_PM_ID: 45 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x15073462 + TX_LANE_MAP: 0x04672531 + RX_POLARITY_FLIP: 0xcb + TX_POLARITY_FLIP: 0x72 + ? + PC_PM_ID: 49 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x64507213 + TX_LANE_MAP: 0x35240617 + RX_POLARITY_FLIP: 0x70 + TX_POLARITY_FLIP: 0xc6 + ? + PC_PM_ID: 50 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x43715062 + TX_LANE_MAP: 0x52436107 + RX_POLARITY_FLIP: 0x49 + TX_POLARITY_FLIP: 0xca + ? + PC_PM_ID: 51 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x03217645 + TX_LANE_MAP: 0x67542130 + RX_POLARITY_FLIP: 0x9e + TX_POLARITY_FLIP: 0x56 + ? + PC_PM_ID: 52 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x26053741 + TX_LANE_MAP: 0x17542630 + RX_POLARITY_FLIP: 0x32 + TX_POLARITY_FLIP: 0x78 + ? + PC_PM_ID: 56 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x56704123 + TX_LANE_MAP: 0x36271504 + RX_POLARITY_FLIP: 0xc7 + TX_POLARITY_FLIP: 0x66 + ? + PC_PM_ID: 55 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x63427051 + TX_LANE_MAP: 0x62735014 + RX_POLARITY_FLIP: 0x16 + TX_POLARITY_FLIP: 0x9a + ? + PC_PM_ID: 54 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x03124567 + TX_LANE_MAP: 0x54672031 + RX_POLARITY_FLIP: 0x6b + TX_POLARITY_FLIP: 0x5c + ? + PC_PM_ID: 53 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x24371560 + TX_LANE_MAP: 0x27543601 + RX_POLARITY_FLIP: 0x30 + TX_POLARITY_FLIP: 0x7b + ? + PC_PM_ID: 57 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x75406132 + TX_LANE_MAP: 0x36072514 + RX_POLARITY_FLIP: 0x5a + TX_POLARITY_FLIP: 0x4e + ? + PC_PM_ID: 58 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x43715062 + TX_LANE_MAP: 0x52436107 + RX_POLARITY_FLIP: 0x49 + TX_POLARITY_FLIP: 0xce + ? + PC_PM_ID: 59 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x03217645 + TX_LANE_MAP: 0x67542130 + RX_POLARITY_FLIP: 0x9e + TX_POLARITY_FLIP: 0x52 + ? + PC_PM_ID: 60 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x26053741 + TX_LANE_MAP: 0x17542630 + RX_POLARITY_FLIP: 0x32 + TX_POLARITY_FLIP: 0xf8 + ? + PC_PM_ID: 64 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x56417032 + TX_LANE_MAP: 0x17360524 + RX_POLARITY_FLIP: 0xfd + TX_POLARITY_FLIP: 0x13 + ? + PC_PM_ID: 63 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x62734150 + TX_LANE_MAP: 0x73615204 + RX_POLARITY_FLIP: 0x2a + TX_POLARITY_FLIP: 0x63 + ? + PC_PM_ID: 62 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x12037564 + TX_LANE_MAP: 0x54763210 + RX_POLARITY_FLIP: 0xf2 + TX_POLARITY_FLIP: 0xa6 + ? + PC_PM_ID: 61 + CORE_INDEX: 0 + : + RX_LANE_MAP_AUTO: 0 + TX_LANE_MAP_AUTO: 0 + RX_POLARITY_FLIP_AUTO: 0 + TX_POLARITY_FLIP_AUTO: 0 + RX_LANE_MAP: 0x05142763 + TX_LANE_MAP: 0x24763510 + RX_POLARITY_FLIP: 0xfe + TX_POLARITY_FLIP: 0x0c +... +--- +device: + 0: + PC_PORT_PHYS_MAP: + ? + PORT_ID: 0 + : + PC_PHYS_PORT_ID: 0 + # data path 0 + ? + PORT_ID: 1 + : + PC_PHYS_PORT_ID: 1 + ? + PORT_ID: 2 + : + PC_PHYS_PORT_ID: 9 + # data path 1 + ? + PORT_ID: 18 + : + PC_PHYS_PORT_ID: 17 + ? + PORT_ID: 19 + : + PC_PHYS_PORT_ID: 25 + # data path 2 + ? + PORT_ID: 36 + : + PC_PHYS_PORT_ID: 33 + ? + PORT_ID: 37 + : + PC_PHYS_PORT_ID: 41 + # data path 3 + ? + PORT_ID: 54 + : + PC_PHYS_PORT_ID: 49 + ? + PORT_ID: 55 + : + PC_PHYS_PORT_ID: 57 + # data path 4 + ? + PORT_ID: 72 + : + PC_PHYS_PORT_ID: 65 + ? + PORT_ID: 73 + : + PC_PHYS_PORT_ID: 73 + # data path 5 + ? + PORT_ID: 90 + : + PC_PHYS_PORT_ID: 81 + ? + PORT_ID: 91 + : + PC_PHYS_PORT_ID: 89 + # data path 6 + ? + PORT_ID: 108 + : + PC_PHYS_PORT_ID: 97 + ? + PORT_ID: 109 + : + PC_PHYS_PORT_ID: 105 + # data path 7 + ? + PORT_ID: 126 + : + PC_PHYS_PORT_ID: 113 + ? + PORT_ID: 127 + : + PC_PHYS_PORT_ID: 121 + # data path 8 + ? + PORT_ID: 144 + : + PC_PHYS_PORT_ID: 129 + ? + PORT_ID: 145 + : + PC_PHYS_PORT_ID: 137 + # data path 9 + ? + PORT_ID: 162 + : + PC_PHYS_PORT_ID: 145 + ? + PORT_ID: 163 + : + PC_PHYS_PORT_ID: 153 + # data path 10 + ? + PORT_ID: 180 + : + PC_PHYS_PORT_ID: 161 + ? + PORT_ID: 181 + : + PC_PHYS_PORT_ID: 169 + # data path 11 + ? + PORT_ID: 198 + : + PC_PHYS_PORT_ID: 177 + ? + PORT_ID: 199 + : + PC_PHYS_PORT_ID: 185 + # data path 12 + ? + PORT_ID: 216 + : + PC_PHYS_PORT_ID: 193 + ? + PORT_ID: 217 + : + PC_PHYS_PORT_ID: 201 + # data path 13 + ? + PORT_ID: 234 + : + PC_PHYS_PORT_ID: 209 + ? + PORT_ID: 235 + : + PC_PHYS_PORT_ID: 217 + # data path 14 + ? + PORT_ID: 252 + : + PC_PHYS_PORT_ID: 225 + ? + PORT_ID: 253 + : + PC_PHYS_PORT_ID: 233 + # data path 15 + ? + PORT_ID: 270 + : + PC_PHYS_PORT_ID: 241 + ? + PORT_ID: 271 + : + PC_PHYS_PORT_ID: 249 + # data path 16 + ? + PORT_ID: 288 + : + PC_PHYS_PORT_ID: 257 + ? + PORT_ID: 289 + : + PC_PHYS_PORT_ID: 265 + # data path 17 + ? + PORT_ID: 306 + : + PC_PHYS_PORT_ID: 273 + ? + PORT_ID: 307 + : + PC_PHYS_PORT_ID: 281 + # data path 18 + ? + PORT_ID: 324 + : + PC_PHYS_PORT_ID: 289 + ? + PORT_ID: 325 + : + PC_PHYS_PORT_ID: 297 + # data path 19 + ? + PORT_ID: 342 + : + PC_PHYS_PORT_ID: 305 + ? + PORT_ID: 343 + : + PC_PHYS_PORT_ID: 313 + # data path 20 + ? + PORT_ID: 360 + : + PC_PHYS_PORT_ID: 321 + ? + PORT_ID: 361 + : + PC_PHYS_PORT_ID: 329 + # data path 21 + ? + PORT_ID: 378 + : + PC_PHYS_PORT_ID: 337 + ? + PORT_ID: 379 + : + PC_PHYS_PORT_ID: 345 + # data path 22 + ? + PORT_ID: 396 + : + PC_PHYS_PORT_ID: 353 + ? + PORT_ID: 397 + : + PC_PHYS_PORT_ID: 361 + # data path 23 + ? + PORT_ID: 414 + : + PC_PHYS_PORT_ID: 369 + ? + PORT_ID: 415 + : + PC_PHYS_PORT_ID: 377 + # data path 24 + ? + PORT_ID: 432 + : + PC_PHYS_PORT_ID: 385 + ? + PORT_ID: 433 + : + PC_PHYS_PORT_ID: 393 + # data path 25 + ? + PORT_ID: 450 + : + PC_PHYS_PORT_ID: 401 + ? + PORT_ID: 451 + : + PC_PHYS_PORT_ID: 409 + # data path 26 + ? + PORT_ID: 468 + : + PC_PHYS_PORT_ID: 417 + ? + PORT_ID: 469 + : + PC_PHYS_PORT_ID: 425 + # data path 27 + ? + PORT_ID: 486 + : + PC_PHYS_PORT_ID: 433 + ? + PORT_ID: 487 + : + PC_PHYS_PORT_ID: 441 + # data path 28 + ? + PORT_ID: 504 + : + PC_PHYS_PORT_ID: 449 + ? + PORT_ID: 505 + : + PC_PHYS_PORT_ID: 457 + # data path 29 + ? + PORT_ID: 522 + : + PC_PHYS_PORT_ID: 465 + ? + PORT_ID: 523 + : + PC_PHYS_PORT_ID: 473 + # data path 30 + ? + PORT_ID: 540 + : + PC_PHYS_PORT_ID: 481 + ? + PORT_ID: 541 + : + PC_PHYS_PORT_ID: 489 + # data path 31 + ? + PORT_ID: 558 + : + PC_PHYS_PORT_ID: 497 + ? + PORT_ID: 559 + : + PC_PHYS_PORT_ID: 505 + ? + PORT_ID: 268 + : + PC_PHYS_PORT_ID: 514 + ? + PORT_ID: 52 + : + PC_PHYS_PORT_ID: 515 + +... +--- +device: + 0: + PC_PORT: + ? + PORT_ID: [0] + : + ENABLE: 1 + SPEED: 10000 + NUM_LANES: 1 + ? + PORT_ID: [[1, 2], + [18, 19], + [36, 37], + [54, 55], + [72, 73], + [90, 91], + [108, 109], + [126, 127], + [144, 145], + [162, 163], + [180, 181], + [198, 199], + [216, 217], + [234, 235], + [252, 253], + [270, 271], + [288, 289], + [306, 307], + [324, 325], + [342, 343], + [360, 361], + [378, 379], + [396, 397], + [414, 415], + [432, 433], + [450, 451], + [468, 469], + [486, 487], + [504, 505], + [522, 523], + [540, 541], + [558, 559]] + : + ENABLE: 0 + SPEED: 1600000 + NUM_LANES: 8 + FEC_MODE: PC_FEC_RS544_2XN_IEEE + MAX_FRAME_SIZE: 9416 + ? + PORT_ID: [52, 268] + : + ENABLE: 0 + SPEED: 10000 + NUM_LANES: 1 + FEC_MODE: PC_FEC_NONE + MAX_FRAME_SIZE: 9416 +... +--- +device: + 0: + DEVICE_CONFIG: + AUTOLOAD_BOARD_SETTINGS: 0 +... +--- +device: + 0: + # Per pipe flex counter configuration. Enable PPIU Mode + CTR_EFLEX_CONFIG: + CTR_ING_EFLEX_OPERMODE_PIPEUNIQUE: 1 + CTR_ING_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1 + CTR_EGR_EFLEX_OPERMODE_PIPEUNIQUE: 1 + CTR_EGR_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1 + + # IFP mode + FP_CONFIG: + FP_ING_OPERMODE: GLOBAL_PIPE_AWARE + + #CTR COS_ENABLE + CTR_ING_COS_Q_CONFIG: + COS_ENABLE: 0 +... \ No newline at end of file diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/hwsku.json b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/hwsku.json new file mode 100755 index 00000000000..f7e39288726 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/hwsku.json @@ -0,0 +1,202 @@ +{ + "interfaces": { + "Ethernet0": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet8": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet16": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet24": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet32": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet40": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet48": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet56": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet64": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet72": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet80": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet88": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet96": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet104": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet112": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet120": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet128": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet136": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet144": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet152": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet160": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet168": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet176": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet184": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet192": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet200": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet208": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet216": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet224": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet232": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet240": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet248": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet256": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet264": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet272": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet280": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet288": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet296": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet304": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet312": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet320": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet328": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet336": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet344": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet352": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet360": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet368": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet376": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet384": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet392": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet400": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet408": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet416": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet424": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet432": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet440": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet448": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet456": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet464": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet472": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet480": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet488": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet496": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet504": { + "default_brkout_mode": "1x1600G" + }, + "Ethernet512": { + "default_brkout_mode": "1x10G" + }, + "Ethernet513": { + "default_brkout_mode": "1x10G" + } + } +} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/pg_profile_lookup.ini b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/pg_profile_lookup.ini new file mode 100755 index 00000000000..f7e31b0f6d4 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/pg_profile_lookup.ini @@ -0,0 +1,23 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 10000 5m 1248 2288 35776 0 2288 + 25000 5m 1248 2288 53248 0 2288 + 40000 5m 1248 2288 66560 0 2288 + 50000 5m 1248 2288 90272 0 2288 + 100000 5m 1248 2288 165568 0 2288 + 400000 5m 1248 2288 307848 0 2288 + 800000 5m 1248 2288 572516 0 2288 + 10000 40m 1248 2288 37024 0 2288 + 25000 40m 1248 2288 53248 0 2288 + 40000 40m 1248 2288 71552 0 2288 + 50000 40m 1248 2288 96096 0 2288 + 100000 40m 1248 2288 177632 0 2288 + 400000 40m 1248 2288 330200 0 2288 + 800000 40m 1248 2288 614172 0 2288 + 10000 300m 1248 2288 46176 0 2288 + 25000 300m 1248 2288 79040 0 2288 + 40000 300m 1248 2288 108160 0 2288 + 50000 300m 1248 2288 141856 0 2288 + 100000 300m 1248 2288 268736 0 2288 + 400000 300m 1248 2288 499618 0 2288 + 800000 300m 1248 2288 929132 0 2288 diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/port_config.ini b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/port_config.ini new file mode 100755 index 00000000000..491daca12c8 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/port_config.ini @@ -0,0 +1,67 @@ +# name lanes alias index speed fec +Ethernet0 9,10,11,12,13,14,15,16 Ethernet1/1 1 1600000 rs +Ethernet8 1,2,3,4,5,6,7,8 Ethernet2/1 2 1600000 rs +Ethernet16 49,50,51,52,53,54,55,56 Ethernet3/1 3 1600000 rs +Ethernet24 57,58,59,60,61,62,63,64 Ethernet4/1 4 1600000 rs +Ethernet32 73,74,75,76,77,78,79,80 Ethernet5/1 5 1600000 rs +Ethernet40 65,66,67,68,69,70,71,72 Ethernet6/1 6 1600000 rs +Ethernet48 113,114,115,116,117,118,119,120 Ethernet7/1 7 1600000 rs +Ethernet56 121,122,123,124,125,126,127,128 Ethernet8/1 8 1600000 rs +Ethernet64 137,138,139,140,141,142,143,144 Ethernet9/1 9 1600000 rs +Ethernet72 129,130,131,132,133,134,135,136 Ethernet10/1 10 1600000 rs +Ethernet80 177,178,179,180,181,182,183,184 Ethernet11/1 11 1600000 rs +Ethernet88 185,186,187,188,189,190,191,192 Ethernet12/1 12 1600000 rs +Ethernet96 201,202,203,204,205,206,207,208 Ethernet13/1 13 1600000 rs +Ethernet104 193,194,195,196,197,198,199,200 Ethernet14/1 14 1600000 rs +Ethernet112 241,242,243,244,245,246,247,248 Ethernet15/1 15 1600000 rs +Ethernet120 249,250,251,252,253,254,255,256 Ethernet16/1 16 1600000 rs +Ethernet128 265,266,267,268,269,270,271,272 Ethernet17/1 17 1600000 rs +Ethernet136 257,258,259,260,261,262,263,264 Ethernet18/1 18 1600000 rs +Ethernet144 305,306,307,308,309,310,311,312 Ethernet19/1 19 1600000 rs +Ethernet152 313,314,315,316,317,318,319,320 Ethernet20/1 20 1600000 rs +Ethernet160 329,330,331,332,333,334,335,336 Ethernet21/1 21 1600000 rs +Ethernet168 321,322,323,324,325,326,327,328 Ethernet22/1 22 1600000 rs +Ethernet176 369,370,371,372,373,374,375,376 Ethernet23/1 23 1600000 rs +Ethernet184 377,378,379,380,381,382,383,384 Ethernet24/1 24 1600000 rs +Ethernet192 393,394,395,396,397,398,399,400 Ethernet25/1 25 1600000 rs +Ethernet200 385,386,387,388,389,390,391,392 Ethernet26/1 26 1600000 rs +Ethernet208 433,434,435,436,437,438,439,440 Ethernet27/1 27 1600000 rs +Ethernet216 441,442,443,444,445,446,447,448 Ethernet28/1 28 1600000 rs +Ethernet224 457,458,459,460,461,462,463,464 Ethernet29/1 29 1600000 rs +Ethernet232 449,450,451,452,453,454,455,456 Ethernet30/1 30 1600000 rs +Ethernet240 497,498,499,500,501,502,503,504 Ethernet31/1 31 1600000 rs +Ethernet248 505,506,507,508,509,510,511,512 Ethernet32/1 32 1600000 rs +Ethernet256 25,26,27,28,29,30,31,32 Ethernet33/1 33 1600000 rs +Ethernet264 17,18,19,20,21,22,23,24 Ethernet34/1 34 1600000 rs +Ethernet272 33,34,35,36,37,38,39,40 Ethernet35/1 35 1600000 rs +Ethernet280 41,42,43,44,45,46,47,48 Ethernet36/1 36 1600000 rs +Ethernet288 89,90,91,92,93,94,95,96 Ethernet37/1 37 1600000 rs +Ethernet296 81,82,83,84,85,86,87,88 Ethernet38/1 38 1600000 rs +Ethernet304 97,98,99,100,101,102,103,104 Ethernet39/1 39 1600000 rs +Ethernet312 105,106,107,108,109,110,111,112 Ethernet40/1 40 1600000 rs +Ethernet320 153,154,155,156,157,158,159,160 Ethernet41/1 41 1600000 rs +Ethernet328 145,146,147,148,149,150,151,152 Ethernet42/1 42 1600000 rs +Ethernet336 161,162,163,164,165,166,167,168 Ethernet43/1 43 1600000 rs +Ethernet344 169,170,171,172,173,174,175,176 Ethernet44/1 44 1600000 rs +Ethernet352 217,218,219,220,221,222,223,224 Ethernet45/1 45 1600000 rs +Ethernet360 209,210,211,212,213,214,215,216 Ethernet46/1 46 1600000 rs +Ethernet368 225,226,227,228,229,230,231,232 Ethernet47/1 47 1600000 rs +Ethernet376 233,234,235,236,237,238,239,240 Ethernet48/1 48 1600000 rs +Ethernet384 281,282,283,284,285,286,287,288 Ethernet49/1 49 1600000 rs +Ethernet392 273,274,275,276,277,278,279,280 Ethernet50/1 50 1600000 rs +Ethernet400 289,290,291,292,293,294,295,296 Ethernet51/1 51 1600000 rs +Ethernet408 297,298,299,300,301,302,303,304 Ethernet52/1 52 1600000 rs +Ethernet416 345,346,347,348,349,350,351,352 Ethernet53/1 53 1600000 rs +Ethernet424 337,338,339,340,341,342,343,344 Ethernet54/1 54 1600000 rs +Ethernet432 353,354,355,356,357,358,359,360 Ethernet55/1 55 1600000 rs +Ethernet440 361,362,363,364,365,366,367,368 Ethernet56/1 56 1600000 rs +Ethernet448 409,410,411,412,413,414,415,416 Ethernet57/1 57 1600000 rs +Ethernet456 401,402,403,404,405,406,407,408 Ethernet58/1 58 1600000 rs +Ethernet464 417,418,419,420,421,422,423,424 Ethernet59/1 59 1600000 rs +Ethernet472 425,426,427,428,429,430,431,432 Ethernet60/1 60 1600000 rs +Ethernet480 473,474,475,476,477,478,479,480 Ethernet61/1 61 1600000 rs +Ethernet488 465,466,467,468,469,470,471,472 Ethernet62/1 62 1600000 rs +Ethernet496 481,482,483,484,485,486,487,488 Ethernet63/1 63 1600000 rs +Ethernet504 489,490,491,492,493,494,495,496 Ethernet64/1 64 1600000 rs +Ethernet512 514 Ethernet65 65 10000 none +Ethernet513 515 Ethernet66 66 10000 none diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/profile.ini b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/profile.ini new file mode 100755 index 00000000000..4eda67c91a6 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/profile.ini @@ -0,0 +1 @@ +switchMacAddress=XX:XX:XX:XX:XX:XX diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/qos.json.j2 b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/qos.json.j2 new file mode 100755 index 00000000000..3e548325ea3 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/qos.json.j2 @@ -0,0 +1 @@ +{%- include 'qos_config.j2' %} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/sai.profile b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/sai.profile new file mode 100755 index 00000000000..07e77e2eb1d --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/Nokia-IXR7220-H6-64/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/h6-64.yml diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/custom_led.bin b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/custom_led.bin new file mode 100644 index 00000000000..4a0e618e5a3 Binary files /dev/null and b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/custom_led.bin differ diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/default_sku b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/default_sku new file mode 100755 index 00000000000..b0bb5824384 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/default_sku @@ -0,0 +1 @@ +Nokia-IXR7220-H6-64 t1 diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/installer.conf b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/installer.conf new file mode 100755 index 00000000000..cdaaf72f616 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/installer.conf @@ -0,0 +1 @@ +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="tpm_tis.interrupts=0" diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/led_proc_init.soc b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/led_proc_init.soc new file mode 100755 index 00000000000..eda09a0dd1f --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/led_proc_init.soc @@ -0,0 +1,4 @@ +led stop +led load /usr/share/sonic/platform/custom_led.bin +led auto on +led start diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/pcie.yaml b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/pcie.yaml new file mode 100644 index 00000000000..4a4da1a30bf --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/pcie.yaml @@ -0,0 +1,224 @@ +- bus: '00' + dev: '00' + fn: '0' + id: 14b5 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Root + Complex (rev 01)' +- bus: '00' + dev: '00' + fn: '2' + id: 14b6 + name: 'IOMMU: Advanced Micro Devices, Inc. [AMD] Family 17h-19h IOMMU' +- bus: '00' + dev: '01' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: '01' + fn: '2' + id: 14b8 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge' +- bus: '00' + dev: '02' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: '02' + fn: '1' + id: 14ba + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge' +- bus: '00' + dev: '02' + fn: '5' + id: 14ba + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe GPP Bridge' +- bus: '00' + dev: '03' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: '04' + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: 08 + fn: '0' + id: 14b7 + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h PCIe Dummy + Host Bridge (rev 01)' +- bus: '00' + dev: 08 + fn: '1' + id: 14b9 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe + GPP Bridge (rev 10)' +- bus: '00' + dev: 08 + fn: '2' + id: 14b9 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe + GPP Bridge (rev 10)' +- bus: '00' + dev: 08 + fn: '3' + id: 14b9 + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h-19h Internal PCIe + GPP Bridge (rev 10)' +- bus: '00' + dev: '14' + fn: '0' + id: 790b + name: 'SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)' +- bus: '00' + dev: '14' + fn: '3' + id: 790e + name: 'ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)' +- bus: '00' + dev: '18' + fn: '0' + id: '1679' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 0' +- bus: '00' + dev: '18' + fn: '1' + id: 167a + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 1' +- bus: '00' + dev: '18' + fn: '2' + id: 167b + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 2' +- bus: '00' + dev: '18' + fn: '3' + id: 167c + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 3' +- bus: '00' + dev: '18' + fn: '4' + id: 167d + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 4' +- bus: '00' + dev: '18' + fn: '5' + id: 167e + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 5' +- bus: '00' + dev: '18' + fn: '6' + id: 167f + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 6' +- bus: '00' + dev: '18' + fn: '7' + id: '1680' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Rembrandt Data Fabric: Device + 18h; Function 7' +- bus: '01' + dev: '00' + fn: '0' + id: f914 + name: 'Ethernet controller: Broadcom Inc. and subsidiaries BCM78914 Switch ASIC + [Tomahawk6] (rev 11)' +- bus: '02' + dev: '00' + fn: '0' + id: '7021' + name: 'Memory controller: Xilinx Corporation Device 7021' +- bus: '03' + dev: '00' + fn: '0' + id: '1533' + name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev + 03)' +- bus: '04' + dev: '00' + fn: '0' + id: 145a + name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD/ATI] + Dummy Function (absent graphics controller)' +- bus: '04' + dev: '00' + fn: '2' + id: '1649' + name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP' +- bus: '04' + dev: '00' + fn: '3' + id: 161d + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #3' +- bus: '04' + dev: '00' + fn: '4' + id: 161e + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #4' +- bus: '04' + dev: '00' + fn: '5' + id: 15e2 + name: 'Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x + Audio Coprocessor (rev 60)' +- bus: '04' + dev: '00' + fn: '6' + id: 15e3 + name: 'Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio + Controller' +- bus: '04' + dev: '00' + fn: '7' + id: 15e4 + name: 'Signal processing controller: Advanced Micro Devices, Inc. [AMD] Sensor Fusion + Hub' +- bus: '05' + dev: '00' + fn: '0' + id: '7901' + name: 'SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI + mode] (rev a1)' +- bus: '05' + dev: '00' + fn: '2' + id: '1458' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' +- bus: '05' + dev: '00' + fn: '3' + id: '1458' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' +- bus: '06' + dev: '00' + fn: '0' + id: 161f + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #8' +- bus: '06' + dev: '00' + fn: '3' + id: 15d6 + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #5' +- bus: '06' + dev: '00' + fn: '4' + id: 15d7 + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4 XHCI controller + #6' diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform.json b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform.json new file mode 100755 index 00000000000..2a34ba113dc --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform.json @@ -0,0 +1,4228 @@ +{ + "chassis": { + "name": "7220 IXR-H6-64", + "components": [ + { + "name": "BIOS" + }, + { + "name": "SYS_FPGA" + }, + { + "name": "SYS_CPLD" + }, + { + "name": "PORT_CPLD0" + }, + { + "name": "PORT_CPLD1" + }, + { + "name": "FCM0_CPLD" + }, + { + "name": "FCM1_CPLD" + } + ], + "fans": [ + { + "name": "Fan1", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan2", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan3", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan4", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan5", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan6", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan7", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan8", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan9", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan10", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan11", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan12", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan13", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan14", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan15", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan16", + "status_led": { + "controllable": false + } + } + ], + "fan_drawers": [ + { + "name": "drawer1", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan1", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan2", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer2", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan3", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan4", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer3", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan5", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan6", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer4", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan7", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan8", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer5", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan9", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan10", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer6", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan11", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan12", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer7", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan13", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan14", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer8", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan15", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan16", + "status_led": { + "controllable": false + } + } + ] + } + ], + "psus": [ + { + "name": "PSU1", + "status_led": { + "controllable": false + }, + "current": true, + "power": true, + "max_power": false, + "voltage_high_threshold": false, + "voltage_low_threshold": false, + "temperature": false + }, + { + "name": "PSU2", + "status_led": { + "controllable": false + }, + "current": true, + "power": true, + "max_power": false, + "voltage_high_threshold": false, + "voltage_low_threshold": false, + "temperature": false + }, + { + "name": "PSU3", + "status_led": { + "controllable": false + }, + "current": true, + "power": true, + "max_power": false, + "voltage_high_threshold": false, + "voltage_low_threshold": false, + "temperature": false + }, + { + "name": "PSU4", + "status_led": { + "controllable": false + }, + "current": true, + "power": true, + "max_power": false, + "voltage_high_threshold": false, + "voltage_low_threshold": false, + "temperature": false + } + ], + "thermals": [ + { + "name": "CPU Board", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "CB Left", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "CB Right", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "SFP Board", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "MB Left", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "MB Center 1", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "MB MAC", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "MB Center 2", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "MB Right", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "MB Front Right", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "FCM Upper", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "FCM Lower", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "CPU", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "DDR", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "Max Port Temp.", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "SSD", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "ASIC TH6", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + } + ], + "sfps": [ + { + "name": "OSFP_1" + }, + { + "name": "OSFP_2" + }, + { + "name": "OSFP_3" + }, + { + "name": "OSFP_4" + }, + { + "name": "OSFP_5" + }, + { + "name": "OSFP_6" + }, + { + "name": "OSFP_7" + }, + { + "name": "OSFP_8" + }, + { + "name": "OSFP_9" + }, + { + "name": "OSFP_10" + }, + { + "name": "OSFP_11" + }, + { + "name": "OSFP_12" + }, + { + "name": "OSFP_13" + }, + { + "name": "OSFP_14" + }, + { + "name": "OSFP_15" + }, + { + "name": "OSFP_16" + }, + { + "name": "OSFP_17" + }, + { + "name": "OSFP_18" + }, + { + "name": "OSFP_19" + }, + { + "name": "OSFP_20" + }, + { + "name": "OSFP_21" + }, + { + "name": "OSFP_22" + }, + { + "name": "OSFP_23" + }, + { + "name": "OSFP_24" + }, + { + "name": "OSFP_25" + }, + { + "name": "OSFP_26" + }, + { + "name": "OSFP_27" + }, + { + "name": "OSFP_28" + }, + { + "name": "OSFP_29" + }, + { + "name": "OSFP_30" + }, + { + "name": "OSFP_31" + }, + { + "name": "OSFP_32" + }, + { + "name": "OSFP_33" + }, + { + "name": "OSFP_34" + }, + { + "name": "OSFP_35" + }, + { + "name": "OSFP_36" + }, + { + "name": "OSFP_37" + }, + { + "name": "OSFP_38" + }, + { + "name": "OSFP_39" + }, + { + "name": "OSFP_40" + }, + { + "name": "OSFP_41" + }, + { + "name": "OSFP_42" + }, + { + "name": "OSFP_43" + }, + { + "name": "OSFP_44" + }, + { + "name": "OSFP_45" + }, + { + "name": "OSFP_46" + }, + { + "name": "OSFP_47" + }, + { + "name": "OSFP_48" + }, + { + "name": "OSFP_49" + }, + { + "name": "OSFP_50" + }, + { + "name": "OSFP_51" + }, + { + "name": "OSFP_52" + }, + { + "name": "OSFP_53" + }, + { + "name": "OSFP_54" + }, + { + "name": "OSFP_55" + }, + { + "name": "OSFP_56" + }, + { + "name": "OSFP_57" + }, + { + "name": "OSFP_58" + }, + { + "name": "OSFP_59" + }, + { + "name": "OSFP_60" + }, + { + "name": "OSFP_61" + }, + { + "name": "OSFP_62" + }, + { + "name": "OSFP_63" + }, + { + "name": "OSFP_64" + }, + { + "name": "SFP28_0" + }, + { + "name": "SFP28_1" + } + ] + }, + "interfaces": { + "Ethernet0": { + "index": "1,1,1,1,1,1,1,1", + "lanes": "9,10,11,12,13,14,15,16", + "breakout_modes": { + "1x1600G": [ + "Ethernet1/1" + ], + "1x800G": [ + "Ethernet1/1" + ], + "1x100G(4)": [ + "Ethernet1/1" + ], + "2x400G": [ + "Ethernet1/1", + "Ethernet1/5" + ], + "4x200G": [ + "Ethernet1/1", + "Ethernet1/3", + "Ethernet1/5", + "Ethernet1/7" + ], + "8x100G": [ + "Ethernet1/1", + "Ethernet1/2", + "Ethernet1/3", + "Ethernet1/4", + "Ethernet1/5", + "Ethernet1/6", + "Ethernet1/7", + "Ethernet1/8" + ], + "2x800G": [ + "Ethernet1/1", + "Ethernet1/5" + ], + "4x400G": [ + "Ethernet1/1", + "Ethernet1/3", + "Ethernet1/5", + "Ethernet1/7" + ], + "8x200G": [ + "Ethernet1/1", + "Ethernet1/2", + "Ethernet1/3", + "Ethernet1/4", + "Ethernet1/5", + "Ethernet1/6", + "Ethernet1/7", + "Ethernet1/8" + ] + } + }, + "Ethernet8": { + "index": "2,2,2,2,2,2,2,2", + "lanes": "1,2,3,4,5,6,7,8", + "breakout_modes": { + "1x1600G": [ + "Ethernet2/1" + ], + "1x800G": [ + "Ethernet2/1" + ], + "1x100G(4)": [ + "Ethernet2/1" + ], + "2x400G": [ + "Ethernet2/1", + "Ethernet2/5" + ], + "4x200G": [ + "Ethernet2/1", + "Ethernet2/3", + "Ethernet2/5", + "Ethernet2/7" + ], + "8x100G": [ + "Ethernet2/1", + "Ethernet2/2", + "Ethernet2/3", + "Ethernet2/4", + "Ethernet2/5", + "Ethernet2/6", + "Ethernet2/7", + "Ethernet2/8" + ], + "2x800G": [ + "Ethernet2/1", + "Ethernet2/5" + ], + "4x400G": [ + "Ethernet2/1", + "Ethernet2/3", + "Ethernet2/5", + "Ethernet2/7" + ], + "8x200G": [ + "Ethernet2/1", + "Ethernet2/2", + "Ethernet2/3", + "Ethernet2/4", + "Ethernet2/5", + "Ethernet2/6", + "Ethernet2/7", + "Ethernet2/8" + ] + } + }, + "Ethernet16": { + "index": "3,3,3,3,3,3,3,3", + "lanes": "49,50,51,52,53,54,55,56", + "breakout_modes": { + "1x1600G": [ + "Ethernet3/1" + ], + "1x800G": [ + "Ethernet3/1" + ], + "1x100G(4)": [ + "Ethernet3/1" + ], + "2x400G": [ + "Ethernet3/1", + "Ethernet3/5" + ], + "4x200G": [ + "Ethernet3/1", + "Ethernet3/3", + "Ethernet3/5", + "Ethernet3/7" + ], + "8x100G": [ + "Ethernet3/1", + "Ethernet3/2", + "Ethernet3/3", + "Ethernet3/4", + "Ethernet3/5", + "Ethernet3/6", + "Ethernet3/7", + "Ethernet3/8" + ], + "2x800G": [ + "Ethernet3/1", + "Ethernet3/5" + ], + "4x400G": [ + "Ethernet3/1", + "Ethernet3/3", + "Ethernet3/5", + "Ethernet3/7" + ], + "8x200G": [ + "Ethernet3/1", + "Ethernet3/2", + "Ethernet3/3", + "Ethernet3/4", + "Ethernet3/5", + "Ethernet3/6", + "Ethernet3/7", + "Ethernet3/8" + ] + } + }, + "Ethernet24": { + "index": "4,4,4,4,4,4,4,4", + "lanes": "57,58,59,60,61,62,63,64", + "breakout_modes": { + "1x1600G": [ + "Ethernet4/1" + ], + "1x800G": [ + "Ethernet4/1" + ], + "1x100G(4)": [ + "Ethernet4/1" + ], + "2x400G": [ + "Ethernet4/1", + "Ethernet4/5" + ], + "4x200G": [ + "Ethernet4/1", + "Ethernet4/3", + "Ethernet4/5", + "Ethernet4/7" + ], + "8x100G": [ + "Ethernet4/1", + "Ethernet4/2", + "Ethernet4/3", + "Ethernet4/4", + "Ethernet4/5", + "Ethernet4/6", + "Ethernet4/7", + "Ethernet4/8" + ], + "2x800G": [ + "Ethernet4/1", + "Ethernet4/5" + ], + "4x400G": [ + "Ethernet4/1", + "Ethernet4/3", + "Ethernet4/5", + "Ethernet4/7" + ], + "8x200G": [ + "Ethernet4/1", + "Ethernet4/2", + "Ethernet4/3", + "Ethernet4/4", + "Ethernet4/5", + "Ethernet4/6", + "Ethernet4/7", + "Ethernet4/8" + ] + } + }, + "Ethernet32": { + "index": "5,5,5,5,5,5,5,5", + "lanes": "73,74,75,76,77,78,79,80", + "breakout_modes": { + "1x1600G": [ + "Ethernet5/1" + ], + "1x800G": [ + "Ethernet5/1" + ], + "1x100G(4)": [ + "Ethernet5/1" + ], + "2x400G": [ + "Ethernet5/1", + "Ethernet5/5" + ], + "4x200G": [ + "Ethernet5/1", + "Ethernet5/3", + "Ethernet5/5", + "Ethernet5/7" + ], + "8x100G": [ + "Ethernet5/1", + "Ethernet5/2", + "Ethernet5/3", + "Ethernet5/4", + "Ethernet5/5", + "Ethernet5/6", + "Ethernet5/7", + "Ethernet5/8" + ], + "2x800G": [ + "Ethernet5/1", + "Ethernet5/5" + ], + "4x400G": [ + "Ethernet5/1", + "Ethernet5/3", + "Ethernet5/5", + "Ethernet5/7" + ], + "8x200G": [ + "Ethernet5/1", + "Ethernet5/2", + "Ethernet5/3", + "Ethernet5/4", + "Ethernet5/5", + "Ethernet5/6", + "Ethernet5/7", + "Ethernet5/8" + ] + } + }, + "Ethernet40": { + "index": "6,6,6,6,6,6,6,6", + "lanes": "65,66,67,68,69,70,71,72", + "breakout_modes": { + "1x1600G": [ + "Ethernet6/1" + ], + "1x800G": [ + "Ethernet6/1" + ], + "1x100G(4)": [ + "Ethernet6/1" + ], + "2x400G": [ + "Ethernet6/1", + "Ethernet6/5" + ], + "4x200G": [ + "Ethernet6/1", + "Ethernet6/3", + "Ethernet6/5", + "Ethernet6/7" + ], + "8x100G": [ + "Ethernet6/1", + "Ethernet6/2", + "Ethernet6/3", + "Ethernet6/4", + "Ethernet6/5", + "Ethernet6/6", + "Ethernet6/7", + "Ethernet6/8" + ], + "2x800G": [ + "Ethernet6/1", + "Ethernet6/5" + ], + "4x400G": [ + "Ethernet6/1", + "Ethernet6/3", + "Ethernet6/5", + "Ethernet6/7" + ], + "8x200G": [ + "Ethernet6/1", + "Ethernet6/2", + "Ethernet6/3", + "Ethernet6/4", + "Ethernet6/5", + "Ethernet6/6", + "Ethernet6/7", + "Ethernet6/8" + ] + } + }, + "Ethernet48": { + "index": "7,7,7,7,7,7,7,7", + "lanes": "113,114,115,116,117,118,119,120", + "breakout_modes": { + "1x1600G": [ + "Ethernet7/1" + ], + "1x800G": [ + "Ethernet7/1" + ], + "1x100G(4)": [ + "Ethernet7/1" + ], + "2x400G": [ + "Ethernet7/1", + "Ethernet7/5" + ], + "4x200G": [ + "Ethernet7/1", + "Ethernet7/3", + "Ethernet7/5", + "Ethernet7/7" + ], + "8x100G": [ + "Ethernet7/1", + "Ethernet7/2", + "Ethernet7/3", + "Ethernet7/4", + "Ethernet7/5", + "Ethernet7/6", + "Ethernet7/7", + "Ethernet7/8" + ], + "2x800G": [ + "Ethernet7/1", + "Ethernet7/5" + ], + "4x400G": [ + "Ethernet7/1", + "Ethernet7/3", + "Ethernet7/5", + "Ethernet7/7" + ], + "8x200G": [ + "Ethernet7/1", + "Ethernet7/2", + "Ethernet7/3", + "Ethernet7/4", + "Ethernet7/5", + "Ethernet7/6", + "Ethernet7/7", + "Ethernet7/8" + ] + } + }, + "Ethernet56": { + "index": "8,8,8,8,8,8,8,8", + "lanes": "121,122,123,124,125,126,127,128", + "breakout_modes": { + "1x1600G": [ + "Ethernet8/1" + ], + "1x800G": [ + "Ethernet8/1" + ], + "1x100G(4)": [ + "Ethernet8/1" + ], + "2x400G": [ + "Ethernet8/1", + "Ethernet8/5" + ], + "4x200G": [ + "Ethernet8/1", + "Ethernet8/3", + "Ethernet8/5", + "Ethernet8/7" + ], + "8x100G": [ + "Ethernet8/1", + "Ethernet8/2", + "Ethernet8/3", + "Ethernet8/4", + "Ethernet8/5", + "Ethernet8/6", + "Ethernet8/7", + "Ethernet8/8" + ], + "2x800G": [ + "Ethernet8/1", + "Ethernet8/5" + ], + "4x400G": [ + "Ethernet8/1", + "Ethernet8/3", + "Ethernet8/5", + "Ethernet8/7" + ], + "8x200G": [ + "Ethernet8/1", + "Ethernet8/2", + "Ethernet8/3", + "Ethernet8/4", + "Ethernet8/5", + "Ethernet8/6", + "Ethernet8/7", + "Ethernet8/8" + ] + } + }, + "Ethernet64": { + "index": "9,9,9,9,9,9,9,9", + "lanes": "137,138,139,140,141,142,143,144", + "breakout_modes": { + "1x1600G": [ + "Ethernet9/1" + ], + "1x800G": [ + "Ethernet9/1" + ], + "1x100G(4)": [ + "Ethernet9/1" + ], + "2x400G": [ + "Ethernet9/1", + "Ethernet9/5" + ], + "4x200G": [ + "Ethernet9/1", + "Ethernet9/3", + "Ethernet9/5", + "Ethernet9/7" + ], + "8x100G": [ + "Ethernet9/1", + "Ethernet9/2", + "Ethernet9/3", + "Ethernet9/4", + "Ethernet9/5", + "Ethernet9/6", + "Ethernet9/7", + "Ethernet9/8" + ], + "2x800G": [ + "Ethernet9/1", + "Ethernet9/5" + ], + "4x400G": [ + "Ethernet9/1", + "Ethernet9/3", + "Ethernet9/5", + "Ethernet9/7" + ], + "8x200G": [ + "Ethernet9/1", + "Ethernet9/2", + "Ethernet9/3", + "Ethernet9/4", + "Ethernet9/5", + "Ethernet9/6", + "Ethernet9/7", + "Ethernet9/8" + ] + } + }, + "Ethernet72": { + "index": "10,10,10,10,10,10,10,10", + "lanes": "129,130,131,132,133,134,135,136", + "breakout_modes": { + "1x1600G": [ + "Ethernet10/1" + ], + "1x800G": [ + "Ethernet10/1" + ], + "1x100G(4)": [ + "Ethernet10/1" + ], + "2x400G": [ + "Ethernet10/1", + "Ethernet10/5" + ], + "4x200G": [ + "Ethernet10/1", + "Ethernet10/3", + "Ethernet10/5", + "Ethernet10/7" + ], + "8x100G": [ + "Ethernet10/1", + "Ethernet10/2", + "Ethernet10/3", + "Ethernet10/4", + "Ethernet10/5", + "Ethernet10/6", + "Ethernet10/7", + "Ethernet10/8" + ], + "2x800G": [ + "Ethernet10/1", + "Ethernet10/5" + ], + "4x400G": [ + "Ethernet10/1", + "Ethernet10/3", + "Ethernet10/5", + "Ethernet10/7" + ], + "8x200G": [ + "Ethernet10/1", + "Ethernet10/2", + "Ethernet10/3", + "Ethernet10/4", + "Ethernet10/5", + "Ethernet10/6", + "Ethernet10/7", + "Ethernet10/8" + ] + } + }, + "Ethernet80": { + "index": "11,11,11,11,11,11,11,11", + "lanes": "177,178,179,180,181,182,183,184", + "breakout_modes": { + "1x1600G": [ + "Ethernet11/1" + ], + "1x800G": [ + "Ethernet11/1" + ], + "1x100G(4)": [ + "Ethernet11/1" + ], + "2x400G": [ + "Ethernet11/1", + "Ethernet11/5" + ], + "4x200G": [ + "Ethernet11/1", + "Ethernet11/3", + "Ethernet11/5", + "Ethernet11/7" + ], + "8x100G": [ + "Ethernet11/1", + "Ethernet11/2", + "Ethernet11/3", + "Ethernet11/4", + "Ethernet11/5", + "Ethernet11/6", + "Ethernet11/7", + "Ethernet11/8" + ], + "2x800G": [ + "Ethernet11/1", + "Ethernet11/5" + ], + "4x400G": [ + "Ethernet11/1", + "Ethernet11/3", + "Ethernet11/5", + "Ethernet11/7" + ], + "8x200G": [ + "Ethernet11/1", + "Ethernet11/2", + "Ethernet11/3", + "Ethernet11/4", + "Ethernet11/5", + "Ethernet11/6", + "Ethernet11/7", + "Ethernet11/8" + ] + } + }, + "Ethernet88": { + "index": "12,12,12,12,12,12,12,12", + "lanes": "185,186,187,188,189,190,191,192", + "breakout_modes": { + "1x1600G": [ + "Ethernet12/1" + ], + "1x800G": [ + "Ethernet12/1" + ], + "1x100G(4)": [ + "Ethernet12/1" + ], + "2x400G": [ + "Ethernet12/1", + "Ethernet12/5" + ], + "4x200G": [ + "Ethernet12/1", + "Ethernet12/3", + "Ethernet12/5", + "Ethernet12/7" + ], + "8x100G": [ + "Ethernet12/1", + "Ethernet12/2", + "Ethernet12/3", + "Ethernet12/4", + "Ethernet12/5", + "Ethernet12/6", + "Ethernet12/7", + "Ethernet12/8" + ], + "2x800G": [ + "Ethernet12/1", + "Ethernet12/5" + ], + "4x400G": [ + "Ethernet12/1", + "Ethernet12/3", + "Ethernet12/5", + "Ethernet12/7" + ], + "8x200G": [ + "Ethernet12/1", + "Ethernet12/2", + "Ethernet12/3", + "Ethernet12/4", + "Ethernet12/5", + "Ethernet12/6", + "Ethernet12/7", + "Ethernet12/8" + ] + } + }, + "Ethernet96": { + "index": "13,13,13,13,13,13,13,13", + "lanes": "201,202,203,204,205,206,207,208", + "breakout_modes": { + "1x1600G": [ + "Ethernet13/1" + ], + "1x800G": [ + "Ethernet13/1" + ], + "1x100G(4)": [ + "Ethernet13/1" + ], + "2x400G": [ + "Ethernet13/1", + "Ethernet13/5" + ], + "4x200G": [ + "Ethernet13/1", + "Ethernet13/3", + "Ethernet13/5", + "Ethernet13/7" + ], + "8x100G": [ + "Ethernet13/1", + "Ethernet13/2", + "Ethernet13/3", + "Ethernet13/4", + "Ethernet13/5", + "Ethernet13/6", + "Ethernet13/7", + "Ethernet13/8" + ], + "2x800G": [ + "Ethernet13/1", + "Ethernet13/5" + ], + "4x400G": [ + "Ethernet13/1", + "Ethernet13/3", + "Ethernet13/5", + "Ethernet13/7" + ], + "8x200G": [ + "Ethernet13/1", + "Ethernet13/2", + "Ethernet13/3", + "Ethernet13/4", + "Ethernet13/5", + "Ethernet13/6", + "Ethernet13/7", + "Ethernet13/8" + ] + } + }, + "Ethernet104": { + "index": "14,14,14,14,14,14,14,14", + "lanes": "193,194,195,196,197,198,199,200", + "breakout_modes": { + "1x1600G": [ + "Ethernet14/1" + ], + "1x800G": [ + "Ethernet14/1" + ], + "1x100G(4)": [ + "Ethernet14/1" + ], + "2x400G": [ + "Ethernet14/1", + "Ethernet14/5" + ], + "4x200G": [ + "Ethernet14/1", + "Ethernet14/3", + "Ethernet14/5", + "Ethernet14/7" + ], + "8x100G": [ + "Ethernet14/1", + "Ethernet14/2", + "Ethernet14/3", + "Ethernet14/4", + "Ethernet14/5", + "Ethernet14/6", + "Ethernet14/7", + "Ethernet14/8" + ], + "2x800G": [ + "Ethernet14/1", + "Ethernet14/5" + ], + "4x400G": [ + "Ethernet14/1", + "Ethernet14/3", + "Ethernet14/5", + "Ethernet14/7" + ], + "8x200G": [ + "Ethernet14/1", + "Ethernet14/2", + "Ethernet14/3", + "Ethernet14/4", + "Ethernet14/5", + "Ethernet14/6", + "Ethernet14/7", + "Ethernet14/8" + ] + } + }, + "Ethernet112": { + "index": "15,15,15,15,15,15,15,15", + "lanes": "241,242,243,244,245,246,247,248", + "breakout_modes": { + "1x1600G": [ + "Ethernet15/1" + ], + "1x800G": [ + "Ethernet15/1" + ], + "1x100G(4)": [ + "Ethernet15/1" + ], + "2x400G": [ + "Ethernet15/1", + "Ethernet15/5" + ], + "4x200G": [ + "Ethernet15/1", + "Ethernet15/3", + "Ethernet15/5", + "Ethernet15/7" + ], + "8x100G": [ + "Ethernet15/1", + "Ethernet15/2", + "Ethernet15/3", + "Ethernet15/4", + "Ethernet15/5", + "Ethernet15/6", + "Ethernet15/7", + "Ethernet15/8" + ], + "2x800G": [ + "Ethernet15/1", + "Ethernet15/5" + ], + "4x400G": [ + "Ethernet15/1", + "Ethernet15/3", + "Ethernet15/5", + "Ethernet15/7" + ], + "8x200G": [ + "Ethernet15/1", + "Ethernet15/2", + "Ethernet15/3", + "Ethernet15/4", + "Ethernet15/5", + "Ethernet15/6", + "Ethernet15/7", + "Ethernet15/8" + ] + } + }, + "Ethernet120": { + "index": "16,16,16,16,16,16,16,16", + "lanes": "249,250,251,252,253,254,255,256", + "breakout_modes": { + "1x1600G": [ + "Ethernet16/1" + ], + "1x800G": [ + "Ethernet16/1" + ], + "1x100G(4)": [ + "Ethernet16/1" + ], + "2x400G": [ + "Ethernet16/1", + "Ethernet16/5" + ], + "4x200G": [ + "Ethernet16/1", + "Ethernet16/3", + "Ethernet16/5", + "Ethernet16/7" + ], + "8x100G": [ + "Ethernet16/1", + "Ethernet16/2", + "Ethernet16/3", + "Ethernet16/4", + "Ethernet16/5", + "Ethernet16/6", + "Ethernet16/7", + "Ethernet16/8" + ], + "2x800G": [ + "Ethernet16/1", + "Ethernet16/5" + ], + "4x400G": [ + "Ethernet16/1", + "Ethernet16/3", + "Ethernet16/5", + "Ethernet16/7" + ], + "8x200G": [ + "Ethernet16/1", + "Ethernet16/2", + "Ethernet16/3", + "Ethernet16/4", + "Ethernet16/5", + "Ethernet16/6", + "Ethernet16/7", + "Ethernet16/8" + ] + } + }, + "Ethernet128": { + "index": "17,17,17,17,17,17,17,17", + "lanes": "265,266,267,268,269,270,271,272", + "breakout_modes": { + "1x1600G": [ + "Ethernet17/1" + ], + "1x800G": [ + "Ethernet17/1" + ], + "1x100G(4)": [ + "Ethernet17/1" + ], + "2x400G": [ + "Ethernet17/1", + "Ethernet17/5" + ], + "4x200G": [ + "Ethernet17/1", + "Ethernet17/3", + "Ethernet17/5", + "Ethernet17/7" + ], + "8x100G": [ + "Ethernet17/1", + "Ethernet17/2", + "Ethernet17/3", + "Ethernet17/4", + "Ethernet17/5", + "Ethernet17/6", + "Ethernet17/7", + "Ethernet17/8" + ], + "2x800G": [ + "Ethernet17/1", + "Ethernet17/5" + ], + "4x400G": [ + "Ethernet17/1", + "Ethernet17/3", + "Ethernet17/5", + "Ethernet17/7" + ], + "8x200G": [ + "Ethernet17/1", + "Ethernet17/2", + "Ethernet17/3", + "Ethernet17/4", + "Ethernet17/5", + "Ethernet17/6", + "Ethernet17/7", + "Ethernet17/8" + ] + } + }, + "Ethernet136": { + "index": "18,18,18,18,18,18,18,18", + "lanes": "257,258,259,260,261,262,263,264", + "breakout_modes": { + "1x1600G": [ + "Ethernet18/1" + ], + "1x800G": [ + "Ethernet18/1" + ], + "1x100G(4)": [ + "Ethernet18/1" + ], + "2x400G": [ + "Ethernet18/1", + "Ethernet18/5" + ], + "4x200G": [ + "Ethernet18/1", + "Ethernet18/3", + "Ethernet18/5", + "Ethernet18/7" + ], + "8x100G": [ + "Ethernet18/1", + "Ethernet18/2", + "Ethernet18/3", + "Ethernet18/4", + "Ethernet18/5", + "Ethernet18/6", + "Ethernet18/7", + "Ethernet18/8" + ], + "2x800G": [ + "Ethernet18/1", + "Ethernet18/5" + ], + "4x400G": [ + "Ethernet18/1", + "Ethernet18/3", + "Ethernet18/5", + "Ethernet18/7" + ], + "8x200G": [ + "Ethernet18/1", + "Ethernet18/2", + "Ethernet18/3", + "Ethernet18/4", + "Ethernet18/5", + "Ethernet18/6", + "Ethernet18/7", + "Ethernet18/8" + ] + } + }, + "Ethernet144": { + "index": "19,19,19,19,19,19,19,19", + "lanes": "305,306,307,308,309,310,311,312", + "breakout_modes": { + "1x1600G": [ + "Ethernet19/1" + ], + "1x800G": [ + "Ethernet19/1" + ], + "1x100G(4)": [ + "Ethernet19/1" + ], + "2x400G": [ + "Ethernet19/1", + "Ethernet19/5" + ], + "4x200G": [ + "Ethernet19/1", + "Ethernet19/3", + "Ethernet19/5", + "Ethernet19/7" + ], + "8x100G": [ + "Ethernet19/1", + "Ethernet19/2", + "Ethernet19/3", + "Ethernet19/4", + "Ethernet19/5", + "Ethernet19/6", + "Ethernet19/7", + "Ethernet19/8" + ], + "2x800G": [ + "Ethernet19/1", + "Ethernet19/5" + ], + "4x400G": [ + "Ethernet19/1", + "Ethernet19/3", + "Ethernet19/5", + "Ethernet19/7" + ], + "8x200G": [ + "Ethernet19/1", + "Ethernet19/2", + "Ethernet19/3", + "Ethernet19/4", + "Ethernet19/5", + "Ethernet19/6", + "Ethernet19/7", + "Ethernet19/8" + ] + } + }, + "Ethernet152": { + "index": "20,20,20,20,20,20,20,20", + "lanes": "313,314,315,316,317,318,319,320", + "breakout_modes": { + "1x1600G": [ + "Ethernet20/1" + ], + "1x800G": [ + "Ethernet20/1" + ], + "1x100G(4)": [ + "Ethernet20/1" + ], + "2x400G": [ + "Ethernet20/1", + "Ethernet20/5" + ], + "4x200G": [ + "Ethernet20/1", + "Ethernet20/3", + "Ethernet20/5", + "Ethernet20/7" + ], + "8x100G": [ + "Ethernet20/1", + "Ethernet20/2", + "Ethernet20/3", + "Ethernet20/4", + "Ethernet20/5", + "Ethernet20/6", + "Ethernet20/7", + "Ethernet20/8" + ], + "2x800G": [ + "Ethernet20/1", + "Ethernet20/5" + ], + "4x400G": [ + "Ethernet20/1", + "Ethernet20/3", + "Ethernet20/5", + "Ethernet20/7" + ], + "8x200G": [ + "Ethernet20/1", + "Ethernet20/2", + "Ethernet20/3", + "Ethernet20/4", + "Ethernet20/5", + "Ethernet20/6", + "Ethernet20/7", + "Ethernet20/8" + ] + } + }, + "Ethernet160": { + "index": "21,21,21,21,21,21,21,21", + "lanes": "329,330,331,332,333,334,335,336", + "breakout_modes": { + "1x1600G": [ + "Ethernet21/1" + ], + "1x800G": [ + "Ethernet21/1" + ], + "1x100G(4)": [ + "Ethernet21/1" + ], + "2x400G": [ + "Ethernet21/1", + "Ethernet21/5" + ], + "4x200G": [ + "Ethernet21/1", + "Ethernet21/3", + "Ethernet21/5", + "Ethernet21/7" + ], + "8x100G": [ + "Ethernet21/1", + "Ethernet21/2", + "Ethernet21/3", + "Ethernet21/4", + "Ethernet21/5", + "Ethernet21/6", + "Ethernet21/7", + "Ethernet21/8" + ], + "2x800G": [ + "Ethernet21/1", + "Ethernet21/5" + ], + "4x400G": [ + "Ethernet21/1", + "Ethernet21/3", + "Ethernet21/5", + "Ethernet21/7" + ], + "8x200G": [ + "Ethernet21/1", + "Ethernet21/2", + "Ethernet21/3", + "Ethernet21/4", + "Ethernet21/5", + "Ethernet21/6", + "Ethernet21/7", + "Ethernet21/8" + ] + } + }, + "Ethernet168": { + "index": "22,22,22,22,22,22,22,22", + "lanes": "321,322,323,324,325,326,327,328", + "breakout_modes": { + "1x1600G": [ + "Ethernet22/1" + ], + "1x800G": [ + "Ethernet22/1" + ], + "1x100G(4)": [ + "Ethernet22/1" + ], + "2x400G": [ + "Ethernet22/1", + "Ethernet22/5" + ], + "4x200G": [ + "Ethernet22/1", + "Ethernet22/3", + "Ethernet22/5", + "Ethernet22/7" + ], + "8x100G": [ + "Ethernet22/1", + "Ethernet22/2", + "Ethernet22/3", + "Ethernet22/4", + "Ethernet22/5", + "Ethernet22/6", + "Ethernet22/7", + "Ethernet22/8" + ], + "2x800G": [ + "Ethernet22/1", + "Ethernet22/5" + ], + "4x400G": [ + "Ethernet22/1", + "Ethernet22/3", + "Ethernet22/5", + "Ethernet22/7" + ], + "8x200G": [ + "Ethernet22/1", + "Ethernet22/2", + "Ethernet22/3", + "Ethernet22/4", + "Ethernet22/5", + "Ethernet22/6", + "Ethernet22/7", + "Ethernet22/8" + ] + } + }, + "Ethernet176": { + "index": "23,23,23,23,23,23,23,23", + "lanes": "369,370,371,372,373,374,375,376", + "breakout_modes": { + "1x1600G": [ + "Ethernet23/1" + ], + "1x800G": [ + "Ethernet23/1" + ], + "1x100G(4)": [ + "Ethernet23/1" + ], + "2x400G": [ + "Ethernet23/1", + "Ethernet23/5" + ], + "4x200G": [ + "Ethernet23/1", + "Ethernet23/3", + "Ethernet23/5", + "Ethernet23/7" + ], + "8x100G": [ + "Ethernet23/1", + "Ethernet23/2", + "Ethernet23/3", + "Ethernet23/4", + "Ethernet23/5", + "Ethernet23/6", + "Ethernet23/7", + "Ethernet23/8" + ], + "2x800G": [ + "Ethernet23/1", + "Ethernet23/5" + ], + "4x400G": [ + "Ethernet23/1", + "Ethernet23/3", + "Ethernet23/5", + "Ethernet23/7" + ], + "8x200G": [ + "Ethernet23/1", + "Ethernet23/2", + "Ethernet23/3", + "Ethernet23/4", + "Ethernet23/5", + "Ethernet23/6", + "Ethernet23/7", + "Ethernet23/8" + ] + } + }, + "Ethernet184": { + "index": "24,24,24,24,24,24,24,24", + "lanes": "377,378,379,380,381,382,383,384", + "breakout_modes": { + "1x1600G": [ + "Ethernet24/1" + ], + "1x800G": [ + "Ethernet24/1" + ], + "1x100G(4)": [ + "Ethernet24/1" + ], + "2x400G": [ + "Ethernet24/1", + "Ethernet24/5" + ], + "4x200G": [ + "Ethernet24/1", + "Ethernet24/3", + "Ethernet24/5", + "Ethernet24/7" + ], + "8x100G": [ + "Ethernet24/1", + "Ethernet24/2", + "Ethernet24/3", + "Ethernet24/4", + "Ethernet24/5", + "Ethernet24/6", + "Ethernet24/7", + "Ethernet24/8" + ], + "2x800G": [ + "Ethernet24/1", + "Ethernet24/5" + ], + "4x400G": [ + "Ethernet24/1", + "Ethernet24/3", + "Ethernet24/5", + "Ethernet24/7" + ], + "8x200G": [ + "Ethernet24/1", + "Ethernet24/2", + "Ethernet24/3", + "Ethernet24/4", + "Ethernet24/5", + "Ethernet24/6", + "Ethernet24/7", + "Ethernet24/8" + ] + } + }, + "Ethernet192": { + "index": "25,25,25,25,25,25,25,25", + "lanes": "393,394,395,396,397,398,399,400", + "breakout_modes": { + "1x1600G": [ + "Ethernet25/1" + ], + "1x800G": [ + "Ethernet25/1" + ], + "1x100G(4)": [ + "Ethernet25/1" + ], + "2x400G": [ + "Ethernet25/1", + "Ethernet25/5" + ], + "4x200G": [ + "Ethernet25/1", + "Ethernet25/3", + "Ethernet25/5", + "Ethernet25/7" + ], + "8x100G": [ + "Ethernet25/1", + "Ethernet25/2", + "Ethernet25/3", + "Ethernet25/4", + "Ethernet25/5", + "Ethernet25/6", + "Ethernet25/7", + "Ethernet25/8" + ], + "2x800G": [ + "Ethernet25/1", + "Ethernet25/5" + ], + "4x400G": [ + "Ethernet25/1", + "Ethernet25/3", + "Ethernet25/5", + "Ethernet25/7" + ], + "8x200G": [ + "Ethernet25/1", + "Ethernet25/2", + "Ethernet25/3", + "Ethernet25/4", + "Ethernet25/5", + "Ethernet25/6", + "Ethernet25/7", + "Ethernet25/8" + ] + } + }, + "Ethernet200": { + "index": "26,26,26,26,26,26,26,26", + "lanes": "385,386,387,388,389,390,391,392", + "breakout_modes": { + "1x1600G": [ + "Ethernet26/1" + ], + "1x800G": [ + "Ethernet26/1" + ], + "1x100G(4)": [ + "Ethernet26/1" + ], + "2x400G": [ + "Ethernet26/1", + "Ethernet26/5" + ], + "4x200G": [ + "Ethernet26/1", + "Ethernet26/3", + "Ethernet26/5", + "Ethernet26/7" + ], + "8x100G": [ + "Ethernet26/1", + "Ethernet26/2", + "Ethernet26/3", + "Ethernet26/4", + "Ethernet26/5", + "Ethernet26/6", + "Ethernet26/7", + "Ethernet26/8" + ], + "2x800G": [ + "Ethernet26/1", + "Ethernet26/5" + ], + "4x400G": [ + "Ethernet26/1", + "Ethernet26/3", + "Ethernet26/5", + "Ethernet26/7" + ], + "8x200G": [ + "Ethernet26/1", + "Ethernet26/2", + "Ethernet26/3", + "Ethernet26/4", + "Ethernet26/5", + "Ethernet26/6", + "Ethernet26/7", + "Ethernet26/8" + ] + } + }, + "Ethernet208": { + "index": "27,27,27,27,27,27,27,27", + "lanes": "433,434,435,436,437,438,439,440", + "breakout_modes": { + "1x1600G": [ + "Ethernet27/1" + ], + "1x800G": [ + "Ethernet27/1" + ], + "1x100G(4)": [ + "Ethernet27/1" + ], + "2x400G": [ + "Ethernet27/1", + "Ethernet27/5" + ], + "4x200G": [ + "Ethernet27/1", + "Ethernet27/3", + "Ethernet27/5", + "Ethernet27/7" + ], + "8x100G": [ + "Ethernet27/1", + "Ethernet27/2", + "Ethernet27/3", + "Ethernet27/4", + "Ethernet27/5", + "Ethernet27/6", + "Ethernet27/7", + "Ethernet27/8" + ], + "2x800G": [ + "Ethernet27/1", + "Ethernet27/5" + ], + "4x400G": [ + "Ethernet27/1", + "Ethernet27/3", + "Ethernet27/5", + "Ethernet27/7" + ], + "8x200G": [ + "Ethernet27/1", + "Ethernet27/2", + "Ethernet27/3", + "Ethernet27/4", + "Ethernet27/5", + "Ethernet27/6", + "Ethernet27/7", + "Ethernet27/8" + ] + } + }, + "Ethernet216": { + "index": "28,28,28,28,28,28,28,28", + "lanes": "441,442,443,444,445,446,447,448", + "breakout_modes": { + "1x1600G": [ + "Ethernet28/1" + ], + "1x800G": [ + "Ethernet28/1" + ], + "1x100G(4)": [ + "Ethernet28/1" + ], + "2x400G": [ + "Ethernet28/1", + "Ethernet28/5" + ], + "4x200G": [ + "Ethernet28/1", + "Ethernet28/3", + "Ethernet28/5", + "Ethernet28/7" + ], + "8x100G": [ + "Ethernet28/1", + "Ethernet28/2", + "Ethernet28/3", + "Ethernet28/4", + "Ethernet28/5", + "Ethernet28/6", + "Ethernet28/7", + "Ethernet28/8" + ], + "2x800G": [ + "Ethernet28/1", + "Ethernet28/5" + ], + "4x400G": [ + "Ethernet28/1", + "Ethernet28/3", + "Ethernet28/5", + "Ethernet28/7" + ], + "8x200G": [ + "Ethernet28/1", + "Ethernet28/2", + "Ethernet28/3", + "Ethernet28/4", + "Ethernet28/5", + "Ethernet28/6", + "Ethernet28/7", + "Ethernet28/8" + ] + } + }, + "Ethernet224": { + "index": "29,29,29,29,29,29,29,29", + "lanes": "457,458,459,460,461,462,463,464", + "breakout_modes": { + "1x1600G": [ + "Ethernet29/1" + ], + "1x800G": [ + "Ethernet29/1" + ], + "1x100G(4)": [ + "Ethernet29/1" + ], + "2x400G": [ + "Ethernet29/1", + "Ethernet29/5" + ], + "4x200G": [ + "Ethernet29/1", + "Ethernet29/3", + "Ethernet29/5", + "Ethernet29/7" + ], + "8x100G": [ + "Ethernet29/1", + "Ethernet29/2", + "Ethernet29/3", + "Ethernet29/4", + "Ethernet29/5", + "Ethernet29/6", + "Ethernet29/7", + "Ethernet29/8" + ], + "2x800G": [ + "Ethernet29/1", + "Ethernet29/5" + ], + "4x400G": [ + "Ethernet29/1", + "Ethernet29/3", + "Ethernet29/5", + "Ethernet29/7" + ], + "8x200G": [ + "Ethernet29/1", + "Ethernet29/2", + "Ethernet29/3", + "Ethernet29/4", + "Ethernet29/5", + "Ethernet29/6", + "Ethernet29/7", + "Ethernet29/8" + ] + } + }, + "Ethernet232": { + "index": "30,30,30,30,30,30,30,30", + "lanes": "449,450,451,452,453,454,455,456", + "breakout_modes": { + "1x1600G": [ + "Ethernet30/1" + ], + "1x800G": [ + "Ethernet30/1" + ], + "1x100G(4)": [ + "Ethernet30/1" + ], + "2x400G": [ + "Ethernet30/1", + "Ethernet30/5" + ], + "4x200G": [ + "Ethernet30/1", + "Ethernet30/3", + "Ethernet30/5", + "Ethernet30/7" + ], + "8x100G": [ + "Ethernet30/1", + "Ethernet30/2", + "Ethernet30/3", + "Ethernet30/4", + "Ethernet30/5", + "Ethernet30/6", + "Ethernet30/7", + "Ethernet30/8" + ], + "2x800G": [ + "Ethernet30/1", + "Ethernet30/5" + ], + "4x400G": [ + "Ethernet30/1", + "Ethernet30/3", + "Ethernet30/5", + "Ethernet30/7" + ], + "8x200G": [ + "Ethernet30/1", + "Ethernet30/2", + "Ethernet30/3", + "Ethernet30/4", + "Ethernet30/5", + "Ethernet30/6", + "Ethernet30/7", + "Ethernet30/8" + ] + } + }, + "Ethernet240": { + "index": "31,31,31,31,31,31,31,31", + "lanes": "497,498,499,500,501,502,503,504", + "breakout_modes": { + "1x1600G": [ + "Ethernet31/1" + ], + "1x800G": [ + "Ethernet31/1" + ], + "1x100G(4)": [ + "Ethernet31/1" + ], + "2x400G": [ + "Ethernet31/1", + "Ethernet31/5" + ], + "4x200G": [ + "Ethernet31/1", + "Ethernet31/3", + "Ethernet31/5", + "Ethernet31/7" + ], + "8x100G": [ + "Ethernet31/1", + "Ethernet31/2", + "Ethernet31/3", + "Ethernet31/4", + "Ethernet31/5", + "Ethernet31/6", + "Ethernet31/7", + "Ethernet31/8" + ], + "2x800G": [ + "Ethernet31/1", + "Ethernet31/5" + ], + "4x400G": [ + "Ethernet31/1", + "Ethernet31/3", + "Ethernet31/5", + "Ethernet31/7" + ], + "8x200G": [ + "Ethernet31/1", + "Ethernet31/2", + "Ethernet31/3", + "Ethernet31/4", + "Ethernet31/5", + "Ethernet31/6", + "Ethernet31/7", + "Ethernet31/8" + ] + } + }, + "Ethernet248": { + "index": "32,32,32,32,32,32,32,32", + "lanes": "505,506,507,508,509,510,511,512", + "breakout_modes": { + "1x1600G": [ + "Ethernet32/1" + ], + "1x800G": [ + "Ethernet32/1" + ], + "1x100G(4)": [ + "Ethernet32/1" + ], + "2x400G": [ + "Ethernet32/1", + "Ethernet32/5" + ], + "4x200G": [ + "Ethernet32/1", + "Ethernet32/3", + "Ethernet32/5", + "Ethernet32/7" + ], + "8x100G": [ + "Ethernet32/1", + "Ethernet32/2", + "Ethernet32/3", + "Ethernet32/4", + "Ethernet32/5", + "Ethernet32/6", + "Ethernet32/7", + "Ethernet32/8" + ], + "2x800G": [ + "Ethernet32/1", + "Ethernet32/5" + ], + "4x400G": [ + "Ethernet32/1", + "Ethernet32/3", + "Ethernet32/5", + "Ethernet32/7" + ], + "8x200G": [ + "Ethernet32/1", + "Ethernet32/2", + "Ethernet32/3", + "Ethernet32/4", + "Ethernet32/5", + "Ethernet32/6", + "Ethernet32/7", + "Ethernet32/8" + ] + } + }, + "Ethernet256": { + "index": "33,33,33,33,33,33,33,33", + "lanes": "25,26,27,28,29,30,31,32", + "breakout_modes": { + "1x1600G": [ + "Ethernet33/1" + ], + "1x800G": [ + "Ethernet33/1" + ], + "1x100G(4)": [ + "Ethernet33/1" + ], + "2x400G": [ + "Ethernet33/1", + "Ethernet33/5" + ], + "4x200G": [ + "Ethernet33/1", + "Ethernet33/3", + "Ethernet33/5", + "Ethernet33/7" + ], + "8x100G": [ + "Ethernet33/1", + "Ethernet33/2", + "Ethernet33/3", + "Ethernet33/4", + "Ethernet33/5", + "Ethernet33/6", + "Ethernet33/7", + "Ethernet33/8" + ], + "2x800G": [ + "Ethernet33/1", + "Ethernet33/5" + ], + "4x400G": [ + "Ethernet33/1", + "Ethernet33/3", + "Ethernet33/5", + "Ethernet33/7" + ], + "8x200G": [ + "Ethernet33/1", + "Ethernet33/2", + "Ethernet33/3", + "Ethernet33/4", + "Ethernet33/5", + "Ethernet33/6", + "Ethernet33/7", + "Ethernet33/8" + ] + } + }, + "Ethernet264": { + "index": "34,34,34,34,34,34,34,34", + "lanes": "17,18,19,20,21,22,23,24", + "breakout_modes": { + "1x1600G": [ + "Ethernet34/1" + ], + "1x800G": [ + "Ethernet34/1" + ], + "1x100G(4)": [ + "Ethernet34/1" + ], + "2x400G": [ + "Ethernet34/1", + "Ethernet34/5" + ], + "4x200G": [ + "Ethernet34/1", + "Ethernet34/3", + "Ethernet34/5", + "Ethernet34/7" + ], + "8x100G": [ + "Ethernet34/1", + "Ethernet34/2", + "Ethernet34/3", + "Ethernet34/4", + "Ethernet34/5", + "Ethernet34/6", + "Ethernet34/7", + "Ethernet34/8" + ], + "2x800G": [ + "Ethernet34/1", + "Ethernet34/5" + ], + "4x400G": [ + "Ethernet34/1", + "Ethernet34/3", + "Ethernet34/5", + "Ethernet34/7" + ], + "8x200G": [ + "Ethernet34/1", + "Ethernet34/2", + "Ethernet34/3", + "Ethernet34/4", + "Ethernet34/5", + "Ethernet34/6", + "Ethernet34/7", + "Ethernet34/8" + ] + } + }, + "Ethernet272": { + "index": "35,35,35,35,35,35,35,35", + "lanes": "33,34,35,36,37,38,39,40", + "breakout_modes": { + "1x1600G": [ + "Ethernet35/1" + ], + "1x800G": [ + "Ethernet35/1" + ], + "1x100G(4)": [ + "Ethernet35/1" + ], + "2x400G": [ + "Ethernet35/1", + "Ethernet35/5" + ], + "4x200G": [ + "Ethernet35/1", + "Ethernet35/3", + "Ethernet35/5", + "Ethernet35/7" + ], + "8x100G": [ + "Ethernet35/1", + "Ethernet35/2", + "Ethernet35/3", + "Ethernet35/4", + "Ethernet35/5", + "Ethernet35/6", + "Ethernet35/7", + "Ethernet35/8" + ], + "2x800G": [ + "Ethernet35/1", + "Ethernet35/5" + ], + "4x400G": [ + "Ethernet35/1", + "Ethernet35/3", + "Ethernet35/5", + "Ethernet35/7" + ], + "8x200G": [ + "Ethernet35/1", + "Ethernet35/2", + "Ethernet35/3", + "Ethernet35/4", + "Ethernet35/5", + "Ethernet35/6", + "Ethernet35/7", + "Ethernet35/8" + ] + } + }, + "Ethernet280": { + "index": "36,36,36,36,36,36,36,36", + "lanes": "41,42,43,44,45,46,47,48", + "breakout_modes": { + "1x1600G": [ + "Ethernet36/1" + ], + "1x800G": [ + "Ethernet36/1" + ], + "1x100G(4)": [ + "Ethernet36/1" + ], + "2x400G": [ + "Ethernet36/1", + "Ethernet36/5" + ], + "4x200G": [ + "Ethernet36/1", + "Ethernet36/3", + "Ethernet36/5", + "Ethernet36/7" + ], + "8x100G": [ + "Ethernet36/1", + "Ethernet36/2", + "Ethernet36/3", + "Ethernet36/4", + "Ethernet36/5", + "Ethernet36/6", + "Ethernet36/7", + "Ethernet36/8" + ], + "2x800G": [ + "Ethernet36/1", + "Ethernet36/5" + ], + "4x400G": [ + "Ethernet36/1", + "Ethernet36/3", + "Ethernet36/5", + "Ethernet36/7" + ], + "8x200G": [ + "Ethernet36/1", + "Ethernet36/2", + "Ethernet36/3", + "Ethernet36/4", + "Ethernet36/5", + "Ethernet36/6", + "Ethernet36/7", + "Ethernet36/8" + ] + } + }, + "Ethernet288": { + "index": "37,37,37,37,37,37,37,37", + "lanes": "89,90,91,92,93,94,95,96", + "breakout_modes": { + "1x1600G": [ + "Ethernet37/1" + ], + "1x800G": [ + "Ethernet37/1" + ], + "1x100G(4)": [ + "Ethernet37/1" + ], + "2x400G": [ + "Ethernet37/1", + "Ethernet37/5" + ], + "4x200G": [ + "Ethernet37/1", + "Ethernet37/3", + "Ethernet37/5", + "Ethernet37/7" + ], + "8x100G": [ + "Ethernet37/1", + "Ethernet37/2", + "Ethernet37/3", + "Ethernet37/4", + "Ethernet37/5", + "Ethernet37/6", + "Ethernet37/7", + "Ethernet37/8" + ], + "2x800G": [ + "Ethernet37/1", + "Ethernet37/5" + ], + "4x400G": [ + "Ethernet37/1", + "Ethernet37/3", + "Ethernet37/5", + "Ethernet37/7" + ], + "8x200G": [ + "Ethernet37/1", + "Ethernet37/2", + "Ethernet37/3", + "Ethernet37/4", + "Ethernet37/5", + "Ethernet37/6", + "Ethernet37/7", + "Ethernet37/8" + ] + } + }, + "Ethernet296": { + "index": "38,38,38,38,38,38,38,38", + "lanes": "81,82,83,84,85,86,87,88", + "breakout_modes": { + "1x1600G": [ + "Ethernet38/1" + ], + "1x800G": [ + "Ethernet38/1" + ], + "1x100G(4)": [ + "Ethernet38/1" + ], + "2x400G": [ + "Ethernet38/1", + "Ethernet38/5" + ], + "4x200G": [ + "Ethernet38/1", + "Ethernet38/3", + "Ethernet38/5", + "Ethernet38/7" + ], + "8x100G": [ + "Ethernet38/1", + "Ethernet38/2", + "Ethernet38/3", + "Ethernet38/4", + "Ethernet38/5", + "Ethernet38/6", + "Ethernet38/7", + "Ethernet38/8" + ], + "2x800G": [ + "Ethernet38/1", + "Ethernet38/5" + ], + "4x400G": [ + "Ethernet38/1", + "Ethernet38/3", + "Ethernet38/5", + "Ethernet38/7" + ], + "8x200G": [ + "Ethernet38/1", + "Ethernet38/2", + "Ethernet38/3", + "Ethernet38/4", + "Ethernet38/5", + "Ethernet38/6", + "Ethernet38/7", + "Ethernet38/8" + ] + } + }, + "Ethernet304": { + "index": "39,39,39,39,39,39,39,39", + "lanes": "97,98,99,100,101,102,103,104", + "breakout_modes": { + "1x1600G": [ + "Ethernet39/1" + ], + "1x800G": [ + "Ethernet39/1" + ], + "1x100G(4)": [ + "Ethernet39/1" + ], + "2x400G": [ + "Ethernet39/1", + "Ethernet39/5" + ], + "4x200G": [ + "Ethernet39/1", + "Ethernet39/3", + "Ethernet39/5", + "Ethernet39/7" + ], + "8x100G": [ + "Ethernet39/1", + "Ethernet39/2", + "Ethernet39/3", + "Ethernet39/4", + "Ethernet39/5", + "Ethernet39/6", + "Ethernet39/7", + "Ethernet39/8" + ], + "2x800G": [ + "Ethernet39/1", + "Ethernet39/5" + ], + "4x400G": [ + "Ethernet39/1", + "Ethernet39/3", + "Ethernet39/5", + "Ethernet39/7" + ], + "8x200G": [ + "Ethernet39/1", + "Ethernet39/2", + "Ethernet39/3", + "Ethernet39/4", + "Ethernet39/5", + "Ethernet39/6", + "Ethernet39/7", + "Ethernet39/8" + ] + } + }, + "Ethernet312": { + "index": "40,40,40,40,40,40,40,40", + "lanes": "105,106,107,108,109,110,111,112", + "breakout_modes": { + "1x1600G": [ + "Ethernet40/1" + ], + "1x800G": [ + "Ethernet40/1" + ], + "1x100G(4)": [ + "Ethernet40/1" + ], + "2x400G": [ + "Ethernet40/1", + "Ethernet40/5" + ], + "4x200G": [ + "Ethernet40/1", + "Ethernet40/3", + "Ethernet40/5", + "Ethernet40/7" + ], + "8x100G": [ + "Ethernet40/1", + "Ethernet40/2", + "Ethernet40/3", + "Ethernet40/4", + "Ethernet40/5", + "Ethernet40/6", + "Ethernet40/7", + "Ethernet40/8" + ], + "2x800G": [ + "Ethernet40/1", + "Ethernet40/5" + ], + "4x400G": [ + "Ethernet40/1", + "Ethernet40/3", + "Ethernet40/5", + "Ethernet40/7" + ], + "8x200G": [ + "Ethernet40/1", + "Ethernet40/2", + "Ethernet40/3", + "Ethernet40/4", + "Ethernet40/5", + "Ethernet40/6", + "Ethernet40/7", + "Ethernet40/8" + ] + } + }, + "Ethernet320": { + "index": "41,41,41,41,41,41,41,41", + "lanes": "153,154,155,156,157,158,159,160", + "breakout_modes": { + "1x1600G": [ + "Ethernet41/1" + ], + "1x800G": [ + "Ethernet41/1" + ], + "1x100G(4)": [ + "Ethernet41/1" + ], + "2x400G": [ + "Ethernet41/1", + "Ethernet41/5" + ], + "4x200G": [ + "Ethernet41/1", + "Ethernet41/3", + "Ethernet41/5", + "Ethernet41/7" + ], + "8x100G": [ + "Ethernet41/1", + "Ethernet41/2", + "Ethernet41/3", + "Ethernet41/4", + "Ethernet41/5", + "Ethernet41/6", + "Ethernet41/7", + "Ethernet41/8" + ], + "2x800G": [ + "Ethernet41/1", + "Ethernet41/5" + ], + "4x400G": [ + "Ethernet41/1", + "Ethernet41/3", + "Ethernet41/5", + "Ethernet41/7" + ], + "8x200G": [ + "Ethernet41/1", + "Ethernet41/2", + "Ethernet41/3", + "Ethernet41/4", + "Ethernet41/5", + "Ethernet41/6", + "Ethernet41/7", + "Ethernet41/8" + ] + } + }, + "Ethernet328": { + "index": "42,42,42,42,42,42,42,42", + "lanes": "145,146,147,148,149,150,151,152", + "breakout_modes": { + "1x1600G": [ + "Ethernet42/1" + ], + "1x800G": [ + "Ethernet42/1" + ], + "1x100G(4)": [ + "Ethernet42/1" + ], + "2x400G": [ + "Ethernet42/1", + "Ethernet42/5" + ], + "4x200G": [ + "Ethernet42/1", + "Ethernet42/3", + "Ethernet42/5", + "Ethernet42/7" + ], + "8x100G": [ + "Ethernet42/1", + "Ethernet42/2", + "Ethernet42/3", + "Ethernet42/4", + "Ethernet42/5", + "Ethernet42/6", + "Ethernet42/7", + "Ethernet42/8" + ], + "2x800G": [ + "Ethernet42/1", + "Ethernet42/5" + ], + "4x400G": [ + "Ethernet42/1", + "Ethernet42/3", + "Ethernet42/5", + "Ethernet42/7" + ], + "8x200G": [ + "Ethernet42/1", + "Ethernet42/2", + "Ethernet42/3", + "Ethernet42/4", + "Ethernet42/5", + "Ethernet42/6", + "Ethernet42/7", + "Ethernet42/8" + ] + } + }, + "Ethernet336": { + "index": "43,43,43,43,43,43,43,43", + "lanes": "161,162,163,164,165,166,167,168", + "breakout_modes": { + "1x1600G": [ + "Ethernet43/1" + ], + "1x800G": [ + "Ethernet43/1" + ], + "1x100G(4)": [ + "Ethernet43/1" + ], + "2x400G": [ + "Ethernet43/1", + "Ethernet43/5" + ], + "4x200G": [ + "Ethernet43/1", + "Ethernet43/3", + "Ethernet43/5", + "Ethernet43/7" + ], + "8x100G": [ + "Ethernet43/1", + "Ethernet43/2", + "Ethernet43/3", + "Ethernet43/4", + "Ethernet43/5", + "Ethernet43/6", + "Ethernet43/7", + "Ethernet43/8" + ], + "2x800G": [ + "Ethernet43/1", + "Ethernet43/5" + ], + "4x400G": [ + "Ethernet43/1", + "Ethernet43/3", + "Ethernet43/5", + "Ethernet43/7" + ], + "8x200G": [ + "Ethernet43/1", + "Ethernet43/2", + "Ethernet43/3", + "Ethernet43/4", + "Ethernet43/5", + "Ethernet43/6", + "Ethernet43/7", + "Ethernet43/8" + ] + } + }, + "Ethernet344": { + "index": "44,44,44,44,44,44,44,44", + "lanes": "169,170,171,172,173,174,175,176", + "breakout_modes": { + "1x1600G": [ + "Ethernet44/1" + ], + "1x800G": [ + "Ethernet44/1" + ], + "1x100G(4)": [ + "Ethernet44/1" + ], + "2x400G": [ + "Ethernet44/1", + "Ethernet44/5" + ], + "4x200G": [ + "Ethernet44/1", + "Ethernet44/3", + "Ethernet44/5", + "Ethernet44/7" + ], + "8x100G": [ + "Ethernet44/1", + "Ethernet44/2", + "Ethernet44/3", + "Ethernet44/4", + "Ethernet44/5", + "Ethernet44/6", + "Ethernet44/7", + "Ethernet44/8" + ], + "2x800G": [ + "Ethernet44/1", + "Ethernet44/5" + ], + "4x400G": [ + "Ethernet44/1", + "Ethernet44/3", + "Ethernet44/5", + "Ethernet44/7" + ], + "8x200G": [ + "Ethernet44/1", + "Ethernet44/2", + "Ethernet44/3", + "Ethernet44/4", + "Ethernet44/5", + "Ethernet44/6", + "Ethernet44/7", + "Ethernet44/8" + ] + } + }, + "Ethernet352": { + "index": "45,45,45,45,45,45,45,45", + "lanes": "217,218,219,220,221,222,223,224", + "breakout_modes": { + "1x1600G": [ + "Ethernet45/1" + ], + "1x800G": [ + "Ethernet45/1" + ], + "1x100G(4)": [ + "Ethernet45/1" + ], + "2x400G": [ + "Ethernet45/1", + "Ethernet45/5" + ], + "4x200G": [ + "Ethernet45/1", + "Ethernet45/3", + "Ethernet45/5", + "Ethernet45/7" + ], + "8x100G": [ + "Ethernet45/1", + "Ethernet45/2", + "Ethernet45/3", + "Ethernet45/4", + "Ethernet45/5", + "Ethernet45/6", + "Ethernet45/7", + "Ethernet45/8" + ], + "2x800G": [ + "Ethernet45/1", + "Ethernet45/5" + ], + "4x400G": [ + "Ethernet45/1", + "Ethernet45/3", + "Ethernet45/5", + "Ethernet45/7" + ], + "8x200G": [ + "Ethernet45/1", + "Ethernet45/2", + "Ethernet45/3", + "Ethernet45/4", + "Ethernet45/5", + "Ethernet45/6", + "Ethernet45/7", + "Ethernet45/8" + ] + } + }, + "Ethernet360": { + "index": "46,46,46,46,46,46,46,46", + "lanes": "209,210,211,212,213,214,215,216", + "breakout_modes": { + "1x1600G": [ + "Ethernet46/1" + ], + "1x800G": [ + "Ethernet46/1" + ], + "1x100G(4)": [ + "Ethernet46/1" + ], + "2x400G": [ + "Ethernet46/1", + "Ethernet46/5" + ], + "4x200G": [ + "Ethernet46/1", + "Ethernet46/3", + "Ethernet46/5", + "Ethernet46/7" + ], + "8x100G": [ + "Ethernet46/1", + "Ethernet46/2", + "Ethernet46/3", + "Ethernet46/4", + "Ethernet46/5", + "Ethernet46/6", + "Ethernet46/7", + "Ethernet46/8" + ], + "2x800G": [ + "Ethernet46/1", + "Ethernet46/5" + ], + "4x400G": [ + "Ethernet46/1", + "Ethernet46/3", + "Ethernet46/5", + "Ethernet46/7" + ], + "8x200G": [ + "Ethernet46/1", + "Ethernet46/2", + "Ethernet46/3", + "Ethernet46/4", + "Ethernet46/5", + "Ethernet46/6", + "Ethernet46/7", + "Ethernet46/8" + ] + } + }, + "Ethernet368": { + "index": "47,47,47,47,47,47,47,47", + "lanes": "225,226,227,228,229,230,231,232", + "breakout_modes": { + "1x1600G": [ + "Ethernet47/1" + ], + "1x800G": [ + "Ethernet47/1" + ], + "1x100G(4)": [ + "Ethernet47/1" + ], + "2x400G": [ + "Ethernet47/1", + "Ethernet47/5" + ], + "4x200G": [ + "Ethernet47/1", + "Ethernet47/3", + "Ethernet47/5", + "Ethernet47/7" + ], + "8x100G": [ + "Ethernet47/1", + "Ethernet47/2", + "Ethernet47/3", + "Ethernet47/4", + "Ethernet47/5", + "Ethernet47/6", + "Ethernet47/7", + "Ethernet47/8" + ], + "2x800G": [ + "Ethernet47/1", + "Ethernet47/5" + ], + "4x400G": [ + "Ethernet47/1", + "Ethernet47/3", + "Ethernet47/5", + "Ethernet47/7" + ], + "8x200G": [ + "Ethernet47/1", + "Ethernet47/2", + "Ethernet47/3", + "Ethernet47/4", + "Ethernet47/5", + "Ethernet47/6", + "Ethernet47/7", + "Ethernet47/8" + ] + } + }, + "Ethernet376": { + "index": "48,48,48,48,48,48,48,48", + "lanes": "233,234,235,236,237,238,239,240", + "breakout_modes": { + "1x1600G": [ + "Ethernet48/1" + ], + "1x800G": [ + "Ethernet48/1" + ], + "1x100G(4)": [ + "Ethernet48/1" + ], + "2x400G": [ + "Ethernet48/1", + "Ethernet48/5" + ], + "4x200G": [ + "Ethernet48/1", + "Ethernet48/3", + "Ethernet48/5", + "Ethernet48/7" + ], + "8x100G": [ + "Ethernet48/1", + "Ethernet48/2", + "Ethernet48/3", + "Ethernet48/4", + "Ethernet48/5", + "Ethernet48/6", + "Ethernet48/7", + "Ethernet48/8" + ], + "2x800G": [ + "Ethernet48/1", + "Ethernet48/5" + ], + "4x400G": [ + "Ethernet48/1", + "Ethernet48/3", + "Ethernet48/5", + "Ethernet48/7" + ], + "8x200G": [ + "Ethernet48/1", + "Ethernet48/2", + "Ethernet48/3", + "Ethernet48/4", + "Ethernet48/5", + "Ethernet48/6", + "Ethernet48/7", + "Ethernet48/8" + ] + } + }, + "Ethernet384": { + "index": "49,49,49,49,49,49,49,49", + "lanes": "281,282,283,284,285,286,287,288", + "breakout_modes": { + "1x1600G": [ + "Ethernet49/1" + ], + "1x800G": [ + "Ethernet49/1" + ], + "1x100G(4)": [ + "Ethernet49/1" + ], + "2x400G": [ + "Ethernet49/1", + "Ethernet49/5" + ], + "4x200G": [ + "Ethernet49/1", + "Ethernet49/3", + "Ethernet49/5", + "Ethernet49/7" + ], + "8x100G": [ + "Ethernet49/1", + "Ethernet49/2", + "Ethernet49/3", + "Ethernet49/4", + "Ethernet49/5", + "Ethernet49/6", + "Ethernet49/7", + "Ethernet49/8" + ], + "2x800G": [ + "Ethernet49/1", + "Ethernet49/5" + ], + "4x400G": [ + "Ethernet49/1", + "Ethernet49/3", + "Ethernet49/5", + "Ethernet49/7" + ], + "8x200G": [ + "Ethernet49/1", + "Ethernet49/2", + "Ethernet49/3", + "Ethernet49/4", + "Ethernet49/5", + "Ethernet49/6", + "Ethernet49/7", + "Ethernet49/8" + ] + } + }, + "Ethernet392": { + "index": "50,50,50,50,50,50,50,50", + "lanes": "273,274,275,276,277,278,279,280", + "breakout_modes": { + "1x1600G": [ + "Ethernet50/1" + ], + "1x800G": [ + "Ethernet50/1" + ], + "1x100G(4)": [ + "Ethernet50/1" + ], + "2x400G": [ + "Ethernet50/1", + "Ethernet50/5" + ], + "4x200G": [ + "Ethernet50/1", + "Ethernet50/3", + "Ethernet50/5", + "Ethernet50/7" + ], + "8x100G": [ + "Ethernet50/1", + "Ethernet50/2", + "Ethernet50/3", + "Ethernet50/4", + "Ethernet50/5", + "Ethernet50/6", + "Ethernet50/7", + "Ethernet50/8" + ], + "2x800G": [ + "Ethernet50/1", + "Ethernet50/5" + ], + "4x400G": [ + "Ethernet50/1", + "Ethernet50/3", + "Ethernet50/5", + "Ethernet50/7" + ], + "8x200G": [ + "Ethernet50/1", + "Ethernet50/2", + "Ethernet50/3", + "Ethernet50/4", + "Ethernet50/5", + "Ethernet50/6", + "Ethernet50/7", + "Ethernet50/8" + ] + } + }, + "Ethernet400": { + "index": "51,51,51,51,51,51,51,51", + "lanes": "289,290,291,292,293,294,295,296", + "breakout_modes": { + "1x1600G": [ + "Ethernet51/1" + ], + "1x800G": [ + "Ethernet51/1" + ], + "1x100G(4)": [ + "Ethernet51/1" + ], + "2x400G": [ + "Ethernet51/1", + "Ethernet51/5" + ], + "4x200G": [ + "Ethernet51/1", + "Ethernet51/3", + "Ethernet51/5", + "Ethernet51/7" + ], + "8x100G": [ + "Ethernet51/1", + "Ethernet51/2", + "Ethernet51/3", + "Ethernet51/4", + "Ethernet51/5", + "Ethernet51/6", + "Ethernet51/7", + "Ethernet51/8" + ], + "2x800G": [ + "Ethernet51/1", + "Ethernet51/5" + ], + "4x400G": [ + "Ethernet51/1", + "Ethernet51/3", + "Ethernet51/5", + "Ethernet51/7" + ], + "8x200G": [ + "Ethernet51/1", + "Ethernet51/2", + "Ethernet51/3", + "Ethernet51/4", + "Ethernet51/5", + "Ethernet51/6", + "Ethernet51/7", + "Ethernet51/8" + ] + } + }, + "Ethernet408": { + "index": "52,52,52,52,52,52,52,52", + "lanes": "297,298,299,300,301,302,303,304", + "breakout_modes": { + "1x1600G": [ + "Ethernet52/1" + ], + "1x800G": [ + "Ethernet52/1" + ], + "1x100G(4)": [ + "Ethernet52/1" + ], + "2x400G": [ + "Ethernet52/1", + "Ethernet52/5" + ], + "4x200G": [ + "Ethernet52/1", + "Ethernet52/3", + "Ethernet52/5", + "Ethernet52/7" + ], + "8x100G": [ + "Ethernet52/1", + "Ethernet52/2", + "Ethernet52/3", + "Ethernet52/4", + "Ethernet52/5", + "Ethernet52/6", + "Ethernet52/7", + "Ethernet52/8" + ], + "2x800G": [ + "Ethernet52/1", + "Ethernet52/5" + ], + "4x400G": [ + "Ethernet52/1", + "Ethernet52/3", + "Ethernet52/5", + "Ethernet52/7" + ], + "8x200G": [ + "Ethernet52/1", + "Ethernet52/2", + "Ethernet52/3", + "Ethernet52/4", + "Ethernet52/5", + "Ethernet52/6", + "Ethernet52/7", + "Ethernet52/8" + ] + } + }, + "Ethernet416": { + "index": "53,53,53,53,53,53,53,53", + "lanes": "345,346,347,348,349,350,351,352", + "breakout_modes": { + "1x1600G": [ + "Ethernet53/1" + ], + "1x800G": [ + "Ethernet53/1" + ], + "1x100G(4)": [ + "Ethernet53/1" + ], + "2x400G": [ + "Ethernet53/1", + "Ethernet53/5" + ], + "4x200G": [ + "Ethernet53/1", + "Ethernet53/3", + "Ethernet53/5", + "Ethernet53/7" + ], + "8x100G": [ + "Ethernet53/1", + "Ethernet53/2", + "Ethernet53/3", + "Ethernet53/4", + "Ethernet53/5", + "Ethernet53/6", + "Ethernet53/7", + "Ethernet53/8" + ], + "2x800G": [ + "Ethernet53/1", + "Ethernet53/5" + ], + "4x400G": [ + "Ethernet53/1", + "Ethernet53/3", + "Ethernet53/5", + "Ethernet53/7" + ], + "8x200G": [ + "Ethernet53/1", + "Ethernet53/2", + "Ethernet53/3", + "Ethernet53/4", + "Ethernet53/5", + "Ethernet53/6", + "Ethernet53/7", + "Ethernet53/8" + ] + } + }, + "Ethernet424": { + "index": "54,54,54,54,54,54,54,54", + "lanes": "337,338,339,340,341,342,343,344", + "breakout_modes": { + "1x1600G": [ + "Ethernet54/1" + ], + "1x800G": [ + "Ethernet54/1" + ], + "1x100G(4)": [ + "Ethernet54/1" + ], + "2x400G": [ + "Ethernet54/1", + "Ethernet54/5" + ], + "4x200G": [ + "Ethernet54/1", + "Ethernet54/3", + "Ethernet54/5", + "Ethernet54/7" + ], + "8x100G": [ + "Ethernet54/1", + "Ethernet54/2", + "Ethernet54/3", + "Ethernet54/4", + "Ethernet54/5", + "Ethernet54/6", + "Ethernet54/7", + "Ethernet54/8" + ], + "2x800G": [ + "Ethernet54/1", + "Ethernet54/5" + ], + "4x400G": [ + "Ethernet54/1", + "Ethernet54/3", + "Ethernet54/5", + "Ethernet54/7" + ], + "8x200G": [ + "Ethernet54/1", + "Ethernet54/2", + "Ethernet54/3", + "Ethernet54/4", + "Ethernet54/5", + "Ethernet54/6", + "Ethernet54/7", + "Ethernet54/8" + ] + } + }, + "Ethernet432": { + "index": "55,55,55,55,55,55,55,55", + "lanes": "353,354,355,356,357,358,359,360", + "breakout_modes": { + "1x1600G": [ + "Ethernet55/1" + ], + "1x800G": [ + "Ethernet55/1" + ], + "1x100G(4)": [ + "Ethernet55/1" + ], + "2x400G": [ + "Ethernet55/1", + "Ethernet55/5" + ], + "4x200G": [ + "Ethernet55/1", + "Ethernet55/3", + "Ethernet55/5", + "Ethernet55/7" + ], + "8x100G": [ + "Ethernet55/1", + "Ethernet55/2", + "Ethernet55/3", + "Ethernet55/4", + "Ethernet55/5", + "Ethernet55/6", + "Ethernet55/7", + "Ethernet55/8" + ], + "2x800G": [ + "Ethernet55/1", + "Ethernet55/5" + ], + "4x400G": [ + "Ethernet55/1", + "Ethernet55/3", + "Ethernet55/5", + "Ethernet55/7" + ], + "8x200G": [ + "Ethernet55/1", + "Ethernet55/2", + "Ethernet55/3", + "Ethernet55/4", + "Ethernet55/5", + "Ethernet55/6", + "Ethernet55/7", + "Ethernet55/8" + ] + } + }, + "Ethernet440": { + "index": "56,56,56,56,56,56,56,56", + "lanes": "361,362,363,364,365,366,367,368", + "breakout_modes": { + "1x1600G": [ + "Ethernet56/1" + ], + "1x800G": [ + "Ethernet56/1" + ], + "1x100G(4)": [ + "Ethernet56/1" + ], + "2x400G": [ + "Ethernet56/1", + "Ethernet56/5" + ], + "4x200G": [ + "Ethernet56/1", + "Ethernet56/3", + "Ethernet56/5", + "Ethernet56/7" + ], + "8x100G": [ + "Ethernet56/1", + "Ethernet56/2", + "Ethernet56/3", + "Ethernet56/4", + "Ethernet56/5", + "Ethernet56/6", + "Ethernet56/7", + "Ethernet56/8" + ], + "2x800G": [ + "Ethernet56/1", + "Ethernet56/5" + ], + "4x400G": [ + "Ethernet56/1", + "Ethernet56/3", + "Ethernet56/5", + "Ethernet56/7" + ], + "8x200G": [ + "Ethernet56/1", + "Ethernet56/2", + "Ethernet56/3", + "Ethernet56/4", + "Ethernet56/5", + "Ethernet56/6", + "Ethernet56/7", + "Ethernet56/8" + ] + } + }, + "Ethernet448": { + "index": "57,57,57,57,57,57,57,57", + "lanes": "409,410,411,412,413,414,415,416", + "breakout_modes": { + "1x1600G": [ + "Ethernet57/1" + ], + "1x800G": [ + "Ethernet57/1" + ], + "1x100G(4)": [ + "Ethernet57/1" + ], + "2x400G": [ + "Ethernet57/1", + "Ethernet57/5" + ], + "4x200G": [ + "Ethernet57/1", + "Ethernet57/3", + "Ethernet57/5", + "Ethernet57/7" + ], + "8x100G": [ + "Ethernet57/1", + "Ethernet57/2", + "Ethernet57/3", + "Ethernet57/4", + "Ethernet57/5", + "Ethernet57/6", + "Ethernet57/7", + "Ethernet57/8" + ], + "2x800G": [ + "Ethernet57/1", + "Ethernet57/5" + ], + "4x400G": [ + "Ethernet57/1", + "Ethernet57/3", + "Ethernet57/5", + "Ethernet57/7" + ], + "8x200G": [ + "Ethernet57/1", + "Ethernet57/2", + "Ethernet57/3", + "Ethernet57/4", + "Ethernet57/5", + "Ethernet57/6", + "Ethernet57/7", + "Ethernet57/8" + ] + } + }, + "Ethernet456": { + "index": "58,58,58,58,58,58,58,58", + "lanes": "401,402,403,404,405,406,407,408", + "breakout_modes": { + "1x1600G": [ + "Ethernet58/1" + ], + "1x800G": [ + "Ethernet58/1" + ], + "1x100G(4)": [ + "Ethernet58/1" + ], + "2x400G": [ + "Ethernet58/1", + "Ethernet58/5" + ], + "4x200G": [ + "Ethernet58/1", + "Ethernet58/3", + "Ethernet58/5", + "Ethernet58/7" + ], + "8x100G": [ + "Ethernet58/1", + "Ethernet58/2", + "Ethernet58/3", + "Ethernet58/4", + "Ethernet58/5", + "Ethernet58/6", + "Ethernet58/7", + "Ethernet58/8" + ], + "2x800G": [ + "Ethernet58/1", + "Ethernet58/5" + ], + "4x400G": [ + "Ethernet58/1", + "Ethernet58/3", + "Ethernet58/5", + "Ethernet58/7" + ], + "8x200G": [ + "Ethernet58/1", + "Ethernet58/2", + "Ethernet58/3", + "Ethernet58/4", + "Ethernet58/5", + "Ethernet58/6", + "Ethernet58/7", + "Ethernet58/8" + ] + } + }, + "Ethernet464": { + "index": "59,59,59,59,59,59,59,59", + "lanes": "417,418,419,420,421,422,423,424", + "breakout_modes": { + "1x1600G": [ + "Ethernet59/1" + ], + "1x800G": [ + "Ethernet59/1" + ], + "1x100G(4)": [ + "Ethernet59/1" + ], + "2x400G": [ + "Ethernet59/1", + "Ethernet59/5" + ], + "4x200G": [ + "Ethernet59/1", + "Ethernet59/3", + "Ethernet59/5", + "Ethernet59/7" + ], + "8x100G": [ + "Ethernet59/1", + "Ethernet59/2", + "Ethernet59/3", + "Ethernet59/4", + "Ethernet59/5", + "Ethernet59/6", + "Ethernet59/7", + "Ethernet59/8" + ], + "2x800G": [ + "Ethernet59/1", + "Ethernet59/5" + ], + "4x400G": [ + "Ethernet59/1", + "Ethernet59/3", + "Ethernet59/5", + "Ethernet59/7" + ], + "8x200G": [ + "Ethernet59/1", + "Ethernet59/2", + "Ethernet59/3", + "Ethernet59/4", + "Ethernet59/5", + "Ethernet59/6", + "Ethernet59/7", + "Ethernet59/8" + ] + } + }, + "Ethernet472": { + "index": "60,60,60,60,60,60,60,60", + "lanes": "425,426,427,428,429,430,431,432", + "breakout_modes": { + "1x1600G": [ + "Ethernet60/1" + ], + "1x800G": [ + "Ethernet60/1" + ], + "1x100G(4)": [ + "Ethernet60/1" + ], + "2x400G": [ + "Ethernet60/1", + "Ethernet60/5" + ], + "4x200G": [ + "Ethernet60/1", + "Ethernet60/3", + "Ethernet60/5", + "Ethernet60/7" + ], + "8x100G": [ + "Ethernet60/1", + "Ethernet60/2", + "Ethernet60/3", + "Ethernet60/4", + "Ethernet60/5", + "Ethernet60/6", + "Ethernet60/7", + "Ethernet60/8" + ], + "2x800G": [ + "Ethernet60/1", + "Ethernet60/5" + ], + "4x400G": [ + "Ethernet60/1", + "Ethernet60/3", + "Ethernet60/5", + "Ethernet60/7" + ], + "8x200G": [ + "Ethernet60/1", + "Ethernet60/2", + "Ethernet60/3", + "Ethernet60/4", + "Ethernet60/5", + "Ethernet60/6", + "Ethernet60/7", + "Ethernet60/8" + ] + } + }, + "Ethernet480": { + "index": "61,61,61,61,61,61,61,61", + "lanes": "473,474,475,476,477,478,479,480", + "breakout_modes": { + "1x1600G": [ + "Ethernet61/1" + ], + "1x800G": [ + "Ethernet61/1" + ], + "1x100G(4)": [ + "Ethernet61/1" + ], + "2x400G": [ + "Ethernet61/1", + "Ethernet61/5" + ], + "4x200G": [ + "Ethernet61/1", + "Ethernet61/3", + "Ethernet61/5", + "Ethernet61/7" + ], + "8x100G": [ + "Ethernet61/1", + "Ethernet61/2", + "Ethernet61/3", + "Ethernet61/4", + "Ethernet61/5", + "Ethernet61/6", + "Ethernet61/7", + "Ethernet61/8" + ], + "2x800G": [ + "Ethernet61/1", + "Ethernet61/5" + ], + "4x400G": [ + "Ethernet61/1", + "Ethernet61/3", + "Ethernet61/5", + "Ethernet61/7" + ], + "8x200G": [ + "Ethernet61/1", + "Ethernet61/2", + "Ethernet61/3", + "Ethernet61/4", + "Ethernet61/5", + "Ethernet61/6", + "Ethernet61/7", + "Ethernet61/8" + ] + } + }, + "Ethernet488": { + "index": "62,62,62,62,62,62,62,62", + "lanes": "465,466,467,468,469,470,471,472", + "breakout_modes": { + "1x1600G": [ + "Ethernet62/1" + ], + "1x800G": [ + "Ethernet62/1" + ], + "1x100G(4)": [ + "Ethernet62/1" + ], + "2x400G": [ + "Ethernet62/1", + "Ethernet62/5" + ], + "4x200G": [ + "Ethernet62/1", + "Ethernet62/3", + "Ethernet62/5", + "Ethernet62/7" + ], + "8x100G": [ + "Ethernet62/1", + "Ethernet62/2", + "Ethernet62/3", + "Ethernet62/4", + "Ethernet62/5", + "Ethernet62/6", + "Ethernet62/7", + "Ethernet62/8" + ], + "2x800G": [ + "Ethernet62/1", + "Ethernet62/5" + ], + "4x400G": [ + "Ethernet62/1", + "Ethernet62/3", + "Ethernet62/5", + "Ethernet62/7" + ], + "8x200G": [ + "Ethernet62/1", + "Ethernet62/2", + "Ethernet62/3", + "Ethernet62/4", + "Ethernet62/5", + "Ethernet62/6", + "Ethernet62/7", + "Ethernet62/8" + ] + } + }, + "Ethernet496": { + "index": "63,63,63,63,63,63,63,63", + "lanes": "481,482,483,484,485,486,487,488", + "breakout_modes": { + "1x1600G": [ + "Ethernet63/1" + ], + "1x800G": [ + "Ethernet63/1" + ], + "1x100G(4)": [ + "Ethernet63/1" + ], + "2x400G": [ + "Ethernet63/1", + "Ethernet63/5" + ], + "4x200G": [ + "Ethernet63/1", + "Ethernet63/3", + "Ethernet63/5", + "Ethernet63/7" + ], + "8x100G": [ + "Ethernet63/1", + "Ethernet63/2", + "Ethernet63/3", + "Ethernet63/4", + "Ethernet63/5", + "Ethernet63/6", + "Ethernet63/7", + "Ethernet63/8" + ], + "2x800G": [ + "Ethernet63/1", + "Ethernet63/5" + ], + "4x400G": [ + "Ethernet63/1", + "Ethernet63/3", + "Ethernet63/5", + "Ethernet63/7" + ], + "8x200G": [ + "Ethernet63/1", + "Ethernet63/2", + "Ethernet63/3", + "Ethernet63/4", + "Ethernet63/5", + "Ethernet63/6", + "Ethernet63/7", + "Ethernet63/8" + ] + } + }, + "Ethernet504": { + "index": "64,64,64,64,64,64,64,64", + "lanes": "489,490,491,492,493,494,495,496", + "breakout_modes": { + "1x1600G": [ + "Ethernet64/1" + ], + "1x800G": [ + "Ethernet64/1" + ], + "1x100G(4)": [ + "Ethernet64/1" + ], + "2x400G": [ + "Ethernet64/1", + "Ethernet64/5" + ], + "4x200G": [ + "Ethernet64/1", + "Ethernet64/3", + "Ethernet64/5", + "Ethernet64/7" + ], + "8x100G": [ + "Ethernet64/1", + "Ethernet64/2", + "Ethernet64/3", + "Ethernet64/4", + "Ethernet64/5", + "Ethernet64/6", + "Ethernet64/7", + "Ethernet64/8" + ], + "2x800G": [ + "Ethernet64/1", + "Ethernet64/5" + ], + "4x400G": [ + "Ethernet64/1", + "Ethernet64/3", + "Ethernet64/5", + "Ethernet64/7" + ], + "8x200G": [ + "Ethernet64/1", + "Ethernet64/2", + "Ethernet64/3", + "Ethernet64/4", + "Ethernet64/5", + "Ethernet64/6", + "Ethernet64/7", + "Ethernet64/8" + ] + } + }, + "Ethernet512": { + "index": "65", + "lanes": "514", + "breakout_modes": { + "1x10G": [ + "Ethernet65" + ] + } + }, + "Ethernet513": { + "index": "66", + "lanes": "515", + "breakout_modes": { + "1x10G": [ + "Ethernet66" + ] + } + } + }, + "asic_sensors": { + "poll_interval": "10", + "poll_admin_status": "enable" + } +} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform_asic b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform_asic new file mode 100755 index 00000000000..96046765276 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform_asic @@ -0,0 +1 @@ +broadcom diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform_env.conf b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform_env.conf new file mode 100755 index 00000000000..b4f7155e6b1 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/platform_env.conf @@ -0,0 +1,3 @@ +SYNCD_SHM_SIZE=512m +is_ltsw_chip=1 + diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/plugins/eeprom.py b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/plugins/eeprom.py new file mode 100755 index 00000000000..0a18c998f5f --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/plugins/eeprom.py @@ -0,0 +1,16 @@ +try: + import os + from sonic_eeprom import eeprom_tlvinfo +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class board(eeprom_tlvinfo.TlvInfoDecoder): + + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/99-0056/eeprom" + if not os.path.exists(self.eeprom_path): + file = "/sys/bus/i2c/devices/i2c-99/new_device" + with open(file, 'w') as f: + f.write('24c04 0x56\n') + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/plugins/led_control.py b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/plugins/led_control.py new file mode 100755 index 00000000000..f6be8dc74fe --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/plugins/led_control.py @@ -0,0 +1,109 @@ +""" + led_control.py + + Platform-specific LED control functionality for SONiC +""" + +try: + from sonic_led.led_control_base import LedControlBase + import os + import time + import syslog + from mmap import * + import sonic_platform.platform +except ImportError as e: + raise ImportError(str(e) + " - required module not found") + +FAN_DRAWERS = 8 +FANS_PER_DRAWER = 2 +CPLD_DIR = "/sys/bus/i2c/devices/73-0061/" + +def DBG_PRINT(str): + syslog.openlog("nokia-led") + syslog.syslog(syslog.LOG_INFO, str) + syslog.closelog() + +class LedControl(LedControlBase): + """Platform specific LED control class""" + + # Constructor + def __init__(self): + self.chassis = sonic_platform.platform.Platform().get_chassis() + self._initDefaultConfig() + + def _initDefaultConfig(self): + # The fan tray leds and system led managed by new chassis class API + # leaving only a couple other front panel leds to be done old style + DBG_PRINT("starting system leds") + self._initSystemLed() + DBG_PRINT(" led done") + + def _read_sysfs_file(self, sysfs_file): + # On successful read, returns the value read from given + # reg_name and on failure returns 'ERR' + rv = 'ERR' + + if (not os.path.isfile(sysfs_file)): + return rv + try: + with open(sysfs_file, 'r') as fd: + rv = fd.read() + fd.close() + except Exception as e: + rv = 'ERR' + + rv = rv.rstrip('\r\n') + rv = rv.lstrip(" ") + return rv + + def _write_sysfs_file(self, sysfs_file, value): + # On successful write, the value read will be written on + # reg_name and on failure returns 'ERR' + rv = 'ERR' + + if (not os.path.isfile(sysfs_file)): + return rv + try: + with open(sysfs_file, 'w') as fd: + rv = fd.write(value) + fd.close() + except Exception as e: + rv = 'ERR' + + return rv + + def _initSystemLed(self): + # Front Panel System LEDs setting + oldfan = 0xf # 2=amber, 1=green + + # Write sys led + status = self._write_sysfs_file(CPLD_DIR + 'led_sys', "0xf") + if status == "ERR": + DBG_PRINT(" System LED NOT set correctly") + else: + DBG_PRINT(" System LED set O.K. ") + + # Timer loop to monitor and set front panel Status, Fan, and PSU LEDs + while True: + # Front Panel FAN Panel LED setting + good_fan = 0 + for fan in self.chassis._fan_list: + if fan.get_status() == True: + good_fan = good_fan + 1 + + if (good_fan == FAN_DRAWERS * FANS_PER_DRAWER): + if (os.path.isfile(CPLD_DIR + "led_fan")): + if oldfan != 0x1: + self._write_sysfs_file(CPLD_DIR + "led_fan", "1") + oldfan = 0x1 + else: + oldfan = 0xf + else: + if (os.path.isfile(CPLD_DIR + "led_fan")): + if oldfan != 0x0: + self._write_sysfs_file(CPLD_DIR + "led_fan", "2") + oldfan = 0x0 + else: + oldfan = 0xf + + time.sleep(6) diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/system_health_monitoring_config.json b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/system_health_monitoring_config.json new file mode 100755 index 00000000000..d5f3a7b9830 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/system_health_monitoring_config.json @@ -0,0 +1,14 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [ + "asic", + "psu.temperature" + ], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "blinking green" + } +} diff --git a/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/thermal_policy.json b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/thermal_policy.json new file mode 100755 index 00000000000..88516a609b5 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7220_h6_64-r0/thermal_policy.json @@ -0,0 +1,66 @@ +{ + "thermal_control_algorithm": { + "run_at_boot_up": "false", + "fan_speed_when_suspend": "60" + }, + "info_types": [ + { + "type": "fan_info" + }, + { + "type": "thermal_info" + }, + { + "type": "chassis_info" + } + ], + "policies": [ + { + "name": "any fan absence", + "conditions": [ + { + "type": "fan.any.absence" + } + ], + "actions": [ + { + "type": "thermal_control.control", + "status": "false" + }, + { + "type": "fan.all.set_speed", + "speed": "100" + } + ] + }, + { + "name": "all fan presence", + "conditions": [ + { + "type": "fan.all.presence" + } + ], + "actions": [ + { + "type": "thermal.temp_check_and_set_all_fan_speed", + "default_speed": "46", + "threshold1_speed": "73", + "hightemp_speed": "100" + } + ] + }, + { + "name": "temp over high critical threshold", + "conditions": [ + { + "type": "thermal.over.high_critical_threshold" + } + ], + "actions": [ + { + "type": "switch.shutdown" + } + ] + } + ] +} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/buffers.json.j2 b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/buffers.json.j2 new file mode 100644 index 00000000000..f34a844f4a8 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't2' %} +{%- include 'buffers_config.j2' %} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/buffers_defaults_t2.j2 b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/buffers_defaults_t2.j2 new file mode 100644 index 00000000000..cf0e02f6d7c --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/buffers_defaults_t2.j2 @@ -0,0 +1,46 @@ +{%- set default_cable = '300m' %} + +{%- set ports2cable = { + 'torrouter_server' : '300m', + 'leafrouter_torrouter' : '300m', + 'spinerouter_leafrouter' : '2000m', + 'regionalhub_spinerouter': '120000m', + 'aznghub_spinerouter' : '120000m' + } +-%} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,36) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "6441610000", + "type": "both", + "mode": "dynamic", + "xoff": "1582033305" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "xon_offset": "0", + "dynamic_th":"0" + }, + "egress_lossless_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"-1" + }, + "egress_lossy_profile": { + "pool":"ingress_lossless_pool", + "size":"0", + "dynamic_th":"-4" + } + }, +{%- endmacro %} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/context_config.json b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/context_config.json new file mode 100644 index 00000000000..e454ee31fdf --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/context_config.json @@ -0,0 +1,21 @@ +{ + "CONTEXTS": [ + { + "guid" : 0, + "name" : "syncd0", + "dbAsic" : "ASIC_DB", + "dbCounters" : "COUNTERS_DB", + "dbFlex": "FLEX_COUNTER_DB", + "dbState" : "STATE_DB", + "zmq_enable": false, + "zmq_endpoint": "tcp://127.0.0.1:5555", + "zmq_ntf_endpoint": "tcp://127.0.0.1:5556", + "switches": [ + { + "index" : 0, + "hwinfo" : "" + } + ] + } + ] +} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/pg_profile_lookup.ini b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/pg_profile_lookup.ini new file mode 100644 index 00000000000..ba784705e06 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 40000 300m 0 2560 69632 -6 181753 + 100000 300m 0 2560 110592 -6 363506 + 400000 300m 0 2560 315392 -5 1454025 + 40000 1000m 0 2560 114688 -6 181753 + 100000 1000m 0 2560 225280 -6 363506 + 400000 1000m 0 2560 778240 -5 1454025 + 40000 2000m 0 2560 184320 -6 181753 + 100000 2000m 0 2560 393216 -6 363506 + 400000 2000m 0 2560 1445888 -5 1454025 + 40000 80000m 0 2560 5369856 -6 181753 + 100000 80000m 0 2560 13357056 -6 363506 + 400000 80000m 0 2560 53305344 -5 1454025 + 40000 120000m 0 2560 8028160 -6 181753 + 100000 120000m 0 2560 20004864 -6 363506 + 400000 120000m 0 2560 79900672 -5 1454025 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/port_config.ini b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/port_config.ini new file mode 100644 index 00000000000..2fb1f4af0a1 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias index role speed asic_port_name core_id core_port_id num_voq +Ethernet0 160,161,162,163,164,165,166,167 Ethernet1/1 1 Ext 800000 Eth0 5 1 8 +Ethernet8 168,169,170,171,172,173,174,175 Ethernet2/1 2 Ext 800000 Eth8 5 2 8 +Ethernet16 176,177,178,179,180,181,182,183 Ethernet3/1 3 Ext 800000 Eth16 5 3 8 +Ethernet24 184,185,186,187,188,189,190,191 Ethernet4/1 4 Ext 800000 Eth24 5 4 8 +Ethernet32 248,249,250,251,252,253,254,255 Ethernet5/1 5 Ext 800000 Eth32 7 5 8 +Ethernet40 240,241,242,243,244,245,246,247 Ethernet6/1 6 Ext 800000 Eth40 7 6 8 +Ethernet48 232,233,234,235,236,237,238,239 Ethernet7/1 7 Ext 800000 Eth48 7 7 8 +Ethernet56 224,225,226,227,228,229,230,231 Ethernet8/1 8 Ext 800000 Eth56 7 8 8 +Ethernet64 192,193,194,195,196,197,198,199 Ethernet9/1 9 Ext 800000 Eth64 6 9 8 +Ethernet72 200,201,202,203,204,205,206,207 Ethernet10/1 10 Ext 800000 Eth72 6 10 8 +Ethernet80 208,209,210,211,212,213,214,215 Ethernet11/1 11 Ext 800000 Eth80 6 11 8 +Ethernet88 216,217,218,219,220,221,222,223 Ethernet12/1 12 Ext 800000 Eth88 6 12 8 +Ethernet96 152,153,154,155,156,157,158,159 Ethernet13/1 13 Ext 800000 Eth96 4 13 8 +Ethernet104 144,145,146,147,148,149,150,151 Ethernet14/1 14 Ext 800000 Eth104 4 14 8 +Ethernet112 136,137,138,139,140,141,142,143 Ethernet15/1 15 Ext 800000 Eth112 4 15 8 +Ethernet120 128,129,130,131,132,133,134,135 Ethernet16/1 16 Ext 800000 Eth120 4 16 8 +Ethernet128 32,33,34,35,36,37,38,39 Ethernet17/1 17 Ext 800000 Eth128 1 17 8 +Ethernet136 40,41,42,43,44,45,46,47 Ethernet18/1 18 Ext 800000 Eth136 1 18 8 +Ethernet144 48,49,50,51,52,53,54,55 Ethernet19/1 19 Ext 800000 Eth144 1 19 8 +Ethernet152 56,57,58,59,60,61,62,63 Ethernet20/1 20 Ext 800000 Eth152 1 20 8 +Ethernet160 120,121,122,123,124,125,126,127 Ethernet21/1 21 Ext 800000 Eth160 3 21 8 +Ethernet168 112,113,114,115,116,117,118,119 Ethernet22/1 22 Ext 800000 Eth168 3 22 8 +Ethernet176 104,105,106,107,108,109,110,111 Ethernet23/1 23 Ext 800000 Eth176 3 23 8 +Ethernet184 96,97,98,99,100,101,102,103 Ethernet24/1 24 Ext 800000 Eth184 3 24 8 +Ethernet192 64,65,66,67,68,69,70,71 Ethernet25/1 25 Ext 800000 Eth192 2 25 8 +Ethernet200 72,73,74,75,76,77,78,79 Ethernet26/1 26 Ext 800000 Eth200 2 26 8 +Ethernet208 80,81,82,83,84,85,86,87 Ethernet27/1 27 Ext 800000 Eth208 2 27 8 +Ethernet216 88,89,90,91,92,93,94,95 Ethernet28/1 28 Ext 800000 Eth216 2 28 8 +Ethernet224 24,25,26,27,28,29,30,31 Ethernet29/1 29 Ext 800000 Eth224 0 29 8 +Ethernet232 16,17,18,19,20,21,22,23 Ethernet30/1 30 Ext 800000 Eth232 0 30 8 +Ethernet240 8,9,10,11,12,13,14,15 Ethernet31/1 31 Ext 800000 Eth240 0 31 8 +Ethernet248 0,1,2,3,4,5,6,7 Ethernet32/1 32 Ext 800000 Eth248 0 32 8 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/profile.ini b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/profile.ini new file mode 100644 index 00000000000..4eda67c91a6 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/profile.ini @@ -0,0 +1 @@ +switchMacAddress=XX:XX:XX:XX:XX:XX diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/q3d-nokia-32x800g-config.bcm b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/q3d-nokia-32x800g-config.bcm new file mode 100644 index 00000000000..e81f4b22d10 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/q3d-nokia-32x800g-config.bcm @@ -0,0 +1,1355 @@ +appl_param_rcy_mirror_ports_range.BCM8887X=100-139 +appl_enable_mesh_topology_init=0 +appl_enable_intr_init.BCM8887X=1 +appl_enable_learn_and_limit_init.BCM8887X=0 +appl_enable_oam.BCM8887X=0 +appl_enable_oam_fwd_idx_init.BCM8887X=0 +appl_enable_oam_stat_init.BCM8887X=0 +appl_enable_bier.BCM8887X=0 +#"lyaer" isn't typo here but in SDK itself +appl_enable_ebtr_eth_lyaer.BCM8887X=0 +appl_enable_field_rch_handle.BCM8887X=0 +appl_enable_field_ftmh_mc.BCM8887X=0 +# Need to revisit this for SRv6 +appl_enable_field_srv6.BCM8887X=0 +appl_enable_flow_id_init.BCM8887X=0; +appl_enable_disable_erpp_counters_init.BCM8887X=0 +dpp_db_path=/usr/share/bcm/db + +stable_location.BCM8887X=4 + +# Note that each unit should have a unique filename and that adapter does not play well with tmp and dev/shm folders. +#stable_filename.BCM8887X=/dev/shm/warmboot_data_0 +#stable_filename.1.BCM8887X=/dev/shm/warmboot_data_1 +#stable_filename.2.BCM8887X=/dev/shm/warmboot_data_2 +stable_size.BCM8887X=1700000000 + +port_priorities=8 +port_priorities_sch=8 +#CPU ports +port_priorities_0=2 +port_priorities_200=2 +port_priorities_201=2 +port_priorities_202=2 +port_priorities_203=2 +port_priorities_204=2 +port_priorities_205=2 +port_priorities_206=2 +port_priorities_207=2 +#RCY Ports +port_priorities_221=2 +port_priorities_222=2 +port_priorities_223=2 +port_priorities_224=2 +port_priorities_225=2 +port_priorities_226=2 +port_priorities_227=2 +port_priorities_228=2 +port_priorities_245=2 +port_priorities_246=2 +port_priorities_247=2 +port_priorities_248=2 +port_priorities_249=2 +port_priorities_250=2 +port_priorities_251=2 +port_priorities_252=2 +port_priorities_255=2 +port_priorities_256=2 +port_priorities_257=2 +port_priorities_258=2 +port_priorities_259=2 +port_priorities_260=2 +port_priorities_261=2 +port_priorities_262=2 + +ucode_port_0.BCM8887X=CPU.0:core_0.0 +ucode_port_200.BCM8887X=CPU.8:core_1.200 +ucode_port_201.BCM8887X=CPU.16:core_0.201 +ucode_port_202.BCM8887X=CPU.24:core_2.202 +ucode_port_203.BCM8887X=CPU.32:core_3.203 +ucode_port_204.BCM8887X=CPU.4:core_6.204 +ucode_port_205.BCM8887X=CPU.12:core_7.205 +ucode_port_206.BCM8887X=CPU.20:core_4.206 +ucode_port_207.BCM8887X=CPU.28:core_5.207 + +ucode_port_1.BCM8887X=D3CE20:core_5.1 +ucode_port_2.BCM8887X=D3CE21:core_5.2 +ucode_port_3.BCM8887X=D3CE22:core_5.3 +ucode_port_4.BCM8887X=D3CE23:core_5.4 +ucode_port_5.BCM8887X=D3CE31:core_7.5 +ucode_port_6.BCM8887X=D3CE30:core_7.6 +ucode_port_7.BCM8887X=D3CE29:core_7.7 +ucode_port_8.BCM8887X=D3CE28:core_7.8 +ucode_port_9.BCM8887X=D3CE24:core_6.9 +ucode_port_10.BCM8887X=D3CE25:core_6.10 +ucode_port_11.BCM8887X=D3CE26:core_6.11 +ucode_port_12.BCM8887X=D3CE27:core_6.12 +ucode_port_13.BCM8887X=D3CE19:core_4.13 +ucode_port_14.BCM8887X=D3CE18:core_4.14 +ucode_port_15.BCM8887X=D3CE17:core_4.15 +ucode_port_16.BCM8887X=D3CE16:core_4.16 +ucode_port_17.BCM8887X=D3CE4:core_1.17 +ucode_port_18.BCM8887X=D3CE5:core_1.18 +ucode_port_19.BCM8887X=D3CE6:core_1.19 +ucode_port_20.BCM8887X=D3CE7:core_1.20 +ucode_port_21.BCM8887X=D3CE15:core_3.21 +ucode_port_22.BCM8887X=D3CE14:core_3.22 +ucode_port_23.BCM8887X=D3CE13:core_3.23 +ucode_port_24.BCM8887X=D3CE12:core_3.24 +ucode_port_25.BCM8887X=D3CE8:core_2.25 +ucode_port_26.BCM8887X=D3CE9:core_2.26 +ucode_port_27.BCM8887X=D3CE10:core_2.27 +ucode_port_28.BCM8887X=D3CE11:core_2.28 +ucode_port_29.BCM8887X=D3CE3:core_0.29 +ucode_port_30.BCM8887X=D3CE2:core_0.30 +ucode_port_31.BCM8887X=D3CE1:core_0.31 +ucode_port_32.BCM8887X=D3CE0:core_0.32 + +tm_port_header_type_in_0.BCM8887X=INJECTED +tm_port_header_type_in_200.BCM8887X=INJECTED +tm_port_header_type_in_201.BCM8887X=INJECTED +tm_port_header_type_in_202.BCM8887X=INJECTED +tm_port_header_type_in_203.BCM8887X=INJECTED +tm_port_header_type_in_204.BCM8887X=INJECTED +tm_port_header_type_in_205.BCM8887X=INJECTED +tm_port_header_type_in_206.BCM8887X=INJECTED +tm_port_header_type_in_207.BCM8887X=INJECTED +tm_port_header_type_out_0.BCM8885X=CPU +tm_port_header_type_out_200.BCM8885X=ETH +tm_port_header_type_out_201.BCM8885X=ETH +tm_port_header_type_out_202.BCM8885X=ETH +tm_port_header_type_out_203.BCM8885X=ETH +tm_port_header_type_out_204.BCM8885X=ETH +tm_port_header_type_out_205.BCM8885X=ETH +tm_port_header_type_out_206.BCM8885X=ETH +tm_port_header_type_out_207.BCM8885X=ETH + +tm_port_header_type_in_33.BCM8887X=ETH +tm_port_header_type_in_34.BCM8887X=ETH +tm_port_header_type_out_33.BCM8887X=ETH +tm_port_header_type_out_33.BCM8887X=ETH + +custom_feature_statdma_enable=0 +dram_temperature_monitor_enable=1 +dram_temperature_threshold_stop_traffic=100 +dram_temperature_threshold_restore_traffic=95 +dram_temperature_threshold_power_down=104 + +### MDB configuration ### +mdb_profile.BCM8887X=Elastic-Balanced + +### Enable Descriptor-DMA ### +dma_desc_aggregator_chain_length_max.BCM8887X=256 +dma_desc_aggregator_buff_size_kb.BCM8887X=64 +dma_desc_aggregator_enable_specific_MDB_LPM.BCM8887X=1 +dma_desc_aggregator_enable_specific_MDB_FEC.BCM8887X=1 +dma_desc_aggregator_enable_specific_XLTCAM.BCM8887X=1 +dma_desc_aggregator_enable_specific_INIT.BCM8887X=1 + +### Outlif configuration ### +outlif_logical_to_physical_phase_map_1.BCM8887X=S1 +outlif_logical_to_physical_phase_map_2.BCM8887X=L1 +outlif_logical_to_physical_phase_map_3.BCM8887X=XL +outlif_logical_to_physical_phase_map_4.BCM8887X=L2 +outlif_logical_to_physical_phase_map_5.BCM8887X=M1 +outlif_logical_to_physical_phase_map_6.BCM8887X=M2 +outlif_logical_to_physical_phase_map_7.BCM8887X=M3 +outlif_logical_to_physical_phase_map_8.BCM8887X=S2 + + +### Outlif data granularity configuration ### +outlif_physical_phase_data_granularity_S1.BCM8887X=60 +outlif_physical_phase_data_granularity_S2.BCM8887X=60 +outlif_physical_phase_data_granularity_M1.BCM8887X=60 +outlif_physical_phase_data_granularity_M2.BCM8887X=60 +outlif_physical_phase_data_granularity_M3.BCM8887X=60 +outlif_physical_phase_data_granularity_L1.BCM8887X=60 +outlif_physical_phase_data_granularity_L2.BCM8887X=60 +outlif_physical_phase_data_granularity_XL.BCM8887X=60 + +pmf_maps_payload_size.BCM8887X=30 + +tm_port_header_type_in_0.BCM8887X=INJECTED +tm_port_header_type_out_0.BCM8887X=CPU + +tm_port_header_type_in_200.BCM8887X=INJECTED +tm_port_header_type_out_200.BCM8887X=ETH +tm_port_header_type_in_201.BCM8887X=INJECTED +tm_port_header_type_out_201.BCM8887X=ETH +tm_port_header_type_in_202.BCM8887X=INJECTED +tm_port_header_type_out_202.BCM8887X=ETH +tm_port_header_type_in_203.BCM8887X=INJECTED +tm_port_header_type_out_203.BCM8887X=ETH +tm_port_header_type_in_204.BCM8887X=INJECTED +tm_port_header_type_out_204.BCM8887X=ETH +tm_port_header_type_in_205.BCM8887X=INJECTED +tm_port_header_type_out_205.BCM8887X=ETH +tm_port_header_type_in_206.BCM8887X=INJECTED +tm_port_header_type_out_206.BCM8887X=ETH +tm_port_header_type_in_207.BCM8887X=INJECTED +tm_port_header_type_out_207.BCM8887X=ETH + +dtm_flow_mapping_mode_region_65.BCM8887X=3 +dtm_flow_mapping_mode_region_66.BCM8887X=3 +dtm_flow_mapping_mode_region_67.BCM8887X=3 +dtm_flow_mapping_mode_region_68.BCM8887X=3 +dtm_flow_mapping_mode_region_69.BCM8887X=3 +dtm_flow_mapping_mode_region_70.BCM8887X=3 +dtm_flow_mapping_mode_region_71.BCM8887X=3 +dtm_flow_mapping_mode_region_72.BCM8887X=3 +dtm_flow_mapping_mode_region_73.BCM8887X=3 +dtm_flow_mapping_mode_region_74.BCM8887X=7 +dtm_flow_mapping_mode_region_75.BCM8887X=3 +dtm_flow_mapping_mode_region_76.BCM8887X=3 +dtm_flow_mapping_mode_region_77.BCM8887X=3 +dtm_flow_mapping_mode_region_78.BCM8887X=3 +dtm_flow_mapping_mode_region_79.BCM8887X=3 +dtm_flow_mapping_mode_region_80.BCM8887X=3 +dtm_flow_mapping_mode_region_81.BCM8887X=3 +dtm_flow_mapping_mode_region_82.BCM8887X=3 +dtm_flow_mapping_mode_region_83.BCM8887X=3 +dtm_flow_mapping_mode_region_84.BCM8887X=3 +dtm_flow_mapping_mode_region_85.BCM8887X=3 +dtm_flow_mapping_mode_region_86.BCM8887X=3 +dtm_flow_mapping_mode_region_87.BCM8887X=3 +dtm_flow_mapping_mode_region_88.BCM8887X=3 +dtm_flow_mapping_mode_region_89.BCM8887X=3 +dtm_flow_mapping_mode_region_90.BCM8887X=3 +dtm_flow_mapping_mode_region_91.BCM8887X=3 +dtm_flow_mapping_mode_region_92.BCM8887X=3 +dtm_flow_mapping_mode_region_93.BCM8887X=3 +dtm_flow_mapping_mode_region_94.BCM8887X=3 + +dtm_flow_nof_remote_cores_region.BCM8887X=8 + +serdes_tx_taps_1.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_2.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_3.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_4.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_5.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_6.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_7.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_8.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_9.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_10.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_11.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_12.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_13.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_14.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_15.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_16.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_17.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_18.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_19.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_20.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_21.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_22.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_23.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_24.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_25.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_26.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_27.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_28.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_29.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_30.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_31.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 +serdes_tx_taps_32.BCM8887X=mode:pam4,pre:-36,main:112,post:0,pre2:14,pre3:-4,post2:0 + +port_init_cl72_1=0 +port_init_cl72_2=0 +port_init_cl72_3=0 +port_init_cl72_4=0 +port_init_cl72_5=0 +port_init_cl72_6=0 +port_init_cl72_7=0 +port_init_cl72_8=0 +port_init_cl72_9=0 +port_init_cl72_10=0 +port_init_cl72_11=0 +port_init_cl72_12=0 +port_init_cl72_13=0 +port_init_cl72_14=0 +port_init_cl72_15=0 +port_init_cl72_16=0 +port_init_cl72_17=0 +port_init_cl72_18=0 +port_init_cl72_19=0 +port_init_cl72_20=0 +port_init_cl72_21=0 +port_init_cl72_22=0 +port_init_cl72_23=0 +port_init_cl72_24=0 +port_init_cl72_25=0 +port_init_cl72_26=0 +port_init_cl72_27=0 +port_init_cl72_28=0 +port_init_cl72_29=0 +port_init_cl72_30=0 +port_init_cl72_31=0 +port_init_cl72_32=0 + +#serdes NIF Channel Mode +serdes_lane_config_channel_mode_1.BCM8887X=force_nr +serdes_lane_config_channel_mode_2.BCM8887X=force_nr +serdes_lane_config_channel_mode_3.BCM8887X=force_nr +serdes_lane_config_channel_mode_4.BCM8887X=force_nr +serdes_lane_config_channel_mode_5.BCM8887X=force_nr +serdes_lane_config_channel_mode_6.BCM8887X=force_nr +serdes_lane_config_channel_mode_7.BCM8887X=force_nr +serdes_lane_config_channel_mode_8.BCM8887X=force_nr +serdes_lane_config_channel_mode_9.BCM8887X=force_nr +serdes_lane_config_channel_mode_10.BCM8887X=force_nr +serdes_lane_config_channel_mode_11.BCM8887X=force_nr +serdes_lane_config_channel_mode_12.BCM8887X=force_nr +serdes_lane_config_channel_mode_13.BCM8887X=force_nr +serdes_lane_config_channel_mode_14.BCM8887X=force_nr +serdes_lane_config_channel_mode_15.BCM8887X=force_nr +serdes_lane_config_channel_mode_16.BCM8887X=force_nr +serdes_lane_config_channel_mode_17.BCM8887X=force_nr +serdes_lane_config_channel_mode_18.BCM8887X=force_nr +serdes_lane_config_channel_mode_19.BCM8887X=force_nr +serdes_lane_config_channel_mode_20.BCM8887X=force_nr +serdes_lane_config_channel_mode_21.BCM8887X=force_nr +serdes_lane_config_channel_mode_22.BCM8887X=force_nr +serdes_lane_config_channel_mode_23.BCM8887X=force_nr +serdes_lane_config_channel_mode_24.BCM8887X=force_nr +serdes_lane_config_channel_mode_25.BCM8887X=force_nr +serdes_lane_config_channel_mode_26.BCM8887X=force_nr +serdes_lane_config_channel_mode_27.BCM8887X=force_nr +serdes_lane_config_channel_mode_28.BCM8887X=force_nr +serdes_lane_config_channel_mode_29.BCM8887X=force_nr +serdes_lane_config_channel_mode_30.BCM8887X=force_nr +serdes_lane_config_channel_mode_31.BCM8887X=force_nr +serdes_lane_config_channel_mode_32.BCM8887X=force_nr + + +#serdes NIF DFE filter +serdes_lane_config_dfe_1.BCM8887X=on +serdes_lane_config_dfe_2.BCM8887X=on +serdes_lane_config_dfe_3.BCM8887X=on +serdes_lane_config_dfe_4.BCM8887X=on +serdes_lane_config_dfe_5.BCM8887X=on +serdes_lane_config_dfe_6.BCM8887X=on +serdes_lane_config_dfe_7.BCM8887X=on +serdes_lane_config_dfe_8.BCM8887X=on +serdes_lane_config_dfe_9.BCM8887X=on +serdes_lane_config_dfe_10.BCM8887X=on +serdes_lane_config_dfe_11.BCM8887X=on +serdes_lane_config_dfe_12.BCM8887X=on +serdes_lane_config_dfe_13.BCM8887X=on +serdes_lane_config_dfe_14.BCM8887X=on +serdes_lane_config_dfe_15.BCM8887X=on +serdes_lane_config_dfe_16.BCM8887X=on +serdes_lane_config_dfe_17.BCM8887X=on +serdes_lane_config_dfe_18.BCM8887X=on +serdes_lane_config_dfe_19.BCM8887X=on +serdes_lane_config_dfe_20.BCM8887X=on +serdes_lane_config_dfe_21.BCM8887X=on +serdes_lane_config_dfe_22.BCM8887X=on +serdes_lane_config_dfe_23.BCM8887X=on +serdes_lane_config_dfe_24.BCM8887X=on +serdes_lane_config_dfe_25.BCM8887X=on +serdes_lane_config_dfe_26.BCM8887X=on +serdes_lane_config_dfe_27.BCM8887X=on +serdes_lane_config_dfe_28.BCM8887X=on +serdes_lane_config_dfe_29.BCM8887X=on +serdes_lane_config_dfe_30.BCM8887X=on +serdes_lane_config_dfe_31.BCM8887X=on +serdes_lane_config_dfe_32.BCM8887X=on + +#serdes NIF Media Type +serdes_lane_config_media_type_1.BCM8887X=backplane +serdes_lane_config_media_type_2.BCM8887X=backplane +serdes_lane_config_media_type_3.BCM8887X=backplane +serdes_lane_config_media_type_4.BCM8887X=backplane +serdes_lane_config_media_type_5.BCM8887X=backplane +serdes_lane_config_media_type_6.BCM8887X=backplane +serdes_lane_config_media_type_7.BCM8887X=backplane +serdes_lane_config_media_type_8.BCM8887X=backplane +serdes_lane_config_media_type_9.BCM8887X=backplane +serdes_lane_config_media_type_10.BCM8887X=backplane +serdes_lane_config_media_type_11.BCM8887X=backplane +serdes_lane_config_media_type_12.BCM8887X=backplane +serdes_lane_config_media_type_13.BCM8887X=backplane +serdes_lane_config_media_type_14.BCM8887X=backplane +serdes_lane_config_media_type_15.BCM8887X=backplane +serdes_lane_config_media_type_16.BCM8887X=backplane +serdes_lane_config_media_type_17.BCM8887X=backplane +serdes_lane_config_media_type_18.BCM8887X=backplane +serdes_lane_config_media_type_19.BCM8887X=backplane +serdes_lane_config_media_type_20.BCM8887X=backplane +serdes_lane_config_media_type_21.BCM8887X=backplane +serdes_lane_config_media_type_22.BCM8887X=backplane +serdes_lane_config_media_type_23.BCM8887X=backplane +serdes_lane_config_media_type_24.BCM8887X=backplane +serdes_lane_config_media_type_25.BCM8887X=backplane +serdes_lane_config_media_type_26.BCM8887X=backplane +serdes_lane_config_media_type_27.BCM8887X=backplane +serdes_lane_config_media_type_28.BCM8887X=backplane +serdes_lane_config_media_type_29.BCM8887X=backplane +serdes_lane_config_media_type_30.BCM8887X=backplane +serdes_lane_config_media_type_31.BCM8887X=backplane +serdes_lane_config_media_type_32.BCM8887X=backplane + + +#serdes NIF FEC Type +port_fec.1.BCM8887X=9 +port_fec.2.BCM8887X=9 +port_fec.3.BCM8887X=9 +port_fec.4.BCM8887X=9 +port_fec.5.BCM8887X=9 +port_fec.6.BCM8887X=9 +port_fec.7.BCM8887X=9 +port_fec.8.BCM8887X=9 +port_fec.9.BCM8887X=9 +port_fec.10.BCM8887X=9 +port_fec.11.BCM8887X=9 +port_fec.12.BCM8887X=9 +port_fec.13.BCM8887X=9 +port_fec.14.BCM8887X=9 +port_fec.15.BCM8887X=9 +port_fec.16.BCM8887X=9 +port_fec.17.BCM8887X=9 +port_fec.18.BCM8887X=9 +port_fec.19.BCM8887X=9 +port_fec.20.BCM8887X=9 +port_fec.21.BCM8887X=9 +port_fec.22.BCM8887X=9 +port_fec.23.BCM8887X=9 +port_fec.24.BCM8887X=9 +port_fec.25.BCM8887X=9 +port_fec.26.BCM8887X=9 +port_fec.27.BCM8887X=9 +port_fec.28.BCM8887X=9 +port_fec.29.BCM8887X=9 +port_fec.30.BCM8887X=9 +port_fec.31.BCM8887X=9 +port_fec.32.BCM8887X=9 + +fabric_connect_mode.BCM8887X=SINGLE_FAP +port_init_speed_fabric.BCM8887X=53125 + +port_init_speed_xe13.BCM8887X=10000 +port_init_speed_xe14.BCM8887X=10000 +port_init_speed_xe15.BCM8887X=10000 +port_init_speed_xe16.BCM8887X=10000 + +port_init_speed_xe.BCM8887X=25000 +port_init_speed_xl.BCM8887X=40000 +port_init_speed_le.BCM8887X=50000 +port_init_speed_ce.BCM8887X=100000 +port_init_speed_cc.BCM8887X=200000 +port_init_speed_cd.BCM8887X=400000 +port_init_speed_d3c.BCM8887X=800000 + +programmability_image_name.BCM8887X=S121 +programmability_ucode_relative_path.BCM8887X=pemla/ucode/S121/jr3native/u_code_db2pem.txt + +custom_feature_multithread_en.BCM8887X=0 + +phy_rx_polarity_flip.BCM8887X=0 +phy_tx_polarity_flip.BCM8887X=0 + +###RX_NIF_port:32 ###OCT00 +phy_rx_polarity_flip_phy0.BCM8887X=0 +phy_rx_polarity_flip_phy1.BCM8887X=0 +phy_rx_polarity_flip_phy2.BCM8887X=1 +phy_rx_polarity_flip_phy3.BCM8887X=0 +phy_rx_polarity_flip_phy4.BCM8887X=0 +phy_rx_polarity_flip_phy5.BCM8887X=1 +phy_rx_polarity_flip_phy6.BCM8887X=0 +phy_rx_polarity_flip_phy7.BCM8887X=1 +###RX_NIF_port:31 ###OCT01 +phy_rx_polarity_flip_phy8.BCM8887X=0 +phy_rx_polarity_flip_phy9.BCM8887X=1 +phy_rx_polarity_flip_phy10.BCM8887X=0 +phy_rx_polarity_flip_phy11.BCM8887X=0 +phy_rx_polarity_flip_phy12.BCM8887X=0 +phy_rx_polarity_flip_phy13.BCM8887X=0 +phy_rx_polarity_flip_phy14.BCM8887X=0 +phy_rx_polarity_flip_phy15.BCM8887X=1 +###RX_NIF_port:30 ###OCT02 +phy_rx_polarity_flip_phy16.BCM8887X=1 +phy_rx_polarity_flip_phy17.BCM8887X=1 +phy_rx_polarity_flip_phy18.BCM8887X=1 +phy_rx_polarity_flip_phy19.BCM8887X=0 +phy_rx_polarity_flip_phy20.BCM8887X=0 +phy_rx_polarity_flip_phy21.BCM8887X=0 +phy_rx_polarity_flip_phy22.BCM8887X=0 +phy_rx_polarity_flip_phy23.BCM8887X=0 +###RX_NIF_port:29 ###OCT03 +phy_rx_polarity_flip_phy24.BCM8887X=1 +phy_rx_polarity_flip_phy25.BCM8887X=0 +phy_rx_polarity_flip_phy26.BCM8887X=1 +phy_rx_polarity_flip_phy27.BCM8887X=0 +phy_rx_polarity_flip_phy28.BCM8887X=0 +phy_rx_polarity_flip_phy29.BCM8887X=0 +phy_rx_polarity_flip_phy30.BCM8887X=0 +phy_rx_polarity_flip_phy31.BCM8887X=1 +###RX_NIF_port:17 ###OCT04 +phy_rx_polarity_flip_phy32.BCM8887X=1 +phy_rx_polarity_flip_phy33.BCM8887X=1 +phy_rx_polarity_flip_phy34.BCM8887X=1 +phy_rx_polarity_flip_phy35.BCM8887X=0 +phy_rx_polarity_flip_phy36.BCM8887X=1 +phy_rx_polarity_flip_phy37.BCM8887X=0 +phy_rx_polarity_flip_phy38.BCM8887X=0 +phy_rx_polarity_flip_phy39.BCM8887X=0 +###RX_NIF_port:18 ###OCT05 +phy_rx_polarity_flip_phy40.BCM8887X=1 +phy_rx_polarity_flip_phy41.BCM8887X=0 +phy_rx_polarity_flip_phy42.BCM8887X=1 +phy_rx_polarity_flip_phy43.BCM8887X=1 +phy_rx_polarity_flip_phy44.BCM8887X=0 +phy_rx_polarity_flip_phy45.BCM8887X=0 +phy_rx_polarity_flip_phy46.BCM8887X=1 +phy_rx_polarity_flip_phy47.BCM8887X=0 +###RX_NIF_port:19 ###OCT06 +phy_rx_polarity_flip_phy48.BCM8887X=1 +phy_rx_polarity_flip_phy49.BCM8887X=1 +phy_rx_polarity_flip_phy50.BCM8887X=1 +phy_rx_polarity_flip_phy51.BCM8887X=0 +phy_rx_polarity_flip_phy52.BCM8887X=1 +phy_rx_polarity_flip_phy53.BCM8887X=0 +phy_rx_polarity_flip_phy54.BCM8887X=0 +phy_rx_polarity_flip_phy55.BCM8887X=0 +###RX_NIF_port:20 ###OCT07 +phy_rx_polarity_flip_phy56.BCM8887X=0 +phy_rx_polarity_flip_phy57.BCM8887X=1 +phy_rx_polarity_flip_phy58.BCM8887X=1 +phy_rx_polarity_flip_phy59.BCM8887X=1 +phy_rx_polarity_flip_phy60.BCM8887X=1 +phy_rx_polarity_flip_phy61.BCM8887X=1 +phy_rx_polarity_flip_phy62.BCM8887X=0 +phy_rx_polarity_flip_phy63.BCM8887X=1 +###RX_NIF_port:25 ###OCT08 +phy_rx_polarity_flip_phy64.BCM8887X=1 +phy_rx_polarity_flip_phy65.BCM8887X=0 +phy_rx_polarity_flip_phy66.BCM8887X=0 +phy_rx_polarity_flip_phy67.BCM8887X=1 +phy_rx_polarity_flip_phy68.BCM8887X=1 +phy_rx_polarity_flip_phy69.BCM8887X=1 +phy_rx_polarity_flip_phy70.BCM8887X=1 +phy_rx_polarity_flip_phy71.BCM8887X=1 +###RX_NIF_port26 :###OCT09 +phy_rx_polarity_flip_phy72.BCM8887X=0 +phy_rx_polarity_flip_phy73.BCM8887X=1 +phy_rx_polarity_flip_phy74.BCM8887X=1 +phy_rx_polarity_flip_phy75.BCM8887X=1 +phy_rx_polarity_flip_phy76.BCM8887X=1 +phy_rx_polarity_flip_phy77.BCM8887X=1 +phy_rx_polarity_flip_phy78.BCM8887X=0 +phy_rx_polarity_flip_phy79.BCM8887X=1 +###RX_NIF_port:27 ###OCT10 +phy_rx_polarity_flip_phy80.BCM8887X=1 +phy_rx_polarity_flip_phy81.BCM8887X=0 +phy_rx_polarity_flip_phy82.BCM8887X=0 +phy_rx_polarity_flip_phy83.BCM8887X=1 +phy_rx_polarity_flip_phy84.BCM8887X=1 +phy_rx_polarity_flip_phy85.BCM8887X=1 +phy_rx_polarity_flip_phy86.BCM8887X=1 +phy_rx_polarity_flip_phy87.BCM8887X=1 +###RX_NIF_port:28 ###OCT11 +phy_rx_polarity_flip_phy88.BCM8887X=0 +phy_rx_polarity_flip_phy89.BCM8887X=1 +phy_rx_polarity_flip_phy90.BCM8887X=1 +phy_rx_polarity_flip_phy91.BCM8887X=1 +phy_rx_polarity_flip_phy92.BCM8887X=1 +phy_rx_polarity_flip_phy93.BCM8887X=1 +phy_rx_polarity_flip_phy94.BCM8887X=0 +phy_rx_polarity_flip_phy95.BCM8887X=1 +###RX_NIF_port:24 ###OCT12 +phy_rx_polarity_flip_phy96.BCM8887X=1 +phy_rx_polarity_flip_phy97.BCM8887X=0 +phy_rx_polarity_flip_phy98.BCM8887X=1 +phy_rx_polarity_flip_phy99.BCM8887X=1 +phy_rx_polarity_flip_phy100.BCM8887X=0 +phy_rx_polarity_flip_phy101.BCM8887X=0 +phy_rx_polarity_flip_phy102.BCM8887X=0 +phy_rx_polarity_flip_phy103.BCM8887X=0 +###RX_NIF_port:23 ###OCT13 +phy_rx_polarity_flip_phy104.BCM8887X=1 +phy_rx_polarity_flip_phy105.BCM8887X=0 +phy_rx_polarity_flip_phy106.BCM8887X=0 +phy_rx_polarity_flip_phy107.BCM8887X=0 +phy_rx_polarity_flip_phy108.BCM8887X=0 +phy_rx_polarity_flip_phy109.BCM8887X=0 +phy_rx_polarity_flip_phy110.BCM8887X=0 +phy_rx_polarity_flip_phy111.BCM8887X=1 +###RX_NIF_port:22 ###OCT14 +phy_rx_polarity_flip_phy112.BCM8887X=1 +phy_rx_polarity_flip_phy113.BCM8887X=0 +phy_rx_polarity_flip_phy114.BCM8887X=1 +phy_rx_polarity_flip_phy115.BCM8887X=0 +phy_rx_polarity_flip_phy116.BCM8887X=0 +phy_rx_polarity_flip_phy117.BCM8887X=1 +phy_rx_polarity_flip_phy118.BCM8887X=0 +phy_rx_polarity_flip_phy119.BCM8887X=0 +###RX_NIF_port:21 ###OCT15 +phy_rx_polarity_flip_phy120.BCM8887X=1 +phy_rx_polarity_flip_phy121.BCM8887X=0 +phy_rx_polarity_flip_phy122.BCM8887X=1 +phy_rx_polarity_flip_phy123.BCM8887X=0 +phy_rx_polarity_flip_phy124.BCM8887X=0 +phy_rx_polarity_flip_phy125.BCM8887X=0 +phy_rx_polarity_flip_phy126.BCM8887X=0 +phy_rx_polarity_flip_phy127.BCM8887X=1 +###RX_NIF_port:16 ###OCT16 +phy_rx_polarity_flip_phy128.BCM8887X=1 +phy_rx_polarity_flip_phy129.BCM8887X=0 +phy_rx_polarity_flip_phy130.BCM8887X=0 +phy_rx_polarity_flip_phy131.BCM8887X=0 +phy_rx_polarity_flip_phy132.BCM8887X=1 +phy_rx_polarity_flip_phy133.BCM8887X=0 +phy_rx_polarity_flip_phy134.BCM8887X=1 +phy_rx_polarity_flip_phy135.BCM8887X=0 +###RX_NIF_port:15 ###OCT17 +phy_rx_polarity_flip_phy136.BCM8887X=0 +phy_rx_polarity_flip_phy137.BCM8887X=1 +phy_rx_polarity_flip_phy138.BCM8887X=1 +phy_rx_polarity_flip_phy139.BCM8887X=0 +phy_rx_polarity_flip_phy140.BCM8887X=0 +phy_rx_polarity_flip_phy141.BCM8887X=0 +phy_rx_polarity_flip_phy142.BCM8887X=0 +phy_rx_polarity_flip_phy143.BCM8887X=0 +###RX_NIF_port:14 ###OCT18 +phy_rx_polarity_flip_phy144.BCM8887X=1 +phy_rx_polarity_flip_phy145.BCM8887X=0 +phy_rx_polarity_flip_phy146.BCM8887X=0 +phy_rx_polarity_flip_phy147.BCM8887X=0 +phy_rx_polarity_flip_phy148.BCM8887X=1 +phy_rx_polarity_flip_phy149.BCM8887X=0 +phy_rx_polarity_flip_phy150.BCM8887X=1 +phy_rx_polarity_flip_phy151.BCM8887X=0 +###RX_NIF_port:13 ###OCT19 +phy_rx_polarity_flip_phy152.BCM8887X=0 +phy_rx_polarity_flip_phy153.BCM8887X=1 +phy_rx_polarity_flip_phy154.BCM8887X=0 +phy_rx_polarity_flip_phy155.BCM8887X=1 +phy_rx_polarity_flip_phy156.BCM8887X=1 +phy_rx_polarity_flip_phy157.BCM8887X=1 +phy_rx_polarity_flip_phy158.BCM8887X=1 +phy_rx_polarity_flip_phy159.BCM8887X=0 +###RX_NIF_port:1 ###OCT20 +phy_rx_polarity_flip_phy160.BCM8887X=1 +phy_rx_polarity_flip_phy161.BCM8887X=0 +phy_rx_polarity_flip_phy162.BCM8887X=1 +phy_rx_polarity_flip_phy163.BCM8887X=0 +phy_rx_polarity_flip_phy164.BCM8887X=0 +phy_rx_polarity_flip_phy165.BCM8887X=0 +phy_rx_polarity_flip_phy166.BCM8887X=1 +phy_rx_polarity_flip_phy167.BCM8887X=1 +###RX_NIF_port:2 ###OCT21 +phy_rx_polarity_flip_phy168.BCM8887X=1 +phy_rx_polarity_flip_phy169.BCM8887X=0 +phy_rx_polarity_flip_phy170.BCM8887X=1 +phy_rx_polarity_flip_phy171.BCM8887X=0 +phy_rx_polarity_flip_phy172.BCM8887X=0 +phy_rx_polarity_flip_phy173.BCM8887X=0 +phy_rx_polarity_flip_phy174.BCM8887X=1 +phy_rx_polarity_flip_phy175.BCM8887X=1 +###RX_NIF_port:3 ###OCT22 +phy_rx_polarity_flip_phy176.BCM8887X=1 +phy_rx_polarity_flip_phy177.BCM8887X=1 +phy_rx_polarity_flip_phy178.BCM8887X=0 +phy_rx_polarity_flip_phy179.BCM8887X=0 +phy_rx_polarity_flip_phy180.BCM8887X=1 +phy_rx_polarity_flip_phy181.BCM8887X=1 +phy_rx_polarity_flip_phy182.BCM8887X=0 +phy_rx_polarity_flip_phy183.BCM8887X=0 +###RX_NIF_port:4 ###OCT23 +phy_rx_polarity_flip_phy184.BCM8887X=1 +phy_rx_polarity_flip_phy185.BCM8887X=0 +phy_rx_polarity_flip_phy186.BCM8887X=0 +phy_rx_polarity_flip_phy187.BCM8887X=0 +phy_rx_polarity_flip_phy188.BCM8887X=0 +phy_rx_polarity_flip_phy189.BCM8887X=0 +phy_rx_polarity_flip_phy190.BCM8887X=1 +phy_rx_polarity_flip_phy191.BCM8887X=0 +###RX_NIF_port:9 ###OCT24 +phy_rx_polarity_flip_phy192.BCM8887X=1 +phy_rx_polarity_flip_phy193.BCM8887X=1 +phy_rx_polarity_flip_phy194.BCM8887X=0 +phy_rx_polarity_flip_phy195.BCM8887X=0 +phy_rx_polarity_flip_phy196.BCM8887X=0 +phy_rx_polarity_flip_phy197.BCM8887X=0 +phy_rx_polarity_flip_phy198.BCM8887X=0 +phy_rx_polarity_flip_phy199.BCM8887X=1 +###RX_NIF_port:10 ###OCT25 +phy_rx_polarity_flip_phy200.BCM8887X=1 +phy_rx_polarity_flip_phy201.BCM8887X=0 +phy_rx_polarity_flip_phy202.BCM8887X=0 +phy_rx_polarity_flip_phy203.BCM8887X=0 +phy_rx_polarity_flip_phy204.BCM8887X=0 +phy_rx_polarity_flip_phy205.BCM8887X=0 +phy_rx_polarity_flip_phy206.BCM8887X=1 +phy_rx_polarity_flip_phy207.BCM8887X=0 +###RX_NIF_port:11 ###OCT26 +phy_rx_polarity_flip_phy208.BCM8887X=1 +phy_rx_polarity_flip_phy209.BCM8887X=1 +phy_rx_polarity_flip_phy210.BCM8887X=0 +phy_rx_polarity_flip_phy211.BCM8887X=0 +phy_rx_polarity_flip_phy212.BCM8887X=0 +phy_rx_polarity_flip_phy213.BCM8887X=0 +phy_rx_polarity_flip_phy214.BCM8887X=0 +phy_rx_polarity_flip_phy215.BCM8887X=0 +###RX_NIF_port:12 ###OCT27 +phy_rx_polarity_flip_phy216.BCM8887X=1 +phy_rx_polarity_flip_phy217.BCM8887X=0 +phy_rx_polarity_flip_phy218.BCM8887X=0 +phy_rx_polarity_flip_phy219.BCM8887X=0 +phy_rx_polarity_flip_phy220.BCM8887X=0 +phy_rx_polarity_flip_phy221.BCM8887X=0 +phy_rx_polarity_flip_phy222.BCM8887X=1 +phy_rx_polarity_flip_phy223.BCM8887X=0 +###RX_NIF_port:8 ###OCT28 +phy_rx_polarity_flip_phy224.BCM8887X=0 +phy_rx_polarity_flip_phy225.BCM8887X=1 +phy_rx_polarity_flip_phy226.BCM8887X=0 +phy_rx_polarity_flip_phy227.BCM8887X=0 +phy_rx_polarity_flip_phy228.BCM8887X=1 +phy_rx_polarity_flip_phy229.BCM8887X=1 +phy_rx_polarity_flip_phy230.BCM8887X=1 +phy_rx_polarity_flip_phy231.BCM8887X=1 +###RX_NIF_port:7 ###OCT29 +phy_rx_polarity_flip_phy232.BCM8887X=1 +phy_rx_polarity_flip_phy233.BCM8887X=1 +phy_rx_polarity_flip_phy234.BCM8887X=0 +phy_rx_polarity_flip_phy235.BCM8887X=1 +phy_rx_polarity_flip_phy236.BCM8887X=1 +phy_rx_polarity_flip_phy237.BCM8887X=1 +phy_rx_polarity_flip_phy238.BCM8887X=1 +phy_rx_polarity_flip_phy239.BCM8887X=0 +###RX_NIF_port:6 ###OCT30 +phy_rx_polarity_flip_phy240.BCM8887X=0 +phy_rx_polarity_flip_phy241.BCM8887X=1 +phy_rx_polarity_flip_phy242.BCM8887X=0 +phy_rx_polarity_flip_phy243.BCM8887X=1 +phy_rx_polarity_flip_phy244.BCM8887X=1 +phy_rx_polarity_flip_phy245.BCM8887X=0 +phy_rx_polarity_flip_phy246.BCM8887X=1 +phy_rx_polarity_flip_phy247.BCM8887X=1 +###RX_NIF_port:5 ###OCT31 +phy_rx_polarity_flip_phy248.BCM8887X=0 +phy_rx_polarity_flip_phy249.BCM8887X=1 +phy_rx_polarity_flip_phy250.BCM8887X=0 +phy_rx_polarity_flip_phy251.BCM8887X=1 +phy_rx_polarity_flip_phy252.BCM8887X=1 +phy_rx_polarity_flip_phy253.BCM8887X=1 +phy_rx_polarity_flip_phy254.BCM8887X=1 +phy_rx_polarity_flip_phy255.BCM8887X=0 +#NA - from SDK +phy_rx_polarity_flip_phy256.BCM8887X=0 +phy_rx_polarity_flip_phy257.BCM8887X=0 +phy_rx_polarity_flip_phy258.BCM8887X=0 +phy_rx_polarity_flip_phy259.BCM8887X=0 +phy_rx_polarity_flip_phy260.BCM8887X=0 +phy_rx_polarity_flip_phy261.BCM8887X=0 +phy_rx_polarity_flip_phy262.BCM8887X=0 +phy_rx_polarity_flip_phy263.BCM8887X=0 + +#NIF Tx Polarity +###TX_NIF_port:32 ###OCT00 +phy_tx_polarity_flip_phy0.BCM8887X=1 +phy_tx_polarity_flip_phy1.BCM8887X=0 +phy_tx_polarity_flip_phy2.BCM8887X=0 +phy_tx_polarity_flip_phy3.BCM8887X=1 +phy_tx_polarity_flip_phy4.BCM8887X=1 +phy_tx_polarity_flip_phy5.BCM8887X=1 +phy_tx_polarity_flip_phy6.BCM8887X=1 +phy_tx_polarity_flip_phy7.BCM8887X=1 +###TX_NIF_port:31 ###OCT01 +phy_tx_polarity_flip_phy8.BCM8887X=0 +phy_tx_polarity_flip_phy9.BCM8887X=1 +phy_tx_polarity_flip_phy10.BCM8887X=1 +phy_tx_polarity_flip_phy11.BCM8887X=1 +phy_tx_polarity_flip_phy12.BCM8887X=1 +phy_tx_polarity_flip_phy13.BCM8887X=1 +phy_tx_polarity_flip_phy14.BCM8887X=0 +phy_tx_polarity_flip_phy15.BCM8887X=1 +###TX_NIF_port:30 ###OCT02 +phy_tx_polarity_flip_phy16.BCM8887X=1 +phy_tx_polarity_flip_phy17.BCM8887X=0 +phy_tx_polarity_flip_phy18.BCM8887X=0 +phy_tx_polarity_flip_phy19.BCM8887X=1 +phy_tx_polarity_flip_phy20.BCM8887X=1 +phy_tx_polarity_flip_phy21.BCM8887X=1 +phy_tx_polarity_flip_phy22.BCM8887X=1 +phy_tx_polarity_flip_phy23.BCM8887X=1 +###TX_NIF_port:29 ###OCT03 +phy_tx_polarity_flip_phy24.BCM8887X=0 +phy_tx_polarity_flip_phy25.BCM8887X=1 +phy_tx_polarity_flip_phy26.BCM8887X=1 +phy_tx_polarity_flip_phy27.BCM8887X=0 +phy_tx_polarity_flip_phy28.BCM8887X=0 +phy_tx_polarity_flip_phy29.BCM8887X=1 +phy_tx_polarity_flip_phy30.BCM8887X=1 +phy_tx_polarity_flip_phy31.BCM8887X=1 +###TX_NIF_port:17 ###OCT04 +phy_tx_polarity_flip_phy32.BCM8887X=1 +phy_tx_polarity_flip_phy33.BCM8887X=1 +phy_tx_polarity_flip_phy34.BCM8887X=1 +phy_tx_polarity_flip_phy35.BCM8887X=0 +phy_tx_polarity_flip_phy36.BCM8887X=0 +phy_tx_polarity_flip_phy37.BCM8887X=0 +phy_tx_polarity_flip_phy38.BCM8887X=0 +phy_tx_polarity_flip_phy39.BCM8887X=0 +###TX_NIF_port:18 ###OCT05 +phy_tx_polarity_flip_phy40.BCM8887X=0 +phy_tx_polarity_flip_phy41.BCM8887X=1 +phy_tx_polarity_flip_phy42.BCM8887X=0 +phy_tx_polarity_flip_phy43.BCM8887X=0 +phy_tx_polarity_flip_phy44.BCM8887X=0 +phy_tx_polarity_flip_phy45.BCM8887X=1 +phy_tx_polarity_flip_phy46.BCM8887X=0 +phy_tx_polarity_flip_phy47.BCM8887X=1 +###TX_NIF_port:19 ###OCT06 +phy_tx_polarity_flip_phy48.BCM8887X=1 +phy_tx_polarity_flip_phy49.BCM8887X=1 +phy_tx_polarity_flip_phy50.BCM8887X=1 +phy_tx_polarity_flip_phy51.BCM8887X=0 +phy_tx_polarity_flip_phy52.BCM8887X=0 +phy_tx_polarity_flip_phy53.BCM8887X=0 +phy_tx_polarity_flip_phy54.BCM8887X=0 +phy_tx_polarity_flip_phy55.BCM8887X=0 +###TX_NIF_port:20 ###OCT07 +phy_tx_polarity_flip_phy56.BCM8887X=1 +phy_tx_polarity_flip_phy57.BCM8887X=0 +phy_tx_polarity_flip_phy58.BCM8887X=1 +phy_tx_polarity_flip_phy59.BCM8887X=0 +phy_tx_polarity_flip_phy60.BCM8887X=0 +phy_tx_polarity_flip_phy61.BCM8887X=0 +phy_tx_polarity_flip_phy62.BCM8887X=0 +phy_tx_polarity_flip_phy63.BCM8887X=0 +###TX_NIF_port:25 ###OCT08 +phy_tx_polarity_flip_phy64.BCM8887X=0 +phy_tx_polarity_flip_phy65.BCM8887X=0 +phy_tx_polarity_flip_phy66.BCM8887X=0 +phy_tx_polarity_flip_phy67.BCM8887X=0 +phy_tx_polarity_flip_phy68.BCM8887X=0 +phy_tx_polarity_flip_phy69.BCM8887X=1 +phy_tx_polarity_flip_phy70.BCM8887X=0 +phy_tx_polarity_flip_phy71.BCM8887X=1 +###TX_NIF_port26 :###OCT09 +phy_tx_polarity_flip_phy72.BCM8887X=1 +phy_tx_polarity_flip_phy73.BCM8887X=0 +phy_tx_polarity_flip_phy74.BCM8887X=1 +phy_tx_polarity_flip_phy75.BCM8887X=0 +phy_tx_polarity_flip_phy76.BCM8887X=0 +phy_tx_polarity_flip_phy77.BCM8887X=0 +phy_tx_polarity_flip_phy78.BCM8887X=0 +phy_tx_polarity_flip_phy79.BCM8887X=0 +###TX_NIF_port:27 ###OCT10 +phy_tx_polarity_flip_phy80.BCM8887X=0 +phy_tx_polarity_flip_phy81.BCM8887X=0 +phy_tx_polarity_flip_phy82.BCM8887X=0 +phy_tx_polarity_flip_phy83.BCM8887X=0 +phy_tx_polarity_flip_phy84.BCM8887X=0 +phy_tx_polarity_flip_phy85.BCM8887X=1 +phy_tx_polarity_flip_phy86.BCM8887X=0 +phy_tx_polarity_flip_phy87.BCM8887X=1 +###TX_NIF_port:28 ###OCT11 +phy_tx_polarity_flip_phy88.BCM8887X=1 +phy_tx_polarity_flip_phy89.BCM8887X=0 +phy_tx_polarity_flip_phy90.BCM8887X=1 +phy_tx_polarity_flip_phy91.BCM8887X=0 +phy_tx_polarity_flip_phy92.BCM8887X=0 +phy_tx_polarity_flip_phy93.BCM8887X=0 +phy_tx_polarity_flip_phy94.BCM8887X=0 +phy_tx_polarity_flip_phy95.BCM8887X=0 +###TX_NIF_port:24 ###OCT12 +phy_tx_polarity_flip_phy96.BCM8887X=1 +phy_tx_polarity_flip_phy97.BCM8887X=1 +phy_tx_polarity_flip_phy98.BCM8887X=1 +phy_tx_polarity_flip_phy99.BCM8887X=0 +phy_tx_polarity_flip_phy100.BCM8887X=0 +phy_tx_polarity_flip_phy101.BCM8887X=1 +phy_tx_polarity_flip_phy102.BCM8887X=0 +phy_tx_polarity_flip_phy103.BCM8887X=1 +###TX_NIF_port:23 ###OCT13 +phy_tx_polarity_flip_phy104.BCM8887X=0 +phy_tx_polarity_flip_phy105.BCM8887X=1 +phy_tx_polarity_flip_phy106.BCM8887X=1 +phy_tx_polarity_flip_phy107.BCM8887X=0 +phy_tx_polarity_flip_phy108.BCM8887X=0 +phy_tx_polarity_flip_phy109.BCM8887X=1 +phy_tx_polarity_flip_phy110.BCM8887X=1 +phy_tx_polarity_flip_phy111.BCM8887X=1 +###TX_NIF_port:22 ###OCT14 +phy_tx_polarity_flip_phy112.BCM8887X=1 +phy_tx_polarity_flip_phy113.BCM8887X=1 +phy_tx_polarity_flip_phy114.BCM8887X=1 +phy_tx_polarity_flip_phy115.BCM8887X=0 +phy_tx_polarity_flip_phy116.BCM8887X=1 +phy_tx_polarity_flip_phy117.BCM8887X=1 +phy_tx_polarity_flip_phy118.BCM8887X=0 +phy_tx_polarity_flip_phy119.BCM8887X=0 +###TX_NIF_port:21 ###OCT15 +phy_tx_polarity_flip_phy120.BCM8887X=0 +phy_tx_polarity_flip_phy121.BCM8887X=1 +phy_tx_polarity_flip_phy122.BCM8887X=1 +phy_tx_polarity_flip_phy123.BCM8887X=0 +phy_tx_polarity_flip_phy124.BCM8887X=0 +phy_tx_polarity_flip_phy125.BCM8887X=1 +phy_tx_polarity_flip_phy126.BCM8887X=1 +phy_tx_polarity_flip_phy127.BCM8887X=1 +###TX_NIF_port:16 ###OCT16 +phy_tx_polarity_flip_phy128.BCM8887X=1 +phy_tx_polarity_flip_phy129.BCM8887X=1 +phy_tx_polarity_flip_phy130.BCM8887X=0 +phy_tx_polarity_flip_phy131.BCM8887X=1 +phy_tx_polarity_flip_phy132.BCM8887X=1 +phy_tx_polarity_flip_phy133.BCM8887X=0 +phy_tx_polarity_flip_phy134.BCM8887X=1 +phy_tx_polarity_flip_phy135.BCM8887X=1 +###TX_NIF_port:15 ###OCT17 +phy_tx_polarity_flip_phy136.BCM8887X=1 +phy_tx_polarity_flip_phy137.BCM8887X=1 +phy_tx_polarity_flip_phy138.BCM8887X=0 +phy_tx_polarity_flip_phy139.BCM8887X=1 +phy_tx_polarity_flip_phy140.BCM8887X=1 +phy_tx_polarity_flip_phy141.BCM8887X=0 +phy_tx_polarity_flip_phy142.BCM8887X=1 +phy_tx_polarity_flip_phy143.BCM8887X=1 +###TX_NIF_port:14 ###OCT18 +phy_tx_polarity_flip_phy144.BCM8887X=1 +phy_tx_polarity_flip_phy145.BCM8887X=1 +phy_tx_polarity_flip_phy146.BCM8887X=0 +phy_tx_polarity_flip_phy147.BCM8887X=1 +phy_tx_polarity_flip_phy148.BCM8887X=1 +phy_tx_polarity_flip_phy149.BCM8887X=0 +phy_tx_polarity_flip_phy150.BCM8887X=1 +phy_tx_polarity_flip_phy151.BCM8887X=1 +###TX_NIF_port:13 ###OCT19 +phy_tx_polarity_flip_phy152.BCM8887X=1 +phy_tx_polarity_flip_phy153.BCM8887X=0 +phy_tx_polarity_flip_phy154.BCM8887X=0 +phy_tx_polarity_flip_phy155.BCM8887X=1 +phy_tx_polarity_flip_phy156.BCM8887X=1 +phy_tx_polarity_flip_phy157.BCM8887X=0 +phy_tx_polarity_flip_phy158.BCM8887X=0 +phy_tx_polarity_flip_phy159.BCM8887X=0 +###TX_NIF_port:1 ###OCT20 +phy_tx_polarity_flip_phy160.BCM8887X=0 +phy_tx_polarity_flip_phy161.BCM8887X=1 +phy_tx_polarity_flip_phy162.BCM8887X=0 +phy_tx_polarity_flip_phy163.BCM8887X=1 +phy_tx_polarity_flip_phy164.BCM8887X=1 +phy_tx_polarity_flip_phy165.BCM8887X=0 +phy_tx_polarity_flip_phy166.BCM8887X=0 +phy_tx_polarity_flip_phy167.BCM8887X=0 +###TX_NIF_port:2 ###OCT21 +phy_tx_polarity_flip_phy168.BCM8887X=0 +phy_tx_polarity_flip_phy169.BCM8887X=1 +phy_tx_polarity_flip_phy170.BCM8887X=0 +phy_tx_polarity_flip_phy171.BCM8887X=1 +phy_tx_polarity_flip_phy172.BCM8887X=1 +phy_tx_polarity_flip_phy173.BCM8887X=0 +phy_tx_polarity_flip_phy174.BCM8887X=0 +phy_tx_polarity_flip_phy175.BCM8887X=0 +###TX_NIF_port:3 ###OCT22 +phy_tx_polarity_flip_phy176.BCM8887X=0 +phy_tx_polarity_flip_phy177.BCM8887X=1 +phy_tx_polarity_flip_phy178.BCM8887X=1 +phy_tx_polarity_flip_phy179.BCM8887X=0 +phy_tx_polarity_flip_phy180.BCM8887X=0 +phy_tx_polarity_flip_phy181.BCM8887X=0 +phy_tx_polarity_flip_phy182.BCM8887X=0 +phy_tx_polarity_flip_phy183.BCM8887X=1 +###TX_NIF_port:4 ###OCT23 +phy_tx_polarity_flip_phy184.BCM8887X=0 +phy_tx_polarity_flip_phy185.BCM8887X=1 +phy_tx_polarity_flip_phy186.BCM8887X=0 +phy_tx_polarity_flip_phy187.BCM8887X=1 +phy_tx_polarity_flip_phy188.BCM8887X=1 +phy_tx_polarity_flip_phy189.BCM8887X=1 +phy_tx_polarity_flip_phy190.BCM8887X=1 +phy_tx_polarity_flip_phy191.BCM8887X=1 +###TX_NIF_port:9 ###OCT24 +phy_tx_polarity_flip_phy192.BCM8887X=1 +phy_tx_polarity_flip_phy193.BCM8887X=1 +phy_tx_polarity_flip_phy194.BCM8887X=1 +phy_tx_polarity_flip_phy195.BCM8887X=1 +phy_tx_polarity_flip_phy196.BCM8887X=1 +phy_tx_polarity_flip_phy197.BCM8887X=0 +phy_tx_polarity_flip_phy198.BCM8887X=1 +phy_tx_polarity_flip_phy199.BCM8887X=0 +###TX_NIF_port:10 ###OCT25 +phy_tx_polarity_flip_phy200.BCM8887X=0 +phy_tx_polarity_flip_phy201.BCM8887X=1 +phy_tx_polarity_flip_phy202.BCM8887X=0 +phy_tx_polarity_flip_phy203.BCM8887X=1 +phy_tx_polarity_flip_phy204.BCM8887X=1 +phy_tx_polarity_flip_phy205.BCM8887X=1 +phy_tx_polarity_flip_phy206.BCM8887X=1 +phy_tx_polarity_flip_phy207.BCM8887X=1 +###TX_NIF_port:11 ###OCT26 +phy_tx_polarity_flip_phy208.BCM8887X=1 +phy_tx_polarity_flip_phy209.BCM8887X=1 +phy_tx_polarity_flip_phy210.BCM8887X=1 +phy_tx_polarity_flip_phy211.BCM8887X=1 +phy_tx_polarity_flip_phy212.BCM8887X=1 +phy_tx_polarity_flip_phy213.BCM8887X=0 +phy_tx_polarity_flip_phy214.BCM8887X=1 +phy_tx_polarity_flip_phy215.BCM8887X=0 +###TX_NIF_port:12 ###OCT27 +phy_tx_polarity_flip_phy216.BCM8887X=0 +phy_tx_polarity_flip_phy217.BCM8887X=1 +phy_tx_polarity_flip_phy218.BCM8887X=0 +phy_tx_polarity_flip_phy219.BCM8887X=1 +phy_tx_polarity_flip_phy220.BCM8887X=1 +phy_tx_polarity_flip_phy221.BCM8887X=1 +phy_tx_polarity_flip_phy222.BCM8887X=1 +phy_tx_polarity_flip_phy223.BCM8887X=1 +###TX_NIF_port:8 ###OCT28 +phy_tx_polarity_flip_phy224.BCM8887X=0 +phy_tx_polarity_flip_phy225.BCM8887X=0 +phy_tx_polarity_flip_phy226.BCM8887X=0 +phy_tx_polarity_flip_phy227.BCM8887X=1 +phy_tx_polarity_flip_phy228.BCM8887X=1 +phy_tx_polarity_flip_phy229.BCM8887X=0 +phy_tx_polarity_flip_phy230.BCM8887X=1 +phy_tx_polarity_flip_phy231.BCM8887X=0 +###TX_NIF_port:7 ###OCT29 +phy_tx_polarity_flip_phy232.BCM8887X=1 +phy_tx_polarity_flip_phy233.BCM8887X=0 +phy_tx_polarity_flip_phy234.BCM8887X=0 +phy_tx_polarity_flip_phy235.BCM8887X=1 +phy_tx_polarity_flip_phy236.BCM8887X=1 +phy_tx_polarity_flip_phy237.BCM8887X=0 +phy_tx_polarity_flip_phy238.BCM8887X=0 +phy_tx_polarity_flip_phy239.BCM8887X=0 +###TX_NIF_port:6 ###OCT30 +phy_tx_polarity_flip_phy240.BCM8887X=0 +phy_tx_polarity_flip_phy241.BCM8887X=0 +phy_tx_polarity_flip_phy242.BCM8887X=0 +phy_tx_polarity_flip_phy243.BCM8887X=1 +phy_tx_polarity_flip_phy244.BCM8887X=0 +phy_tx_polarity_flip_phy245.BCM8887X=0 +phy_tx_polarity_flip_phy246.BCM8887X=1 +phy_tx_polarity_flip_phy247.BCM8887X=1 +###TX_NIF_port:5 ###OCT31 +phy_tx_polarity_flip_phy248.BCM8887X=1 +phy_tx_polarity_flip_phy249.BCM8887X=0 +phy_tx_polarity_flip_phy250.BCM8887X=0 +phy_tx_polarity_flip_phy251.BCM8887X=1 +phy_tx_polarity_flip_phy252.BCM8887X=1 +phy_tx_polarity_flip_phy253.BCM8887X=0 +phy_tx_polarity_flip_phy254.BCM8887X=0 +phy_tx_polarity_flip_phy255.BCM8887X=0 + +#NA +phy_tx_polarity_flip_phy256.BCM8887X=0 +phy_tx_polarity_flip_phy257.BCM8887X=0 +phy_tx_polarity_flip_phy258.BCM8887X=0 +phy_tx_polarity_flip_phy259.BCM8887X=0 +phy_tx_polarity_flip_phy260.BCM8887X=0 +phy_tx_polarity_flip_phy261.BCM8887X=0 +phy_tx_polarity_flip_phy262.BCM8887X=0 +phy_tx_polarity_flip_phy263.BCM8887X=0 + +#Lane Swap configuration required for Broadcom BCM8887X board +#NIF Lane Swap +###NIF_port:32 ###OCT00 +lane_to_serdes_map_nif_lane0.BCM8887X=rx3:tx0 +lane_to_serdes_map_nif_lane1.BCM8887X=rx4:tx1 +lane_to_serdes_map_nif_lane2.BCM8887X=rx0:tx6 +lane_to_serdes_map_nif_lane3.BCM8887X=rx7:tx3 +lane_to_serdes_map_nif_lane4.BCM8887X=rx5:tx4 +lane_to_serdes_map_nif_lane5.BCM8887X=rx1:tx5 +lane_to_serdes_map_nif_lane6.BCM8887X=rx6:tx2 +lane_to_serdes_map_nif_lane7.BCM8887X=rx2:tx7 +###NIF_port:31 ###OCT01 +lane_to_serdes_map_nif_lane8.BCM8887X=rx14:tx9 +lane_to_serdes_map_nif_lane9.BCM8887X=rx9:tx8 +lane_to_serdes_map_nif_lane10.BCM8887X=rx15:tx10 +lane_to_serdes_map_nif_lane11.BCM8887X=rx11:tx13 +lane_to_serdes_map_nif_lane12.BCM8887X=rx12:tx15 +lane_to_serdes_map_nif_lane13.BCM8887X=rx8:tx11 +lane_to_serdes_map_nif_lane14.BCM8887X=rx13:tx14 +lane_to_serdes_map_nif_lane15.BCM8887X=rx10:tx12 +###NIF_port:30 ###OCT02 +lane_to_serdes_map_nif_lane16.BCM8887X=rx16:tx16 +lane_to_serdes_map_nif_lane17.BCM8887X=rx17:tx17 +lane_to_serdes_map_nif_lane18.BCM8887X=rx18:tx22 +lane_to_serdes_map_nif_lane19.BCM8887X=rx19:tx19 +lane_to_serdes_map_nif_lane20.BCM8887X=rx20:tx20 +lane_to_serdes_map_nif_lane21.BCM8887X=rx21:tx21 +lane_to_serdes_map_nif_lane22.BCM8887X=rx22:tx18 +lane_to_serdes_map_nif_lane23.BCM8887X=rx23:tx23 +###NIF_port:29 ###OCT03 +lane_to_serdes_map_nif_lane24.BCM8887X=rx26:tx29 +lane_to_serdes_map_nif_lane25.BCM8887X=rx30:tx28 +lane_to_serdes_map_nif_lane26.BCM8887X=rx27:tx30 +lane_to_serdes_map_nif_lane27.BCM8887X=rx28:tx27 +lane_to_serdes_map_nif_lane28.BCM8887X=rx31:tx24 +lane_to_serdes_map_nif_lane29.BCM8887X=rx25:tx25 +lane_to_serdes_map_nif_lane30.BCM8887X=rx29:tx31 +lane_to_serdes_map_nif_lane31.BCM8887X=rx24:tx26 +###NIF_port:17 ###OCT04 +lane_to_serdes_map_nif_lane32.BCM8887X=rx35:tx33 +lane_to_serdes_map_nif_lane33.BCM8887X=rx37:tx39 +lane_to_serdes_map_nif_lane34.BCM8887X=rx34:tx34 +lane_to_serdes_map_nif_lane35.BCM8887X=rx39:tx35 +lane_to_serdes_map_nif_lane36.BCM8887X=rx36:tx37 +lane_to_serdes_map_nif_lane37.BCM8887X=rx33:tx32 +lane_to_serdes_map_nif_lane38.BCM8887X=rx38:tx36 +lane_to_serdes_map_nif_lane39.BCM8887X=rx32:tx38 +###NIF_port:18 ###OCT05 +lane_to_serdes_map_nif_lane40.BCM8887X=rx42:tx46 +lane_to_serdes_map_nif_lane41.BCM8887X=rx46:tx47 +lane_to_serdes_map_nif_lane42.BCM8887X=rx43:tx40 +lane_to_serdes_map_nif_lane43.BCM8887X=rx44:tx43 +lane_to_serdes_map_nif_lane44.BCM8887X=rx47:tx44 +lane_to_serdes_map_nif_lane45.BCM8887X=rx40:tx42 +lane_to_serdes_map_nif_lane46.BCM8887X=rx45:tx45 +lane_to_serdes_map_nif_lane47.BCM8887X=rx41:tx41 +###NIF_port:19 ###OCT06 +lane_to_serdes_map_nif_lane48.BCM8887X=rx51:tx49 +lane_to_serdes_map_nif_lane49.BCM8887X=rx53:tx55 +lane_to_serdes_map_nif_lane50.BCM8887X=rx50:tx50 +lane_to_serdes_map_nif_lane51.BCM8887X=rx55:tx51 +lane_to_serdes_map_nif_lane52.BCM8887X=rx52:tx53 +lane_to_serdes_map_nif_lane53.BCM8887X=rx49:tx48 +lane_to_serdes_map_nif_lane54.BCM8887X=rx54:tx52 +lane_to_serdes_map_nif_lane55.BCM8887X=rx48:tx54 +###NIF_port:20 ###OCT07 +lane_to_serdes_map_nif_lane56.BCM8887X=rx59:tx63 +lane_to_serdes_map_nif_lane57.BCM8887X=rx61:tx59 +lane_to_serdes_map_nif_lane58.BCM8887X=rx58:tx57 +lane_to_serdes_map_nif_lane59.BCM8887X=rx63:tx61 +lane_to_serdes_map_nif_lane60.BCM8887X=rx62:tx62 +lane_to_serdes_map_nif_lane61.BCM8887X=rx57:tx60 +lane_to_serdes_map_nif_lane62.BCM8887X=rx60:tx58 +lane_to_serdes_map_nif_lane63.BCM8887X=rx56:tx56 +###NIF_port:25 ###OCT08 +lane_to_serdes_map_nif_lane64.BCM8887X=rx66:tx64 +lane_to_serdes_map_nif_lane65.BCM8887X=rx68:tx67 +lane_to_serdes_map_nif_lane66.BCM8887X=rx67:tx68 +lane_to_serdes_map_nif_lane67.BCM8887X=rx70:tx69 +lane_to_serdes_map_nif_lane68.BCM8887X=rx71:tx66 +lane_to_serdes_map_nif_lane69.BCM8887X=rx64:tx65 +lane_to_serdes_map_nif_lane70.BCM8887X=rx69:tx70 +lane_to_serdes_map_nif_lane71.BCM8887X=rx65:tx71 +###NIF_port26 :###OCT09 +lane_to_serdes_map_nif_lane72.BCM8887X=rx75:tx79 +lane_to_serdes_map_nif_lane73.BCM8887X=rx77:tx75 +lane_to_serdes_map_nif_lane74.BCM8887X=rx74:tx73 +lane_to_serdes_map_nif_lane75.BCM8887X=rx79:tx77 +lane_to_serdes_map_nif_lane76.BCM8887X=rx78:tx78 +lane_to_serdes_map_nif_lane77.BCM8887X=rx73:tx76 +lane_to_serdes_map_nif_lane78.BCM8887X=rx76:tx74 +lane_to_serdes_map_nif_lane79.BCM8887X=rx72:tx72 +###NIF_port:27 ###OCT10 +lane_to_serdes_map_nif_lane80.BCM8887X=rx82:tx80 +lane_to_serdes_map_nif_lane81.BCM8887X=rx84:tx83 +lane_to_serdes_map_nif_lane82.BCM8887X=rx83:tx84 +lane_to_serdes_map_nif_lane83.BCM8887X=rx86:tx85 +lane_to_serdes_map_nif_lane84.BCM8887X=rx87:tx82 +lane_to_serdes_map_nif_lane85.BCM8887X=rx80:tx81 +lane_to_serdes_map_nif_lane86.BCM8887X=rx85:tx86 +lane_to_serdes_map_nif_lane87.BCM8887X=rx81:tx87 +###NIF_port:28 ###OCT11 +lane_to_serdes_map_nif_lane88.BCM8887X=rx91:tx95 +lane_to_serdes_map_nif_lane89.BCM8887X=rx93:tx91 +lane_to_serdes_map_nif_lane90.BCM8887X=rx90:tx89 +lane_to_serdes_map_nif_lane91.BCM8887X=rx95:tx93 +lane_to_serdes_map_nif_lane92.BCM8887X=rx94:tx94 +lane_to_serdes_map_nif_lane93.BCM8887X=rx89:tx92 +lane_to_serdes_map_nif_lane94.BCM8887X=rx92:tx90 +lane_to_serdes_map_nif_lane95.BCM8887X=rx88:tx88 +###NIF_port:24 ###OCT12 +lane_to_serdes_map_nif_lane96.BCM8887X=rx96:tx101 +lane_to_serdes_map_nif_lane97.BCM8887X=rx97:tx103 +lane_to_serdes_map_nif_lane98.BCM8887X=rx100:tx102 +lane_to_serdes_map_nif_lane99.BCM8887X=rx102:tx98 +lane_to_serdes_map_nif_lane100.BCM8887X=rx101:tx100 +lane_to_serdes_map_nif_lane101.BCM8887X=rx103:tx99 +lane_to_serdes_map_nif_lane102.BCM8887X=rx99:tx96 +lane_to_serdes_map_nif_lane103.BCM8887X=rx98:tx97 +###NIF_port:23 ###OCT13 +lane_to_serdes_map_nif_lane104.BCM8887X=rx107:tx109 +lane_to_serdes_map_nif_lane105.BCM8887X=rx110:tx108 +lane_to_serdes_map_nif_lane106.BCM8887X=rx106:tx110 +lane_to_serdes_map_nif_lane107.BCM8887X=rx108:tx107 +lane_to_serdes_map_nif_lane108.BCM8887X=rx111:tx104 +lane_to_serdes_map_nif_lane109.BCM8887X=rx105:tx105 +lane_to_serdes_map_nif_lane110.BCM8887X=rx109:tx111 +lane_to_serdes_map_nif_lane111.BCM8887X=rx104:tx106 +###NIF_port:22 ###OCT14 +lane_to_serdes_map_nif_lane112.BCM8887X=rx114:tx114 +lane_to_serdes_map_nif_lane113.BCM8887X=rx117:tx116 +lane_to_serdes_map_nif_lane114.BCM8887X=rx115:tx113 +lane_to_serdes_map_nif_lane115.BCM8887X=rx119:tx115 +lane_to_serdes_map_nif_lane116.BCM8887X=rx116:tx119 +lane_to_serdes_map_nif_lane117.BCM8887X=rx112:tx118 +lane_to_serdes_map_nif_lane118.BCM8887X=rx118:tx112 +lane_to_serdes_map_nif_lane119.BCM8887X=rx113:tx117 +###NIF_port:21 ###OCT15 +lane_to_serdes_map_nif_lane120.BCM8887X=rx123:tx125 +lane_to_serdes_map_nif_lane121.BCM8887X=rx126:tx124 +lane_to_serdes_map_nif_lane122.BCM8887X=rx122:tx126 +lane_to_serdes_map_nif_lane123.BCM8887X=rx124:tx123 +lane_to_serdes_map_nif_lane124.BCM8887X=rx127:tx120 +lane_to_serdes_map_nif_lane125.BCM8887X=rx121:tx121 +lane_to_serdes_map_nif_lane126.BCM8887X=rx125:tx127 +lane_to_serdes_map_nif_lane127.BCM8887X=rx120:tx122 +###NIF_port:16 ###OCT16 +lane_to_serdes_map_nif_lane128.BCM8887X=rx130:tx128 +lane_to_serdes_map_nif_lane129.BCM8887X=rx134:tx135 +lane_to_serdes_map_nif_lane130.BCM8887X=rx131:tx134 +lane_to_serdes_map_nif_lane131.BCM8887X=rx132:tx131 +lane_to_serdes_map_nif_lane132.BCM8887X=rx128:tx132 +lane_to_serdes_map_nif_lane133.BCM8887X=rx135:tx129 +lane_to_serdes_map_nif_lane134.BCM8887X=rx129:tx133 +lane_to_serdes_map_nif_lane135.BCM8887X=rx133:tx130 +###NIF_port:15 ###OCT17 +lane_to_serdes_map_nif_lane136.BCM8887X=rx139:tx138 +lane_to_serdes_map_nif_lane137.BCM8887X=rx137:tx143 +lane_to_serdes_map_nif_lane138.BCM8887X=rx138:tx137 +lane_to_serdes_map_nif_lane139.BCM8887X=rx136:tx139 +lane_to_serdes_map_nif_lane140.BCM8887X=rx140:tx141 +lane_to_serdes_map_nif_lane141.BCM8887X=rx141:tx142 +lane_to_serdes_map_nif_lane142.BCM8887X=rx142:tx140 +lane_to_serdes_map_nif_lane143.BCM8887X=rx143:tx136 +###NIF_port:14 ###OCT18 +lane_to_serdes_map_nif_lane144.BCM8887X=rx146:tx144 +lane_to_serdes_map_nif_lane145.BCM8887X=rx150:tx151 +lane_to_serdes_map_nif_lane146.BCM8887X=rx147:tx150 +lane_to_serdes_map_nif_lane147.BCM8887X=rx148:tx147 +lane_to_serdes_map_nif_lane148.BCM8887X=rx144:tx148 +lane_to_serdes_map_nif_lane149.BCM8887X=rx151:tx145 +lane_to_serdes_map_nif_lane150.BCM8887X=rx145:tx149 +lane_to_serdes_map_nif_lane151.BCM8887X=rx149:tx146 +###NIF_port:13 ###OCT19 +lane_to_serdes_map_nif_lane152.BCM8887X=rx154:tx157 +lane_to_serdes_map_nif_lane153.BCM8887X=rx158:tx156 +lane_to_serdes_map_nif_lane154.BCM8887X=rx155:tx158 +lane_to_serdes_map_nif_lane155.BCM8887X=rx156:tx155 +lane_to_serdes_map_nif_lane156.BCM8887X=rx159:tx152 +lane_to_serdes_map_nif_lane157.BCM8887X=rx153:tx153 +lane_to_serdes_map_nif_lane158.BCM8887X=rx157:tx159 +lane_to_serdes_map_nif_lane159.BCM8887X=rx152:tx154 +###NIF_port:1 ###OCT20 +lane_to_serdes_map_nif_lane160.BCM8887X=rx163:tx160 +lane_to_serdes_map_nif_lane161.BCM8887X=rx166:tx162 +lane_to_serdes_map_nif_lane162.BCM8887X=rx165:tx165 +lane_to_serdes_map_nif_lane163.BCM8887X=rx160:tx167 +lane_to_serdes_map_nif_lane164.BCM8887X=rx161:tx161 +lane_to_serdes_map_nif_lane165.BCM8887X=rx167:tx166 +lane_to_serdes_map_nif_lane166.BCM8887X=rx164:tx163 +lane_to_serdes_map_nif_lane167.BCM8887X=rx162:tx164 +###NIF_port:2 ###OCT21 +lane_to_serdes_map_nif_lane168.BCM8887X=rx171:tx168 +lane_to_serdes_map_nif_lane169.BCM8887X=rx174:tx170 +lane_to_serdes_map_nif_lane170.BCM8887X=rx173:tx173 +lane_to_serdes_map_nif_lane171.BCM8887X=rx168:tx175 +lane_to_serdes_map_nif_lane172.BCM8887X=rx169:tx169 +lane_to_serdes_map_nif_lane173.BCM8887X=rx175:tx174 +lane_to_serdes_map_nif_lane174.BCM8887X=rx172:tx171 +lane_to_serdes_map_nif_lane175.BCM8887X=rx170:tx172 +###NIF_port:3 ###OCT22 +lane_to_serdes_map_nif_lane176.BCM8887X=rx178:tx176 +lane_to_serdes_map_nif_lane177.BCM8887X=rx179:tx177 +lane_to_serdes_map_nif_lane178.BCM8887X=rx176:tx178 +lane_to_serdes_map_nif_lane179.BCM8887X=rx177:tx179 +lane_to_serdes_map_nif_lane180.BCM8887X=rx180:tx180 +lane_to_serdes_map_nif_lane181.BCM8887X=rx181:tx181 +lane_to_serdes_map_nif_lane182.BCM8887X=rx182:tx182 +lane_to_serdes_map_nif_lane183.BCM8887X=rx183:tx183 +###NIF_port:4 ###OCT23 +lane_to_serdes_map_nif_lane184.BCM8887X=rx187:tx191 +lane_to_serdes_map_nif_lane185.BCM8887X=rx189:tx187 +lane_to_serdes_map_nif_lane186.BCM8887X=rx186:tx185 +lane_to_serdes_map_nif_lane187.BCM8887X=rx191:tx189 +lane_to_serdes_map_nif_lane188.BCM8887X=rx190:tx190 +lane_to_serdes_map_nif_lane189.BCM8887X=rx185:tx188 +lane_to_serdes_map_nif_lane190.BCM8887X=rx188:tx186 +lane_to_serdes_map_nif_lane191.BCM8887X=rx184:tx184 +###NIF_port:9 ###OCT24 +lane_to_serdes_map_nif_lane192.BCM8887X=rx195:tx192 +lane_to_serdes_map_nif_lane193.BCM8887X=rx196:tx195 +lane_to_serdes_map_nif_lane194.BCM8887X=rx194:tx196 +lane_to_serdes_map_nif_lane195.BCM8887X=rx198:tx197 +lane_to_serdes_map_nif_lane196.BCM8887X=rx199:tx194 +lane_to_serdes_map_nif_lane197.BCM8887X=rx192:tx193 +lane_to_serdes_map_nif_lane198.BCM8887X=rx197:tx198 +lane_to_serdes_map_nif_lane199.BCM8887X=rx193:tx199 +###NIF_port:10 ###OCT25 +lane_to_serdes_map_nif_lane200.BCM8887X=rx203:tx207 +lane_to_serdes_map_nif_lane201.BCM8887X=rx205:tx203 +lane_to_serdes_map_nif_lane202.BCM8887X=rx202:tx201 +lane_to_serdes_map_nif_lane203.BCM8887X=rx207:tx205 +lane_to_serdes_map_nif_lane204.BCM8887X=rx206:tx206 +lane_to_serdes_map_nif_lane205.BCM8887X=rx201:tx204 +lane_to_serdes_map_nif_lane206.BCM8887X=rx204:tx202 +lane_to_serdes_map_nif_lane207.BCM8887X=rx200:tx200 +###NIF_port:11 ###OCT26 +lane_to_serdes_map_nif_lane208.BCM8887X=rx211:tx208 +lane_to_serdes_map_nif_lane209.BCM8887X=rx212:tx211 +lane_to_serdes_map_nif_lane210.BCM8887X=rx210:tx212 +lane_to_serdes_map_nif_lane211.BCM8887X=rx214:tx213 +lane_to_serdes_map_nif_lane212.BCM8887X=rx215:tx210 +lane_to_serdes_map_nif_lane213.BCM8887X=rx208:tx209 +lane_to_serdes_map_nif_lane214.BCM8887X=rx213:tx214 +lane_to_serdes_map_nif_lane215.BCM8887X=rx209:tx215 +###NIF_port:12 ###OCT27 +lane_to_serdes_map_nif_lane216.BCM8887X=rx219:tx223 +lane_to_serdes_map_nif_lane217.BCM8887X=rx221:tx219 +lane_to_serdes_map_nif_lane218.BCM8887X=rx218:tx217 +lane_to_serdes_map_nif_lane219.BCM8887X=rx223:tx221 +lane_to_serdes_map_nif_lane220.BCM8887X=rx222:tx222 +lane_to_serdes_map_nif_lane221.BCM8887X=rx217:tx220 +lane_to_serdes_map_nif_lane222.BCM8887X=rx220:tx218 +lane_to_serdes_map_nif_lane223.BCM8887X=rx216:tx216 +###NIF_port:8 ###OCT28 +lane_to_serdes_map_nif_lane224.BCM8887X=rx224:tx229 +lane_to_serdes_map_nif_lane225.BCM8887X=rx225:tx231 +lane_to_serdes_map_nif_lane226.BCM8887X=rx228:tx230 +lane_to_serdes_map_nif_lane227.BCM8887X=rx230:tx226 +lane_to_serdes_map_nif_lane228.BCM8887X=rx229:tx228 +lane_to_serdes_map_nif_lane229.BCM8887X=rx231:tx227 +lane_to_serdes_map_nif_lane230.BCM8887X=rx227:tx224 +lane_to_serdes_map_nif_lane231.BCM8887X=rx226:tx225 +###NIF_port:7 ###OCT29 +lane_to_serdes_map_nif_lane232.BCM8887X=rx234:tx237 +lane_to_serdes_map_nif_lane233.BCM8887X=rx238:tx236 +lane_to_serdes_map_nif_lane234.BCM8887X=rx235:tx238 +lane_to_serdes_map_nif_lane235.BCM8887X=rx236:tx235 +lane_to_serdes_map_nif_lane236.BCM8887X=rx239:tx232 +lane_to_serdes_map_nif_lane237.BCM8887X=rx233:tx233 +lane_to_serdes_map_nif_lane238.BCM8887X=rx237:tx239 +lane_to_serdes_map_nif_lane239.BCM8887X=rx232:tx234 +###NIF_port:6 ###OCT30 +lane_to_serdes_map_nif_lane240.BCM8887X=rx242:tx242 +lane_to_serdes_map_nif_lane241.BCM8887X=rx245:tx244 +lane_to_serdes_map_nif_lane242.BCM8887X=rx243:tx241 +lane_to_serdes_map_nif_lane243.BCM8887X=rx247:tx243 +lane_to_serdes_map_nif_lane244.BCM8887X=rx244:tx247 +lane_to_serdes_map_nif_lane245.BCM8887X=rx240:tx246 +lane_to_serdes_map_nif_lane246.BCM8887X=rx246:tx240 +lane_to_serdes_map_nif_lane247.BCM8887X=rx241:tx245 +###NIF_port:5 ###OCT31 +lane_to_serdes_map_nif_lane248.BCM8887X=rx250:tx253 +lane_to_serdes_map_nif_lane249.BCM8887X=rx254:tx252 +lane_to_serdes_map_nif_lane250.BCM8887X=rx251:tx254 +lane_to_serdes_map_nif_lane251.BCM8887X=rx252:tx251 +lane_to_serdes_map_nif_lane252.BCM8887X=rx255:tx248 +lane_to_serdes_map_nif_lane253.BCM8887X=rx249:tx249 +lane_to_serdes_map_nif_lane254.BCM8887X=rx253:tx255 +lane_to_serdes_map_nif_lane255.BCM8887X=rx248:tx250 +# +lane_to_serdes_map_nif_lane256.BCM8887X=rx256:tx256 +lane_to_serdes_map_nif_lane257.BCM8887X=rx257:tx257 +lane_to_serdes_map_nif_lane258.BCM8887X=rx258:tx258 +lane_to_serdes_map_nif_lane259.BCM8887X=rx259:tx259 +lane_to_serdes_map_nif_lane260.BCM8887X=rx260:tx260 +lane_to_serdes_map_nif_lane261.BCM8887X=rx261:tx261 +lane_to_serdes_map_nif_lane262.BCM8887X=rx262:tx262 +lane_to_serdes_map_nif_lane263.BCM8887X=rx263:tx263 + +rif_id_max=24576 +sai_disable_srcmacqedstmac_ctrl=1 +trunk_group_max_members=16 +sai_default_cpu_tx_tc=7 +sai_tc_based_queue_stats_enable=0 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/qos.json.j2 b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/qos.json.j2 new file mode 100644 index 00000000000..411942ab526 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/qos.json.j2 @@ -0,0 +1,21 @@ +{%- macro generate_wred_profiles() %} + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "10000000", + "green_min_threshold" : "2000000", + "yellow_max_threshold" : "10000000", + "yellow_min_threshold" : "2000000", + "red_max_threshold" : "10000000", + "red_min_threshold" : "2000000", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, +{%- endmacro %} + +{%- include 'qos_config.j2' %} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/sai.profile b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/sai.profile new file mode 100644 index 00000000000..b576e60cb0d --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/Nokia-IXR7250-X4/sai.profile @@ -0,0 +1,2 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/q3d-nokia-32x800g-config.bcm +SAI_SWITCH_NON_ECMP_MAX_SIZE=3072 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/asic.conf b/device/nokia/x86_64-nokia_ixr7250_x4-r0/asic.conf new file mode 100644 index 00000000000..8fe8ce7f7b1 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/asic.conf @@ -0,0 +1,2 @@ +NUM_ASIC=1 +DEV_ID_ASIC_0=07:00.0 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/chassisdb.conf b/device/nokia/x86_64-nokia_ixr7250_x4-r0/chassisdb.conf new file mode 100644 index 00000000000..c0a30aada65 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/chassisdb.conf @@ -0,0 +1,4 @@ +start_chassis_db=1 +chassis_db_address=127.0.0.1 +lag_id_start=1 +lag_id_end=1023 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/default_sku b/device/nokia/x86_64-nokia_ixr7250_x4-r0/default_sku new file mode 100755 index 00000000000..0a4baa6aa78 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/default_sku @@ -0,0 +1 @@ +Nokia-IXR7250-X4 t2 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/installer.conf b/device/nokia/x86_64-nokia_ixr7250_x4-r0/installer.conf new file mode 100644 index 00000000000..7af555c1197 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/installer.conf @@ -0,0 +1,4 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="amd_iommu=off" diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/pcie.yaml b/device/nokia/x86_64-nokia_ixr7250_x4-r0/pcie.yaml new file mode 100644 index 00000000000..c11a34d1897 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/pcie.yaml @@ -0,0 +1,248 @@ +- bus: '00' + dev: '00' + fn: '0' + id: '1450' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Root Complex' +- bus: '00' + dev: '00' + fn: '2' + id: '1451' + name: 'IOMMU: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O + Memory Management Unit' +- bus: '00' + dev: '01' + fn: '0' + id: '1452' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) + PCIe Dummy Host Bridge' +- bus: '00' + dev: '01' + fn: '2' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '01' + fn: '3' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '01' + fn: '4' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '02' + fn: '0' + id: '1452' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) + PCIe Dummy Host Bridge' +- bus: '00' + dev: '03' + fn: '0' + id: '1452' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) + PCIe Dummy Host Bridge' +- bus: '00' + dev: '03' + fn: '1' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '03' + fn: '2' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '03' + fn: '3' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '03' + fn: '4' + id: '1453' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + PCIe GPP Bridge' +- bus: '00' + dev: '04' + fn: '0' + id: '1452' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) + PCIe Dummy Host Bridge' +- bus: '00' + dev: '07' + fn: '0' + id: '1452' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) + PCIe Dummy Host Bridge' +- bus: '00' + dev: '07' + fn: '1' + id: '1454' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Internal PCIe GPP Bridge 0 to Bus B' +- bus: '00' + dev: 08 + fn: '0' + id: '1452' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) + PCIe Dummy Host Bridge' +- bus: '00' + dev: 08 + fn: '1' + id: '1454' + name: 'PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Internal PCIe GPP Bridge 0 to Bus B' +- bus: '00' + dev: '14' + fn: '0' + id: 790b + name: 'SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 59)' +- bus: '00' + dev: '14' + fn: '3' + id: 790e + name: 'ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)' +- bus: '00' + dev: '18' + fn: '0' + id: '1460' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 0' +- bus: '00' + dev: '18' + fn: '1' + id: '1461' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 1' +- bus: '00' + dev: '18' + fn: '2' + id: '1462' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 2' +- bus: '00' + dev: '18' + fn: '3' + id: '1463' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 3' +- bus: '00' + dev: '18' + fn: '4' + id: '1464' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 4' +- bus: '00' + dev: '18' + fn: '5' + id: '1465' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 5' +- bus: '00' + dev: '18' + fn: '6' + id: '1466' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 6' +- bus: '00' + dev: '18' + fn: '7' + id: '1467' + name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + Data Fabric: Device 18h; Function 7' +- bus: '01' + dev: '00' + fn: '0' + id: '0030' + name: 'Unassigned class [ff00]: Alcatel Device 0030 (rev 35)' +- bus: '03' + dev: '00' + fn: '0' + id: 157b + name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev + 03)' +- bus: '05' + dev: '00' + fn: '0' + id: '0033' + name: 'Unassigned class [ff00]: Alcatel Device 0033 (rev 35)' +- bus: '07' + dev: '00' + fn: '0' + id: '8870' + name: 'Ethernet controller: Broadcom Inc. and subsidiaries Device 8870 (rev 01)' +- bus: 08 + dev: '00' + fn: '0' + id: '8870' + name: 'Ethernet controller: Broadcom Inc. and subsidiaries Device 8870 (rev 01)' +- bus: 09 + dev: '00' + fn: '0' + id: 145a + name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] + Zeppelin/Raven/Raven2 PCIe Dummy Function' +- bus: 09 + dev: '00' + fn: '2' + id: '1456' + name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models + 00h-0fh) Platform Security Processor (PSP) 3.0 Device' +- bus: 09 + dev: '00' + fn: '3' + id: 145f + name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 xHCI + Compliant Host Controller' +- bus: 0a + dev: '00' + fn: '0' + id: '1455' + name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] + Zeppelin/Renoir PCIe Dummy Function' +- bus: 0a + dev: '00' + fn: '1' + id: '1468' + name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Zeppelin Cryptographic + Coprocessor NTBCCP' +- bus: 0a + dev: '00' + fn: '2' + id: '7901' + name: 'SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI + mode] (rev 51)' +- bus: 0a + dev: '00' + fn: '3' + id: '1457' + name: 'Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) + HD Audio Controller' +- bus: 0a + dev: '00' + fn: '4' + id: '1458' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' +- bus: 0a + dev: '00' + fn: '5' + id: '1458' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' +- bus: 0a + dev: '00' + fn: '6' + id: '1459' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' +- bus: 0a + dev: '00' + fn: '7' + id: '1459' + name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] XGMAC 10GbE Controller' \ No newline at end of file diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform.json b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform.json new file mode 100644 index 00000000000..a634ed14a9d --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform.json @@ -0,0 +1,467 @@ +{ + "chassis": { + "name": "7250 IXR-X4", + "components": [ + { + "name": "BIOS" + }, + { + "name": "CpuCtlFpga" + }, + { + "name": "IoCtlFpga" + } + ], + "fans": [ + { + "name": "Fan1", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan2", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan3", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan4", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan5", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan6", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan7", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan8", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan9", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan10", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan11", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + }, + { + "name": "Fan12", + "speed": { + "controllable": true, + "minimum": 38 + }, + "status_led": { + "controllable": false + } + } + ], + "fan_drawers": [ + { + "name": "drawer1", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan1", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan2", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan3", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan4", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer2", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan5", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan6", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan7", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan8", + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "drawer3", + "status_led": { + "controllable": false + }, + "max_consumed_power": false, + "fans": [ + { + "name": "Fan9", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan10", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan11", + "status_led": { + "controllable": false + } + }, + { + "name": "Fan12", + "status_led": { + "controllable": false + } + } + ] + } + ], + "psus": [ + { + "name": "PSU1", + "status_led": { + "controllable": false + }, + "current": true, + "power": true, + "max_power": false, + "voltage_high_threshold": false, + "voltage_low_threshold": false, + "temperature": false + }, + { + "name": "PSU2", + "status_led": { + "controllable": false + }, + "current": true, + "power": true, + "max_power": false, + "voltage_high_threshold": false, + "voltage_low_threshold": false, + "temperature": false + } + ], + "thermals": [ + { + "name": "FPGA", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "MB Left", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "MB Right", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "MB Center", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "MB CPU", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "DDR1", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "DDR2", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "Max Port Temp.", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": false + }, + { + "name": "ASIC_DRAM0", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "ASIC_DRAM1", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "ASIC", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + }, + { + "name": "CPU", + "controllable": false, + "low-threshold": false, + "high-threshold": true, + "low-crit-threshold": false, + "high-crit-threshold": true + } + ], + "sfps": [ + { + "name": "QSFPDD_1" + }, + { + "name": "QSFPDD_2" + }, + { + "name": "QSFPDD_3" + }, + { + "name": "QSFPDD_4" + }, + { + "name": "QSFPDD_5" + }, + { + "name": "QSFPDD_6" + }, + { + "name": "QSFPDD_7" + }, + { + "name": "QSFPDD_8" + }, + { + "name": "QSFPDD_9" + }, + { + "name": "QSFPDD_10" + }, + { + "name": "QSFPDD_11" + }, + { + "name": "QSFPDD_12" + }, + { + "name": "QSFPDD_13" + }, + { + "name": "QSFPDD_14" + }, + { + "name": "QSFPDD_15" + }, + { + "name": "QSFPDD_16" + }, + { + "name": "QSFPDD_17" + }, + { + "name": "QSFPDD_18" + }, + { + "name": "QSFPDD_19" + }, + { + "name": "QSFPDD_20" + }, + { + "name": "QSFPDD_21" + }, + { + "name": "QSFPDD_22" + }, + { + "name": "QSFPDD_23" + }, + { + "name": "QSFPDD_24" + }, + { + "name": "QSFPDD_25" + }, + { + "name": "QSFPDD_26" + }, + { + "name": "QSFPDD_27" + }, + { + "name": "QSFPDD_28" + }, + { + "name": "QSFPDD_29" + }, + { + "name": "QSFPDD_30" + }, + { + "name": "QSFPDD_31" + }, + { + "name": "QSFPDD_32" + } + ] + }, + "interfaces": { + }, + "asic_sensors": { + "poll_interval": "10", + "poll_admin_status": "enable" + } +} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_asic b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_asic new file mode 100644 index 00000000000..9ba24ca3e75 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_asic @@ -0,0 +1 @@ +broadcom-dnx diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_components.json b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_components.json new file mode 100644 index 00000000000..564821a3984 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_components.json @@ -0,0 +1,11 @@ +{ + "chassis": { + "7250 IXR-X4": { + "component": { + "BIOS": {}, + "CpuCtlFpga": {}, + "IoCtlFpga": {} + } + } + } +} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_env.conf b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_env.conf new file mode 100644 index 00000000000..bc6513e05a0 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_env.conf @@ -0,0 +1,6 @@ +usemsi=1 +dmasize=512M +default_mtu=9100 +macsec_enabled=1 +SYNCD_SHM_SIZE=1g +disaggregatedT2=1 diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_reboot b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_reboot new file mode 100755 index 00000000000..1276e6cac43 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/platform_reboot @@ -0,0 +1,14 @@ +#!/bin/bash + +systemctl stop nokia-watchdog.service +sleep 2 +echo "w" > /dev/watchdog +kick_date=`date -u` +echo "last watchdog kick $kick_date" > /var/log/nokia-watchdog-last.log +sync + +if [ -c "/dev/rtc1" ]; then + sudo hwclock -w -f /dev/rtc1 +fi + +exec /sbin/reboot $@ diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/plugins/led_control.py b/device/nokia/x86_64-nokia_ixr7250_x4-r0/plugins/led_control.py new file mode 100644 index 00000000000..1f3612d4c19 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/plugins/led_control.py @@ -0,0 +1,261 @@ +""" + led_control.py + + Platform-specific LED control functionality for SONiC +""" + +try: + from sonic_led.led_control_base import LedControlBase + from sonic_py_common import daemon_base + from sonic_py_common import multi_asic + from sonic_py_common import logger + from sonic_py_common.interface import backplane_prefix, inband_prefix, recirc_prefix + from swsscommon import swsscommon + import os + import time + import sonic_platform.platform + import sonic_platform.chassis +except ImportError as e: + raise ImportError(str(e) + " - required module not found") + +SELECT_TIMEOUT = 1000 +FAN_DRAWERS = 3 +QSFP_NUMS = 32 +REG_DIR = "/sys/bus/pci/devices/0000:01:00.0/" +PORT_DIR = "/sys/bus/pci/devices/0000:05:00.0/" +FILE_OPERSTATE = "/sys/class/net/eth0/operstate" +FILE_DUPLEX = "/sys/class/net/eth0/duplex" +FILE_RX_PACKETS = "/sys/class/net/eth0/statistics/rx_packets" +FILE_TX_PACKETS = "/sys/class/net/eth0/statistics/tx_packets" +FILE_RX_ERRORS = "/sys/class/net/eth0/statistics/rx_errors" +FILE_TX_ERRORS = "/sys/class/net/eth0/statistics/tx_errors" + +SYSLOG_IDENTIFIER = "nokia-ledd" +sonic_logger = logger.Logger(SYSLOG_IDENTIFIER) +sonic_logger.set_min_log_priority_info() + +class LedControl(LedControlBase): + """Platform specific LED control class""" + + # Constructor + def __init__(self): + self.chassis = sonic_platform.platform.Platform().get_chassis() + self._initDefaultConfig() + + def _initDefaultConfig(self): + # The fan tray leds and system led managed by new chassis class API + # leaving only a couple other front panel leds to be done old style + sonic_logger.log_info("starting system leds") + + if multi_asic.is_multi_asic(): + # Load the namespace details first from the database_global.json file. + if not swsscommon.SonicDBConfig.isGlobalInit(): + swsscommon.SonicDBConfig.initializeGlobalConfig() + + # Get the namespaces in the platform. For multi-asic devices we get the namespaces + # of front-end ascis which have front-panel interfaces. + namespaces = multi_asic.get_front_end_namespaces() + + # Subscribe to PORT table notifications in the Application DB + appl_db = {} + self.sst = {} + self.sel = swsscommon.Select() + + for namespace in namespaces: + # Open a handle to the Application database, in all namespaces + appl_db[namespace] = daemon_base.db_connect("APPL_DB", namespace=namespace) + self.sst[namespace] = swsscommon.SubscriberStateTable(appl_db[namespace], swsscommon.APP_PORT_TABLE_NAME) + self.sel.addSelectable(self.sst[namespace]) + + self._pre_port_led_stat = ['off'] * QSFP_NUMS + + self._initSystemLed() + + def _read_sysfs_file(self, sysfs_file): + # On successful read, returns the value read from given + # reg_name and on failure returns 'ERR' + rv = 'ERR' + + if (not os.path.isfile(sysfs_file)): + return rv + try: + with open(sysfs_file, 'r') as fd: + rv = fd.read() + fd.close() + except Exception as e: + rv = 'ERR' + + rv = rv.rstrip('\r\n') + rv = rv.lstrip(" ") + return rv + + def _write_sysfs_file(self, sysfs_file, value): + # On successful write, the value read will be written on + # reg_name and on failure returns 'ERR' + rv = 'ERR' + + if (not os.path.isfile(sysfs_file)): + return rv + try: + with open(sysfs_file, 'w') as fd: + rv = fd.write(value) + fd.close() + except Exception as e: + rv = 'ERR' + + return rv + + def _initSystemLed(self): + self.oldfan = 'off' + self.oldpsu = 'off' + count = 0 + self.mgmt_link = 'off' + self.mgmt_actv = 'off' + self.mgmt_rx_packets = int(self._read_sysfs_file(FILE_RX_PACKETS)) + self.mgmt_tx_packets = int(self._read_sysfs_file(FILE_TX_PACKETS)) + + # Timer loop to monitor and set Port Leds and + # front panel Status, Fan, and PSU LEDs + while True: + self.port_state_check() + self.mgmt_check() + count = count + 1 + if count == 30: + self.fp_check() + count = 0 + + def port_state_check(self): + # Use timeout to prevent ignoring the signals we want to handle + # in signal_handler() (e.g. SIGTERM for graceful shutdown) + (state, selectableObj) = self.sel.select(SELECT_TIMEOUT) + + if state == swsscommon.Select.TIMEOUT: + # Do not flood log when select times out + return 1 + + if state != swsscommon.Select.OBJECT: + sonic_logger.log_warning("sel.select() did not return swsscommon.Select.OBJECT") + return 2 + + # Get the redisselect object from selectable object + redisSelectObj = swsscommon.CastSelectableToRedisSelectObj(selectableObj) + + # Get the corresponding namespace from redisselect db connector object + namespace = redisSelectObj.getDbConnector().getNamespace() + + (key, op, fvp) = self.sst[namespace].pop() + if fvp: + # TODO: Once these flag entries have been removed from the DB, + # we can remove this check + if key in ["PortConfigDone", "PortInitDone"]: + return 3 + + fvp_dict = dict(fvp) + + if op == "SET" and "oper_status" in fvp_dict: + if not key.startswith((backplane_prefix(), inband_prefix(), recirc_prefix())): + self.port_link_state_change(key, fvp_dict["oper_status"]) + else: + return 4 + + return 0 + + def port_link_state_change(self, port, state): + """ + Called when port link state changes. Update port link state LED here. + + :param port: A string, SONiC port name (e.g., "Ethernet0") + :param state: A string, the port link state (either "up" or "down") + """ + intf_prefix = 'Ethernet' + if port.startswith(intf_prefix) is False: + return + else: + port_idx = int(port[len(intf_prefix):]) // 8 + 1 + if port_idx < 1 or port_idx > QSFP_NUMS: + return + + if state == 'up': + if self._pre_port_led_stat[port_idx-1] != 'green': + self._write_sysfs_file(PORT_DIR + f"port_{port_idx}_led", '0x1') + self._pre_port_led_stat[port_idx-1] = 'green' + elif state == 'down': + if self._pre_port_led_stat[port_idx-1] != 'off': + self._write_sysfs_file(PORT_DIR + f"port_{port_idx}_led", '0x0') + self._pre_port_led_stat[port_idx-1] = 'off' + else: + return + + def fp_check(self): + # Front Panel FAN Panel LED setting + good_fan_drawer = 0 + for fan_drawer in self.chassis._fan_drawer_list: + if fan_drawer.get_status() == True: + good_fan_drawer = good_fan_drawer + 1 + fan_drawer.set_status_led('green') + else: + fan_drawer.set_status_led('amber') + + if (good_fan_drawer == FAN_DRAWERS): + if self.oldfan != 'green': + self._write_sysfs_file(REG_DIR + 'led_fan', '0x6400') + self.oldfan = 'green' + else: + if self.oldfan != 'amber': + self._write_sysfs_file(REG_DIR + 'led_fan', '0xa4c700') + self.oldfan = 'amber' + + # Front Panel PSU Panel LED setting + if (self.chassis.get_psu(0).get_status() == self.chassis.get_psu(1).get_status() == True): + if self.oldpsu != 'green': + self._write_sysfs_file(REG_DIR + 'led_psu', '0x6400') + self.oldpsu = 'green' + else: + if self.oldpsu != 'amber': + self._write_sysfs_file(REG_DIR + 'led_psu', '0xa4c700') + self.oldpsu = 'amber' + + def mgmt_check(self): + link_stat = self._read_sysfs_file(FILE_OPERSTATE) + if link_stat == 'up': + duplex = self._read_sysfs_file(FILE_DUPLEX) + if duplex == 'full': + if self.mgmt_link != 'green': + self._write_sysfs_file(REG_DIR + 'led_mgmt_link', '0x1') + self.mgmt_link = 'green' + elif duplex == 'half': + if self.mgmt_link != 'blink_green': + self._write_sysfs_file(REG_DIR + 'led_mgmt_link', '0x0') + self._write_sysfs_file(REG_DIR + 'led_mgmt_link', '0xf5') + self.mgmt_link = 'blink_green' + else: + if self.mgmt_link != 'off': + self._write_sysfs_file(REG_DIR + 'led_mgmt_link', '0x0') + self.mgmt_link = 'off' + + mgmt_rx_packets = int(self._read_sysfs_file(FILE_RX_PACKETS)) + mgmt_tx_packets = int(self._read_sysfs_file(FILE_TX_PACKETS)) + mgmt_rx_errors = int(self._read_sysfs_file(FILE_RX_ERRORS)) + mgmt_tx_errors = int(self._read_sysfs_file(FILE_TX_ERRORS)) + if mgmt_rx_errors > 0 or mgmt_tx_errors > 0: + if self.mgmt_actv != 'amber': + self._write_sysfs_file(REG_DIR + 'led_mgmt_actv', '0x2') + self.mgmt_actv = 'amber' + elif mgmt_rx_packets > self.mgmt_rx_packets or mgmt_tx_packets > self.mgmt_tx_packets: + self.mgmt_rx_packets = mgmt_rx_packets + self.mgmt_tx_packets = mgmt_tx_packets + if self.mgmt_actv != 'fast_blink_green': + self._write_sysfs_file(REG_DIR + 'led_mgmt_actv', '0x0') + self._write_sysfs_file(REG_DIR + 'led_mgmt_actv', '0x75') + self.mgmt_actv = 'fast_blink_green' + else: + if self.mgmt_actv != 'off': + self._write_sysfs_file(REG_DIR + 'led_mgmt_actv', '0x0') + self.mgmt_actv = 'off' + else: + if self.mgmt_link != 'off': + self._write_sysfs_file(REG_DIR + 'led_mgmt_link', '0x0') + self.mgmt_link = 'off' + if self.mgmt_actv != 'off': + self._write_sysfs_file(REG_DIR + 'led_mgmt_actv', '0x0') + self.mgmt_actv = 'off' diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/plugins/ssd_util.py b/device/nokia/x86_64-nokia_ixr7250_x4-r0/plugins/ssd_util.py new file mode 100755 index 00000000000..1a98e477ee3 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/plugins/ssd_util.py @@ -0,0 +1,139 @@ +# +# ssd_util.py +# + +try: + import re + import subprocess + from sonic_platform_base.sonic_storage.storage_base import StorageBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +NOT_AVAILABLE = "N/A" +SMARTCTL = "smartctl {} -a" +GENERIC_HEALTH_ID = 169 +PHISON_HEALTH_ID = 231 + +class SsdUtil(StorageBase): + """ + Generic implementation of the SSD health API + """ + model = NOT_AVAILABLE + serial = NOT_AVAILABLE + firmware = NOT_AVAILABLE + temperature = NOT_AVAILABLE + health = NOT_AVAILABLE + ssd_info = NOT_AVAILABLE + vendor_ssd_info = NOT_AVAILABLE + + def __init__(self, diskdev): + + self.vendor_ssd_utility = { + "Generic" : { "utility" : SMARTCTL, "parser" : self.parse_generic_ssd_info } + } + + self.dev = diskdev + self.fetch_parse_info(diskdev) + + def fetch_parse_info(self, diskdev): + self.fetch_generic_ssd_info(diskdev) + self.parse_generic_ssd_info() + + def _execute_shell(self, cmd): + process = subprocess.Popen(cmd.split(), universal_newlines=True, stdout=subprocess.PIPE) + output, error = process.communicate() + return output + + def _parse_re(self, pattern, buffer): + res_list = re.findall(pattern, buffer) + return res_list[0] if res_list else NOT_AVAILABLE + + def fetch_generic_ssd_info(self, diskdev): + self.ssd_info = self._execute_shell(self.vendor_ssd_utility["Generic"]["utility"].format(diskdev)) + + def parse_generic_ssd_info(self): + self.model = self._parse_re('Device Model:\s*(.+?)\n', self.ssd_info) + if self.model.startswith('VTSM'): + health_id = PHISON_HEALTH_ID + else: + health_id = GENERIC_HEALTH_ID + + health_raw = self.parse_id_number(health_id, self.ssd_info) + if health_raw == NOT_AVAILABLE: + self.health = NOT_AVAILABLE + else: self.health = health_raw.split()[-1] + + temp_raw = self._parse_re('Temperature_Celsius\s*(.+?)\n', self.ssd_info) + if temp_raw == NOT_AVAILABLE: + self.temperature = NOT_AVAILABLE + else: + self.temperature = temp_raw.split()[7].split()[0] + + self.serial = self._parse_re('Serial Number:\s*(.+?)\n', self.ssd_info) + self.firmware = self._parse_re('Firmware Version:\s*(.+?)\n', self.ssd_info) + + + def get_health(self): + """ + Retrieves current disk health in percentages + + Returns: + A float number of current ssd health + e.g. 83.5 + """ + return self.health + + def get_temperature(self): + """ + Retrieves current disk temperature in Celsius + + Returns: + A float number of current temperature in Celsius + e.g. 40.1 + """ + return self.temperature + + def get_model(self): + """ + Retrieves model for the given disk device + + Returns: + A string holding disk model as provided by the manufacturer + """ + return self.model + + def get_firmware(self): + """ + Retrieves firmware version for the given disk device + + Returns: + A string holding disk firmware version as provided by the manufacturer + """ + return self.firmware + + def get_serial(self): + """ + Retrieves serial number for the given disk device + + Returns: + A string holding disk serial number as provided by the manufacturer + """ + return self.serial + + def get_vendor_output(self): + """ + Retrieves vendor specific data for the given disk device + + Returns: + A string holding some vendor specific disk information + """ + return self.vendor_ssd_info + + def parse_id_number(self, id, buffer): + if buffer: + buffer_lines = buffer.split('\n') + for line in buffer_lines: + if line.strip().startswith(str(id)): + return line[len(str(id)):] + + return NOT_AVAILABLE diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/pmon_daemon_control.json b/device/nokia/x86_64-nokia_ixr7250_x4-r0/pmon_daemon_control.json new file mode 100644 index 00000000000..0b4f504a314 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/pmon_daemon_control.json @@ -0,0 +1,3 @@ +{ + "enable_xcvrd_sff_mgr": true +} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/system_health_monitoring_config.json b/device/nokia/x86_64-nokia_ixr7250_x4-r0/system_health_monitoring_config.json new file mode 100644 index 00000000000..d5f3a7b9830 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/system_health_monitoring_config.json @@ -0,0 +1,14 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [ + "asic", + "psu.temperature" + ], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "blinking green" + } +} diff --git a/device/nokia/x86_64-nokia_ixr7250_x4-r0/thermal_policy.json b/device/nokia/x86_64-nokia_ixr7250_x4-r0/thermal_policy.json new file mode 100644 index 00000000000..24c2d6d22f7 --- /dev/null +++ b/device/nokia/x86_64-nokia_ixr7250_x4-r0/thermal_policy.json @@ -0,0 +1,47 @@ +{ + "thermal_control_algorithm": { + "run_at_boot_up": "false", + "fan_speed_when_suspend": "60" + }, + "info_types": [ + { + "type": "fan_info" + }, + { + "type": "thermal_info" + }, + { + "type": "chassis_info" + } + ], + "policies": [ + { + "name": "any fan presence", + "conditions": [ + { + "type": "fan.any.presence" + } + ], + "actions": [ + { + "type": "thermal.temp_check_and_set_all_fan_speed", + "default_speed": "60", + "hightemp_speed": "100" + } + ] + }, + { + "name": "temp over high critical threshold", + "conditions": [ + { + "type": "thermal.over.high_critical_threshold" + } + ], + "actions": [ + { + "type": "switch.shutdown" + } + ] + } + ] +} diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform.json b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform.json index 4d34218672e..a3770132c05 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform.json +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform.json @@ -1,4 +1,5 @@ { + "fips_module": "Nokia-SONiC-MACsec-Version 1.0", "chassis": { "name": "Nokia-IXR7250E-36x400G", "components": [ diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/pmon_daemon_control.json b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/pmon_daemon_control.json index 2c63c085104..0b4f504a314 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/pmon_daemon_control.json +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/pmon_daemon_control.json @@ -1,2 +1,3 @@ { + "enable_xcvrd_sff_mgr": true } diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pre_reboot_hook b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pre_reboot_hook index 000643bbfd0..3c5ad2ddc9c 100755 --- a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pre_reboot_hook +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pre_reboot_hook @@ -1,8 +1,8 @@ #!/bin/bash # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# Apache-2.0 +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -19,7 +19,7 @@ declare -r EXIT_SUCCESS=0 declare -r EXIT_ERROR=1 -declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh" +declare -r FW_UPGRADE_SCRIPT="/usr/local/bin/mlnx-fw-manager" ${FW_UPGRADE_SCRIPT} --upgrade --verbose EXIT_CODE=$? diff --git a/device/pensando/arm64-elba-asic-flash128-r0/plugins/ssd_util.py b/device/pensando/arm64-elba-asic-flash128-r0/plugins/ssd_util.py new file mode 100644 index 00000000000..c230e5cc9d6 --- /dev/null +++ b/device/pensando/arm64-elba-asic-flash128-r0/plugins/ssd_util.py @@ -0,0 +1,12 @@ +try: + from sonic_platform_base.sonic_storage.emmc import EmmcUtil +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class SsdUtil(EmmcUtil): + """ + Generic implementation of the SSD health API + """ + def __init__(self, diskdev): + EmmcUtil.__init__(self, diskdev) + diff --git a/dockers/docker-auditd-watchdog/watchdog/Cargo.lock b/dockers/docker-auditd-watchdog/watchdog/Cargo.lock deleted file mode 100644 index 82fc3aac62e..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/Cargo.lock +++ /dev/null @@ -1,134 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "watchdog" -version = "0.1.0" -dependencies = [ - "regex", - "serde_json", -] diff --git a/dockers/docker-auditd-watchdog/watchdog/debian/changelog b/dockers/docker-auditd-watchdog/watchdog/debian/changelog deleted file mode 100644 index fc0271a5234..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -sonic (1.0.0) stable; urgency=medium - - * Initial release - - -- Mai Bui Fri, 28 Feb 2025 03:13:12 +0000 diff --git a/dockers/docker-auditd-watchdog/watchdog/debian/compat b/dockers/docker-auditd-watchdog/watchdog/debian/compat deleted file mode 100644 index 9d607966b72..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 \ No newline at end of file diff --git a/dockers/docker-auditd-watchdog/watchdog/debian/control b/dockers/docker-auditd-watchdog/watchdog/debian/control deleted file mode 100644 index 174e52856bd..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/debian/control +++ /dev/null @@ -1,9 +0,0 @@ -Source: sonic -Maintainer: Mai Bui -Section: net -Priority: optional -Standards-Version: 1.0.0 - -Package: sonic-auditd-watchdog -Architecture: any -Description: auditd watchdog for KubeSONiC project diff --git a/dockers/docker-auditd-watchdog/watchdog/debian/install b/dockers/docker-auditd-watchdog/watchdog/debian/install deleted file mode 100644 index 8f7777470ba..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/debian/install +++ /dev/null @@ -1 +0,0 @@ -target/release/watchdog /usr/bin diff --git a/dockers/docker-auditd-watchdog/watchdog/debian/rules b/dockers/docker-auditd-watchdog/watchdog/debian/rules deleted file mode 100755 index 0ecfaac60f9..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/debian/rules +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#export DH_VERBOSE = 1 - -%: - dh $@ - -override_dh_auto_build: - cargo build --release --all - -override_dh_auto_clean: - cargo clean --release - -override_dh_auto_test: - # do nothing - : diff --git a/dockers/docker-auditd-watchdog/watchdog/src/main.rs b/dockers/docker-auditd-watchdog/watchdog/src/main.rs deleted file mode 100644 index 03f1696523b..00000000000 --- a/dockers/docker-auditd-watchdog/watchdog/src/main.rs +++ /dev/null @@ -1,233 +0,0 @@ -use std::io::{Read, Write}; -use std::net::TcpListener; -use std::process::Command; -use regex::Regex; - -static NSENTER_CMD: &str = "nsenter --target 1 --pid --mount --uts --ipc --net"; - -// Expected hash values -static AUDITD_CONF_HASH: &str = "7cdbd1450570c7c12bdc67115b46d9ae778cbd76"; -static AUDITD_RULES_HASH_64BIT: &str = "1c532e73fdd3f7366d9c516eb712102d3063bd5a"; -static AUDITD_RULES_HASH_32BIT: &str = "ac45b13d45de02f08e12918e38b4122206859555"; - -// Helper to run commands -fn run_command(cmd: &str) -> Result { - println!("Running command: {}", cmd); - let output = Command::new("sh") - .arg("-c") - .arg(cmd) - .output() - .map_err(|e| format!("Failed to spawn command '{}': {}", cmd, e))?; - - if !output.status.success() { - let error = format!( - "Command '{}' failed with status {}: {}", - cmd, - output.status.code().map_or("unknown".to_string(), |c| c.to_string()), - String::from_utf8_lossy(&output.stderr) - ); - eprintln!("{}", error); - return Err(error); - } - Ok(String::from_utf8_lossy(&output.stdout).to_string()) -} - -// Check auditd.conf sha1sum -fn check_auditd_conf() -> String { - let cmd = format!(r#"{NSENTER_CMD} cat /etc/audit/auditd.conf | sha1sum"#); - match run_command(&cmd) { - Ok(s) => { - if s.contains(AUDITD_CONF_HASH) { - "OK".to_string() - } else { - format!("FAIL (sha1 = {}, expected = {})", s.trim(), AUDITD_CONF_HASH) - } - } - Err(e) => format!("FAIL ({})", e), - } -} - -// Check syslog.conf -fn check_syslog_conf() -> String { - let cmd = format!(r#"{NSENTER_CMD} grep '^active = yes' /etc/audit/plugins.d/syslog.conf"#); - match run_command(&cmd) { - Ok(_) => "OK".to_string(), - Err(e) => format!("FAIL (syslog.conf does not contain 'active = yes': {})", e), - } -} - -// Check auditd rules sha1, depends on HW SKU -fn check_auditd_rules() -> String { - // Get HW SKU - let cmd = format!(r#"{NSENTER_CMD} file -L /bin/sh"#); - let bitness = match run_command(&cmd) { - Ok(s) => s.trim().to_string(), - Err(e) => return format!("FAIL (could not get bitness: {})", e), - }; - - let expected = if bitness.contains("32-bit") { - AUDITD_RULES_HASH_32BIT - } else if bitness.contains("64-bit") { - AUDITD_RULES_HASH_64BIT - } else { - return format!("FAIL (unknown bitness: {})", bitness); - }; - - let cmd = format!( - r#"{NSENTER_CMD} sh -c 'find /etc/audit/rules.d/ -name '*.rules' -type f | sort | xargs cat 2>/dev/null | sha1sum'"# - ); - - match run_command(&cmd) { - Ok(s) => { - if s.contains(expected) { - "OK".to_string() - } else { - format!("FAIL (rules sha1 = {}, expected {})", s.trim(), expected) - } - } - Err(e) => format!("FAIL ({})", e), - } -} - -// Check auditd.service -fn check_auditd_service() -> String { - let cmd = format!(r#"{NSENTER_CMD} grep '^CPUQuota=10%' /lib/systemd/system/auditd.service"#); - match run_command(&cmd) { - Ok(_) => "OK".to_string(), - Err(e) => format!("FAIL (auditd.service does not contain 'CPUQuota=10%': {})", e), - } -} - -// Check that auditd is active -fn check_auditd_active() -> String { - let cmd = format!(r#"{NSENTER_CMD} systemctl is-active auditd"#); - match run_command(&cmd) { - Ok(s) => { - let trimmed = s.trim(); - if trimmed == "active" { - "OK".to_string() - } else { - format!("FAIL (auditd status = {})", trimmed) - } - } - Err(e) => format!("FAIL ({})", e), - } -} - - -// Check auditd rate limit -fn check_auditd_rate_limit_status() -> String { - // read auditd rules config file - let cmd = format!(r#"{NSENTER_CMD} cat /etc/audit/rules.d/audit.rules"#); - match run_command(&cmd) { - Ok(file_config) => { - let confix_file_regex = Regex::new(r"-r (?\d+)").unwrap(); - match confix_file_regex.captures(&file_config) { - Some(config_file_caps) => { - let config_file_rate_limit = &config_file_caps["rate"]; - - let cmd = format!(r#"{NSENTER_CMD} auditctl -s"#); - match run_command(&cmd) { - Ok(running_config) => { - let running_config_regex = Regex::new(r"rate_limit (?\d+)").unwrap(); - match running_config_regex.captures(&running_config) { - Some(running_config_caps) => { - if &running_config_caps["rate"] == config_file_rate_limit { - "OK".to_string() - } else { - format!("FAIL (rate_limit: {} mismatch with config file setting: {})", running_config, config_file_rate_limit) - } - } - None => { - format!("FAIL (rate_limit not set = {}, config file setting: {})", running_config, config_file_rate_limit) - } - } - } - Err(e) => format!("FAIL (error message = {})", e), - } - } - None => { - // rate limit disabled when -r missing in config file - "OK".to_string() - } - } - } - Err(e) => { - // config file missing - format!("FAIL (open config file failed, error message = {})", e) - } - } -} - -fn main() { - // Start a HTTP server listening on port 50058 - let listener = TcpListener::bind("127.0.0.1:50058") - .expect("Failed to bind to 127.0.0.1:50058"); - - println!("Watchdog HTTP server running on http://127.0.0.1:50058"); - - for stream_result in listener.incoming() { - match stream_result { - Ok(mut stream) => { - let mut buffer = [0_u8; 512]; - if let Ok(bytes_read) = stream.read(&mut buffer) { - let req_str = String::from_utf8_lossy(&buffer[..bytes_read]); - println!("Received request: {}", req_str); - } - - let conf_result = serde_json::to_string(&check_auditd_conf()).unwrap(); - let syslog_result = serde_json::to_string(&check_syslog_conf()).unwrap(); - let rules_result = serde_json::to_string(&check_auditd_rules()).unwrap(); - let srvc_result = serde_json::to_string(&check_auditd_service()).unwrap(); - let srvc_active = serde_json::to_string(&check_auditd_active()).unwrap(); - let rate_limit_result = serde_json::to_string(&check_auditd_rate_limit_status()).unwrap(); - - // Build JSON response - let json_body = format!( - r#"{{ - "auditd_conf":{}, - "syslog_conf":{}, - "auditd_rules":{}, - "auditd_service":{}, - "auditd_active":{}, - "rate_limit":{} -}}"#, - conf_result, - syslog_result, - rules_result, - srvc_result, - srvc_active, - rate_limit_result - ); - - // Determine overall status - let all_results = vec![ - &conf_result, - &syslog_result, - &rules_result, - &srvc_result, - &srvc_active, - &rate_limit_result - ]; - let all_passed = all_results.iter().all(|r| r.trim_matches('"').starts_with("OK")); - - let (status_line, content_length) = if all_passed { - ("HTTP/1.1 200 OK", json_body.len()) - } else { - ("HTTP/1.1 500 Internal Server Error", json_body.len()) - }; - - let response = format!( - "{status_line}\r\nContent-Type: application/json\r\nContent-Length: {content_length}\r\n\r\n{json_body}" - ); - - if let Err(e) = stream.write_all(response.as_bytes()) { - eprintln!("Failed to write response: {}", e); - } - } - Err(e) => { - eprintln!("Error accepting connection: {}", e); - } - } - } -} diff --git a/dockers/docker-auditd/auditd_config_files/30-audisp-tacplus.rules b/dockers/docker-auditd/auditd_config_files/30-audisp-tacplus.rules deleted file mode 100644 index 481ee83a1dc..00000000000 --- a/dockers/docker-auditd/auditd_config_files/30-audisp-tacplus.rules +++ /dev/null @@ -1,46 +0,0 @@ -# This file contains the auditctl rules that are loaded -# whenever the audit daemon is started via the initscripts. -# The rules are simply the parameters that would be passed -# to auditctl. This file can be loaded with -# auditctl -R audisp-tacplus.rules -# In debian wheezy, it can be installed in /etc/audisp/plugins.d -# and it will be loaded when audispd starts. -# In debian jessie, it needs to be installed into /etc/auditd/rules.d -# and then run the augenrules program. This package assumes jessie, -# and installs into the jessie location, and attempts to run augenrules -# in the postinst - -# Do not use -D in this file! This file is loaded after -# auditd.rules - -# The following rules are for TACACS+ accounting with audisp-tacplus -# don't write audit records for process where auid isn't set (-1), or for -# "system" uids, including "cumulus" -# We want to catch exec and exit for the start and stop accounting - -# Use the "tacplus" key for ease of use with ausearch, etc. -# We assume here that user 1000 is the first local user, and therefore -# should not be looked up for tacacs. You may need to change this for -# your local configuration --a always,exit -F arch=b32 -S exit -S exit_group -F auid>1000 -F auid!=4294967295 -k tacplus --a always,exit -F arch=b64 -S exit -S exit_group -F auid>1000 -F auid!=4294967295 -k tacplus - -# In newer distributions (such as debian jessie), a number of auditing events -# are logged by default even after the -D initialization. If you are using -# auditing only for TACACS+ accounting, you may want to include the rules below, to -# reduce the growth of the audit log. EXECVE is needed in order to get the args -# to the exec syscall so we can send them to accounting. - --a exclude,always -F msgtype=CRED_ACQ --a exclude,always -F msgtype=CRED_DISP --a exclude,always -F msgtype=CRED_REFR --a exclude,always -F msgtype=CWD --a exclude,always -F msgtype=LOGIN --a exclude,always -F msgtype=PROCTITLE --a exclude,always -F msgtype=SERVICE_START --a exclude,always -F msgtype=SERVICE_STOP --a exclude,always -F msgtype=USER_ACCT --a exclude,always -F msgtype=USER_AUTH --a exclude,always -F msgtype=USER_CMD --a exclude,always -F msgtype=USER_END --a exclude,always -F msgtype=USER_START diff --git a/dockers/docker-auditd/auditd_config_files/31-docker_commands.rules b/dockers/docker-auditd/auditd_config_files/31-docker_commands.rules deleted file mode 100644 index 90ef1d84a9a..00000000000 --- a/dockers/docker-auditd/auditd_config_files/31-docker_commands.rules +++ /dev/null @@ -1 +0,0 @@ --a always,exit -F arch=b64 -S execve -F path=/usr/bin/docker -F auid>=1000 -F auid!=4294967295 -k docker_commands diff --git a/dockers/docker-auditd/auditd_config_files/31-file_deletion.rules b/dockers/docker-auditd/auditd_config_files/31-file_deletion.rules deleted file mode 100644 index ce32ba4caa0..00000000000 --- a/dockers/docker-auditd/auditd_config_files/31-file_deletion.rules +++ /dev/null @@ -1,2 +0,0 @@ --a always,exit -F arch=b64 -S unlink -S unlinkat -F auid>=1000 -F auid!=4294967295 -F key=file_deletion --a always,exit -F arch=b32 -S unlink -S unlinkat -F auid>=1000 -F auid!=4294967295 -F key=file_deletion diff --git a/dockers/docker-auditd/auditd_config_files/31-process_audit.rules b/dockers/docker-auditd/auditd_config_files/31-process_audit.rules deleted file mode 100644 index 743d1b8d194..00000000000 --- a/dockers/docker-auditd/auditd_config_files/31-process_audit.rules +++ /dev/null @@ -1,2 +0,0 @@ --a always,exit -F arch=b64 -S execve -F auid>=1000 -F auid!=4294967295 -F key=process_audit -F key=tacplus --a always,exit -F arch=b32 -S execve -F auid>=1000 -F auid!=4294967295 -F key=process_audit -F key=tacplus diff --git a/dockers/docker-auditd/auditd_config_files/31-user_group_management.rules b/dockers/docker-auditd/auditd_config_files/31-user_group_management.rules deleted file mode 100644 index eaa436e4594..00000000000 --- a/dockers/docker-auditd/auditd_config_files/31-user_group_management.rules +++ /dev/null @@ -1,2 +0,0 @@ --a always,exit -F arch=b64 -S setuid,setresuid,setreuid,setfsuid,setgid,setresgid,setregid,setfsgid -F auid>=1000 -F auid!=4294967295 -F key=user_group_management --a always,exit -F arch=b32 -S setuid,setresuid,setreuid,setfsuid,setgid,setresgid,setregid,setfsgid -F auid>=1000 -F auid!=4294967295 -F key=user_group_management diff --git a/dockers/docker-auditd/auditd_config_files/32-auth_logs.rules b/dockers/docker-auditd/auditd_config_files/32-auth_logs.rules deleted file mode 100644 index 1ace310e54a..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-auth_logs.rules +++ /dev/null @@ -1 +0,0 @@ --w /var/log/auth.log -p wa -F auid>=1000 -F auid!=4294967295 -k auth_logs diff --git a/dockers/docker-auditd/auditd_config_files/32-cron_changes.rules b/dockers/docker-auditd/auditd_config_files/32-cron_changes.rules deleted file mode 100644 index ec4b78d1167..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-cron_changes.rules +++ /dev/null @@ -1,6 +0,0 @@ --w /etc/crontab -p wa -F auid>=1000 -F auid!=4294967295 -k cron_changes --w /etc/cron.d -p wa -F auid>=1000 -F auid!=4294967295 -k cron_changes --w /etc/cron.daily -p wa -F auid>=1000 -F auid!=4294967295 -k cron_changes --w /etc/cron.hourly -p wa -F auid>=1000 -F auid!=4294967295 -k cron_changes --w /etc/cron.weekly -p wa -F auid>=1000 -F auid!=4294967295 -k cron_changes --w /etc/cron.monthly -p wa -F auid>=1000 -F auid!=4294967295 -k cron_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-dns_changes.rules b/dockers/docker-auditd/auditd_config_files/32-dns_changes.rules deleted file mode 100644 index 12aae1ef655..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-dns_changes.rules +++ /dev/null @@ -1,2 +0,0 @@ --w /etc/resolv.conf -p wa -F auid>=1000 -F auid!=4294967295 -k dns_changes --w /run/resolvconf/resolv.conf -p wa -F auid>=1000 -F auid!=4294967295 -k dns_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-docker_config.rules b/dockers/docker-auditd/auditd_config_files/32-docker_config.rules deleted file mode 100644 index 955747725dd..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-docker_config.rules +++ /dev/null @@ -1 +0,0 @@ --w /etc/docker/daemon.json -p wa -F auid>=1000 -F auid!=4294967295 -k docker_config diff --git a/dockers/docker-auditd/auditd_config_files/32-docker_daemon.rules b/dockers/docker-auditd/auditd_config_files/32-docker_daemon.rules deleted file mode 100644 index 5f6f3821d1c..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-docker_daemon.rules +++ /dev/null @@ -1 +0,0 @@ --w /usr/bin/dockerd -p wa -F auid>=1000 -F auid!=4294967295 -k docker_daemon diff --git a/dockers/docker-auditd/auditd_config_files/32-docker_service.rules b/dockers/docker-auditd/auditd_config_files/32-docker_service.rules deleted file mode 100644 index c021f69d47f..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-docker_service.rules +++ /dev/null @@ -1 +0,0 @@ --w /lib/systemd/system/docker.service -p wa -F auid>=1000 -F auid!=4294967295 -k docker_service diff --git a/dockers/docker-auditd/auditd_config_files/32-docker_socket.rules b/dockers/docker-auditd/auditd_config_files/32-docker_socket.rules deleted file mode 100644 index 0adcc658d16..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-docker_socket.rules +++ /dev/null @@ -1 +0,0 @@ --w /lib/systemd/system/docker.socket -p wa -F auid>=1000 -F auid!=4294967295 -k docker_socket diff --git a/dockers/docker-auditd/auditd_config_files/32-docker_storage.rules b/dockers/docker-auditd/auditd_config_files/32-docker_storage.rules deleted file mode 100644 index f169b54fd82..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-docker_storage.rules +++ /dev/null @@ -1 +0,0 @@ --w /var/lib/docker/ -p wa -F auid>=1000 -F auid!=4294967295 -k docker_storage diff --git a/dockers/docker-auditd/auditd_config_files/32-group_changes.rules b/dockers/docker-auditd/auditd_config_files/32-group_changes.rules deleted file mode 100644 index 3c5c70b075c..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-group_changes.rules +++ /dev/null @@ -1 +0,0 @@ --w /etc/group -p wa -F auid>=1000 -F auid!=4294967295 -k group_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-hosts_changes.rules b/dockers/docker-auditd/auditd_config_files/32-hosts_changes.rules deleted file mode 100644 index 19a1206187d..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-hosts_changes.rules +++ /dev/null @@ -1 +0,0 @@ --w /etc/hosts -p wa -F auid>=1000 -F auid!=4294967295 -k hosts_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-modules_changes.rules b/dockers/docker-auditd/auditd_config_files/32-modules_changes.rules deleted file mode 100644 index 3992a70b8da..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-modules_changes.rules +++ /dev/null @@ -1,5 +0,0 @@ --a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=4294967295 -k modules_changes --a always,exit -F arch=b64 -S finit_module -S init_module -S delete_module -F auid>=1000 -F auid!=4294967295 -k modules_changes --a always,exit -F arch=b32 -S finit_module -S init_module -S delete_module -F auid>=1000 -F auid!=4294967295 -k modules_changes --a always,exit -F arch=b64 -S open,openat -F dir=/lib/modules/ -F perm=r -F success=1 -F auid>=1000 -F auid!=4294967295 -k modules_changes --a always,exit -F arch=b32 -S open,openat -F dir=/lib/modules/ -F perm=r -F success=1 -F auid>=1000 -F auid!=4294967295 -k modules_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-passwd_changes.rules b/dockers/docker-auditd/auditd_config_files/32-passwd_changes.rules deleted file mode 100644 index 0415ca8725d..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-passwd_changes.rules +++ /dev/null @@ -1 +0,0 @@ --w /etc/passwd -p wa -F auid>=1000 -F auid!=4294967295 -k passwd_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-shadow_changes.rules b/dockers/docker-auditd/auditd_config_files/32-shadow_changes.rules deleted file mode 100644 index 5c34f55a1dc..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-shadow_changes.rules +++ /dev/null @@ -1 +0,0 @@ --w /etc/shadow -p wa -F auid>=1000 -F auid!=4294967295 -k shadow_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-shutdown_reboot.rules b/dockers/docker-auditd/auditd_config_files/32-shutdown_reboot.rules deleted file mode 100644 index 360e1b64d0b..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-shutdown_reboot.rules +++ /dev/null @@ -1 +0,0 @@ --w /var/log/wtmp -p wa -F auid>=1000 -F auid!=4294967295 -k shutdown_reboot diff --git a/dockers/docker-auditd/auditd_config_files/32-sudoers_changes.rules b/dockers/docker-auditd/auditd_config_files/32-sudoers_changes.rules deleted file mode 100644 index 859c53af279..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-sudoers_changes.rules +++ /dev/null @@ -1 +0,0 @@ --w /etc/sudoers -p wa -F auid>=1000 -F auid!=4294967295 -k sudoers_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-time_changes.rules b/dockers/docker-auditd/auditd_config_files/32-time_changes.rules deleted file mode 100644 index f72e4ca3556..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-time_changes.rules +++ /dev/null @@ -1,2 +0,0 @@ --w /etc/localtime -p wa -F auid>=1000 -F auid!=4294967295 -k time_changes --w /usr/share/zoneinfo/Etc/UTC -p wa -F auid>=1000 -F auid!=4294967295 -k time_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-usr_bin_changes.rules b/dockers/docker-auditd/auditd_config_files/32-usr_bin_changes.rules deleted file mode 100644 index 0a058d4e1e5..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-usr_bin_changes.rules +++ /dev/null @@ -1,2 +0,0 @@ --w /bin -p wa -F auid>=1000 -F auid!=4294967295 -k usr_bin_changes --w /usr/bin -p wa -F auid>=1000 -F auid!=4294967295 -k usr_bin_changes diff --git a/dockers/docker-auditd/auditd_config_files/32-usr_sbin_changes.rules b/dockers/docker-auditd/auditd_config_files/32-usr_sbin_changes.rules deleted file mode 100644 index 027f5f76906..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32-usr_sbin_changes.rules +++ /dev/null @@ -1,2 +0,0 @@ --w /sbin -p wa -F auid>=1000 -F auid!=4294967295 -k usr_sbin_changes --w /usr/sbin -p wa -F auid>=1000 -F auid!=4294967295 -k usr_sbin_changes diff --git a/dockers/docker-auditd/auditd_config_files/32bit/30-audisp-tacplus.rules b/dockers/docker-auditd/auditd_config_files/32bit/30-audisp-tacplus.rules deleted file mode 100644 index f9b79c5be76..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32bit/30-audisp-tacplus.rules +++ /dev/null @@ -1,46 +0,0 @@ -# This file contains the auditctl rules that are loaded -# whenever the audit daemon is started via the initscripts. -# The rules are simply the parameters that would be passed -# to auditctl. This file can be loaded with -# auditctl -R audisp-tacplus.rules -# In debian wheezy, it can be installed in /etc/audisp/plugins.d -# and it will be loaded when audispd starts. -# In debian jessie, it needs to be installed into /etc/auditd/rules.d -# and then run the augenrules program. This package assumes jessie, -# and installs into the jessie location, and attempts to run augenrules -# in the postinst - -# Do not use -D in this file! This file is loaded after -# auditd.rules - -# The following rules are for TACACS+ accounting with audisp-tacplus -# don't write audit records for process where auid isn't set (-1), or for -# "system" uids, including "cumulus" -# We want to catch exec and exit for the start and stop accounting - -# Use the "tacplus" key for ease of use with ausearch, etc. -# We assume here that user 1000 is the first local user, and therefore -# should not be looked up for tacacs. You may need to change this for -# your local configuration --a always,exit -F arch=b32 -S exit -S exit_group -F auid>1000 -F auid!=4294967295 -k tacplus -# No 64bit support -a always,exit -F arch=b64 -S execve -S exit -S exit_group -F auid>1000 -F auid!=4294967295 -k tacplus - -# In newer distributions (such as debian jessie), a number of auditing events -# are logged by default even after the -D initialization. If you are using -# auditing only for TACACS+ accounting, you may want to include the rules below, to -# reduce the growth of the audit log. EXECVE is needed in order to get the args -# to the exec syscall so we can send them to accounting. - --a exclude,always -F msgtype=CRED_ACQ --a exclude,always -F msgtype=CRED_DISP --a exclude,always -F msgtype=CRED_REFR --a exclude,always -F msgtype=CWD --a exclude,always -F msgtype=LOGIN --a exclude,always -F msgtype=PROCTITLE --a exclude,always -F msgtype=SERVICE_START --a exclude,always -F msgtype=SERVICE_STOP --a exclude,always -F msgtype=USER_ACCT --a exclude,always -F msgtype=USER_AUTH --a exclude,always -F msgtype=USER_CMD --a exclude,always -F msgtype=USER_END --a exclude,always -F msgtype=USER_START diff --git a/dockers/docker-auditd/auditd_config_files/32bit/31-docker_commands.rules b/dockers/docker-auditd/auditd_config_files/32bit/31-docker_commands.rules deleted file mode 100644 index 6e2f91825b3..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32bit/31-docker_commands.rules +++ /dev/null @@ -1 +0,0 @@ --a always,exit -F arch=b32 -S execve -F path=/usr/bin/docker -F auid>=1000 -F auid!=4294967295 -k docker_commands diff --git a/dockers/docker-auditd/auditd_config_files/32bit/31-file_deletion.rules b/dockers/docker-auditd/auditd_config_files/32bit/31-file_deletion.rules deleted file mode 100644 index 4bf6f8f7d0a..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32bit/31-file_deletion.rules +++ /dev/null @@ -1 +0,0 @@ --a always,exit -F arch=b32 -S unlink -S unlinkat -F auid>=1000 -F auid!=4294967295 -F key=file_deletion diff --git a/dockers/docker-auditd/auditd_config_files/32bit/31-process_audit.rules b/dockers/docker-auditd/auditd_config_files/32bit/31-process_audit.rules deleted file mode 100644 index 0e3193c1be1..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32bit/31-process_audit.rules +++ /dev/null @@ -1 +0,0 @@ --a always,exit -F arch=b32 -S execve -F auid>=1000 -F auid!=4294967295 -F key=process_audit -F key=tacplus diff --git a/dockers/docker-auditd/auditd_config_files/32bit/31-user_group_management.rules b/dockers/docker-auditd/auditd_config_files/32bit/31-user_group_management.rules deleted file mode 100644 index 478ac7e153d..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32bit/31-user_group_management.rules +++ /dev/null @@ -1 +0,0 @@ --a always,exit -F arch=b32 -S setuid,setresuid,setreuid,setfsuid,setgid,setresgid,setregid,setfsgid -F auid>=1000 -F auid!=4294967295 -F key=user_group_management diff --git a/dockers/docker-auditd/auditd_config_files/32bit/32-modules_changes.rules b/dockers/docker-auditd/auditd_config_files/32bit/32-modules_changes.rules deleted file mode 100644 index 39288f93e50..00000000000 --- a/dockers/docker-auditd/auditd_config_files/32bit/32-modules_changes.rules +++ /dev/null @@ -1,3 +0,0 @@ --a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=4294967295 -k modules_changes --a always,exit -F arch=b32 -S finit_module -S init_module -S delete_module -F auid>=1000 -F auid!=4294967295 -k modules_changes --a always,exit -F arch=b32 -S open,openat -F dir=/lib/modules/ -F perm=r -F success=1 -F auid>=1000 -F auid!=4294967295 -k modules_changes diff --git a/dockers/docker-auditd/auditd_config_files/33-log_changes.rules b/dockers/docker-auditd/auditd_config_files/33-log_changes.rules deleted file mode 100644 index 8997a43ae8d..00000000000 --- a/dockers/docker-auditd/auditd_config_files/33-log_changes.rules +++ /dev/null @@ -1,2 +0,0 @@ --w /var/log -p wa -F auid>=1000 -F auid!=4294967295 -k log_changes --w /var/log.tmpfs -p wa -F auid>=1000 -F auid!=4294967295 -k log_changes diff --git a/dockers/docker-auditd/auditd_config_files/39-exclusions.rules b/dockers/docker-auditd/auditd_config_files/39-exclusions.rules deleted file mode 100644 index 51fd3cc215d..00000000000 --- a/dockers/docker-auditd/auditd_config_files/39-exclusions.rules +++ /dev/null @@ -1,3 +0,0 @@ --a always,exclude -F msgtype=EOE --a always,exclude -F msgtype=EXECVE --a always,exclude -F msgtype=PATH -F auid<1000 diff --git a/dockers/docker-auditd/auditd_config_files/audit.rules b/dockers/docker-auditd/auditd_config_files/audit.rules deleted file mode 100644 index 95537b5583b..00000000000 --- a/dockers/docker-auditd/auditd_config_files/audit.rules +++ /dev/null @@ -1,15 +0,0 @@ -## First rule - delete all --D - -## Increase the buffers to survive stress events. -## Make this bigger for busy systems --b 8192 - -## This determine how long to wait in burst of events ---backlog_wait_time 60000 - -## Set failure mode to syslog --f 1 - -## Set auditd rate limit --r 100 diff --git a/dockers/docker-auditd/auditd_config_files/auditd.conf b/dockers/docker-auditd/auditd_config_files/auditd.conf deleted file mode 100644 index 537ff823b3d..00000000000 --- a/dockers/docker-auditd/auditd_config_files/auditd.conf +++ /dev/null @@ -1,39 +0,0 @@ -# -# This file controls the configuration of the audit daemon -# - -local_events = yes -write_logs = no -log_file = /var/log/audit/audit.log -log_group = adm -log_format = ENRICHED -flush = INCREMENTAL_ASYNC -freq = 50 -max_log_file = 8 -num_logs = 5 -priority_boost = 4 -name_format = NONE -##name = mydomain -max_log_file_action = SYSLOG -space_left = 75 -space_left_action = SYSLOG -verify_email = yes -action_mail_acct = root -admin_space_left = 50 -admin_space_left_action = SYSLOG -disk_full_action = SYSLOG -disk_error_action = SYSLOG -use_libwrap = yes -##tcp_listen_port = 60 -tcp_listen_queue = 5 -tcp_max_per_addr = 1 -##tcp_client_ports = 1024-65535 -tcp_client_max_idle = 0 -transport = TCP -krb5_principal = auditd -##krb5_key_file = /etc/audit/audit.key -distribute_network = no -q_depth = 400 -overflow_action = SYSLOG -max_restarts = 10 -plugin_dir = /etc/audit/plugins.d diff --git a/dockers/docker-auditd/config_checker.py b/dockers/docker-auditd/config_checker.py deleted file mode 100644 index 23cd1facf4f..00000000000 --- a/dockers/docker-auditd/config_checker.py +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env python3 - -import json -import time -import subprocess -import sys -from sonic_py_common import logger as log - -logger = log.Logger() - - -# Configuration file paths -RULES_DIR = "/etc/audit/rules.d/" -SYSLOG_CONF = "/etc/audit/plugins.d/syslog.conf" -AUDIT_CONF = "/etc/audit/auditd.conf" -AUDIT_SERVICE = "/lib/systemd/system/auditd.service" -CONFIG_FILES = "/usr/share/sonic/auditd_config_files/" - -# Expected hash values -CONFIG_HASHES = { - "rules": { - "64bit": "1c532e73fdd3f7366d9c516eb712102d3063bd5a", - "32bit": "ac45b13d45de02f08e12918e38b4122206859555" - }, - "auditd_conf": "7cdbd1450570c7c12bdc67115b46d9ae778cbd76" -} - -# Command definitions -RULES_HASH_CMD = f"sh -c \"find {RULES_DIR} -name '*.rules' -type f | sort | xargs cat 2>/dev/null | sha1sum\"" -AUDIT_CONF_HASH_CMD = "cat {} | sha1sum".format(AUDIT_CONF) -NSENTER_CMD = "nsenter --target 1 --pid --mount --uts --ipc --net " - - -def run_command(cmd): - logger.log_debug("Running command: {}".format(cmd)) - p = subprocess.Popen(cmd, - text=True, - shell=True, # nosemgrep - executable='/bin/bash', - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - output, error = p.communicate() - if p.returncode == 0: - return p.returncode, output - logger.log_error("Command failed: {} (Return code: {})".format(cmd, p.returncode)) - logger.log_error("Error: {}".format(error)) - return p.returncode, error - - -def get_bitness(): - cmd = NSENTER_CMD + "file -L /bin/sh" - rc, out = run_command(cmd) - if rc != 0: - logger.log_error("Failed to get bitness") - sys.exit(1) - - out = out.strip() - if "64-bit" in out: - return "64-bit" - elif "32-bit" in out: - return "32-bit" - else: - logger.log_error(f"Unknown bitness from output: {out}") - sys.exit(1) - - -def is_auditd_rules_configured(): - bitness = get_bitness() - if "32-bit" in bitness: - EXPECTED_HASH = CONFIG_HASHES["rules"]["32bit"] - elif "64-bit" in bitness: - EXPECTED_HASH = CONFIG_HASHES["rules"]["64bit"] - else: - EXPECTED_HASH = "unexpected" - - rc, out = run_command(RULES_HASH_CMD) - is_configured = EXPECTED_HASH in out - logger.log_info("auditd rules have {} configured (Hash: {})".format( - "already" if is_configured else "not", - out.strip()) - ) - return is_configured - - -def is_syslog_conf_configured(): - rc, out = run_command("grep '^active = yes' {}".format(SYSLOG_CONF)) - is_configured = rc == 0 - logger.log_info("syslog.conf has {} configured".format("already" if is_configured else "not")) - return is_configured - - -def is_auditd_conf_configured(): - rc, out = run_command(AUDIT_CONF_HASH_CMD) - is_configured = CONFIG_HASHES["auditd_conf"] in out - logger.log_info("auditd.conf has {} configured (Hash: {})".format( - "already" if is_configured else "not", - out.strip()) - ) - return is_configured - - -def is_auditd_service_configured(): - rc, out = run_command("grep '^CPUQuota=10%' {}".format(AUDIT_SERVICE)) - is_configured = rc == 0 - logger.log_info("auditd.service has {} configured".format("already" if is_configured else "not")) - return is_configured - - -def check_rules_syntax(): - logger.log_info("Checking auditd rules syntax...") - rc, out = run_command(NSENTER_CMD + "auditctl -R /etc/audit/audit.rules") - if rc != 0: - logger.log_error("auditctl -R failed: {}".format(out)) - return False - logger.log_info("Auditd rules syntax check passed") - return True - - -def main(): - is_configured = True - bitness = get_bitness() - - # Check rules configuration - if not is_auditd_rules_configured(): - logger.log_info("Updating auditd rules...") - if "32-bit" in bitness: - logger.log_info("Installing 32-bit rules") - run_command("rm -f {}/*.rules".format(RULES_DIR)) - run_command("cp {}/*.rules {}".format(CONFIG_FILES, RULES_DIR)) - run_command("cp {}/32bit/*.rules {}".format(CONFIG_FILES, RULES_DIR)) - elif "64-bit" in bitness: - logger.log_info("Installing 64-bit rules") - run_command("rm -f {}/*.rules".format(RULES_DIR)) - run_command("cp {}/*.rules {}".format(CONFIG_FILES, RULES_DIR)) - else: - logger.log_error("Unknown system bitness") - is_configured = False - - # Check syslog configuration - if not is_syslog_conf_configured(): - logger.log_info("Updating syslog.conf...") - run_command("sed -i 's/^active = no/active = yes/' {}".format(SYSLOG_CONF)) - is_configured = False - - # Check auditd configuration - if not is_auditd_conf_configured(): - logger.log_info("Updating auditd.conf...") - run_command("cp {}/auditd.conf {}".format(CONFIG_FILES, AUDIT_CONF)) - is_configured = False - - # Check service configuration - if not is_auditd_service_configured(): - logger.log_info("Updating auditd.service...") - run_command(r"""sed -i '/\[Service\]/a CPUQuota=10%' {}""".format(AUDIT_SERVICE)) - is_configured = False - - # If configuration has been modified, restart service - if not is_configured: - logger.log_info("Configuration changed, restarting auditd service...") - run_command(NSENTER_CMD + "systemctl daemon-reload") - run_command(NSENTER_CMD + "systemctl restart auditd") - logger.log_info("auditd service restart completed") - - # check rules syntax by reload all rules file - if not check_rules_syntax(): - logger.log_error("auditd rules syntax check failed") - # Exit with non-zero status to indicate failure - sys.exit(1) - else: - logger.log_info("No configuration changes needed") - - logger.log_info("auditd configuration check completed") - - -if __name__ == "__main__": - while True: - main() - time.sleep(900) diff --git a/dockers/docker-base-bookworm/Dockerfile.j2 b/dockers/docker-base-bookworm/Dockerfile.j2 index c63d3a85044..3a8e2f65a30 100644 --- a/dockers/docker-base-bookworm/Dockerfile.j2 +++ b/dockers/docker-base-bookworm/Dockerfile.j2 @@ -18,6 +18,9 @@ COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"] COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"] COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"] +# Install certificates by disabling the peer verification +RUN apt -o Acquire::https::Verify-Peer=false update && \ + apt -o Acquire::https::Verify-Peer=false install -y ca-certificates # Update apt cache and # pre-install fundamental packages diff --git a/dockers/docker-base-trixie/Dockerfile.j2 b/dockers/docker-base-trixie/Dockerfile.j2 new file mode 100644 index 00000000000..3a94051e9ed --- /dev/null +++ b/dockers/docker-base-trixie/Dockerfile.j2 @@ -0,0 +1,98 @@ +{% set prefix = DEFAULT_CONTAINER_REGISTRY %} +{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} +{% if CONFIGURED_ARCH == "armhf" and (MULTIARCH_QEMU_ENVIRON == "y" or CROSS_BUILD_ENVIRON == "y") %} +ARG BASE=--platform=linux/arm/v7 {{ prefix }}debian:trixie +{% elif CONFIGURED_ARCH == "arm64" and (MULTIARCH_QEMU_ENVIRON == "y" or CROSS_BUILD_ENVIRON == "y") %} +ARG BASE=--platform=linux/arm64 {{ prefix }}debian:trixie +{% else %} +ARG BASE={{ prefix }}debian:trixie +{% endif %} + +FROM $BASE AS base + +# Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +# Configure data sources for apt/dpkg +COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"] +COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] +COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"] +COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"] +# Install certificates by disabling the peer verification +RUN apt -o Acquire::https::Verify-Peer=false update && \ + apt -o Acquire::https::Verify-Peer=false install -y ca-certificates + +# Update apt cache and +# pre-install fundamental packages +RUN apt update && \ + apt -y install \ + curl \ + less \ + perl \ + procps \ + python3 \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + python-is-python3 \ + vim-tiny \ + rsyslog \ +# Install rsync for copying over only changes between layers + rsync \ +# Install redis-tools + redis-tools \ +# common dependencies + libdaemon0 \ + libdbus-1-3 \ + libjansson4 \ +# ip and ifconfig utility missing in docker for arm arch + iproute2 \ + net-tools \ +# for processing/handling json files in bash environment + jq \ +# for sairedis zmq rpc channel + libzmq5 \ + libwrap0 \ + libatomic1 + +# Add a config file to allow pip to install packages outside of apt/the Debian repos +COPY ["pip.conf", "/etc/pip.conf"] + +{% if docker_base_trixie_whls.strip() -%} +# Copy locally-built Python wheel dependencies +{{ copy_files("python-wheels/", docker_base_trixie_whls.split(' '), "/python-wheels/") }} + +# Install locally-built Python wheel dependencies +{{ install_python_wheels(docker_base_trixie_whls.split(' ')) }} +{% endif %} + +# For templating +RUN pip3 install j2cli + +# Add support for supervisord to handle startup dependencies +RUN pip3 install supervisord-dependent-startup==1.4.0 + +RUN mkdir -p /var/log/supervisor /etc/supervisor/conf.d + +# Uninstall unused dependencies +RUN apt autoremove -y --purge + +{% if docker_base_trixie_debs.strip() -%} +# Copy locally-built Debian package dependencies +{{ copy_files("debs/", docker_base_trixie_debs.split(' '), "/debs/") }} + +# Install built Debian packages and implicitly install their dependencies +{{ install_debian_packages(docker_base_trixie_debs.split(' ')) }} +{%- endif %} + +COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"] +COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"] +COPY ["root/.vimrc", "/root/.vimrc"] + +RUN ln /usr/bin/vim.tiny /usr/bin/vim + +COPY ["etc/supervisor/supervisord.conf", "/etc/supervisor/"] + +FROM scratch + +COPY --from=base / / diff --git a/dockers/docker-base-trixie/LICENSE b/dockers/docker-base-trixie/LICENSE new file mode 100644 index 00000000000..03d8f31e513 --- /dev/null +++ b/dockers/docker-base-trixie/LICENSE @@ -0,0 +1,13 @@ +Copyright 2016 Microsoft, Inc. + +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. diff --git a/dockers/docker-base-trixie/dpkg_01_drop b/dockers/docker-base-trixie/dpkg_01_drop new file mode 100644 index 00000000000..d238f4049af --- /dev/null +++ b/dockers/docker-base-trixie/dpkg_01_drop @@ -0,0 +1,29 @@ +## Drop unnecessary files +## ref: https://wiki.ubuntu.com/ReducingDiskFootprint + +## Documentation +path-exclude /usr/share/doc/* +# we need to keep copyright files for legal reasons +path-include /usr/share/doc/*/copyright +path-exclude /usr/share/man/* +path-exclude /usr/share/groff/* +path-exclude /usr/share/info/* +# lintian stuff is small, but really unnecessary +path-exclude /usr/share/lintian/* +path-exclude /usr/share/linda/* + +## Translations +path-exclude /usr/share/locale/* + +## Landscape +path-exclude /usr/share/pyshared/twisted/test* +path-exclude /usr/lib/python*/dist-packages/twisted/test* +path-exclude /usr/share/pyshared/twisted/*/test* +path-exclude /usr/lib/python*/dist-packages/twisted/*/test* + +## install the configuration file if it’s currently missing +force-confmiss +## combined with confold: overwrite configuration files that you have not modified +force-confdef +## do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix +force-confold diff --git a/dockers/docker-base-trixie/etc/rsyslog.conf b/dockers/docker-base-trixie/etc/rsyslog.conf new file mode 100644 index 00000000000..7a6667d68a1 --- /dev/null +++ b/dockers/docker-base-trixie/etc/rsyslog.conf @@ -0,0 +1,78 @@ +# +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html + + +################# +#### MODULES #### +################# + +$ModLoad imuxsock # provides support for local system logging + +# +# Set a rate limit on messages from the container +# +$SystemLogRateLimitInterval 300 +$SystemLogRateLimitBurst 20000 + +#$ModLoad imklog # provides kernel logging support +#$ModLoad immark # provides --MARK-- message capability + +# provides UDP syslog reception +#$ModLoad imudp +#$UDPServerRun 514 + +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 + + +########################### +#### GLOBAL DIRECTIVES #### +########################### + +set $.CONTAINER_NAME=getenv("CONTAINER_NAME"); + +# Set remote syslog server +template (name="ForwardFormatInContainer" type="string" string="<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %$.CONTAINER_NAME%#%syslogtag%%msg:::sp-if-no-1st-sp%%msg%") +*.* action(type="omfwd" target=`echo $SYSLOG_TARGET_IP` port="514" protocol="udp" Template="ForwardFormatInContainer") + +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + +# Define a custom template +$template SONiCFileFormat,"%TIMESTAMP%.%timestamp:::date-subseconds% %HOSTNAME% %syslogseverity-text:::uppercase% %$.CONTAINER_NAME%#%syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" +$ActionFileDefaultTemplate SONiCFileFormat + +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 + +# +# Where to place spool and state files +# +$WorkDirectory /var/spool/rsyslog + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf + +# +# Suppress duplicate messages and report "message repeated n times" +# +$RepeatedMsgReduction on + +############### +#### RULES #### +############### \ No newline at end of file diff --git a/dockers/docker-base-trixie/etc/rsyslog.d/supervisor.conf b/dockers/docker-base-trixie/etc/rsyslog.d/supervisor.conf new file mode 100644 index 00000000000..fde8d8a6c99 --- /dev/null +++ b/dockers/docker-base-trixie/etc/rsyslog.d/supervisor.conf @@ -0,0 +1,9 @@ +module(load="imfile" mode="inotify") # Ensure "inotify" mode is used +$WorkDirectory /var/log/supervisor +# Start Monitoring the file +input(type="imfile" + File="/var/log/supervisor/supervisord.log" + Tag="supervisord" + Severity="info" + Facility="local0" + PersistStateInterval="1") diff --git a/dockers/docker-base-trixie/etc/supervisor/supervisord.conf b/dockers/docker-base-trixie/etc/supervisor/supervisord.conf new file mode 100644 index 00000000000..6d7d7390e85 --- /dev/null +++ b/dockers/docker-base-trixie/etc/supervisor/supervisord.conf @@ -0,0 +1,29 @@ +; supervisor config file + +[unix_http_server] +file=/var/run/supervisor.sock ; (the path to the socket file) +chmod=0700 ; socket file mode (default 0700) + +[supervisord] +logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) +pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) +user=root + +; the below section must remain in the config file for RPC +; (supervisorctl/web interface) to work, additional interfaces may be +; added by defining them in separate rpcinterface: sections +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket + +; The [include] section can just contain the "files" setting. This +; setting can list multiple files (separated by whitespace or +; newlines). It can also contain wildcards. The filenames are +; interpreted as relative to this file. Included files *cannot* +; include files themselves. + +[include] +files = /etc/supervisor/conf.d/*.conf diff --git a/dockers/docker-base-trixie/no-check-valid-until b/dockers/docker-base-trixie/no-check-valid-until new file mode 100644 index 00000000000..c7c25d017f7 --- /dev/null +++ b/dockers/docker-base-trixie/no-check-valid-until @@ -0,0 +1,4 @@ +# Instruct apt-get to NOT check the "Valid Until" date in Release files +# Once the Debian team archives a repo, they stop updating this date + +Acquire::Check-Valid-Until "false"; diff --git a/dockers/docker-base-trixie/no_install_recommend_suggest b/dockers/docker-base-trixie/no_install_recommend_suggest new file mode 100644 index 00000000000..b5bca577de1 --- /dev/null +++ b/dockers/docker-base-trixie/no_install_recommend_suggest @@ -0,0 +1,5 @@ +# Instruct apt-get to NOT install "recommended" or "suggested" packages by +# default when installing a package. + +APT::Install-Recommends "false"; +APT::Install-Suggests "false"; diff --git a/dockers/docker-base-trixie/pip.conf b/dockers/docker-base-trixie/pip.conf new file mode 100644 index 00000000000..9d54ef90283 --- /dev/null +++ b/dockers/docker-base-trixie/pip.conf @@ -0,0 +1,2 @@ +[global] +break-system-packages = true diff --git a/dockers/docker-base-trixie/root/.vimrc b/dockers/docker-base-trixie/root/.vimrc new file mode 100644 index 00000000000..5c1ba8a04f4 --- /dev/null +++ b/dockers/docker-base-trixie/root/.vimrc @@ -0,0 +1,2 @@ +" enable vim features +set nocompatible diff --git a/dockers/docker-bmp-watchdog/watchdog/debian/rules b/dockers/docker-bmp-watchdog/watchdog/debian/rules index 0ecfaac60f9..9771b9f0c79 100644 --- a/dockers/docker-bmp-watchdog/watchdog/debian/rules +++ b/dockers/docker-bmp-watchdog/watchdog/debian/rules @@ -9,6 +9,10 @@ override_dh_auto_build: cargo build --release --all +override_dh_auto_install: + # do nothing + : + override_dh_auto_clean: cargo clean --release diff --git a/dockers/docker-config-engine-trixie/Dockerfile.j2 b/dockers/docker-config-engine-trixie/Dockerfile.j2 new file mode 100644 index 00000000000..2b75f2513d6 --- /dev/null +++ b/dockers/docker-config-engine-trixie/Dockerfile.j2 @@ -0,0 +1,65 @@ +{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files, rsync_from_builder_stage %} +ARG BASE=docker-base-trixie-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} + +FROM $BASE AS base + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && \ + apt install -y \ + apt-utils \ + build-essential \ + python3-dev \ + python3-redis \ + python3-yaml + +{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %} +RUN apt install -y \ + libxslt-dev \ + libz-dev +{%- endif %} + +# For sonic-config-engine Python 3 package +# Explicitly install pyangbind here, as pyangbind causes enum34 to be installed. +# enum34 causes Python 're' package to not work properly as it redefines an incompatible enum.py module +# https://github.com/robshakir/pyangbind/issues/232 +RUN pip3 install pyangbind==0.8.7 +RUN pip3 uninstall -y enum34 + +{% if docker_config_engine_trixie_debs.strip() %} +# Copy locally-built Debian package dependencies +{{ copy_files("debs/", docker_config_engine_trixie_debs.split(' '), "/debs/") }} + +# Install locally-built Debian packages and implicitly install their dependencies +{{ install_debian_packages(docker_config_engine_trixie_debs.split(' ')) }} +{% endif %} + +{% if docker_config_engine_trixie_whls.strip() %} +# Copy locally-built Python wheel dependencies +{{ copy_files("python-wheels/", docker_config_engine_trixie_whls.split(' '), "/python-wheels/") }} + +# Install locally-built Python wheel dependencies +{{ install_python_wheels(docker_config_engine_trixie_whls.split(' ')) }} +{% endif %} + +# Copy files +COPY ["files/swss_vars.j2", "/usr/share/sonic/templates/"] +COPY ["files/readiness_probe.sh", "/usr/bin/"] +COPY ["files/container_startup.py", "/usr/share/sonic/scripts/"] + +## Clean up + +{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %} +RUN apt purge -y \ + libxslt-dev \ + libz-dev +{%- endif %} + +RUN apt purge -y \ + python3-dev \ + build-essential + +FROM $BASE + +{{ rsync_from_builder_stage() }} diff --git a/dockers/docker-fpm-frr/frr/bgpd/idf_isolate/idf_isolate.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/idf_isolate/idf_isolate.conf.j2 index 2ab76b128b0..b627a9d675b 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/idf_isolate/idf_isolate.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/idf_isolate/idf_isolate.conf.j2 @@ -9,12 +9,15 @@ route-map CHECK_IDF_ISOLATION permit 3 set community {{ constants.bgp.traffic_shift_community }} {# #} {%- if isolation_status == "isolated_withdraw_all" -%} - route-map CHECK_IDF_ISOLATION deny 4 - route-map CHECK_IDF_ISOLATION permit 10 - no set community no-export additive{# Added to clean up state, in case of transition from isolated_no_export (not expected) #} + +route-map CHECK_IDF_ISOLATION deny 4 +route-map CHECK_IDF_ISOLATION permit 10 + no set community no-export additive + {%- elif isolation_status == "isolated_no_export" -%} - route-map CHECK_IDF_ISOLATION permit 10 - set community no-export additive - no route-map CHECK_IDF_ISOLATION deny 4{# Added to clean up state, in case of transition from isolated_withdraw_all (not expected) #} + +no route-map CHECK_IDF_ISOLATION deny 4 +route-map CHECK_IDF_ISOLATION permit 10 + set community no-export additive {# #} -{%- endif -%} \ No newline at end of file +{%- endif -%} diff --git a/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 b/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 index 36432752e29..13b47b882f3 100644 --- a/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 +++ b/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 @@ -8,11 +8,10 @@ ! {% block zebra_nexthop %} {% if (('localhost' in DEVICE_METADATA) and ('zebra_nexthop' in DEVICE_METADATA['localhost']) and - (DEVICE_METADATA['localhost']['zebra_nexthop'] == 'enabled')) %} -zebra nexthop kernel enable -{% else %} -! Force disable next hop group support + (DEVICE_METADATA['localhost']['zebra_nexthop'] == 'disabled')) %} no zebra nexthop kernel enable +{% else %} +zebra nexthop kernel enable {% endif %} {% endblock zebra_nexthop %} ! diff --git a/dockers/docker-auditd/Dockerfile.j2 b/dockers/docker-gnmi-sidecar/Dockerfile.j2 similarity index 53% rename from dockers/docker-auditd/Dockerfile.j2 rename to dockers/docker-gnmi-sidecar/Dockerfile.j2 index 89063368304..f33b6d5ae62 100644 --- a/dockers/docker-auditd/Dockerfile.j2 +++ b/dockers/docker-gnmi-sidecar/Dockerfile.j2 @@ -1,4 +1,4 @@ -{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files, rsync_from_builder_stage %} +{% from "dockers/dockerfile-macros.j2" import rsync_from_builder_stage %} ARG BASE=docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} FROM $BASE AS base @@ -13,11 +13,17 @@ ENV DEBIAN_FRONTEND=noninteractive # Pass the image_version to container ENV IMAGE_VERSION=$image_version -COPY ["config_checker.py", "/usr/bin/"] -COPY ["auditd_config_files/", "/usr/share/sonic/auditd_config_files/"] +# K8s will override this +ENV IS_V1_ENABLED=false + +COPY ["systemd_stub.py", "/usr/bin/"] +COPY ["systemd_scripts/", "/usr/share/sonic/systemd_scripts/"] +COPY ["files/container_checker", "/usr/share/sonic/systemd_scripts/container_checker"] +COPY ["files/gnmi.sh", "/usr/share/sonic/systemd_scripts/gnmi_v1.sh"] +COPY ["files/k8s_pod_control.sh", "/usr/share/sonic/scripts/k8s_pod_control.sh"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] -RUN chmod +x /usr/bin/config_checker.py +RUN chmod +x /usr/bin/systemd_stub.py /usr/share/sonic/scripts/k8s_pod_control.sh FROM $BASE @@ -29,4 +35,7 @@ ENV DEBIAN_FRONTEND=noninteractive # Pass the image_version to container ENV IMAGE_VERSION=$image_version +# K8s will override this +ENV IS_V1_ENABLED=false + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-gnmi-sidecar/cli-plugin-tests/test_systemd_stub.py b/dockers/docker-gnmi-sidecar/cli-plugin-tests/test_systemd_stub.py new file mode 100644 index 00000000000..689c257113c --- /dev/null +++ b/dockers/docker-gnmi-sidecar/cli-plugin-tests/test_systemd_stub.py @@ -0,0 +1,286 @@ +# tests/test_systemd_stub.py +import sys +import os +import types +import importlib + +import pytest + +# Add docker-gnmi-sidecar directory to path so we can import systemd_stub +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) + +# Add sonic-py-common to path so we can import the real sidecar_common +# Path: cli-plugin-tests -> docker-gnmi-sidecar -> dockers -> sonic-buildimage -> src/sonic-py-common +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../src/sonic-py-common"))) + + +# ===== Create fakes BEFORE importing sidecar_common ===== +def _setup_fakes(): + """Create fake modules before any imports that need them.""" + # ----- fake swsscommon.swsscommon.ConfigDBConnector ----- + swss_pkg = types.ModuleType("swsscommon") + swss_common_mod = types.ModuleType("swsscommon.swsscommon") + + class _DummyConfigDBConnector: + def __init__(self, *_, **__): + pass + + def connect(self, *_, **__): + pass + + def get_entry(self, *_, **__): + return {} + + def set_entry(self, *_, **__): + pass + + swss_common_mod.ConfigDBConnector = _DummyConfigDBConnector + swss_pkg.swsscommon = swss_common_mod + sys.modules["swsscommon"] = swss_pkg + sys.modules["swsscommon.swsscommon"] = swss_common_mod + + # ----- fake sonic_py_common.logger ONLY (let real sonic_py_common load) ----- + logger_mod = types.ModuleType("sonic_py_common.logger") + + class _Logger: + def __init__(self): + self.messages = [] + + def _log(self, level, msg): + self.messages.append((level, msg)) + + def log_debug(self, msg): self._log("DEBUG", msg) + def log_info(self, msg): self._log("INFO", msg) + def log_error(self, msg): self._log("ERROR", msg) + def log_notice(self, msg): self._log("NOTICE", msg) + def log_warning(self, msg): self._log("WARNING", msg) + def log_critical(self, msg): self._log("CRITICAL", msg) + + logger_mod.Logger = _Logger + sys.modules["sonic_py_common.logger"] = logger_mod + +# Create fakes before any imports +_setup_fakes() + +# Now safe to import sidecar_common (it will use the fake swsscommon) +from sonic_py_common import sidecar_common as real_sidecar_common + + +@pytest.fixture(scope="session", autouse=True) +def fake_logger_module(): + """ + Fakes were already set up at module level by _setup_fakes(). + This fixture just ensures they stay registered during test execution. + """ + yield + + +@pytest.fixture +def ss(tmp_path, monkeypatch): + """ + Import systemd_stub fresh for every test, and provide fakes: + + - run_nsenter: simulates host FS + systemctl/docker calls (patched on sidecar_common) + - container_fs: dict for "container" files + - host_fs: dict for "host" files + """ + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Fake host filesystem and command recorder + host_fs = {} + commands = [] + + # ----- Fake run_nsenter for host operations (patch on sidecar_common) ----- + def fake_run_nsenter(args, *, text=True, input_bytes=None): + commands.append(("nsenter", tuple(args))) + + # /bin/cat + if args[:1] == ["/bin/cat"] and len(args) == 2: + path = args[1] + if path in host_fs: + out = host_fs[path] + if text: + return 0, out.decode("utf-8", "ignore"), "" + return 0, out, b"" + return 1, "" if text else b"", "No such file" if text else b"No such file" + + # /bin/sh -c "cat > /tmp/xxx" + if ( + len(args) == 3 + and args[0] == "/bin/sh" + and args[1] in ("-c", "-lc") # accept both forms + and args[2].strip().startswith("cat > ") + ): + tmp_path = args[2].split("cat >", 1)[1].strip() + # strip quotes if shlex.quote added them + if tmp_path and tmp_path[0] == tmp_path[-1] and tmp_path[0] in ("'", '"'): + tmp_path = tmp_path[1:-1] + host_fs[tmp_path] = input_bytes or (b"" if text else b"") + return 0, "" if text else b"", "" if text else b"" + + # chmod / mkdir / mv / rm + if args[:1] == ["/bin/chmod"]: + return 0, "" if text else b"", "" if text else b"" + if args[:1] == ["/bin/mkdir"]: + return 0, "" if text else b"", "" if text else b"" + if args[:1] == ["/bin/mv"] and len(args) == 4: + src, dst = args[2], args[3] + host_fs[dst] = host_fs.get(src, b"") + host_fs.pop(src, None) + return 0, "" if text else b"", "" if text else b"" + if args[:1] == ["/bin/rm"]: + target = args[-1] + host_fs.pop(target, None) + return 0, "" if text else b"", "" if text else b"" + + # sudo … (post actions) + if args[:1] == ["sudo"]: + return 0, "" if text else b"", "" if text else b"" + + return 1, "" if text else b"", "unsupported" if text else b"unsupported" + + monkeypatch.setattr(real_sidecar_common, "run_nsenter", fake_run_nsenter) + + # Fake container FS - patch read_file_bytes_local on sidecar_common + container_fs = {} + + def fake_read_file_bytes_local(path: str): + return container_fs.get(path, None) + + monkeypatch.setattr(real_sidecar_common, "read_file_bytes_local", fake_read_file_bytes_local) + + # Now import systemd_stub (it will use patched sidecar_common) + ss = importlib.import_module("systemd_stub") + + # Isolate POST_COPY_ACTIONS + monkeypatch.setattr(ss, "POST_COPY_ACTIONS", {}, raising=True) + + return ss, container_fs, host_fs, commands + + +def test_sync_no_change_fast_path(ss): + ss, container_fs, host_fs, commands = ss + item = ss.SyncItem("/container/gnmi.sh", "/host/gnmi.sh", 0o755) + container_fs[item.src_in_container] = b"same" + host_fs[item.dst_on_host] = b"same" + ss.SYNC_ITEMS[:] = [item] + + ok = ss.ensure_sync() + assert ok is True + # No write path used (no /bin/sh -c cat > tmp) + assert not any( + c[1][0] == "/bin/sh" and ("-c" in c[1] or "-lc" in c[1]) + for c in commands + ) + + +def test_sync_updates_and_post_actions(ss): + ss, container_fs, host_fs, commands = ss + item = ss.SyncItem("/container/container_checker", "/bin/container_checker", 0o755) + container_fs[item.src_in_container] = b"NEW" + host_fs[item.dst_on_host] = b"OLD" + ss.SYNC_ITEMS[:] = [item] + + ss.POST_COPY_ACTIONS[item.dst_on_host] = [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "monit"], + ] + + ok = ss.ensure_sync() + assert ok is True + assert host_fs[item.dst_on_host] == b"NEW" + + post_cmds = [args for _, args in commands if args and args[0] == "sudo"] + assert ("sudo", "systemctl", "daemon-reload") in post_cmds + assert ("sudo", "systemctl", "restart", "monit") in post_cmds + + +def test_sync_missing_src_returns_false(ss): + ss, container_fs, host_fs, commands = ss + item = ss.SyncItem("/container/missing.sh", "/usr/local/bin/gnmi.sh", 0o755) + ss.SYNC_ITEMS[:] = [item] + ok = ss.ensure_sync() + assert ok is False + + +def test_main_once_exits_zero_and_disables_post_actions(monkeypatch): + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + ss = importlib.import_module("systemd_stub") + + ss.POST_COPY_ACTIONS["/bin/container_checker"] = [["sudo", "echo", "hi"]] + monkeypatch.setattr(ss, "ensure_sync", lambda: True, raising=True) + monkeypatch.setattr(sys, "argv", ["systemd_stub.py", "--once", "--no-post-actions"]) + + rc = ss.main() + assert rc == 0 + assert ss.POST_COPY_ACTIONS == {} + + +def test_main_once_exits_nonzero_when_sync_fails(monkeypatch): + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + ss = importlib.import_module("systemd_stub") + monkeypatch.setattr(ss, "ensure_sync", lambda: False, raising=True) + monkeypatch.setattr(sys, "argv", ["systemd_stub.py", "--once"]) + rc = ss.main() + assert rc == 1 + + +def test_env_controls_gnmi_src_true(monkeypatch): + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + monkeypatch.setenv("IS_V1_ENABLED", "true") + + ss = importlib.import_module("systemd_stub") + assert ss.IS_V1_ENABLED is True + assert ss._GNMI_SRC.endswith("gnmi_v1.sh") + + +def test_env_controls_gnmi_src_false(monkeypatch): + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + monkeypatch.setenv("IS_V1_ENABLED", "false") + + ss = importlib.import_module("systemd_stub") + assert ss.IS_V1_ENABLED is False + assert ss._GNMI_SRC.endswith("gnmi.sh") + + +def test_env_controls_gnmi_src_default(monkeypatch): + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + monkeypatch.delenv("IS_V1_ENABLED", raising=False) + + ss = importlib.import_module("systemd_stub") + assert ss.IS_V1_ENABLED is False + assert ss._GNMI_SRC.endswith("gnmi.sh") + + +def test_gnmi_service_syncs_to_host_when_different(ss): + ss, container_fs, host_fs, commands = ss + + # Prepare container unit content and host old content + container_fs[ss.CONTAINER_GNMI_SERVICE] = b"UNIT-NEW" + host_fs[ss.HOST_GNMI_SERVICE] = b"UNIT-OLD" + + # Only include the gnmi service item to make the assertion clear + ss.SYNC_ITEMS[:] = [ + ss.SyncItem(ss.CONTAINER_GNMI_SERVICE, ss.HOST_GNMI_SERVICE, 0o644) + ] + + # Add post actions for gnmi.service + ss.POST_COPY_ACTIONS[ss.HOST_GNMI_SERVICE] = [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "gnmi"], + ] + + ok = ss.ensure_sync() + assert ok is True + assert host_fs[ss.HOST_GNMI_SERVICE] == b"UNIT-NEW" + + # Verify systemctl actions were invoked + post_cmds = [args for _, args in commands if args and args[0] == "sudo"] + assert ("sudo", "systemctl", "daemon-reload") in post_cmds + assert ("sudo", "systemctl", "restart", "gnmi") in post_cmds diff --git a/dockers/docker-auditd/supervisord.conf b/dockers/docker-gnmi-sidecar/supervisord.conf similarity index 81% rename from dockers/docker-auditd/supervisord.conf rename to dockers/docker-gnmi-sidecar/supervisord.conf index 125c15ee17c..5837a7941e0 100644 --- a/dockers/docker-auditd/supervisord.conf +++ b/dockers/docker-gnmi-sidecar/supervisord.conf @@ -23,11 +23,11 @@ stderr_logfile=NONE stderr_syslog=true dependent_startup=true -[program:config_checker] -command=/usr/bin/config_checker.py +[program:systemd_stub] +command=python3 /usr/bin/systemd_stub.py priority=3 -autostart=false -autorestart=false +autostart=true +autorestart=true startsecs=0 stdout_logfile=NONE stdout_syslog=true @@ -35,3 +35,4 @@ stderr_logfile=NONE stderr_syslog=true dependent_startup=true dependent_startup_wait_for=rsyslogd:running +environment=IS_V1_ENABLED=%(ENV_IS_V1_ENABLED)s diff --git a/dockers/docker-gnmi-sidecar/systemd_scripts/gnmi.service b/dockers/docker-gnmi-sidecar/systemd_scripts/gnmi.service new file mode 100644 index 00000000000..caba3b24f02 --- /dev/null +++ b/dockers/docker-gnmi-sidecar/systemd_scripts/gnmi.service @@ -0,0 +1,19 @@ +[Unit] +Description=GNMI container +Requires=database.service +After=database.service swss.service syncd.service +BindsTo=sonic.target +After=sonic.target +StartLimitIntervalSec=1200 +StartLimitBurst=3 + +[Service] +Type=simple +User=root +ExecStartPre=/usr/local/bin/gnmi.sh start +ExecStart=/usr/local/bin/gnmi.sh wait +ExecStop=/usr/local/bin/gnmi.sh stop +RestartSec=30 +TimeoutStartSec=30s +TimeoutStopSec=30s +Restart=always diff --git a/dockers/docker-gnmi-sidecar/systemd_scripts/gnmi.sh b/dockers/docker-gnmi-sidecar/systemd_scripts/gnmi.sh new file mode 100644 index 00000000000..ed0c8d60323 --- /dev/null +++ b/dockers/docker-gnmi-sidecar/systemd_scripts/gnmi.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# Thin wrapper for GNMI pod control - uses shared k8s_pod_control.sh +exec /usr/share/sonic/scripts/k8s_pod_control.sh gnmi "$@" diff --git a/dockers/docker-gnmi-sidecar/systemd_stub.py b/dockers/docker-gnmi-sidecar/systemd_stub.py new file mode 100644 index 00000000000..9548dbb1c7d --- /dev/null +++ b/dockers/docker-gnmi-sidecar/systemd_stub.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +""" +GNMI sidecar: syncs stub scripts from container to host via nsenter. +Replaces systemd-managed gnmi container with K8s-managed one. +""" +from __future__ import annotations + +import time +import argparse +from typing import List + +from sonic_py_common.sidecar_common import ( + get_bool_env_var, logger, SyncItem, sync_items, SYNC_INTERVAL_S +) + +# ───────────── gnmi.service sync paths ───────────── +CONTAINER_GNMI_SERVICE = "/usr/share/sonic/systemd_scripts/gnmi.service" +HOST_GNMI_SERVICE = "/lib/systemd/system/gnmi.service" + +IS_V1_ENABLED = get_bool_env_var("IS_V1_ENABLED", default=False) + +logger.log_notice(f"IS_V1_ENABLED={IS_V1_ENABLED}") + +_GNMI_SRC = ( + "/usr/share/sonic/systemd_scripts/gnmi_v1.sh" + if IS_V1_ENABLED + else "/usr/share/sonic/systemd_scripts/gnmi.sh" +) +logger.log_notice(f"gnmi source set to {_GNMI_SRC}") + +SYNC_ITEMS: List[SyncItem] = [ + SyncItem(_GNMI_SRC, "/usr/local/bin/gnmi.sh"), + SyncItem("/usr/share/sonic/systemd_scripts/container_checker", "/bin/container_checker"), + SyncItem("/usr/share/sonic/scripts/k8s_pod_control.sh", "/usr/share/sonic/scripts/k8s_pod_control.sh"), + SyncItem(CONTAINER_GNMI_SERVICE, HOST_GNMI_SERVICE, mode=0o644), +] + +POST_COPY_ACTIONS = { + "/lib/systemd/system/gnmi.service": [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "gnmi"], + ], + "/usr/local/bin/gnmi.sh": [ + ["sudo", "docker", "stop", "gnmi"], + ["sudo", "docker", "rm", "gnmi"], + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "gnmi"], + ], + "/bin/container_checker": [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "monit"], + ], +} + + +def ensure_sync() -> bool: + return sync_items(SYNC_ITEMS, POST_COPY_ACTIONS) + + +def parse_args() -> argparse.Namespace: + p = argparse.ArgumentParser( + description="Sync host scripts from this container to the host via nsenter (syslog logging)." + ) + p.add_argument("--once", action="store_true", help="Run one sync pass and exit") + p.add_argument( + "--interval", + type=int, + default=SYNC_INTERVAL_S, + help=f"Loop interval seconds (default: {SYNC_INTERVAL_S})", + ) + p.add_argument( + "--no-post-actions", + action="store_true", + help="(Optional) Skip host systemctl actions (for debugging)", + ) + return p.parse_args() + + +def main() -> int: + args = parse_args() + if args.no_post_actions: + POST_COPY_ACTIONS.clear() + logger.log_info("Post-copy host actions DISABLED for this run") + + ok = ensure_sync() + if args.once: + return 0 if ok else 1 + while True: + time.sleep(args.interval) + ensure_sync() + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/dockers/docker-macsec/cli-plugin-tests/platform.json b/dockers/docker-macsec/cli-plugin-tests/platform.json new file mode 100644 index 00000000000..09e746dbe15 --- /dev/null +++ b/dockers/docker-macsec/cli-plugin-tests/platform.json @@ -0,0 +1,4 @@ +{ + "fips_module": "SONiC-MACsec-Version 1.0", + "chassis": { } +} diff --git a/dockers/docker-macsec/cli-plugin-tests/test_show_macsec.py b/dockers/docker-macsec/cli-plugin-tests/test_show_macsec.py index bc9a3792a2a..63290a8ef05 100644 --- a/dockers/docker-macsec/cli-plugin-tests/test_show_macsec.py +++ b/dockers/docker-macsec/cli-plugin-tests/test_show_macsec.py @@ -1,4 +1,5 @@ import sys +import subprocess from unittest.mock import MagicMock, patch from click.testing import CliRunner @@ -7,6 +8,7 @@ import show_macsec + class TestShowMACsec(object): def test_plugin_registration(self): cli = MagicMock() @@ -274,3 +276,41 @@ def mock_get_all(db_name, key): assert "Module : sai" in result.output assert "Status : pass" in result.output assert "Namespace (asic1)" in result.output + + @patch('sonic_py_common.device_info.get_path_to_platform_dir', MagicMock(return_value='.')) + def test_show_fips_module(self): + runner = CliRunner() + result = runner.invoke(show_macsec.macsec,["--fips-module"]) + assert result.exit_code == 0, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info) + assert "SONiC-MACsec-Version 1.0" in result.output + + # remove fips-module from platform.json. Re-test. This is to test scenario that some vendors + # do not have fips_module defined in platform file yet. + cmd = ['sed', '-i.bak', '/fips_module/d', './platform.json'] + subprocess.run(cmd, capture_output=True) + result = runner.invoke(show_macsec.macsec,["--fips-module"]) + assert result.exit_code == 0, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info) + assert result.output == "" + # put original platform.json back + cmd = ['mv', './platform.json.bak', './platform.json'] + subprocess.run(cmd, stdout=subprocess.DEVNULL) + + def test_fips_module_mutual_exclusivity(self): + """Test that --fips-module and other option/argument are mutually exclusive""" + runner = CliRunner() + + result = runner.invoke(show_macsec.macsec, ["--fips-module", "--post-status"]) + assert result.exit_code == 0 + assert "POST status is not valid with other options/arguments" in result.output + + result = runner.invoke(show_macsec.macsec, ["--fips-module", "--profile"]) + assert result.exit_code == 0 + assert "fips-module is not valid with other options/arguments" in result.output + + result = runner.invoke(show_macsec.macsec, ["--fips-module", "Ethernet1"]) + assert result.exit_code == 0 + assert "fips-module is not valid with other options/arguments" in result.output + + result = runner.invoke(show_macsec.macsec, ["--fips-module", "--dump-file"]) + assert result.exit_code == 0 + assert "fips-module is not valid with other options/arguments" in result.output \ No newline at end of file diff --git a/dockers/docker-macsec/cli/show/plugins/show_macsec.py b/dockers/docker-macsec/cli/show/plugins/show_macsec.py index 8c3fd56982c..7ce1bee0ffc 100644 --- a/dockers/docker-macsec/cli/show/plugins/show_macsec.py +++ b/dockers/docker-macsec/cli/show/plugins/show_macsec.py @@ -4,13 +4,14 @@ import pickle import os import copy - +import json import click from tabulate import tabulate import utilities_common.multi_asic as multi_asic_util from swsscommon.swsscommon import CounterTable, MacsecCounter, SonicV2Connector from utilities_common.cli import UserCache +from sonic_py_common import device_info CACHE_MANAGER = UserCache(app_name="macsec") CACHE_FILE = os.path.join(CACHE_MANAGER.get_directory(), "macsecstats{}") @@ -267,15 +268,21 @@ def cache_find(cache: dict, target: MACsecAppMeta) -> MACsecAppMeta: @click.option('--profile', is_flag=True, required=False, default=False, help="show all macsec profiles") @click.option('--dump-file', is_flag=True, required=False, default=False, help="store show output to a file") @click.option('--post-status', is_flag=True, required=False, default=False, help="show macsec FIPS POST(Pre-Operational Self-Test) status") +@click.option('--fips-module', is_flag=True, required=False, default=False, help="show macsec FIPS module") @multi_asic_util.multi_asic_click_options -def macsec(interface_name, dump_file, namespace, display, profile, post_status): +def macsec(interface_name, dump_file, namespace, display, profile, post_status, fips_module): if post_status: - if interface_name is not None or profile or dump_file: + if interface_name is not None or profile or dump_file or fips_module: click.echo('POST status is not valid with other options/arguments') return MacsecContext(namespace, display).show_post_status() return - + if fips_module: + if interface_name is not None or profile or dump_file or post_status: + click.echo('fips-module is not valid with other options/arguments') + return + MacsecContext(namespace, display).show_fips_module() + return if interface_name is not None and profile: click.echo('Interface name is not valid with profile option') return @@ -399,6 +406,18 @@ def format_module_status(module, namespace): if display_output: click.echo("\n".join(display_output)) + def show_fips_module(self): + json_file = device_info.get_path_to_platform_dir() + '/' + device_info.PLATFORM_JSON_FILE + if not os.path.exists(json_file): + return + try: + with open(json_file, 'r') as file: + platform_data = json.load(file) + except (json.JSONDecodeError, IOError, TypeError, ValueError): + return + if 'fips_module' in platform_data: + click.echo(platform_data['fips_module']) + def register(cli): cli.add_command(macsec) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index 3eca2ab7c55..c35114bf58a 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -100,13 +100,9 @@ fi LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "subtype"` if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then midplane_mgmt_state=$( ip -json -4 addr show eth0-midplane | jq -r ".[0].operstate" ) - mgmt_ip=$( ip -json -4 addr show eth0 | jq -r ".[0].addr_info[0].local" ) if [[ $midplane_mgmt_state == "UP" ]]; then # Enable ZMQ with eth0-midplane interface name ORCHAGENT_ARGS+=" -q tcp://eth0-midplane" - elif [[ $mgmt_ip != "" ]] && [[ $mgmt_ip != "null" ]]; then - # If eth0-midplane interface does not up, enable ZMQ with eth0 address - ORCHAGENT_ARGS+=" -q tcp://${mgmt_ip}" else ORCHAGENT_ARGS+=" -q tcp://127.0.0.1" fi @@ -115,12 +111,6 @@ else ORCHAGENT_ARGS+=" -q tcp://127.0.0.1" fi -# Add VRF parameter when mgmt-vrf enabled -MGMT_VRF_ENABLED=`sonic-db-cli CONFIG_DB hget "MGMT_VRF_CONFIG|vrf_global" "mgmtVrfEnabled"` -if [[ x"${MGMT_VRF_ENABLED}" == x"true" ]]; then - ORCHAGENT_ARGS+=" -v mgmt" -fi - # Enable ring buffer ORCHDAEMON_RING_ENABLED=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "ring_thread_enabled"` if [[ x"${ORCHDAEMON_RING_ENABLED}" == x"true" ]]; then diff --git a/dockers/docker-orchagent/supervisord.conf.j2 b/dockers/docker-orchagent/supervisord.conf.j2 index a377e07ee55..8e3fc7d58fe 100644 --- a/dockers/docker-orchagent/supervisord.conf.j2 +++ b/dockers/docker-orchagent/supervisord.conf.j2 @@ -340,3 +340,15 @@ dependent_startup_wait_for=swssconfig:exited environment=ASAN_OPTIONS="log_path=/var/log/asan/fdbsyncd-asan.log{{ asan_extra_options }}" {% endif %} {%- endif %} + +[program:countersyncd] +command=/usr/bin/countersyncd --enable-otel +priority=18 +autostart=false +autorestart=false +stdout_logfile=NONE +stdout_syslog=true +stderr_logfile=NONE +stderr_syslog=true +dependent_startup=true +dependent_startup_wait_for=swssconfig:exited diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 35677998046..7a869ca20b4 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -82,13 +82,13 @@ apply_ipinip_subset() { SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable` SWSS_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|swss" enable` if [[ "$SYSTEM_WARM_START" == "true" ]] || [[ "$SWSS_WARM_START" == "true" ]]; then - # On warm boot, only apply TUNNEL_DECAP_TABLE subset on non-Broadcom ASICs to - # match ipinip.json.j2 config - if [[ "$sonic_asic_type" != "broadcom" ]]; then - echo "Preparing to apply ipinip.json config for non-broadcom ASIC switch" - apply_ipinip_subset + # On warm boot, only apply TUNNEL_DECAP_TABLE subset to match ipinip.json.j2 config, + # except for broadcom and marvell-teralynx asic_types + if [[ "$sonic_asic_type" == "broadcom" ]] || [[ "$sonic_asic_type" == "marvell-teralynx" ]]; then + echo "Skip applying ipinip.json config for ASIC type: $sonic_asic_type after warm-boot" else - echo "Skip applying ipinip.json config for broadcom ASIC switch after warm-boot" + echo "Preparing to apply ipinip.json config for ASIC type: $sonic_asic_type" + apply_ipinip_subset fi exit 0 fi diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index 6494ad88529..64fd6176d87 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -47,7 +47,7 @@ RUN apt-get install -y -t bookworm-backports \ # install any dependencies required by the Arista sonic_platform package. # TODO: eliminate the need to install these explicitly. RUN pip3 install grpcio==1.51.1 \ - grpcio-tools==1.51.1 + grpcio-tools==1.51.1 --no-build-isolation # Barefoot platform vendors' sonic_platform packages import these Python libraries (and netifaces) RUN pip3 install thrift==0.13.0 diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index 355ea96905b..6e25ac94707 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -14,11 +14,12 @@ FROM {{ prefix }}debian:bookworm USER root WORKDIR /root -LABEL maintainer="Pavel Shirshov" - COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"] COPY ["apt-retries-count", "/etc/apt/apt.conf.d"] +# Install certificates by disabling the peer verification +RUN apt -o Acquire::https::Verify-Peer=false update && \ + apt -o Acquire::https::Verify-Peer=false install -y ca-certificates ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -51,7 +52,7 @@ RUN apt-get update \ {% if PTF_ENV_PY_VER == "mixed" %} libboost-atomic1.71.0 \ {% else %} - libboost-atomic1.74.0 \ + libboost-atomic1.81.0 \ flex \ bison \ tcpd \ @@ -163,7 +164,7 @@ RUN rm -rf /debs \ {% endif %} && git clone https://github.com/sflow/sflowtool \ && cd sflowtool \ - && git checkout v6.04 \ + && git checkout v6.09 \ && ./boot.sh \ && ./configure \ && make \ @@ -179,17 +180,17 @@ RUN rm -rf /debs \ && make install \ && cd .. \ && rm -fr OpenBFDD \ - && wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ - && tar xvfz 1.0.0.tar.gz \ - && cd nanomsg-1.0.0 \ + && wget https://github.com/nanomsg/nanomsg/archive/1.2.2.tar.gz \ + && tar xvfz 1.2.2.tar.gz \ + && cd nanomsg-1.2.2 \ && mkdir -p build \ && cd build \ && cmake .. \ && make install \ && ldconfig \ && cd ../.. \ - && rm -fr nanomsg-1.0.0 \ - && rm -f 1.0.0.tar.gz \ + && rm -fr nanomsg-1.2.2 \ + && rm -f 1.2.2.tar.gz \ {% if PTF_ENV_PY_VER == "mixed" %} && pip install cffi \ && pip install nnpy \ @@ -227,7 +228,7 @@ COPY ["tacacs+", "/etc/default"] # Workaround: Tornado installed outside of the # virtualenv as the call to the process API # Ansible -> Supervisor -> ExaBGP -> Process API -# causes the process API to have a restricted +# causes the process API to have a restricted # environment without access to the virtualenv. {% if PTF_ENV_PY_VER == "py3" %} RUN pip3 install --break-system-packages tornado @@ -245,34 +246,29 @@ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONIOENCODING=UTF-8 RUN python3 -m pip install --upgrade --ignore-installed pip {% endif %} -# For py3 image the following offending packages below do not use the updated -# setuptools on Python 3.9. The packages downgrade setuptools +# For py3 image the following offending packages below do not use the updated +# setuptools on Python 3.9. The packages downgrade setuptools # to 40.x causing further installations to fail {% if PTF_ENV_PY_VER == "py3" %} -{% set offending_packages = ["supervisor", "ipython==5.4.1", "exabgp==4.2.25", "grpcio-tools", "pybrctl", "pyrasite", "scapy==2.5.0", "thrift"] %} +{% set offending_packages = ["supervisor", "ipython", "exabgp==4.2.25", "grpcio-tools", "pybrctl", "pyrasite", "scapy", "thrift"] %} {{ install_offending_packages(offending_packages) }} {% else %} RUN pip3 install setuptools \ && pip3 install supervisor \ - && pip3 install ipython==5.4.1 \ + && pip3 install ipython \ && pip3 install exabgp==4.2.25 \ && pip3 install grpcio-tools \ && pip3 install pybrctl \ && pip3 install pyrasite \ - && pip3 install scapy==2.5.0 \ + && pip3 install scapy \ && pip3 install thrift {% endif %} -# Install all python modules from pypi. python3-scapy is exception, +# Install all python modules from pypi. python3-scapy is exception, # ptf debian package requires python3-scapy +RUN pip3 install Flask \ {% if PTF_ENV_PY_VER == "py3" %} -# Werkzeug 3.1.3 has a bug and causes announce routes to fail -# by returning 413 Request Entity Too Large though request buffers -# have been increased. -RUN pip3 install Flask==3.0.3 \ - && pip3 install Werkzeug==3.1.2 \ -{% else %} -RUN pip3 install Flask \ + && pip3 install Werkzeug \ {% endif %} && pip3 install Cython \ && pip3 install cffi \ @@ -282,15 +278,13 @@ RUN pip3 install Flask \ && pip3 install pysubnettree \ && pip3 install paramiko \ && pip3 install tornado \ - && pip3 install Flask \ - && pip3 install exabgp \ && pip3 install pyaml \ && pip3 install pyro4 rpyc \ && pip3 install unittest-xml-reporting \ && pip3 install python-libpcap \ && pip3 install enum34 \ && pip3 install grpcio \ - && pip3 install six==1.16.0 \ + && pip3 install six \ && pip3 install itsdangerous \ && pip3 install retrying \ && pip3 install jinja2 @@ -367,7 +361,7 @@ RUN git clone https://github.com/karimra/gnoic.git \ && cd gnoic \ && git checkout 57aac3d \ && chmod +x install.sh \ - && ./install.sh --version 0.1.0 \ + && ./install.sh --version 0.2.0 \ && cd .. \ && rm -rf gnoic diff --git a/dockers/docker-restapi-sidecar/Dockerfile.j2 b/dockers/docker-restapi-sidecar/Dockerfile.j2 new file mode 100644 index 00000000000..4c36a395787 --- /dev/null +++ b/dockers/docker-restapi-sidecar/Dockerfile.j2 @@ -0,0 +1,55 @@ +{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} +ARG BASE=docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} + +FROM $BASE AS base + +ARG docker_container_name +ARG image_version + +# Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +# Pass the image_version to container +ENV IMAGE_VERSION=$image_version + +COPY ["systemd_stub.py", "/usr/bin/"] +COPY ["systemd_scripts/", "/usr/share/sonic/systemd_scripts/"] +COPY ["files/k8s_pod_control.sh", "/usr/share/sonic/scripts/k8s_pod_control.sh"] + +{% if docker_restapi_sidecar_debs.strip() -%} +# Copy locally-built Debian package dependencies +{{ copy_files("debs/", docker_restapi_sidecar_debs.split(' '), "/debs/") }} + +# Install locally-built Debian packages and implicitly install their dependencies +{{ install_debian_packages(docker_restapi_sidecar_debs.split(' ')) }} +{%- endif %} + +{% if docker_restapi_sidecar_whls.strip() -%} +# Copy locally-built Python wheel dependencies +{{ copy_files("python-wheels/", docker_restapi_sidecar_whls.split(' '), "/python-wheels/") }} + +# Install locally-built Python wheel dependencies +{{ install_python_wheels(docker_restapi_sidecar_whls.split(' ')) }} +{%- endif %} + +COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] +COPY ["critical_processes", "/etc/supervisor/"] +COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"] +COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"] +RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf +RUN chmod +x /usr/bin/systemd_stub.py /usr/share/sonic/scripts/k8s_pod_control.sh + +FROM $BASE + +RUN --mount=type=bind,from=base,target=/changes-to-image rsync -axAX --no-D --exclude=/sys --exclude=/proc --exclude=/dev --exclude=resolv.conf /changes-to-image/ / + +# Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +# Pass the image_version to container +ENV IMAGE_VERSION=$image_version + +# K8s will override this +ENV IS_V1_ENABLED=false + +ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-restapi-sidecar/cli-plugin-tests/test_systemd_stub.py b/dockers/docker-restapi-sidecar/cli-plugin-tests/test_systemd_stub.py new file mode 100644 index 00000000000..a748023f7f1 --- /dev/null +++ b/dockers/docker-restapi-sidecar/cli-plugin-tests/test_systemd_stub.py @@ -0,0 +1,582 @@ +# tests/test_systemd_stub.py +import sys +import os +import types +import importlib + +import pytest + +# Add docker-restapi-sidecar directory to path so we can import systemd_stub +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) + +# Add sonic-py-common to path so we can import the real sidecar_common +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../../src/sonic-py-common"))) + + +# ===== Create fakes BEFORE importing sidecar_common ===== +def _setup_fakes(): + """Create fake modules before any imports that need them.""" + # ----- fake swsscommon.swsscommon.ConfigDBConnector ----- + swss_pkg = types.ModuleType("swsscommon") + swss_common_mod = types.ModuleType("swsscommon.swsscommon") + + class _DummyConfigDBConnector: + def __init__(self, *_, **__): + pass + + def connect(self, *_, **__): + pass + + def get_entry(self, *_, **__): + return {} + + def set_entry(self, *_, **__): + pass + + swss_common_mod.ConfigDBConnector = _DummyConfigDBConnector + swss_pkg.swsscommon = swss_common_mod + sys.modules["swsscommon"] = swss_pkg + sys.modules["swsscommon.swsscommon"] = swss_common_mod + + # ----- fake sonic_py_common.logger ONLY (let real sonic_py_common load) ----- + logger_mod = types.ModuleType("sonic_py_common.logger") + + class _Logger: + def __init__(self): + self.messages = [] + + def _log(self, level, msg): + self.messages.append((level, msg)) + + def log_debug(self, msg): self._log("DEBUG", msg) + def log_info(self, msg): self._log("INFO", msg) + def log_error(self, msg): self._log("ERROR", msg) + def log_notice(self, msg): self._log("NOTICE", msg) + def log_warning(self, msg): self._log("WARNING", msg) + def log_critical(self, msg): self._log("CRITICAL", msg) + + logger_mod.Logger = _Logger + sys.modules["sonic_py_common.logger"] = logger_mod + +# Create fakes before any imports +_setup_fakes() + +# Now safe to import sidecar_common (it will use the fake swsscommon) +from sonic_py_common import sidecar_common as real_sidecar_common + + +@pytest.fixture(scope="session", autouse=True) +def fake_logger_module(): + """ + Fakes were already set up at module level by _setup_fakes(). + This fixture just ensures they stay registered during test execution. + """ + yield + + +@pytest.fixture +def ss(tmp_path, monkeypatch): + """ + Import systemd_stub fresh for every test, and provide fakes: + + - run_nsenter: simulates host FS + systemctl/docker calls + - container_fs: dict for "container" files + - host_fs: dict for "host" files + - config_db: dict for CONFIG_DB contents ("TABLE|KEY" -> {field: value}) + """ + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Mock sonic_version.yml with a supported branch (default to 202311) + version_file = tmp_path / "sonic_version.yml" + version_file.write_text("build_version: 'SONiC.20231110.19'") + + original_exists = os.path.exists + def mock_exists(path): + if path == "/etc/sonic/sonic_version.yml": + return True + return original_exists(path) + + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + # Fake host filesystem and command recorder + host_fs = {} + commands = [] + + # Fake CONFIG_DB (redis key "TABLE|KEY" -> dict(field -> value)) + config_db = {} + + # ----- Patch db_hget / db_hset to use our fake CONFIG_DB ----- + def fake_db_hget(key: str, field: str): + """Get a field from CONFIG_DB""" + entry = config_db.get(key, {}) + return entry.get(field) + + def fake_db_hset(key: str, field: str, value: str) -> bool: + """Set a field in CONFIG_DB""" + if key not in config_db: + config_db[key] = {} + config_db[key][field] = value + return True + + monkeypatch.setattr(real_sidecar_common, "db_hget", fake_db_hget) + monkeypatch.setattr(real_sidecar_common, "db_hset", fake_db_hset) + + # ----- Patch run_nsenter for host operations ----- + def fake_run_nsenter(args, *, text=True, input_bytes=None): + commands.append(("nsenter", tuple(args))) + + # /bin/cat + if args[:1] == ["/bin/cat"] and len(args) == 2: + path = args[1] + if path in host_fs: + out = host_fs[path] + if text: + return 0, out.decode("utf-8", "ignore"), "" + return 0, out, b"" + return 1, "" if text else b"", "No such file" if text else b"No such file" + + # /bin/sh -c "cat > /tmp/xxx" + if ( + len(args) == 3 + and args[0] == "/bin/sh" + and args[1] in ("-c", "-lc") # accept both forms + and args[2].strip().startswith("cat > ") + ): + tmp_path = args[2].split("cat >", 1)[1].strip() + # strip quotes if shlex.quote added them + if tmp_path and tmp_path[0] == tmp_path[-1] and tmp_path[0] in ("'", '"'): + tmp_path = tmp_path[1:-1] + host_fs[tmp_path] = input_bytes or (b"" if text else b"") + return 0, "" if text else b"", "" if text else b"" + + # chmod / mkdir / mv / rm + if args[:1] == ["/bin/chmod"]: + return 0, "" if text else b"", "" if text else b"" + if args[:1] == ["/bin/mkdir"]: + return 0, "" if text else b"", "" if text else b"" + if args[:1] == ["/bin/mv"] and len(args) == 4: + src, dst = args[2], args[3] + host_fs[dst] = host_fs.get(src, b"") + host_fs.pop(src, None) + return 0, "" if text else b"", "" if text else b"" + if args[:1] == ["/bin/rm"]: + target = args[-1] + host_fs.pop(target, None) + return 0, "" if text else b"", "" if text else b"" + + # sudo … (post actions) + if args[:1] == ["sudo"]: + return 0, "" if text else b"", "" if text else b"" + + return 1, "" if text else b"", "unsupported" if text else b"unsupported" + + monkeypatch.setattr(real_sidecar_common, "run_nsenter", fake_run_nsenter) + + # ----- Patch read_file_bytes_local to use container_fs ----- + # Fake container FS + container_fs = {} + + def fake_read_file_bytes_local(path: str): + return container_fs.get(path, None) + + monkeypatch.setattr(real_sidecar_common, "read_file_bytes_local", fake_read_file_bytes_local) + + # Now import systemd_stub after all patches are in place + ss = importlib.import_module("systemd_stub") + + # Isolate POST_COPY_ACTIONS + monkeypatch.setattr(ss, "POST_COPY_ACTIONS", {}) + + return ss, container_fs, host_fs, commands, config_db + + +def test_sync_no_change_fast_path(ss): + ss, container_fs, host_fs, commands, config_db = ss + + # Put required source files in container_fs - files that ensure_sync() expects + # Default branch is 202311 from fixture + container_fs["/usr/share/sonic/systemd_scripts/restapi.sh"] = b"same" + container_fs["/usr/share/sonic/systemd_scripts/container_checker_202311"] = b"same" + container_fs["/usr/share/sonic/scripts/k8s_pod_control.sh"] = b"same" + container_fs["/usr/share/sonic/systemd_scripts/restapi.service_202311"] = b"same" + + # Put same files on host + host_fs["/usr/bin/restapi.sh"] = b"same" + host_fs["/bin/container_checker"] = b"same" + host_fs["/usr/share/sonic/scripts/k8s_pod_control.sh"] = b"same" + host_fs["/lib/systemd/system/restapi.service"] = b"same" + + ok = ss.ensure_sync() + assert ok is True + # No write path used (no /bin/sh -c cat > tmp) since files are identical + assert not any( + c[1][0] == "/bin/sh" and ("-c" in c[1] or "-lc" in c[1]) + for c in commands + ) + + +def test_sync_updates_and_post_actions(ss): + ss, container_fs, host_fs, commands, config_db = ss + + # Put required source files in container_fs - files that ensure_sync() expects + # Default branch is 202311 from fixture + container_fs["/usr/share/sonic/systemd_scripts/restapi.sh"] = b"NEW-RESTAPI" + container_fs["/usr/share/sonic/systemd_scripts/container_checker_202311"] = b"NEW-CHECKER" + container_fs["/usr/share/sonic/scripts/k8s_pod_control.sh"] = b"NEW-K8S" + container_fs["/usr/share/sonic/systemd_scripts/restapi.service_202311"] = b"NEW-SERVICE" + + # Put old files on host + host_fs["/usr/bin/restapi.sh"] = b"OLD" + host_fs["/bin/container_checker"] = b"OLD" + host_fs["/usr/share/sonic/scripts/k8s_pod_control.sh"] = b"OLD" + host_fs["/lib/systemd/system/restapi.service"] = b"OLD" + + ss.POST_COPY_ACTIONS["/bin/container_checker"] = [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "monit"], + ] + + ok = ss.ensure_sync() + assert ok is True + assert host_fs["/bin/container_checker"] == b"NEW-CHECKER" + + post_cmds = [args for _, args in commands if args and args[0] == "sudo"] + assert ("sudo", "systemctl", "daemon-reload") in post_cmds + assert ("sudo", "systemctl", "restart", "monit") in post_cmds + + +def test_sync_missing_src_returns_false(ss): + ss, container_fs, host_fs, commands, config_db = ss + + # Don't put source files in container_fs - ensure_sync() will fail + # It will try to read files like /usr/share/sonic/systemd_scripts/restapi.sh but they won't exist + + ok = ss.ensure_sync() + assert ok is False + + +def test_main_once_exits_zero_and_disables_post_actions(ss, monkeypatch): + # Default restapi has no reconcile logic; simple sync only. + systemd_stub, container_fs, host_fs, commands, config_db = ss + + systemd_stub.POST_COPY_ACTIONS["/bin/container_checker"] = [["sudo", "echo", "hi"]] + monkeypatch.setattr(systemd_stub, "ensure_sync", lambda: True, raising=True) + monkeypatch.setattr(sys, "argv", ["systemd_stub.py", "--once", "--no-post-actions"]) + + rc = systemd_stub.main() + assert rc == 0 + assert systemd_stub.POST_COPY_ACTIONS == {} + + +def test_env_controls_restapi_src_false(monkeypatch, tmp_path): + """Test that when IS_V1_ENABLED=false, restapi.sh is used as the source.""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Create fake sonic_version.yml for branch 202311 + version_file = tmp_path / "sonic_version.yml" + version_file.write_text("build_version: 'SONiC.20231110.19'\n") + + monkeypatch.setenv("IS_V1_ENABLED", "false") + + # Mock file operations + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + ss = importlib.import_module("systemd_stub") + + # Verify IS_V1_ENABLED is False and branch detection works + assert ss.IS_V1_ENABLED is False + branch = ss._get_branch_name() + assert branch == "202311" + + +def test_env_controls_restapi_src_true(monkeypatch, tmp_path): + """Test that when IS_V1_ENABLED=true, per-branch restapi.sh is used as the source.""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Create fake sonic_version.yml for branch 202311 + version_file = tmp_path / "sonic_version.yml" + version_file.write_text("build_version: 'SONiC.20231110.19'\n") + + monkeypatch.setenv("IS_V1_ENABLED", "true") + + # Mock file operations + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + ss = importlib.import_module("systemd_stub") + + # Verify IS_V1_ENABLED is True and branch detection works + assert ss.IS_V1_ENABLED is True + branch = ss._get_branch_name() + assert branch == "202311" + + +def test_env_controls_restapi_src_default(monkeypatch, tmp_path): + """Test that when IS_V1_ENABLED is not set, it defaults to false (restapi.sh).""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Mock sonic_version.yml + version_file = tmp_path / "sonic_version.yml" + version_file.write_text("build_version: 'SONiC.20231110.19'\n") + + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + monkeypatch.delenv("IS_V1_ENABLED", raising=False) + ss = importlib.import_module("systemd_stub") + + # Verify IS_V1_ENABLED defaults to False and branch detection works + assert ss.IS_V1_ENABLED is False + branch = ss._get_branch_name() + assert branch == "202311" + + +def test_post_copy_actions_match_sync_items(monkeypatch, tmp_path): + """Test that all POST_COPY_ACTIONS keys correspond to destination paths in SYNC_ITEMS.""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Create fake sonic_version.yml for branch 202311 + version_file = tmp_path / "sonic_version.yml" + version_file.write_text("build_version: 'SONiC.20231110.19'\n") + + monkeypatch.delenv("IS_V1_ENABLED", raising=False) + + # Mock file operations + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + ss = importlib.import_module("systemd_stub") + + # Since SYNC_ITEMS is now built dynamically in ensure_sync(), we need to determine + # expected destinations based on the branch (202311 from fixture) + expected_destinations = { + "/usr/bin/restapi.sh", + "/bin/container_checker", + "/usr/share/sonic/scripts/k8s_pod_control.sh", + "/lib/systemd/system/restapi.service", + } + + # Verify all POST_COPY_ACTIONS keys are in expected sync destinations + for action_path in ss.POST_COPY_ACTIONS.keys(): + assert action_path in expected_destinations, \ + f"POST_COPY_ACTIONS key '{action_path}' does not match any destination in SYNC_ITEMS. " \ + f"Available destinations: {sorted(expected_destinations)}" + + +# ===== Per-branch detection tests ===== + +@pytest.mark.parametrize("version,expected_branch", [ + ("SONiC.20231110.19", "202311"), + ("SONiC.20240510.25", "202405"), + ("SONiC.20241110.22", "202411"), + ("SONiC.20250510.04", "202505"), + ("SONiC.20251110.01", "202511"), + ("20231110.19", "202311"), # Without SONiC. prefix + ("20240510.25", "202405"), + ("20241110.22", "202411"), + ("20250510.04", "202505"), + ("20251110.01", "202511"), + # Test with non-standard suffixes (e.g., kw builds) + ("20241110.kw.24", "202411"), + ("SONiC.20241110.kw.24", "202411"), + ("20240510.25", "202405"), + ("SONiC.20231120.abc.123", "202311"), +]) +def test_branch_detection_from_version(monkeypatch, tmp_path, version, expected_branch): + """Test branch detection from various SONiC version formats.""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Create fake sonic_version.yml + version_file = tmp_path / "sonic_version.yml" + version_file.write_text(f"build_version: '{version}'\n") + + monkeypatch.setenv("IS_V1_ENABLED", "false") + + # Mock file operations + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + ss = importlib.import_module("systemd_stub") + + # Verify correct branch detected (branch_name is now computed at runtime in ensure_sync) + branch = ss._get_branch_name() + assert branch == expected_branch + + +@pytest.mark.parametrize("version", [ + "SONiC.master.921927-18199d73f", + "master.921927-18199d73f", + "SONiC.internal.135691748-dbb8d29985", + "internal.135691748-dbb8d29985", + "private-build-1.0", + "unknown-format", +]) +def test_unsupported_branches_exit_with_error(monkeypatch, tmp_path, version): + """Test that unsupported branches (master/internal/private) return False from ensure_sync().""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Create fake sonic_version.yml + version_file = tmp_path / "sonic_version.yml" + version_file.write_text(f"build_version: '{version}'\n") + + monkeypatch.setenv("IS_V1_ENABLED", "false") + + # Mock file operations + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + # Module import should succeed now (branch evaluation happens in ensure_sync()) + ss = importlib.import_module("systemd_stub") + + # But ensure_sync() should return False for unsupported branches + result = ss.ensure_sync() + assert result is False + + +@pytest.mark.parametrize("branch,is_v1_enabled", [ + ("202311", False), + ("202405", False), + ("202411", False), + ("202505", False), + ("202511", False), + ("202311", True), + ("202405", True), + ("202411", True), + ("202505", True), + ("202511", True), +]) +def test_per_branch_files_with_v1_flag(monkeypatch, tmp_path, branch, is_v1_enabled): + """Test that per-branch files are correctly selected with IS_V1_ENABLED flag.""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + + # Map branch to version string + branch_to_version = { + "202311": "SONiC.20231110.19", + "202405": "SONiC.20240510.25", + "202411": "SONiC.20241110.22", + "202505": "SONiC.20250510.04", + "202511": "SONiC.20251110.01", + } + + version = branch_to_version[branch] + + # Create fake sonic_version.yml + version_file = tmp_path / "sonic_version.yml" + version_file.write_text(f"build_version: '{version}'\n") + + monkeypatch.setenv("IS_V1_ENABLED", "true" if is_v1_enabled else "false") + + # Mock file operations + original_exists = os.path.exists + def mock_exists(p): + if p == "/etc/sonic/sonic_version.yml": + return True + return original_exists(p) + monkeypatch.setattr("os.path.exists", mock_exists) + + original_open = open + def mock_open(file, *args, **kwargs): + if file == "/etc/sonic/sonic_version.yml": + return original_open(str(version_file), *args, **kwargs) + return original_open(file, *args, **kwargs) + + monkeypatch.setattr("builtins.open", mock_open) + + ss = importlib.import_module("systemd_stub") + + # Verify branch detected correctly (branch_name is now computed at runtime in ensure_sync) + detected_branch = ss._get_branch_name() + assert detected_branch == branch + + # Verify IS_V1_ENABLED is set correctly + assert ss.IS_V1_ENABLED == is_v1_enabled + diff --git a/dockers/docker-restapi-sidecar/critical_processes b/dockers/docker-restapi-sidecar/critical_processes new file mode 100644 index 00000000000..b17ebcb1d71 --- /dev/null +++ b/dockers/docker-restapi-sidecar/critical_processes @@ -0,0 +1 @@ +program:systemd_stub diff --git a/dockers/docker-restapi-sidecar/etc/rsyslog.conf b/dockers/docker-restapi-sidecar/etc/rsyslog.conf new file mode 100644 index 00000000000..ef249229ab1 --- /dev/null +++ b/dockers/docker-restapi-sidecar/etc/rsyslog.conf @@ -0,0 +1,76 @@ +# +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html + + +################# +#### MODULES #### +################# + +$ModLoad imuxsock # provides support for local system logging + +# +# Set a rate limit on messages from the container +# +$SystemLogRateLimitInterval 300 +$SystemLogRateLimitBurst 20000 + +#$ModLoad imklog # provides kernel logging support +#$ModLoad immark # provides --MARK-- message capability + +# provides UDP syslog reception +#$ModLoad imudp +#$UDPServerRun 514 + +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 + + +########################### +#### GLOBAL DIRECTIVES #### +########################### + +# Set remote syslog server +template (name="ForwardFormatInContainer" type="string" string="<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%") +*.* action(type="omfwd" target="127.0.0.1" port="514" protocol="udp" Template="ForwardFormatInContainer") + +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + +# Define a custom template +$template SONiCFileFormat,"%TIMESTAMP%.%timestamp:::date-subseconds% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" +$ActionFileDefaultTemplate SONiCFileFormat + +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 + +# +# Where to place spool and state files +# +$WorkDirectory /var/spool/rsyslog + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf + +# +# Suppress duplicate messages and report "message repeated n times" +# +$RepeatedMsgReduction on + +############### +#### RULES #### +############### diff --git a/dockers/docker-restapi-sidecar/etc/rsyslog.d/supervisor.conf b/dockers/docker-restapi-sidecar/etc/rsyslog.d/supervisor.conf new file mode 100644 index 00000000000..fde8d8a6c99 --- /dev/null +++ b/dockers/docker-restapi-sidecar/etc/rsyslog.d/supervisor.conf @@ -0,0 +1,9 @@ +module(load="imfile" mode="inotify") # Ensure "inotify" mode is used +$WorkDirectory /var/log/supervisor +# Start Monitoring the file +input(type="imfile" + File="/var/log/supervisor/supervisord.log" + Tag="supervisord" + Severity="info" + Facility="local0" + PersistStateInterval="1") diff --git a/dockers/docker-restapi-sidecar/supervisord.conf b/dockers/docker-restapi-sidecar/supervisord.conf new file mode 100644 index 00000000000..ebf5c50f531 --- /dev/null +++ b/dockers/docker-restapi-sidecar/supervisord.conf @@ -0,0 +1,49 @@ +[supervisord] +logfile_maxbytes=1MB +logfile_backups=2 +nodaemon=true + +[eventlistener:dependent-startup] +command=python3 -m supervisord_dependent_startup +autostart=true +autorestart=unexpected +startretries=0 +exitcodes=0,3 +events=PROCESS_STATE +buffer_size=1024 + +[program:rsyslogd] +command=/usr/sbin/rsyslogd -n -iNONE +priority=1 +autostart=false +autorestart=unexpected +stdout_logfile=NONE +stdout_syslog=true +stderr_logfile=NONE +stderr_syslog=true +dependent_startup=true + +[program:systemd_stub] +command=python3 /usr/bin/systemd_stub.py +priority=3 +autostart=true +autorestart=false +startsecs=0 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running +environment=IS_V1_ENABLED=%(ENV_IS_V1_ENABLED)s + +[eventlistener:supervisor-proc-exit-listener] +command=/usr/bin/supervisor-proc-exit-listener-rs --container-name restapi +events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING +autostart=true +autorestart=unexpected +buffer_size=1024 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202311 b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202311 new file mode 100755 index 00000000000..03f2737038f --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202311 @@ -0,0 +1,230 @@ +#!/usr/bin/env python3 + +""" +container_checker + +This script is intended to be run by Monit. It will write an alerting message into +syslog if it found containers which were expected to run but were not running. At +the same time, if some containers were unexpected to run, it also writes an alerting +syslog message. Note that if print(...) statement in this script was executed, the +string in it will be appended to Monit syslog messages. + +The following is an example in Monit configuration file to show how Monit will run +this script: + +check program container_checker with path "/usr/bin/container_checker" + if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles +""" + +import docker +import sys + +from sonic_py_common import multi_asic, device_info +from swsscommon import swsscommon + +EVENTS_PUBLISHER_SOURCE = "sonic-events-host" +EVENTS_PUBLISHER_TAG = "event-down-ctr" + +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + return False + +def get_expected_running_containers(): + """ + @summary: This function will get the expected running & always-enabled containers by following the rule: + The 'state' field of container in 'FEATURE' table should not be 'disabled' or 'always_disabled'. + If the device has Multi-ASIC, this function will get container list by determining the + value of field 'has_global_scope', the number of ASICs and the value of field + 'has_per_asic_scope'. + If the device has single ASIC, the container name was put into the list. + @return: A set which contains the expected running containers and a set that has + containers marked as "always_enabled". + """ + config_db = swsscommon.ConfigDBConnector() + config_db.connect() + feature_table = config_db.get_table("FEATURE") + + expected_running_containers = set() + always_running_containers = set() + + # Get current asic presence list. For multi_asic system, multi instance containers + # should be checked only for asics present. + asics_id_presence = multi_asic.get_asic_presence_list() + + # Some services may run all the instances irrespective of asic presence. + # Add those to exception list. + # database service: Currently services have dependency on all database services to + # be up irrespective of asic presence. + # bgp service: Currently bgp runs all instances. Once this is fixed to be config driven, + # it will be removed from exception list. + run_all_instance_list = ['database', 'bgp'] + + container_list = [] + for container_name in feature_table.keys(): + # skip frr_bmp since it's not container just bmp option used by bgpd + if container_name == "frr_bmp": + continue + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + expected_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + expected_running_containers.add(container_name + str(asic_id)) + else: + expected_running_containers.add(container_name) + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + always_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) + + if device_info.is_supervisor(): + always_running_containers.add("database-chassis") + return expected_running_containers, always_running_containers + +def get_current_running_from_DB(always_running_containers): + """ + @summary: This function will get the current running container list + from FEATURE table @ STATE_DB, if this table is available. + @return: a tuple + First: Return value indicating if info can be obtained from + DB or not. + Second: A set which contains the current running containers, + if this info is available in DB. + """ + running_containers = set() + + state_db = swsscommon.DBConnector("STATE_DB", 0) + tbl = swsscommon.Table(state_db, "FEATURE") + if not tbl.getKeys(): + return running_containers + + for name in tbl.getKeys(): + data = dict(tbl.get(name)[1]) + if data.get('container_id'): + running_containers.add(name) + + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + RUNNING = 'running' + for name in always_running_containers: + try: + container = DOCKER_CLIENT.containers.get(name) + container_state = container.attrs.get('State', {}) + if container_state.get('Status', "") == RUNNING: + running_containers.add(name) + except (docker.errors.NotFound, docker.errors.APIError) as err: + print("Failed to get container '{}'. Error: '{}'".format(name, err)) + pass + + return running_containers + +def get_current_running_from_dockers(): + """ + @summary: This function will get all running containers from + the list of docker containers in running state. + If namespace == 'sonic': it's rollout-ed via kubernetes so add io.kubernetes.container.name + If namespace is missing/empty: it's image native container, add ctr.name directly + @return: A set which contains containers that are + in running state. + """ + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + running_containers = set() + + try: + for ctr in DOCKER_CLIENT.containers.list(filters={"status": "running"}): + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + elif not ns: + running_containers.add(ctr.name) + + except docker.errors.APIError as err: + print(f"Failed to retrieve the running container list. Error: '{err}'") + pass + except docker.errors.DockerException as err: + print(f"Docker client error: '{err}'") + pass + return running_containers + +def get_current_running_containers(always_running_containers): + """ + @summary: This function will get the list of currently running containers. + If available in STATE-DB, get from DB else from list of dockers. + + @return: A set of currently running containers. + """ + + current_running_containers = get_current_running_from_DB(always_running_containers) + current_running_containers.update(get_current_running_from_dockers()) + return current_running_containers + + +def publish_events(lst): + events_handle = swsscommon.events_init_publisher(EVENTS_PUBLISHER_SOURCE) + params = swsscommon.FieldValueMap() + + for ctr in lst: + params["ctr_name"] = ctr; + swsscommon.event_publish(events_handle, EVENTS_PUBLISHER_TAG, params) + + swsscommon.events_deinit_publisher(events_handle) + + +def main(): + """ + @summary: This function will compare the difference between the current running containers + and the containers which were expected to run. If containers which were exepcted + to run were not running, then an alerting message will be written into syslog. + """ + expected_running_containers, always_running_containers = get_expected_running_containers() + current_running_containers = get_current_running_containers(always_running_containers) + + expected_running_containers |= always_running_containers + not_running_containers = expected_running_containers.difference(current_running_containers) + if not_running_containers: + publish_events(not_running_containers) + print("Expected containers not running: " + ", ".join(not_running_containers)) + sys.exit(3) + + +if __name__ == "__main__": + main() + sys.exit(0) diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202405 b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202405 new file mode 100755 index 00000000000..03f2737038f --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202405 @@ -0,0 +1,230 @@ +#!/usr/bin/env python3 + +""" +container_checker + +This script is intended to be run by Monit. It will write an alerting message into +syslog if it found containers which were expected to run but were not running. At +the same time, if some containers were unexpected to run, it also writes an alerting +syslog message. Note that if print(...) statement in this script was executed, the +string in it will be appended to Monit syslog messages. + +The following is an example in Monit configuration file to show how Monit will run +this script: + +check program container_checker with path "/usr/bin/container_checker" + if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles +""" + +import docker +import sys + +from sonic_py_common import multi_asic, device_info +from swsscommon import swsscommon + +EVENTS_PUBLISHER_SOURCE = "sonic-events-host" +EVENTS_PUBLISHER_TAG = "event-down-ctr" + +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + return False + +def get_expected_running_containers(): + """ + @summary: This function will get the expected running & always-enabled containers by following the rule: + The 'state' field of container in 'FEATURE' table should not be 'disabled' or 'always_disabled'. + If the device has Multi-ASIC, this function will get container list by determining the + value of field 'has_global_scope', the number of ASICs and the value of field + 'has_per_asic_scope'. + If the device has single ASIC, the container name was put into the list. + @return: A set which contains the expected running containers and a set that has + containers marked as "always_enabled". + """ + config_db = swsscommon.ConfigDBConnector() + config_db.connect() + feature_table = config_db.get_table("FEATURE") + + expected_running_containers = set() + always_running_containers = set() + + # Get current asic presence list. For multi_asic system, multi instance containers + # should be checked only for asics present. + asics_id_presence = multi_asic.get_asic_presence_list() + + # Some services may run all the instances irrespective of asic presence. + # Add those to exception list. + # database service: Currently services have dependency on all database services to + # be up irrespective of asic presence. + # bgp service: Currently bgp runs all instances. Once this is fixed to be config driven, + # it will be removed from exception list. + run_all_instance_list = ['database', 'bgp'] + + container_list = [] + for container_name in feature_table.keys(): + # skip frr_bmp since it's not container just bmp option used by bgpd + if container_name == "frr_bmp": + continue + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + expected_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + expected_running_containers.add(container_name + str(asic_id)) + else: + expected_running_containers.add(container_name) + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + always_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) + + if device_info.is_supervisor(): + always_running_containers.add("database-chassis") + return expected_running_containers, always_running_containers + +def get_current_running_from_DB(always_running_containers): + """ + @summary: This function will get the current running container list + from FEATURE table @ STATE_DB, if this table is available. + @return: a tuple + First: Return value indicating if info can be obtained from + DB or not. + Second: A set which contains the current running containers, + if this info is available in DB. + """ + running_containers = set() + + state_db = swsscommon.DBConnector("STATE_DB", 0) + tbl = swsscommon.Table(state_db, "FEATURE") + if not tbl.getKeys(): + return running_containers + + for name in tbl.getKeys(): + data = dict(tbl.get(name)[1]) + if data.get('container_id'): + running_containers.add(name) + + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + RUNNING = 'running' + for name in always_running_containers: + try: + container = DOCKER_CLIENT.containers.get(name) + container_state = container.attrs.get('State', {}) + if container_state.get('Status', "") == RUNNING: + running_containers.add(name) + except (docker.errors.NotFound, docker.errors.APIError) as err: + print("Failed to get container '{}'. Error: '{}'".format(name, err)) + pass + + return running_containers + +def get_current_running_from_dockers(): + """ + @summary: This function will get all running containers from + the list of docker containers in running state. + If namespace == 'sonic': it's rollout-ed via kubernetes so add io.kubernetes.container.name + If namespace is missing/empty: it's image native container, add ctr.name directly + @return: A set which contains containers that are + in running state. + """ + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + running_containers = set() + + try: + for ctr in DOCKER_CLIENT.containers.list(filters={"status": "running"}): + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + elif not ns: + running_containers.add(ctr.name) + + except docker.errors.APIError as err: + print(f"Failed to retrieve the running container list. Error: '{err}'") + pass + except docker.errors.DockerException as err: + print(f"Docker client error: '{err}'") + pass + return running_containers + +def get_current_running_containers(always_running_containers): + """ + @summary: This function will get the list of currently running containers. + If available in STATE-DB, get from DB else from list of dockers. + + @return: A set of currently running containers. + """ + + current_running_containers = get_current_running_from_DB(always_running_containers) + current_running_containers.update(get_current_running_from_dockers()) + return current_running_containers + + +def publish_events(lst): + events_handle = swsscommon.events_init_publisher(EVENTS_PUBLISHER_SOURCE) + params = swsscommon.FieldValueMap() + + for ctr in lst: + params["ctr_name"] = ctr; + swsscommon.event_publish(events_handle, EVENTS_PUBLISHER_TAG, params) + + swsscommon.events_deinit_publisher(events_handle) + + +def main(): + """ + @summary: This function will compare the difference between the current running containers + and the containers which were expected to run. If containers which were exepcted + to run were not running, then an alerting message will be written into syslog. + """ + expected_running_containers, always_running_containers = get_expected_running_containers() + current_running_containers = get_current_running_containers(always_running_containers) + + expected_running_containers |= always_running_containers + not_running_containers = expected_running_containers.difference(current_running_containers) + if not_running_containers: + publish_events(not_running_containers) + print("Expected containers not running: " + ", ".join(not_running_containers)) + sys.exit(3) + + +if __name__ == "__main__": + main() + sys.exit(0) diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202411 b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202411 new file mode 100755 index 00000000000..43b3ef7a470 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202411 @@ -0,0 +1,237 @@ +#!/usr/bin/env python3 + +""" +container_checker + +This script is intended to be run by Monit. It will write an alerting message into +syslog if it found containers which were expected to run but were not running. At +the same time, if some containers were unexpected to run, it also writes an alerting +syslog message. Note that if print(...) statement in this script was executed, the +string in it will be appended to Monit syslog messages. + +The following is an example in Monit configuration file to show how Monit will run +this script: + +check program container_checker with path "/usr/bin/container_checker" + if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles +""" + +import docker +import sys + +from sonic_py_common import multi_asic, device_info +from swsscommon import swsscommon + +EVENTS_PUBLISHER_SOURCE = "sonic-events-host" +EVENTS_PUBLISHER_TAG = "event-down-ctr" + +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + return False + +def get_expected_running_containers(): + """ + @summary: This function will get the expected running & always-enabled containers by following the rule: + The 'state' field of container in 'FEATURE' table should not be 'disabled' or 'always_disabled'. + If the device has Multi-ASIC, this function will get container list by determining the + value of field 'has_global_scope', the number of ASICs and the value of field + 'has_per_asic_scope'. + If the device has single ASIC, the container name was put into the list. + @return: A set which contains the expected running containers and a set that has + containers marked as "always_enabled". + """ + config_db = swsscommon.ConfigDBConnector() + config_db.connect() + feature_table = config_db.get_table("FEATURE") + + expected_running_containers = set() + always_running_containers = set() + + # Get current asic presence list. For multi_asic system, multi instance containers + # should be checked only for asics present. + asics_id_presence = multi_asic.get_asic_presence_list() + + # Some services may run all the instances irrespective of asic presence. + # Add those to exception list. + # database service: Currently services have dependency on all database services to + # be up irrespective of asic presence. + # bgp service: Currently bgp runs all instances. Once this is fixed to be config driven, + # it will be removed from exception list. + run_all_instance_list = ['database', 'bgp'] + + container_list = [] + for container_name in feature_table.keys(): + # skip frr_bmp since it's not container just bmp option used by bgpd + if container_name == "frr_bmp": + continue + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + expected_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + expected_running_containers.add(container_name + str(asic_id)) + else: + expected_running_containers.add(container_name) + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + always_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) + + if device_info.is_supervisor() or device_info.is_smartswitch(): + always_running_containers.add("database-chassis") + + if device_info.is_smartswitch(): + raw_dpustable = config_db.get_table("DPUS") + for dpu_name in raw_dpustable: + container_name = f"databasedpu{dpu_name.replace('dpu', '')}" + always_running_containers.add(container_name) + + return expected_running_containers, always_running_containers + +def get_current_running_from_DB(always_running_containers): + """ + @summary: This function will get the current running container list + from FEATURE table @ STATE_DB, if this table is available. + @return: a tuple + First: Return value indicating if info can be obtained from + DB or not. + Second: A set which contains the current running containers, + if this info is available in DB. + """ + running_containers = set() + + state_db = swsscommon.DBConnector("STATE_DB", 0) + tbl = swsscommon.Table(state_db, "FEATURE") + if not tbl.getKeys(): + return running_containers + + for name in tbl.getKeys(): + data = dict(tbl.get(name)[1]) + if data.get('container_id'): + running_containers.add(name) + + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + RUNNING = 'running' + for name in always_running_containers: + try: + container = DOCKER_CLIENT.containers.get(name) + container_state = container.attrs.get('State', {}) + if container_state.get('Status', "") == RUNNING: + running_containers.add(name) + except (docker.errors.NotFound, docker.errors.APIError) as err: + print("Failed to get container '{}'. Error: '{}'".format(name, err)) + pass + + return running_containers + +def get_current_running_from_dockers(): + """ + @summary: This function will get all running containers from + the list of docker containers in running state. + If namespace == 'sonic': it's rollout-ed via kubernetes so add io.kubernetes.container.name + If namespace is missing/empty: it's image native container, add ctr.name directly + @return: A set which contains containers that are + in running state. + """ + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + running_containers = set() + + try: + for ctr in DOCKER_CLIENT.containers.list(filters={"status": "running"}): + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + elif not ns: + running_containers.add(ctr.name) + + except docker.errors.APIError as err: + print(f"Failed to retrieve the running container list. Error: '{err}'") + pass + except docker.errors.DockerException as err: + print(f"Docker client error: '{err}'") + pass + return running_containers + +def get_current_running_containers(always_running_containers): + """ + @summary: This function will get the list of currently running containers. + If available in STATE-DB, get from DB else from list of dockers. + + @return: A set of currently running containers. + """ + + current_running_containers = get_current_running_from_DB(always_running_containers) + current_running_containers.update(get_current_running_from_dockers()) + return current_running_containers + + +def publish_events(lst): + events_handle = swsscommon.events_init_publisher(EVENTS_PUBLISHER_SOURCE) + params = swsscommon.FieldValueMap() + + for ctr in lst: + params["ctr_name"] = ctr; + swsscommon.event_publish(events_handle, EVENTS_PUBLISHER_TAG, params) + + swsscommon.events_deinit_publisher(events_handle) + + +def main(): + """ + @summary: This function will compare the difference between the current running containers + and the containers which were expected to run. If containers which were exepcted + to run were not running, then an alerting message will be written into syslog. + """ + expected_running_containers, always_running_containers = get_expected_running_containers() + current_running_containers = get_current_running_containers(always_running_containers) + + expected_running_containers |= always_running_containers + not_running_containers = expected_running_containers.difference(current_running_containers) + if not_running_containers: + publish_events(not_running_containers) + print("Expected containers not running: " + ", ".join(not_running_containers)) + sys.exit(3) + + +if __name__ == "__main__": + main() + sys.exit(0) diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202505 b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202505 new file mode 100755 index 00000000000..1583a127b0e --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202505 @@ -0,0 +1,237 @@ +#!/usr/bin/env python3 + +""" +container_checker + +This script is intended to be run by Monit. It will write an alerting message into +syslog if it found containers which were expected to run but were not running. At +the same time, if some containers were unexpected to run, it also writes an alerting +syslog message. Note that if print(...) statement in this script was executed, the +string in it will be appended to Monit syslog messages. + +The following is an example in Monit configuration file to show how Monit will run +this script: + +check program container_checker with path "/usr/bin/container_checker" + if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles +""" + +import docker +import sys + +from sonic_py_common import multi_asic, device_info +from swsscommon import swsscommon + +EVENTS_PUBLISHER_SOURCE = "sonic-events-host" +EVENTS_PUBLISHER_TAG = "event-down-ctr" + +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + return False + +def get_expected_running_containers(): + """ + @summary: This function will get the expected running & always-enabled containers by following the rule: + The 'state' field of container in 'FEATURE' table should not be 'disabled' or 'always_disabled'. + If the device has Multi-ASIC, this function will get container list by determining the + value of field 'has_global_scope', the number of ASICs and the value of field + 'has_per_asic_scope'. + If the device has single ASIC, the container name was put into the list. + @return: A set which contains the expected running containers and a set that has + containers marked as "always_enabled". + """ + config_db = swsscommon.ConfigDBConnector() + config_db.connect() + feature_table = config_db.get_table("FEATURE") + + expected_running_containers = set() + always_running_containers = set() + + # Get current asic presence list. For multi_asic system, multi instance containers + # should be checked only for asics present. + asics_id_presence = multi_asic.get_asic_presence_list() + + # Some services may run all the instances irrespective of asic presence. + # Add those to exception list. + # database service: Currently services have dependency on all database services to + # be up irrespective of asic presence. + # bgp service: Currently bgp runs all instances. Once this is fixed to be config driven, + # it will be removed from exception list. + run_all_instance_list = ['database', 'bgp'] + + container_list = [] + for container_name in feature_table.keys(): + # skip frr_bmp since it's not container just bmp option used by bgpd + if container_name == "frr_bmp": + continue + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + expected_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + expected_running_containers.add(container_name + str(asic_id)) + else: + expected_running_containers.add(container_name) + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + always_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) + + if device_info.is_supervisor() or device_info.is_disaggregated_chassis() or device_info.is_smartswitch(): + always_running_containers.add("database-chassis") + + if device_info.is_smartswitch(): + raw_dpustable = config_db.get_table("DPUS") + for dpu_name in raw_dpustable: + container_name = f"databasedpu{dpu_name.replace('dpu', '')}" + always_running_containers.add(container_name) + + return expected_running_containers, always_running_containers + +def get_current_running_from_DB(always_running_containers): + """ + @summary: This function will get the current running container list + from FEATURE table @ STATE_DB, if this table is available. + @return: a tuple + First: Return value indicating if info can be obtained from + DB or not. + Second: A set which contains the current running containers, + if this info is available in DB. + """ + running_containers = set() + + state_db = swsscommon.DBConnector("STATE_DB", 0) + tbl = swsscommon.Table(state_db, "FEATURE") + if not tbl.getKeys(): + return running_containers + + for name in tbl.getKeys(): + data = dict(tbl.get(name)[1]) + if data.get('container_id'): + running_containers.add(name) + + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + RUNNING = 'running' + for name in always_running_containers: + try: + container = DOCKER_CLIENT.containers.get(name) + container_state = container.attrs.get('State', {}) + if container_state.get('Status', "") == RUNNING: + running_containers.add(name) + except (docker.errors.NotFound, docker.errors.APIError) as err: + print("Failed to get container '{}'. Error: '{}'".format(name, err)) + pass + + return running_containers + +def get_current_running_from_dockers(): + """ + @summary: This function will get all running containers from + the list of docker containers in running state. + If namespace == 'sonic': it's rollout-ed via kubernetes so add io.kubernetes.container.name + If namespace is missing/empty: it's image native container, add ctr.name directly + @return: A set which contains containers that are + in running state. + """ + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + running_containers = set() + + try: + for ctr in DOCKER_CLIENT.containers.list(filters={"status": "running"}): + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + elif not ns: + running_containers.add(ctr.name) + + except docker.errors.APIError as err: + print(f"Failed to retrieve the running container list. Error: '{err}'") + pass + except docker.errors.DockerException as err: + print(f"Docker client error: '{err}'") + pass + return running_containers + +def get_current_running_containers(always_running_containers): + """ + @summary: This function will get the list of currently running containers. + If available in STATE-DB, get from DB else from list of dockers. + + @return: A set of currently running containers. + """ + + current_running_containers = get_current_running_from_DB(always_running_containers) + current_running_containers.update(get_current_running_from_dockers()) + return current_running_containers + + +def publish_events(lst): + events_handle = swsscommon.events_init_publisher(EVENTS_PUBLISHER_SOURCE) + params = swsscommon.FieldValueMap() + + for ctr in lst: + params["ctr_name"] = ctr; + swsscommon.event_publish(events_handle, EVENTS_PUBLISHER_TAG, params) + + swsscommon.events_deinit_publisher(events_handle) + + +def main(): + """ + @summary: This function will compare the difference between the current running containers + and the containers which were expected to run. If containers which were exepcted + to run were not running, then an alerting message will be written into syslog. + """ + expected_running_containers, always_running_containers = get_expected_running_containers() + current_running_containers = get_current_running_containers(always_running_containers) + + expected_running_containers |= always_running_containers + not_running_containers = expected_running_containers.difference(current_running_containers) + if not_running_containers: + publish_events(not_running_containers) + print("Expected containers not running: " + ", ".join(not_running_containers)) + sys.exit(3) + + +if __name__ == "__main__": + main() + sys.exit(0) diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202511 b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202511 new file mode 100755 index 00000000000..1583a127b0e --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/container_checker_202511 @@ -0,0 +1,237 @@ +#!/usr/bin/env python3 + +""" +container_checker + +This script is intended to be run by Monit. It will write an alerting message into +syslog if it found containers which were expected to run but were not running. At +the same time, if some containers were unexpected to run, it also writes an alerting +syslog message. Note that if print(...) statement in this script was executed, the +string in it will be appended to Monit syslog messages. + +The following is an example in Monit configuration file to show how Monit will run +this script: + +check program container_checker with path "/usr/bin/container_checker" + if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles +""" + +import docker +import sys + +from sonic_py_common import multi_asic, device_info +from swsscommon import swsscommon + +EVENTS_PUBLISHER_SOURCE = "sonic-events-host" +EVENTS_PUBLISHER_TAG = "event-down-ctr" + +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + return False + +def get_expected_running_containers(): + """ + @summary: This function will get the expected running & always-enabled containers by following the rule: + The 'state' field of container in 'FEATURE' table should not be 'disabled' or 'always_disabled'. + If the device has Multi-ASIC, this function will get container list by determining the + value of field 'has_global_scope', the number of ASICs and the value of field + 'has_per_asic_scope'. + If the device has single ASIC, the container name was put into the list. + @return: A set which contains the expected running containers and a set that has + containers marked as "always_enabled". + """ + config_db = swsscommon.ConfigDBConnector() + config_db.connect() + feature_table = config_db.get_table("FEATURE") + + expected_running_containers = set() + always_running_containers = set() + + # Get current asic presence list. For multi_asic system, multi instance containers + # should be checked only for asics present. + asics_id_presence = multi_asic.get_asic_presence_list() + + # Some services may run all the instances irrespective of asic presence. + # Add those to exception list. + # database service: Currently services have dependency on all database services to + # be up irrespective of asic presence. + # bgp service: Currently bgp runs all instances. Once this is fixed to be config driven, + # it will be removed from exception list. + run_all_instance_list = ['database', 'bgp'] + + container_list = [] + for container_name in feature_table.keys(): + # skip frr_bmp since it's not container just bmp option used by bgpd + if container_name == "frr_bmp": + continue + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + expected_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + expected_running_containers.add(container_name + str(asic_id)) + else: + expected_running_containers.add(container_name) + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + always_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) + + if device_info.is_supervisor() or device_info.is_disaggregated_chassis() or device_info.is_smartswitch(): + always_running_containers.add("database-chassis") + + if device_info.is_smartswitch(): + raw_dpustable = config_db.get_table("DPUS") + for dpu_name in raw_dpustable: + container_name = f"databasedpu{dpu_name.replace('dpu', '')}" + always_running_containers.add(container_name) + + return expected_running_containers, always_running_containers + +def get_current_running_from_DB(always_running_containers): + """ + @summary: This function will get the current running container list + from FEATURE table @ STATE_DB, if this table is available. + @return: a tuple + First: Return value indicating if info can be obtained from + DB or not. + Second: A set which contains the current running containers, + if this info is available in DB. + """ + running_containers = set() + + state_db = swsscommon.DBConnector("STATE_DB", 0) + tbl = swsscommon.Table(state_db, "FEATURE") + if not tbl.getKeys(): + return running_containers + + for name in tbl.getKeys(): + data = dict(tbl.get(name)[1]) + if data.get('container_id'): + running_containers.add(name) + + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + RUNNING = 'running' + for name in always_running_containers: + try: + container = DOCKER_CLIENT.containers.get(name) + container_state = container.attrs.get('State', {}) + if container_state.get('Status', "") == RUNNING: + running_containers.add(name) + except (docker.errors.NotFound, docker.errors.APIError) as err: + print("Failed to get container '{}'. Error: '{}'".format(name, err)) + pass + + return running_containers + +def get_current_running_from_dockers(): + """ + @summary: This function will get all running containers from + the list of docker containers in running state. + If namespace == 'sonic': it's rollout-ed via kubernetes so add io.kubernetes.container.name + If namespace is missing/empty: it's image native container, add ctr.name directly + @return: A set which contains containers that are + in running state. + """ + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + running_containers = set() + + try: + for ctr in DOCKER_CLIENT.containers.list(filters={"status": "running"}): + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + elif not ns: + running_containers.add(ctr.name) + + except docker.errors.APIError as err: + print(f"Failed to retrieve the running container list. Error: '{err}'") + pass + except docker.errors.DockerException as err: + print(f"Docker client error: '{err}'") + pass + return running_containers + +def get_current_running_containers(always_running_containers): + """ + @summary: This function will get the list of currently running containers. + If available in STATE-DB, get from DB else from list of dockers. + + @return: A set of currently running containers. + """ + + current_running_containers = get_current_running_from_DB(always_running_containers) + current_running_containers.update(get_current_running_from_dockers()) + return current_running_containers + + +def publish_events(lst): + events_handle = swsscommon.events_init_publisher(EVENTS_PUBLISHER_SOURCE) + params = swsscommon.FieldValueMap() + + for ctr in lst: + params["ctr_name"] = ctr; + swsscommon.event_publish(events_handle, EVENTS_PUBLISHER_TAG, params) + + swsscommon.events_deinit_publisher(events_handle) + + +def main(): + """ + @summary: This function will compare the difference between the current running containers + and the containers which were expected to run. If containers which were exepcted + to run were not running, then an alerting message will be written into syslog. + """ + expected_running_containers, always_running_containers = get_expected_running_containers() + current_running_containers = get_current_running_containers(always_running_containers) + + expected_running_containers |= always_running_containers + not_running_containers = expected_running_containers.difference(current_running_containers) + if not_running_containers: + publish_events(not_running_containers) + print("Expected containers not running: " + ", ".join(not_running_containers)) + sys.exit(3) + + +if __name__ == "__main__": + main() + sys.exit(0) diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 new file mode 100644 index 00000000000..bf13e6372d8 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 @@ -0,0 +1,17 @@ +[Unit] +Description=RestAPI container +Requires=updategraph.service +After=updategraph.service +BindsTo=sonic.target +After=sonic.target +Before=ntp-config.service + +[Service] +User=root +ExecStartPre=/usr/bin/restapi.sh start +ExecStart=/usr/bin/restapi.sh wait +ExecStop=/usr/bin/restapi.sh stop +RestartSec=30 + +[Install] +WantedBy=sonic.target diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 new file mode 100644 index 00000000000..75e06eafb2a --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 @@ -0,0 +1,17 @@ +[Unit] +Description=RestAPI container +Requires=config-setup.service +After=config-setup.service +BindsTo=sonic.target +After=sonic.target +Before=ntp-config.service + +[Service] +User=root +ExecStartPre=/usr/bin/restapi.sh start +ExecStart=/usr/bin/restapi.sh wait +ExecStop=/usr/bin/restapi.sh stop +RestartSec=30 + +[Install] +WantedBy=sonic.target diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 new file mode 100644 index 00000000000..75e06eafb2a --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 @@ -0,0 +1,17 @@ +[Unit] +Description=RestAPI container +Requires=config-setup.service +After=config-setup.service +BindsTo=sonic.target +After=sonic.target +Before=ntp-config.service + +[Service] +User=root +ExecStartPre=/usr/bin/restapi.sh start +ExecStart=/usr/bin/restapi.sh wait +ExecStop=/usr/bin/restapi.sh stop +RestartSec=30 + +[Install] +WantedBy=sonic.target diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 new file mode 100644 index 00000000000..21bd9786acb --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 @@ -0,0 +1,18 @@ +[Unit] +Description=RestAPI container +Requires=config-setup.service +After=config-setup.service +BindsTo=sonic.target +After=sonic.target + +[Service] +Environment="NUM_DPU=0" +Environment="IS_DPU_DEVICE=false" +User=root +ExecStartPre=/usr/bin/restapi.sh start +ExecStart=/usr/bin/restapi.sh wait +ExecStop=/usr/bin/restapi.sh stop +RestartSec=30 + +[Install] +WantedBy=sonic.target diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 new file mode 100644 index 00000000000..cc91531c0e5 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 @@ -0,0 +1,16 @@ +[Unit] +Description=RestAPI container +Requires=config-setup.service +After=config-setup.service +BindsTo=sonic.target +After=sonic.target + +[Service] +User=root +ExecStartPre=/usr/bin/restapi.sh start +ExecStart=/usr/bin/restapi.sh wait +ExecStop=/usr/bin/restapi.sh stop +RestartSec=30 + +[Install] +WantedBy=sonic.target diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.sh b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.sh new file mode 100644 index 00000000000..690a07311e7 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# Thin wrapper for restapi pod control - uses shared k8s_pod_control.sh +exec /usr/share/sonic/scripts/k8s_pod_control.sh restapi "$@" diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202311 b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202311 new file mode 100755 index 00000000000..b6cd5347db1 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202311 @@ -0,0 +1,242 @@ +#!/bin/bash + +# single instance containers are still supported (even though it might not look like it) +# if no instance number is passed to this script, $DEV will simply be unset, resulting in docker +# commands being sent to the base container name. E.g. `docker start database$DEV` simply starts +# the container `database` if no instance number is passed since `$DEV` is not defined + +function updateSyslogConf() +{ + # On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers + # running on the namespace to reach the rsyslog service running on the host + # Also update the container name + if [[ ($NUM_ASIC -gt 1) ]]; then + TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + CONTAINER_NAME="$DOCKERNAME" + TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf" + sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE + docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf + rm -rf $TMP_FILE + fi +} +function ebtables_config() +{ + if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + # Install ebtables filter in namespaces on multi-asic. + ip netns exec $NET_NS ebtables-restore < /etc/ebtables.filter.cfg + else + if [[ ! ($NUM_ASIC -gt 1) ]]; then + # Install ebtables filter in host for single asic. + ebtables-restore < /etc/ebtables.filter.cfg + fi + fi +} + +function getMountPoint() +{ + echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null +} + +function getBootType() +{ + # same code snippet in files/scripts/syncd.sh + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *) + TYPE='cold' + esac + echo "${TYPE}" +} + +function preStartAction() +{ + : # nothing + updateSyslogConf +} + +function postStartAction() +{ + : # nothing +} + +start() { + # Obtain boot type from kernel arguments + BOOT_TYPE=`getBootType` + + # Obtain our platform as we will mount directories with these names in each docker + PLATFORM=${PLATFORM:-`$SONIC_CFGGEN -H -v DEVICE_METADATA.localhost.platform`} + + + # Parse the device specific asic conf file, if it exists + ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf + if [ -f "$ASIC_CONF" ]; then + source $ASIC_CONF + fi + + # Default rsyslog target IP for single ASIC platform + SYSLOG_TARGET_IP=127.0.0.1 + if [[ ($NUM_ASIC -gt 1) ]]; then + SYSLOG_TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + fi + + PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf + if [ -f "$PLATFORM_ENV_CONF" ]; then + source $PLATFORM_ENV_CONF + fi + # Obtain our HWSKU as we will mount directories with these names in each docker + HWSKU=${HWSKU:-`$SONIC_CFGGEN -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} + MOUNTPATH="/usr/share/sonic/device/$PLATFORM/$HWSKU" + if [ "$DEV" ]; then + MOUNTPATH="$MOUNTPATH/$DEV" + fi + + DOCKERCHECK=`docker inspect --type container ${DOCKERNAME} 2>/dev/null` + if [ "$?" -eq "0" ]; then + DOCKERMOUNT=`getMountPoint "$DOCKERCHECK"` + if [ x"$DOCKERMOUNT" == x"$MOUNTPATH" ]; then + CONTAINER_EXISTS="yes" + preStartAction + echo "Starting existing ${DOCKERNAME} container with HWSKU $HWSKU" + /usr/local/bin/container start ${DOCKERNAME} + postStartAction + exit $? + fi + + # docker created with a different HWSKU, remove and recreate + echo "Removing obsolete ${DOCKERNAME} container with HWSKU $DOCKERMOUNT" + docker rm -f ${DOCKERNAME} + fi + echo "Creating new ${DOCKERNAME} container with HWSKU $HWSKU" + + # In Multi ASIC platforms the global database config file database_global.json will exist. + # Parse the file and get the include path for the database_config.json files used in + # various namesapces. The database_config paths are relative to the DIR of SONIC_DB_GLOBAL_JSON. + SONIC_DB_GLOBAL_JSON="/var/run/redis/sonic-db/database_global.json" + if [ -f "$SONIC_DB_GLOBAL_JSON" ]; then + # TODO Create a separate python script with the below logic and invoke it here. + redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \ + global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \ + print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\ + for elem in data['INCLUDES'] if 'namespace' in elem])); f.close()" $SONIC_DB_GLOBAL_JSON` + fi + + if [[ -z "$DEV" || $DATABASE_TYPE == "dpudb" ]]; then + NET="host" + + # For Multi-ASIC platform we have to mount the redis paths for database instances running in different + # namespaces, into the single instance dockers like snmp, pmon on linux host. These global dockers + # will need to get/set tables from databases in different namespaces. + # /var/run/redis0 ---> mounted as --> /var/run/redis0 + # /var/run/redis1 ---> mounted as --> /var/run/redis1 .. etc + # The below logic extracts the base DIR's where database_config.json's for various namespaces exist. + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + for redis_dir in $redis_dir_list + do + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + done + fi + else + # This part of code is applicable for Multi-ASIC platforms. Here we mount the namespace specific + # redis directory into the docker running in that namespace. Below eg: is for namespace "asic1" + # /var/run/redis1 ---> mounted as --> /var/run/redis1 + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + id=`expr $DEV + 1` + redis_dir=`echo $redis_dir_list | cut -d " " -f $id` + REDIS_MNT=" -v $redis_dir:$redis_dir:rw " + fi + NET="container:database$DEV" + DB_OPT="" + fi + + NAMESPACE_ID="$DEV" + if [[ $DATABASE_TYPE == "dpudb" ]]; then + NAMESPACE_ID="" + fi + + CAP_ADD="" + # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version + docker create -t -v /var/run/redis/redis.sock:/var/run/redis/redis.sock -v /etc/sonic/credentials:/etc/sonic/credentials:ro -p=8081:8081/tcp \ + --net=$NET \ + -e RUNTIME_OWNER=local \ + --uts=host \ + --log-opt max-size=2M --log-opt max-file=5 \ + --tmpfs /tmp \ + -v /var/run/redis$DEV:/var/run/redis:rw \ + -v /var/run/redis-chassis:/var/run/redis-chassis:ro \ + -v /usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV:/usr/share/sonic/hwsku:ro \ + $REDIS_MNT \ + -v /etc/fips/fips_enable:/etc/fips/fips_enable:ro \ + -v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \ + -v /usr/share/sonic/templates/rsyslog-container.conf.j2:/usr/share/sonic/templates/rsyslog-container.conf.j2:ro \ + --tmpfs /var/tmp \ + --env "NAMESPACE_ID"="$NAMESPACE_ID" \ + --env "NAMESPACE_PREFIX"="$NAMESPACE_PREFIX" \ + --env "NAMESPACE_COUNT"="$NUM_ASIC" \ + --env "DEV"="$DEV" \ + --env "CONTAINER_NAME"=$DOCKERNAME \ + --env "SYSLOG_TARGET_IP"=$SYSLOG_TARGET_IP \ + --env "PLATFORM"=$PLATFORM \ + $CAP_ADD \ + --name=$DOCKERNAME \ + docker-sonic-restapi:latest \ + || { + echo "Failed to docker run" >&1 + exit 4 + } + + preStartAction + /usr/local/bin/container start ${DOCKERNAME} + postStartAction +} + +wait() { + /usr/local/bin/container wait $DOCKERNAME +} + +stop() { + /usr/local/bin/container stop $DOCKERNAME +} + +kill() { + /usr/local/bin/container kill $DOCKERNAME +} + +DOCKERNAME=restapi +OP=$1 +DEV=$2 # namespace/device number to operate on +NAMESPACE_PREFIX="asic" +DOCKERNAME=$DOCKERNAME$DEV +CONTAINER_EXISTS="no" +if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace + + SONIC_CFGGEN="sonic-cfggen -n $NET_NS" + SONIC_DB_CLI="sonic-db-cli -n $NET_NS" + else + NET_NS="" + SONIC_CFGGEN="sonic-cfggen" + SONIC_DB_CLI="sonic-db-cli" +fi + +# read SONiC immutable variables +[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment + +case "$1" in + start|wait|stop|kill) + $1 + ;; + *) + echo "Usage: $0 {start namespace(optional)|wait namespace(optional)|stop namespace(optional)}" + exit 1 + ;; +esac diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202405 b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202405 new file mode 100755 index 00000000000..3c6a5bdb4e0 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202405 @@ -0,0 +1,258 @@ +#!/bin/bash + +# single instance containers are still supported (even though it might not look like it) +# if no instance number is passed to this script, $DEV will simply be unset, resulting in docker +# commands being sent to the base container name. E.g. `docker start database$DEV` simply starts +# the container `database` if no instance number is passed since `$DEV` is not defined + +function updateSyslogConf() +{ + # On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers + # running on the namespace to reach the rsyslog service running on the host + # Also update the container name + if [[ ($NUM_ASIC -gt 1) ]]; then + TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + CONTAINER_NAME="$DOCKERNAME" + TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf" + sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE + docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf + rm -rf $TMP_FILE + fi +} +function ebtables_config() +{ + if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + # Install ebtables filter in namespaces on multi-asic. + ip netns exec $NET_NS ebtables-restore < /etc/ebtables.filter.cfg + else + if [[ ! ($NUM_ASIC -gt 1) ]]; then + # Install ebtables filter in host for single asic. + ebtables-restore < /etc/ebtables.filter.cfg + fi + fi +} + +function getMountPoint() +{ + echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null +} + +function getBootType() +{ + # same code snippet in files/scripts/syncd.sh + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *) + TYPE='cold' + esac + echo "${TYPE}" +} + +function preStartAction() +{ + : # nothing + updateSyslogConf +} + +function postStartAction() +{ + : # nothing +} + +start() { + # Obtain boot type from kernel arguments + BOOT_TYPE=`getBootType` + + # Obtain our platform as we will mount directories with these names in each docker + PLATFORM=${PLATFORM:-`$SONIC_CFGGEN -H -v DEVICE_METADATA.localhost.platform`} + + # Parse the device specific asic conf file, if it exists + ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf + if [ -f "$ASIC_CONF" ]; then + source $ASIC_CONF + fi + + # Default rsyslog target IP for single ASIC platform + SYSLOG_TARGET_IP=127.0.0.1 + if [[ ($NUM_ASIC -gt 1) ]]; then + SYSLOG_TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + fi + + PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf + if [ -f "$PLATFORM_ENV_CONF" ]; then + source $PLATFORM_ENV_CONF + fi + + # Parse the platform.json file to get the platform specific information + PLATFORM_JSON=/usr/share/sonic/device/$PLATFORM/platform.json + if [ -f "$PLATFORM_JSON" ]; then + NUM_DPU=$(jq -r '.DPUS | length' $PLATFORM_JSON 2>/dev/null) + jq -e '.DPU' $PLATFORM_JSON >/dev/null + if [[ $? -eq 0 ]]; then + IS_DPU_DEVICE="true" + else + IS_DPU_DEVICE="false" + fi + fi + # Obtain our HWSKU as we will mount directories with these names in each docker + HWSKU=${HWSKU:-`$SONIC_CFGGEN -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} + MOUNTPATH="/usr/share/sonic/device/$PLATFORM/$HWSKU" + if [ "$DEV" ]; then + MOUNTPATH="$MOUNTPATH/$DEV" + fi + + DOCKERCHECK=`docker inspect --type container ${DOCKERNAME} 2>/dev/null` + if [ "$?" -eq "0" ]; then + DOCKERMOUNT=`getMountPoint "$DOCKERCHECK"` + if [ x"$DOCKERMOUNT" == x"$MOUNTPATH" ]; then + CONTAINER_EXISTS="yes" + preStartAction + echo "Starting existing ${DOCKERNAME} container with HWSKU $HWSKU" + /usr/local/bin/container start ${DOCKERNAME} + postStartAction + exit $? + fi + + # docker created with a different HWSKU, remove and recreate + echo "Removing obsolete ${DOCKERNAME} container with HWSKU $DOCKERMOUNT" + docker rm -f ${DOCKERNAME} + fi + echo "Creating new ${DOCKERNAME} container with HWSKU $HWSKU" + + # In Multi ASIC platforms the global database config file database_global.json will exist. + # Parse the file and get the include path for the database_config.json files used in + # various namesapces. The database_config paths are relative to the DIR of SONIC_DB_GLOBAL_JSON. + SONIC_DB_GLOBAL_JSON="/var/run/redis/sonic-db/database_global.json" + if [ -f "$SONIC_DB_GLOBAL_JSON" ]; then + # TODO Create a separate python script with the below logic and invoke it here. + redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \ + global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \ + print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\ + for elem in data['INCLUDES'] if 'namespace' in elem or 'container_name' in elem ])); f.close()" $SONIC_DB_GLOBAL_JSON` + fi + + if [[ -z "$DEV" || $DATABASE_TYPE == "dpudb" ]]; then + NET="host" + + # For Multi-ASIC platform we have to mount the redis paths for database instances running in different + # namespaces, into the single instance dockers like snmp, pmon on linux host. These global dockers + # will need to get/set tables from databases in different namespaces. + # /var/run/redis0 ---> mounted as --> /var/run/redis0 + # /var/run/redis1 ---> mounted as --> /var/run/redis1 .. etc + # The below logic extracts the base DIR's where database_config.json's for various namespaces exist. + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + for redis_dir in $redis_dir_list + do + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + done + fi + else + # This part of code is applicable for Multi-ASIC platforms. Here we mount the namespace specific + # redis directory into the docker running in that namespace. Below eg: is for namespace "asic1" + # /var/run/redis1 ---> mounted as --> /var/run/redis1 + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + id=`expr $DEV + 1` + redis_dir=`echo $redis_dir_list | cut -d " " -f $id` + REDIS_MNT=" -v $redis_dir:$redis_dir:rw " + fi + NET="container:database$DEV" + DB_OPT="" + fi + + NAMESPACE_ID="$DEV" + if [[ $DATABASE_TYPE == "dpudb" ]]; then + NAMESPACE_ID="" + fi + + CAP_ADD="" + # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version + docker create -t -v /var/run/redis/redis.sock:/var/run/redis/redis.sock -v /etc/sonic/credentials:/etc/sonic/credentials:ro -p=8081:8081/tcp \ + --net=$NET \ + -e RUNTIME_OWNER=local \ + --uts=host \ + --log-opt max-size=2M --log-opt max-file=5 \ + --tmpfs /tmp \ + -v /var/run/redis$DEV:/var/run/redis:rw \ + -v /var/run/redis-chassis:/var/run/redis-chassis:ro \ + -v /usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV:/usr/share/sonic/hwsku:ro \ + $REDIS_MNT \ + -v /etc/fips/fips_enable:/etc/fips/fips_enable:ro \ + -v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \ + -v /usr/share/sonic/templates/rsyslog-container.conf.j2:/usr/share/sonic/templates/rsyslog-container.conf.j2:ro \ + --tmpfs /var/tmp \ + --env "NAMESPACE_ID"="$NAMESPACE_ID" \ + --env "NAMESPACE_PREFIX"="$NAMESPACE_PREFIX" \ + --env "NAMESPACE_COUNT"="$NUM_ASIC" \ + --env "DEV"="$DEV" \ + --env "CONTAINER_NAME"=$DOCKERNAME \ + $CAP_ADD \ + --env "SYSLOG_TARGET_IP"=$SYSLOG_TARGET_IP \ + --env "PLATFORM"=$PLATFORM \ + --name=$DOCKERNAME \ + docker-sonic-restapi:latest \ + || { + echo "Failed to docker run" >&1 + exit 4 + } + + preStartAction + /usr/local/bin/container start ${DOCKERNAME} + postStartAction +} + +wait() { + /usr/local/bin/container wait $DOCKERNAME +} + +stop() { + container_id=$(docker ps --filter "name=$DOCKERNAME" --quiet) + if [ -z "$container_id" ]; then + echo "container stop $DOCKERNAME - No such container: $DOCKERNAME" + else + /usr/local/bin/container stop $DOCKERNAME + fi +} + +kill() { + /usr/local/bin/container kill $DOCKERNAME +} + +DOCKERNAME=restapi +OP=$1 +DEV=$2 # namespace/device number to operate on +NAMESPACE_PREFIX="asic" +DOCKERNAME=$DOCKERNAME$DEV +CONTAINER_EXISTS="no" +if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace + + SONIC_CFGGEN="sonic-cfggen -n $NET_NS" + SONIC_DB_CLI="sonic-db-cli -n $NET_NS" + else + NET_NS="" + SONIC_CFGGEN="sonic-cfggen" + SONIC_DB_CLI="sonic-db-cli" +fi + +# read SONiC immutable variables +[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment + +case "$1" in + start|wait|stop|kill) + $1 + ;; + *) + echo "Usage: $0 {start namespace(optional)|wait namespace(optional)|stop namespace(optional)}" + exit 1 + ;; +esac diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202411 b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202411 new file mode 100755 index 00000000000..2376da9d4ef --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202411 @@ -0,0 +1,263 @@ +#!/bin/bash + +# single instance containers are still supported (even though it might not look like it) +# if no instance number is passed to this script, $DEV will simply be unset, resulting in docker +# commands being sent to the base container name. E.g. `docker start database$DEV` simply starts +# the container `database` if no instance number is passed since `$DEV` is not defined + +function updateSyslogConf() +{ + # On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers + # running on the namespace to reach the rsyslog service running on the host + # Also update the container name + if [[ ($NUM_ASIC -gt 1) ]]; then + TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + CONTAINER_NAME="$DOCKERNAME" + TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf" + sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE + docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf + rm -rf $TMP_FILE + fi +} +function ebtables_config() +{ + if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + # Install ebtables filter in namespaces on multi-asic. + ip netns exec $NET_NS ebtables-restore < /etc/ebtables.filter.cfg + else + if [[ ! ($NUM_ASIC -gt 1) ]]; then + # Install ebtables filter in host for single asic. + ebtables-restore < /etc/ebtables.filter.cfg + fi + fi +} + +function getMountPoint() +{ + echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null +} + +function getBootType() +{ + # same code snippet in files/scripts/syncd.sh + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=express*) + TYPE='express' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *) + TYPE='cold' + esac + echo "${TYPE}" +} + +function preStartAction() +{ + : # nothing + updateSyslogConf +} + +function postStartAction() +{ + : # nothing + /etc/resolvconf/update-libc.d/update-containers ${DOCKERNAME} & +} + +start() { + # Obtain boot type from kernel arguments + BOOT_TYPE=`getBootType` + + # Obtain our platform as we will mount directories with these names in each docker + PLATFORM=${PLATFORM:-`$SONIC_CFGGEN -H -v DEVICE_METADATA.localhost.platform`} + + # Parse the device specific asic conf file, if it exists + ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf + if [ -f "$ASIC_CONF" ]; then + source $ASIC_CONF + fi + + # Default rsyslog target IP for single ASIC platform + SYSLOG_TARGET_IP=127.0.0.1 + if [[ ($NUM_ASIC -gt 1) ]]; then + SYSLOG_TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + fi + + PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf + if [ -f "$PLATFORM_ENV_CONF" ]; then + source $PLATFORM_ENV_CONF + fi + + # Parse the platform.json file to get the platform specific information + PLATFORM_JSON=/usr/share/sonic/device/$PLATFORM/platform.json + if [ -f "$PLATFORM_JSON" ]; then + NUM_DPU=$(jq -r '.DPUS | length' $PLATFORM_JSON 2>/dev/null) + jq -e '.DPU' $PLATFORM_JSON >/dev/null + if [[ $? -eq 0 ]]; then + IS_DPU_DEVICE="true" + else + IS_DPU_DEVICE="false" + fi + fi + # Obtain our HWSKU as we will mount directories with these names in each docker + HWSKU=${HWSKU:-`$SONIC_CFGGEN -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} + MOUNTPATH="/usr/share/sonic/device/$PLATFORM/$HWSKU" + if [ "$DEV" ]; then + MOUNTPATH="$MOUNTPATH/$DEV" + fi + + DOCKERCHECK=`docker inspect --type container ${DOCKERNAME} 2>/dev/null` + if [ "$?" -eq "0" ]; then + DOCKERMOUNT=`getMountPoint "$DOCKERCHECK"` + if [ x"$DOCKERMOUNT" == x"$MOUNTPATH" ]; then + CONTAINER_EXISTS="yes" + preStartAction + echo "Starting existing ${DOCKERNAME} container with HWSKU $HWSKU" + /usr/local/bin/container start ${DOCKERNAME} + postStartAction + exit $? + fi + + # docker created with a different HWSKU, remove and recreate + echo "Removing obsolete ${DOCKERNAME} container with HWSKU $DOCKERMOUNT" + docker rm -f ${DOCKERNAME} + fi + echo "Creating new ${DOCKERNAME} container with HWSKU $HWSKU" + + # In Multi ASIC platforms the global database config file database_global.json will exist. + # Parse the file and get the include path for the database_config.json files used in + # various namesapces. The database_config paths are relative to the DIR of SONIC_DB_GLOBAL_JSON. + SONIC_DB_GLOBAL_JSON="/var/run/redis/sonic-db/database_global.json" + if [ -f "$SONIC_DB_GLOBAL_JSON" ]; then + # TODO Create a separate python script with the below logic and invoke it here. + redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \ + global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \ + print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\ + for elem in data['INCLUDES'] if 'namespace' in elem or 'container_name' in elem ])); f.close()" $SONIC_DB_GLOBAL_JSON` + fi + + if [[ -z "$DEV" || $DATABASE_TYPE == "dpudb" ]]; then + NET="host" + + # For Multi-ASIC platform we have to mount the redis paths for database instances running in different + # namespaces, into the single instance dockers like snmp, pmon on linux host. These global dockers + # will need to get/set tables from databases in different namespaces. + # /var/run/redis0 ---> mounted as --> /var/run/redis0 + # /var/run/redis1 ---> mounted as --> /var/run/redis1 .. etc + # The below logic extracts the base DIR's where database_config.json's for various namespaces exist. + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + for redis_dir in $redis_dir_list + do + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + done + fi + else + # This part of code is applicable for Multi-ASIC platforms. Here we mount the namespace specific + # redis directory into the docker running in that namespace. Below eg: is for namespace "asic1" + # /var/run/redis1 ---> mounted as --> /var/run/redis1 + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + id=`expr $DEV + 1` + redis_dir=`echo $redis_dir_list | cut -d " " -f $id` + REDIS_MNT=" -v $redis_dir:$redis_dir:rw " + fi + NET="container:database$DEV" + DB_OPT="" + fi + + NAMESPACE_ID="$DEV" + if [[ $DATABASE_TYPE == "dpudb" ]]; then + NAMESPACE_ID="" + fi + + CAP_ADD="" + # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version + docker create -t -v /var/run/redis/redis.sock:/var/run/redis/redis.sock -v /etc/sonic/credentials:/etc/sonic/credentials:ro -p=8081:8081/tcp \ + --net=$NET \ + -e RUNTIME_OWNER=local \ + --uts=host \ + --tmpfs /var/log/supervisor:rw \ + --log-opt max-size=2M --log-opt max-file=5 \ + --tmpfs /tmp \ + -v /var/run/redis$DEV:/var/run/redis:rw \ + -v /var/run/redis-chassis:/var/run/redis-chassis:ro \ + -v /usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV:/usr/share/sonic/hwsku:ro \ + $REDIS_MNT \ + -v /etc/fips/fips_enable:/etc/fips/fips_enable:ro \ + -v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \ + -v /usr/share/sonic/templates/rsyslog-container.conf.j2:/usr/share/sonic/templates/rsyslog-container.conf.j2:ro \ + --tmpfs /var/tmp \ + --env "NAMESPACE_ID"="$NAMESPACE_ID" \ + --env "NAMESPACE_PREFIX"="$NAMESPACE_PREFIX" \ + --env "NAMESPACE_COUNT"="$NUM_ASIC" \ + --env "DEV"="$DEV" \ + --env "CONTAINER_NAME"=$DOCKERNAME \ + $CAP_ADD \ + --env "SYSLOG_TARGET_IP"=$SYSLOG_TARGET_IP \ + --env "PLATFORM"=$PLATFORM \ + --name=$DOCKERNAME \ + docker-sonic-restapi:latest \ + || { + echo "Failed to docker run" >&1 + exit 4 + } + + preStartAction + /usr/local/bin/container start ${DOCKERNAME} + postStartAction +} + +wait() { + /usr/local/bin/container wait $DOCKERNAME +} + +stop() { + container_id=$(docker ps --filter "name=$DOCKERNAME" --quiet) + if [ -z "$container_id" ]; then + echo "container stop $DOCKERNAME - No such container: $DOCKERNAME" + else + /usr/local/bin/container stop $DOCKERNAME + fi +} + +kill() { + /usr/local/bin/container kill $DOCKERNAME +} + +DOCKERNAME=restapi +OP=$1 +DEV=$2 # namespace/device number to operate on +NAMESPACE_PREFIX="asic" +DOCKERNAME=$DOCKERNAME$DEV +CONTAINER_EXISTS="no" +if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace + + SONIC_CFGGEN="sonic-cfggen -n $NET_NS" + SONIC_DB_CLI="sonic-db-cli -n $NET_NS" + else + NET_NS="" + SONIC_CFGGEN="sonic-cfggen" + SONIC_DB_CLI="sonic-db-cli" +fi + +# read SONiC immutable variables +[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment + +case "$1" in + start|wait|stop|kill) + $1 + ;; + *) + echo "Usage: $0 {start namespace(optional)|wait namespace(optional)|stop namespace(optional)}" + exit 1 + ;; +esac diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202505 b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202505 new file mode 100755 index 00000000000..fd48a377857 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202505 @@ -0,0 +1,252 @@ +#!/bin/bash + +# single instance containers are still supported (even though it might not look like it) +# if no instance number is passed to this script, $DEV will simply be unset, resulting in docker +# commands being sent to the base container name. E.g. `docker start database$DEV` simply starts +# the container `database` if no instance number is passed since `$DEV` is not defined + +function updateSyslogConf() +{ + # On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers + # running on the namespace to reach the rsyslog service running on the host + # Also update the container name + if [[ ($NUM_ASIC -gt 1) ]]; then + TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + CONTAINER_NAME="$DOCKERNAME" + TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf" + sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE + docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf + rm -rf $TMP_FILE + fi +} +function ebtables_config() +{ + if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + # Install ebtables filter in namespaces on multi-asic. + ip netns exec $NET_NS ebtables-restore < /etc/ebtables.filter.cfg + else + if [[ ! ($NUM_ASIC -gt 1) ]]; then + # Install ebtables filter in host for single asic. + ebtables-restore < /etc/ebtables.filter.cfg + fi + fi +} + +function getMountPoint() +{ + echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null +} + +function getBootType() +{ + # same code snippet in files/scripts/syncd.sh + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=express*) + TYPE='express' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *) + TYPE='cold' + esac + echo "${TYPE}" +} + +function preStartAction() +{ + : # nothing + updateSyslogConf +} + +function postStartAction() +{ + : # nothing + /etc/resolvconf/update-libc.d/update-containers ${DOCKERNAME} & +} + +start() { + # Obtain boot type from kernel arguments + BOOT_TYPE=`getBootType` + + # Obtain our platform as we will mount directories with these names in each docker + PLATFORM=${PLATFORM:-`$SONIC_CFGGEN -H -v DEVICE_METADATA.localhost.platform`} + + # Parse the device specific asic conf file, if it exists + ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf + if [ -f "$ASIC_CONF" ]; then + source $ASIC_CONF + fi + + # Default rsyslog target IP for single ASIC platform + SYSLOG_TARGET_IP=127.0.0.1 + if [[ ($NUM_ASIC -gt 1) ]]; then + SYSLOG_TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + fi + + PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf + if [ -f "$PLATFORM_ENV_CONF" ]; then + source $PLATFORM_ENV_CONF + fi + # Obtain our HWSKU as we will mount directories with these names in each docker + HWSKU=${HWSKU:-`$SONIC_CFGGEN -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} + MOUNTPATH="/usr/share/sonic/device/$PLATFORM/$HWSKU" + if [ "$DEV" ]; then + MOUNTPATH="$MOUNTPATH/$DEV" + fi + + DOCKERCHECK=`docker inspect --type container ${DOCKERNAME} 2>/dev/null` + if [ "$?" -eq "0" ]; then + DOCKERMOUNT=`getMountPoint "$DOCKERCHECK"` + if [ x"$DOCKERMOUNT" == x"$MOUNTPATH" ]; then + CONTAINER_EXISTS="yes" + preStartAction + echo "Starting existing ${DOCKERNAME} container with HWSKU $HWSKU" + /usr/local/bin/container start ${DOCKERNAME} + postStartAction + exit $? + fi + + # docker created with a different HWSKU, remove and recreate + echo "Removing obsolete ${DOCKERNAME} container with HWSKU $DOCKERMOUNT" + docker rm -f ${DOCKERNAME} + fi + echo "Creating new ${DOCKERNAME} container with HWSKU $HWSKU" + + # In Multi ASIC platforms the global database config file database_global.json will exist. + # Parse the file and get the include path for the database_config.json files used in + # various namesapces. The database_config paths are relative to the DIR of SONIC_DB_GLOBAL_JSON. + SONIC_DB_GLOBAL_JSON="/var/run/redis/sonic-db/database_global.json" + if [ -f "$SONIC_DB_GLOBAL_JSON" ]; then + # TODO Create a separate python script with the below logic and invoke it here. + redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \ + global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \ + print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\ + for elem in data['INCLUDES'] if 'namespace' in elem or 'container_name' in elem ])); f.close()" $SONIC_DB_GLOBAL_JSON` + fi + REDIS_MNT="-v /var/run/redis$DEV:/var/run/redis:rw" + + if [[ -z "$DEV" || $DATABASE_TYPE == "dpudb" ]]; then + NET="host" + + # For Multi-ASIC platform we have to mount the redis paths for database instances running in different + # namespaces, into the single instance dockers like snmp, pmon on linux host. These global dockers + # will need to get/set tables from databases in different namespaces. + # /var/run/redis0 ---> mounted as --> /var/run/redis0 + # /var/run/redis1 ---> mounted as --> /var/run/redis1 .. etc + # The below logic extracts the base DIR's where database_config.json's for various namespaces exist. + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + + if [ -n "$redis_dir_list" ]; then + for redis_dir in $redis_dir_list + do + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + done + fi + else + # This part of code is applicable for Multi-ASIC platforms. Here we mount the namespace specific + # redis directory into the docker running in that namespace. Below eg: is for namespace "asic1" + # /var/run/redis1 ---> mounted as --> /var/run/redis1 + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + id=`expr $DEV + 1` + redis_dir=`echo $redis_dir_list | cut -d " " -f $id` + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + fi + NET="container:database$DEV" + DB_OPT="" + fi + + NAMESPACE_ID="$DEV" + if [[ $DATABASE_TYPE == "dpudb" ]]; then + NAMESPACE_ID="" + fi + + CAP_ADD="" + # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version + docker create -t -v /var/run/redis/redis.sock:/var/run/redis/redis.sock -v /etc/sonic/credentials:/etc/sonic/credentials:ro -p=8081:8081/tcp \ + --net=$NET \ + -e RUNTIME_OWNER=local \ + --uts=host \ + --tmpfs /var/log/supervisor:rw \ + --log-opt max-size=2M --log-opt max-file=5 \ + --tmpfs /tmp \ + -v /var/run/redis-chassis:/var/run/redis-chassis:ro \ + -v /usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV:/usr/share/sonic/hwsku:ro \ + $REDIS_MNT \ + -v /etc/fips/fips_enable:/etc/fips/fips_enable:ro \ + -v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:rw \ + -v /usr/share/sonic/templates/rsyslog-container.conf.j2:/usr/share/sonic/templates/rsyslog-container.conf.j2:ro \ + --tmpfs /var/tmp \ + --env "NAMESPACE_ID"="$NAMESPACE_ID" \ + --env "NAMESPACE_PREFIX"="$NAMESPACE_PREFIX" \ + --env "NAMESPACE_COUNT"="$NUM_ASIC" \ + --env "DEV"="$DEV" \ + --env "CONTAINER_NAME"=$DOCKERNAME \ + $CAP_ADD \ + --env "SYSLOG_TARGET_IP"=$SYSLOG_TARGET_IP \ + --env "PLATFORM"=$PLATFORM \ + --name=$DOCKERNAME \ + docker-sonic-restapi:latest \ + || { + echo "Failed to docker run" >&1 + exit 4 + } + + preStartAction + /usr/local/bin/container start ${DOCKERNAME} + postStartAction +} + +wait() { + /usr/local/bin/container wait $DOCKERNAME +} + +stop() { + container_id=$(docker ps --filter "name=$DOCKERNAME" --quiet) + if [ -z "$container_id" ]; then + echo "container stop $DOCKERNAME - No such container: $DOCKERNAME" + else + /usr/local/bin/container stop $DOCKERNAME + fi +} + +kill() { + /usr/local/bin/container kill $DOCKERNAME +} + +DOCKERNAME=restapi +OP=$1 +DEV=$2 # namespace/device number to operate on +NAMESPACE_PREFIX="asic" +DOCKERNAME=$DOCKERNAME$DEV +CONTAINER_EXISTS="no" +if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace + + SONIC_CFGGEN="sonic-cfggen -n $NET_NS" + SONIC_DB_CLI="sonic-db-cli -n $NET_NS" + else + NET_NS="" + SONIC_CFGGEN="sonic-cfggen" + SONIC_DB_CLI="sonic-db-cli" +fi + +# read SONiC immutable variables +[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment + +case "$1" in + start|wait|stop|kill) + $1 + ;; + *) + echo "Usage: $0 {start namespace(optional)|wait namespace(optional)|stop namespace(optional)}" + exit 1 + ;; +esac diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202511 b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202511 new file mode 100755 index 00000000000..fd48a377857 --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_scripts/v1/restapi.sh_202511 @@ -0,0 +1,252 @@ +#!/bin/bash + +# single instance containers are still supported (even though it might not look like it) +# if no instance number is passed to this script, $DEV will simply be unset, resulting in docker +# commands being sent to the base container name. E.g. `docker start database$DEV` simply starts +# the container `database` if no instance number is passed since `$DEV` is not defined + +function updateSyslogConf() +{ + # On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers + # running on the namespace to reach the rsyslog service running on the host + # Also update the container name + if [[ ($NUM_ASIC -gt 1) ]]; then + TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + CONTAINER_NAME="$DOCKERNAME" + TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf" + sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE + docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf + rm -rf $TMP_FILE + fi +} +function ebtables_config() +{ + if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + # Install ebtables filter in namespaces on multi-asic. + ip netns exec $NET_NS ebtables-restore < /etc/ebtables.filter.cfg + else + if [[ ! ($NUM_ASIC -gt 1) ]]; then + # Install ebtables filter in host for single asic. + ebtables-restore < /etc/ebtables.filter.cfg + fi + fi +} + +function getMountPoint() +{ + echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print('' if len(mnts) == 0 else os.path.abspath(mnts[0]['Source']))" 2>/dev/null +} + +function getBootType() +{ + # same code snippet in files/scripts/syncd.sh + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=express*) + TYPE='express' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *) + TYPE='cold' + esac + echo "${TYPE}" +} + +function preStartAction() +{ + : # nothing + updateSyslogConf +} + +function postStartAction() +{ + : # nothing + /etc/resolvconf/update-libc.d/update-containers ${DOCKERNAME} & +} + +start() { + # Obtain boot type from kernel arguments + BOOT_TYPE=`getBootType` + + # Obtain our platform as we will mount directories with these names in each docker + PLATFORM=${PLATFORM:-`$SONIC_CFGGEN -H -v DEVICE_METADATA.localhost.platform`} + + # Parse the device specific asic conf file, if it exists + ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf + if [ -f "$ASIC_CONF" ]; then + source $ASIC_CONF + fi + + # Default rsyslog target IP for single ASIC platform + SYSLOG_TARGET_IP=127.0.0.1 + if [[ ($NUM_ASIC -gt 1) ]]; then + SYSLOG_TARGET_IP=$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}') + fi + + PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf + if [ -f "$PLATFORM_ENV_CONF" ]; then + source $PLATFORM_ENV_CONF + fi + # Obtain our HWSKU as we will mount directories with these names in each docker + HWSKU=${HWSKU:-`$SONIC_CFGGEN -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`} + MOUNTPATH="/usr/share/sonic/device/$PLATFORM/$HWSKU" + if [ "$DEV" ]; then + MOUNTPATH="$MOUNTPATH/$DEV" + fi + + DOCKERCHECK=`docker inspect --type container ${DOCKERNAME} 2>/dev/null` + if [ "$?" -eq "0" ]; then + DOCKERMOUNT=`getMountPoint "$DOCKERCHECK"` + if [ x"$DOCKERMOUNT" == x"$MOUNTPATH" ]; then + CONTAINER_EXISTS="yes" + preStartAction + echo "Starting existing ${DOCKERNAME} container with HWSKU $HWSKU" + /usr/local/bin/container start ${DOCKERNAME} + postStartAction + exit $? + fi + + # docker created with a different HWSKU, remove and recreate + echo "Removing obsolete ${DOCKERNAME} container with HWSKU $DOCKERMOUNT" + docker rm -f ${DOCKERNAME} + fi + echo "Creating new ${DOCKERNAME} container with HWSKU $HWSKU" + + # In Multi ASIC platforms the global database config file database_global.json will exist. + # Parse the file and get the include path for the database_config.json files used in + # various namesapces. The database_config paths are relative to the DIR of SONIC_DB_GLOBAL_JSON. + SONIC_DB_GLOBAL_JSON="/var/run/redis/sonic-db/database_global.json" + if [ -f "$SONIC_DB_GLOBAL_JSON" ]; then + # TODO Create a separate python script with the below logic and invoke it here. + redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \ + global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \ + print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\ + for elem in data['INCLUDES'] if 'namespace' in elem or 'container_name' in elem ])); f.close()" $SONIC_DB_GLOBAL_JSON` + fi + REDIS_MNT="-v /var/run/redis$DEV:/var/run/redis:rw" + + if [[ -z "$DEV" || $DATABASE_TYPE == "dpudb" ]]; then + NET="host" + + # For Multi-ASIC platform we have to mount the redis paths for database instances running in different + # namespaces, into the single instance dockers like snmp, pmon on linux host. These global dockers + # will need to get/set tables from databases in different namespaces. + # /var/run/redis0 ---> mounted as --> /var/run/redis0 + # /var/run/redis1 ---> mounted as --> /var/run/redis1 .. etc + # The below logic extracts the base DIR's where database_config.json's for various namespaces exist. + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + + if [ -n "$redis_dir_list" ]; then + for redis_dir in $redis_dir_list + do + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + done + fi + else + # This part of code is applicable for Multi-ASIC platforms. Here we mount the namespace specific + # redis directory into the docker running in that namespace. Below eg: is for namespace "asic1" + # /var/run/redis1 ---> mounted as --> /var/run/redis1 + # redis_dir_list is a string of form "/var/run/redis0/ /var/run/redis1/ /var/run/redis2/" + if [ -n "$redis_dir_list" ]; then + id=`expr $DEV + 1` + redis_dir=`echo $redis_dir_list | cut -d " " -f $id` + REDIS_MNT=$REDIS_MNT" -v $redis_dir:$redis_dir:rw " + fi + NET="container:database$DEV" + DB_OPT="" + fi + + NAMESPACE_ID="$DEV" + if [[ $DATABASE_TYPE == "dpudb" ]]; then + NAMESPACE_ID="" + fi + + CAP_ADD="" + # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version + docker create -t -v /var/run/redis/redis.sock:/var/run/redis/redis.sock -v /etc/sonic/credentials:/etc/sonic/credentials:ro -p=8081:8081/tcp \ + --net=$NET \ + -e RUNTIME_OWNER=local \ + --uts=host \ + --tmpfs /var/log/supervisor:rw \ + --log-opt max-size=2M --log-opt max-file=5 \ + --tmpfs /tmp \ + -v /var/run/redis-chassis:/var/run/redis-chassis:ro \ + -v /usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV:/usr/share/sonic/hwsku:ro \ + $REDIS_MNT \ + -v /etc/fips/fips_enable:/etc/fips/fips_enable:ro \ + -v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:rw \ + -v /usr/share/sonic/templates/rsyslog-container.conf.j2:/usr/share/sonic/templates/rsyslog-container.conf.j2:ro \ + --tmpfs /var/tmp \ + --env "NAMESPACE_ID"="$NAMESPACE_ID" \ + --env "NAMESPACE_PREFIX"="$NAMESPACE_PREFIX" \ + --env "NAMESPACE_COUNT"="$NUM_ASIC" \ + --env "DEV"="$DEV" \ + --env "CONTAINER_NAME"=$DOCKERNAME \ + $CAP_ADD \ + --env "SYSLOG_TARGET_IP"=$SYSLOG_TARGET_IP \ + --env "PLATFORM"=$PLATFORM \ + --name=$DOCKERNAME \ + docker-sonic-restapi:latest \ + || { + echo "Failed to docker run" >&1 + exit 4 + } + + preStartAction + /usr/local/bin/container start ${DOCKERNAME} + postStartAction +} + +wait() { + /usr/local/bin/container wait $DOCKERNAME +} + +stop() { + container_id=$(docker ps --filter "name=$DOCKERNAME" --quiet) + if [ -z "$container_id" ]; then + echo "container stop $DOCKERNAME - No such container: $DOCKERNAME" + else + /usr/local/bin/container stop $DOCKERNAME + fi +} + +kill() { + /usr/local/bin/container kill $DOCKERNAME +} + +DOCKERNAME=restapi +OP=$1 +DEV=$2 # namespace/device number to operate on +NAMESPACE_PREFIX="asic" +DOCKERNAME=$DOCKERNAME$DEV +CONTAINER_EXISTS="no" +if [[ "$DEV" && $DATABASE_TYPE != "dpudb" ]]; then + NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace + + SONIC_CFGGEN="sonic-cfggen -n $NET_NS" + SONIC_DB_CLI="sonic-db-cli -n $NET_NS" + else + NET_NS="" + SONIC_CFGGEN="sonic-cfggen" + SONIC_DB_CLI="sonic-db-cli" +fi + +# read SONiC immutable variables +[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment + +case "$1" in + start|wait|stop|kill) + $1 + ;; + *) + echo "Usage: $0 {start namespace(optional)|wait namespace(optional)|stop namespace(optional)}" + exit 1 + ;; +esac diff --git a/dockers/docker-restapi-sidecar/systemd_stub.py b/dockers/docker-restapi-sidecar/systemd_stub.py new file mode 100644 index 00000000000..da7bd9e41fa --- /dev/null +++ b/dockers/docker-restapi-sidecar/systemd_stub.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import os +import re +import subprocess +import time +import argparse +import traceback +from typing import List + +from sonic_py_common.sidecar_common import ( + get_bool_env_var, logger, SyncItem, + sync_items, SYNC_INTERVAL_S +) + +# ───────────── restapi.service sync paths ───────────── +HOST_RESTAPI_SERVICE = "/lib/systemd/system/restapi.service" + +IS_V1_ENABLED = get_bool_env_var("IS_V1_ENABLED", default=False) + +logger.log_notice(f"IS_V1_ENABLED={IS_V1_ENABLED}") + + +def _get_branch_name() -> str: + """ + Extract branch name from SONiC version at runtime. + Follows the logic from sonic-mgmt/tests/test_pretest.py get_asic_and_branch_name(). + + Supported patterns: + 1. Master: [SONiC.]master.921927-18199d73f -> returns "master" + 2. Internal: [SONiC.]internal.135691748-dbb8d29985 -> returns "internal" + 3. Official feature branch: [SONiC.]YYYYMMDD.XX -> returns YYYYMM (e.g., 202505) + 4. Private/unmatched: returns "private" + """ + version = "" + try: + # Try reading from sonic_version.yml + version_file = "/etc/sonic/sonic_version.yml" + if os.path.exists(version_file): + with open(version_file, 'r') as f: + for line in f: + if 'build_version:' in line.lower(): + version = line.split(':', 1)[1].strip().strip('"\'') + break + + if not version: + # Fallback: try nsenter to host + result = subprocess.run( + ["nsenter", "-t", "1", "-m", "-u", "-i", "-n", "sonic-cfggen", "-y", "/etc/sonic/sonic_version.yml", "-v", "build_version"], + capture_output=True, text=True, timeout=5 + ) + if result.returncode == 0: + version = result.stdout.strip().strip('"\'') + except Exception as e: + logger.log_warning(f"Failed to read SONiC version: {e}") + version = "" + + if not version: + logger.log_error("No SONiC version found") + return "private" + + # Pattern 1: Master - [SONiC.]master.XXXXXX-XXXXXXXX + master_pattern = re.compile(r'^(?:SONiC\.)?master\.\d+-[a-f0-9]+$', re.IGNORECASE) + if master_pattern.match(version): + logger.log_notice(f"Detected master branch from version: {version}") + return "master" + + # Pattern 2: Internal - [SONiC.]internal.XXXXXXXXX-XXXXXXXXXX + elif re.match(r'^(?:SONiC\.)?internal\.\d+-[a-f0-9]+$', version, re.IGNORECASE): + logger.log_notice(f"Detected internal branch from version: {version}") + return "internal" + + # Pattern 3: Official feature branch - [SONiC.]YYYYMMDD.* (e.g., 20241110.kw.24) + elif re.match(r'^(?:SONiC\.)?\d{8}\b', version, re.IGNORECASE): + date_match = re.search(r'^(?:SONiC\.)?(\d{4})(\d{2})\d{2}\b', version, re.IGNORECASE) + if date_match: + year, month = date_match.groups() + branch = f"{year}{month}" + logger.log_notice(f"Detected branch {branch} from version: {version}") + return branch + else: + logger.log_warning(f"Failed to parse date from version: {version}") + return "private" + + # Pattern 4: Private image or unmatched pattern + else: + logger.log_notice(f"Unmatched version pattern (private): {version}") + return "private" + +POST_COPY_ACTIONS = { + "/lib/systemd/system/restapi.service": [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "restapi"], + ], + "/usr/bin/restapi.sh": [ + ["sudo", "docker", "stop", "restapi"], + ["sudo", "docker", "rm", "restapi"], + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "restapi"], + ], + "/bin/container_checker": [ + ["sudo", "systemctl", "daemon-reload"], + ["sudo", "systemctl", "restart", "monit"], + ], +} + + +def ensure_sync() -> bool: + # Evaluate branch and source paths each time to allow retry on runtime failures + branch_name = _get_branch_name() + + # Map to available branch-specific files: {202311,202405,202411,202505,202511} + if branch_name not in ["202311", "202405", "202411", "202505", "202511"]: + logger.log_error(f"Unsupported branch: {branch_name}. Only 202311, 202405, 202411, 202505, 202511 are supported.") + return False + + # restapi.sh: per-branch when IS_V1_ENABLED, otherwise use common restapi.sh + restapi_src = ( + f"/usr/share/sonic/systemd_scripts/v1/restapi.sh_{branch_name}" + if IS_V1_ENABLED + else "/usr/share/sonic/systemd_scripts/restapi.sh" + ) + + container_checker_src = f"/usr/share/sonic/systemd_scripts/container_checker_{branch_name}" + container_restapi_service = f"/usr/share/sonic/systemd_scripts/restapi.service_{branch_name}" + + # Construct SYNC_ITEMS with evaluated paths + sync_items_list: List[SyncItem] = [ + SyncItem(restapi_src, "/usr/bin/restapi.sh", mode=0o755), + SyncItem(container_checker_src, "/bin/container_checker", mode=0o755), + SyncItem("/usr/share/sonic/scripts/k8s_pod_control.sh", "/usr/share/sonic/scripts/k8s_pod_control.sh", mode=0o755), + SyncItem(container_restapi_service, HOST_RESTAPI_SERVICE, mode=0o644), + ] + return sync_items(sync_items_list, POST_COPY_ACTIONS) + +def parse_args() -> argparse.Namespace: + p = argparse.ArgumentParser( + description="Sync host scripts from this container to the host via nsenter (syslog logging)." + ) + p.add_argument("--once", action="store_true", help="Run one sync pass and exit") + p.add_argument( + "--interval", + type=int, + default=SYNC_INTERVAL_S, + help=f"Loop interval seconds (default: {SYNC_INTERVAL_S})", + ) + p.add_argument( + "--no-post-actions", + action="store_true", + help="(Optional) Skip host systemctl actions (for debugging)", + ) + return p.parse_args() + + +def main() -> int: + args = parse_args() + if args.no_post_actions: + POST_COPY_ACTIONS.clear() + logger.log_info("Post-copy host actions DISABLED for this run") + + try: + ok = ensure_sync() + if not ok: + logger.log_error("Initial sync failed.") + except Exception as e: + logger.log_error(f"Initial sync failed: {e}") + logger.log_error(f"Traceback: {traceback.format_exc()}") + ok = False + + if args.once: + return 0 if ok else 1 + while True: + try: + time.sleep(args.interval) + ok = ensure_sync() + if not ok: + logger.log_error("Sync failed. Will retry in next iteration.") + except Exception as e: + logger.log_error(f"Sync loop iteration failed: {e}. Will retry in {args.interval} seconds.") + logger.log_error(f"Traceback: {traceback.format_exc()}") + # Continue to next iteration rather than crashing + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/dockers/docker-auditd-watchdog/Dockerfile.j2 b/dockers/docker-restapi-watchdog/Dockerfile.j2 similarity index 62% rename from dockers/docker-auditd-watchdog/Dockerfile.j2 rename to dockers/docker-restapi-watchdog/Dockerfile.j2 index d692e3f5193..68d807eea37 100644 --- a/dockers/docker-auditd-watchdog/Dockerfile.j2 +++ b/dockers/docker-restapi-watchdog/Dockerfile.j2 @@ -1,7 +1,4 @@ -{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files, rsync_from_builder_stage %} -ARG BASE=docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} - -FROM $BASE AS builder +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} AS builder # Update apt's cache of available packages RUN apt-get update && apt-get install -y \ @@ -21,7 +18,7 @@ COPY watchdog/ ./ # Build from within /watchdog RUN cargo build --release -FROM $BASE AS base +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG image_version @@ -34,17 +31,7 @@ ENV IMAGE_VERSION=$image_version COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] # Copy the compiled Rust binary from the builder stage -COPY --from=builder /watchdog/target/release/watchdog /usr/bin/auditd_watchdog -RUN chmod +x /usr/bin/auditd_watchdog - -FROM $BASE - -{{ rsync_from_builder_stage() }} - -# Make apt-get non-interactive -ENV DEBIAN_FRONTEND=noninteractive - -# Pass the image_version to container -ENV IMAGE_VERSION=$image_version +COPY --from=builder /watchdog/target/release/watchdog /usr/bin/restapi_watchdog +RUN chmod +x /usr/bin/restapi_watchdog ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-auditd-watchdog/supervisord.conf b/dockers/docker-restapi-watchdog/supervisord.conf similarity index 91% rename from dockers/docker-auditd-watchdog/supervisord.conf rename to dockers/docker-restapi-watchdog/supervisord.conf index e49ec9ef41c..f4cf03b2d61 100644 --- a/dockers/docker-auditd-watchdog/supervisord.conf +++ b/dockers/docker-restapi-watchdog/supervisord.conf @@ -23,8 +23,8 @@ stderr_logfile=NONE stderr_syslog=true dependent_startup=true -[program:auditd_watchdog] -command=/usr/bin/auditd_watchdog +[program:restapi_watchdog] +command=/usr/bin/restapi_watchdog priority=3 autostart=false autorestart=false diff --git a/dockers/docker-auditd-watchdog/watchdog/Cargo.toml b/dockers/docker-restapi-watchdog/watchdog/Cargo.toml similarity index 53% rename from dockers/docker-auditd-watchdog/watchdog/Cargo.toml rename to dockers/docker-restapi-watchdog/watchdog/Cargo.toml index 3b81e1ce82a..7bf0047377a 100644 --- a/dockers/docker-auditd-watchdog/watchdog/Cargo.toml +++ b/dockers/docker-restapi-watchdog/watchdog/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -regex = "1.11.1" -serde_json = "1.0.140" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" diff --git a/dockers/docker-auditd-watchdog/watchdog/Makefile b/dockers/docker-restapi-watchdog/watchdog/Makefile similarity index 100% rename from dockers/docker-auditd-watchdog/watchdog/Makefile rename to dockers/docker-restapi-watchdog/watchdog/Makefile diff --git a/dockers/docker-restapi-watchdog/watchdog/src/main.rs b/dockers/docker-restapi-watchdog/watchdog/src/main.rs new file mode 100644 index 00000000000..115d19b7e3f --- /dev/null +++ b/dockers/docker-restapi-watchdog/watchdog/src/main.rs @@ -0,0 +1,79 @@ +use std::io::{BufRead, BufReader, Write}; +use std::net::{TcpListener, TcpStream}; +use std::time::Duration; + +use serde::Serialize; + +#[derive(serde::Serialize)] +struct HealthStatus { + restapi_status: String, +} + +// Check restapi program status +fn check_restapi_status() -> String { + let restapi_https_port = 8081; + let addr = format!("127.0.0.1:{}", restapi_https_port); + let timeout = Duration::from_secs(5); + + match TcpStream::connect_timeout(&addr.parse().unwrap(), timeout) { + Ok(_) => "OK".to_string(), + Err(e) => format!("ERROR: {}", e), + } +} + +fn main() { + let watchdog_port = 50100; + // Start a HTTP server listening on port 50100 + let listener = TcpListener::bind(format!("127.0.0.1:{}", watchdog_port)) + .expect(&format!("Failed to bind to 127.0.0.1:{}", watchdog_port)); + + println!("Watchdog HTTP server running on http://127.0.0.1:{}", watchdog_port); + + for stream_result in listener.incoming() { + match stream_result { + Ok(mut stream) => { + let mut reader = BufReader::new(&stream); + let mut request_line = String::new(); + + if let Ok(_) = reader.read_line(&mut request_line) { + println!("Received request: {}", request_line.trim_end()); + + if !request_line.starts_with("GET /") { + let response = "HTTP/1.1 405 Method Not Allowed\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"; + if let Err(e) = stream.write_all(response.as_bytes()) { + eprintln!("Failed to write response: {}", e); + } + continue; + } + + let restapi_result = check_restapi_status(); + + let status = HealthStatus { + restapi_status: restapi_result, + }; + + // Build a JSON object + let json_body = serde_json::to_string(&status).unwrap(); + + let (status_line, content_length) = if status.restapi_status == "OK" { + ("HTTP/1.1 200 OK", json_body.len()) + } else { + ("HTTP/1.1 500 Internal Server Error", json_body.len()) + }; + + let response = format!( + "{status_line}\r\nContent-Type: application/json\r\nContent-Length: {content_length}\ + \r\nConnection: close\r\n\r\n{json_body}" + ); + + if let Err(e) = stream.write_all(response.as_bytes()) { + eprintln!("Failed to write response: {}", e); + } + } + } + Err(e) => { + eprintln!("Error accepting connection: {}", e); + } + } + } +} diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 2bcbbd94b29..df60b1bcd4e 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -127,6 +127,7 @@ RUN pip install --no-cache-dir \ tabulate \ textfsm \ thrift \ + kubernetes \ && wget https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.1.tar.gz \ && tar xvfz 1.2.1.tar.gz \ && cd nanomsg-1.2.1 \ diff --git a/dockers/docker-sonic-otel/Dockerfile.j2 b/dockers/docker-sonic-otel/Dockerfile.j2 index 8c2af9c772f..5722db6632c 100644 --- a/dockers/docker-sonic-otel/Dockerfile.j2 +++ b/dockers/docker-sonic-otel/Dockerfile.j2 @@ -1,4 +1,4 @@ -{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} +{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files, rsync_from_builder_stage %} ARG BASE=docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} FROM $BASE AS base @@ -29,7 +29,7 @@ RUN apt-get install -y \ wget # Install OpenTelemetry Collector from official .deb package -ARG OTEL_VERSION=0.114.0 +ARG OTEL_VERSION=0.144.0 # Download and install official .deb package with architecture-specific logic {% if CONFIGURED_ARCH == "armhf" %} @@ -62,7 +62,7 @@ COPY ["critical_processes", "/etc/supervisor"] FROM $BASE -RUN --mount=type=bind,from=base,target=/changes-to-image rsync -axAX --no-D --exclude=/sys --exclude=/proc --exclude=/dev --exclude=resolv.conf /changes-to-image/ / +{{ rsync_from_builder_stage() }} ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive diff --git a/dockers/docker-sonic-otel/base_image_files/monit_otel b/dockers/docker-sonic-otel/base_image_files/monit_otel index 913a0728e57..1db285b2ca9 100644 --- a/dockers/docker-sonic-otel/base_image_files/monit_otel +++ b/dockers/docker-sonic-otel/base_image_files/monit_otel @@ -1,5 +1,5 @@ ############################################################################### ## Monit configuration for otel container ############################################################################### -check program container_memory_telemetry with path "/usr/bin/memory_checker otel 419430400" +check program container_memory_otel with path "/usr/bin/memory_checker otel 419430400" if status == 3 for 10 times within 20 cycles then exec "/usr/bin/restart_service otel" repeat every 2 cycles diff --git a/dockers/docker-sonic-otel/supervisord.conf b/dockers/docker-sonic-otel/supervisord.conf index c9e336b20fa..f7cf7d91c0d 100644 --- a/dockers/docker-sonic-otel/supervisord.conf +++ b/dockers/docker-sonic-otel/supervisord.conf @@ -13,7 +13,7 @@ events=PROCESS_STATE buffer_size=1024 [eventlistener:supervisor-proc-exit-listener] -command=/usr/local/bin/supervisor-proc-exit-listener --container-name otel +command=/usr/bin/supervisor-proc-exit-listener-rs --container-name otel events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING autostart=true autorestart=unexpected diff --git a/dockers/docker-sonic-p4rt/p4rt.sh b/dockers/docker-sonic-p4rt/p4rt.sh index 687cf6f50dc..ad5451bca90 100755 --- a/dockers/docker-sonic-p4rt/p4rt.sh +++ b/dockers/docker-sonic-p4rt/p4rt.sh @@ -16,7 +16,7 @@ readonly X509=$(echo ${P4RT_VARS} | jq -r '.x509') readonly P4RT=$(echo ${P4RT_VARS} | jq -r '.p4rt') readonly CERTS=$(echo ${P4RT_VARS} | jq -r '.certs') -P4RT_ARGS=" --alsologtostderr --logbuflevel=-1" +P4RT_ARGS="" if [ -n "${CERTS}" ]; then readonly SERVER_CRT=$(echo ${CERTS} | jq -r '.server_crt // empty') diff --git a/dockers/docker-swss-layer-trixie/Dockerfile.j2 b/dockers/docker-swss-layer-trixie/Dockerfile.j2 new file mode 100644 index 00000000000..fb3262ae352 --- /dev/null +++ b/dockers/docker-swss-layer-trixie/Dockerfile.j2 @@ -0,0 +1,25 @@ +{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files, rsync_from_builder_stage %} +ARG BASE=docker-config-engine-trixie-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} + +FROM $BASE AS base + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update + +RUN apt install -y iputils-ping + +{% if docker_swss_layer_trixie_debs.strip() -%} +# Copy locally-built Debian package dependencies +{{ copy_files("debs/", docker_swss_layer_trixie_debs.split(' '), "/debs/") }} + +# Install locally-built Debian packages and implicitly install their dependencies +{{ install_debian_packages(docker_swss_layer_trixie_debs.split(' ')) }} +{%- endif %} + +FROM $BASE + +{{ rsync_from_builder_stage() }} + +ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-telemetry-sidecar/Dockerfile.j2 b/dockers/docker-telemetry-sidecar/Dockerfile.j2 index 0db5aa70869..0f486fc3366 100644 --- a/dockers/docker-telemetry-sidecar/Dockerfile.j2 +++ b/dockers/docker-telemetry-sidecar/Dockerfile.j2 @@ -5,7 +5,6 @@ FROM $BASE AS base ARG docker_container_name ARG image_version -RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -22,6 +21,9 @@ COPY ["files/container_checker", "/usr/share/sonic/systemd_scripts/container_che COPY ["files/telemetry.sh", "/usr/share/sonic/systemd_scripts/telemetry_v1.sh"] COPY ["files/k8s_pod_control.sh", "/usr/share/sonic/scripts/k8s_pod_control.sh"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] +COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"] +COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"] +RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf RUN chmod +x /usr/bin/systemd_stub.py /usr/share/sonic/scripts/k8s_pod_control.sh diff --git a/dockers/docker-telemetry-sidecar/cli-plugin-tests/test_systemd_stub.py b/dockers/docker-telemetry-sidecar/cli-plugin-tests/test_systemd_stub.py index f1071ca7946..237a6df6496 100644 --- a/dockers/docker-telemetry-sidecar/cli-plugin-tests/test_systemd_stub.py +++ b/dockers/docker-telemetry-sidecar/cli-plugin-tests/test_systemd_stub.py @@ -2,15 +2,16 @@ import sys import os import types +import subprocess import importlib import pytest # Add docker-telemetry-sidecar directory to path so we can import systemd_stub -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))) +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) # Add sonic-py-common to path so we can import the real sidecar_common -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../../src/sonic-py-common"))) +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../src/sonic-py-common"))) # ===== Create fakes BEFORE importing sidecar_common ===== @@ -188,6 +189,14 @@ def fake_read_file_bytes_local(path: str): # Isolate POST_COPY_ACTIONS monkeypatch.setattr(ss, "POST_COPY_ACTIONS", {}, raising=True) + # Mock _get_branch_name to return "202412" by default (avoids real file/nsenter I/O) + monkeypatch.setattr(ss, "_get_branch_name", lambda: "202412") + + # Provide a default container_checker in both filesystems so the auto-appended + # SyncItem from ensure_sync() is always satisfied and is a no-op. + container_fs["/usr/share/sonic/systemd_scripts/container_checker"] = b"default-checker" + host_fs["/bin/container_checker"] = b"default-checker" + return ss, container_fs, host_fs, commands, config_db @@ -209,14 +218,16 @@ def test_sync_no_change_fast_path(ss): def test_sync_updates_and_post_actions(ss): ss, container_fs, host_fs, commands, config_db = ss - item = ss.SyncItem("/container/container_checker", "/bin/container_checker", 0o755) + # Use telemetry.sh path (not /bin/container_checker) to avoid conflict + # with the container_checker item that ensure_sync() appends automatically. + item = ss.SyncItem("/container/telemetry.sh", "/usr/local/bin/telemetry.sh", 0o755) container_fs[item.src_in_container] = b"NEW" host_fs[item.dst_on_host] = b"OLD" ss.SYNC_ITEMS[:] = [item] ss.POST_COPY_ACTIONS[item.dst_on_host] = [ ["sudo", "systemctl", "daemon-reload"], - ["sudo", "systemctl", "restart", "monit"], + ["sudo", "systemctl", "restart", "telemetry"], ] ok = ss.ensure_sync() @@ -225,7 +236,7 @@ def test_sync_updates_and_post_actions(ss): post_cmds = [args for _, args in commands if args and args[0] == "sudo"] assert ("sudo", "systemctl", "daemon-reload") in post_cmds - assert ("sudo", "systemctl", "restart", "monit") in post_cmds + assert ("sudo", "systemctl", "restart", "telemetry") in post_cmds def test_sync_missing_src_returns_false(ss): @@ -350,3 +361,149 @@ def test_reconcile_disabled_removes_cname(ss): ss.reconcile_config_db_once() assert f"GNMI_CLIENT_CERT|{ss.GNMI_CLIENT_CNAME}" not in config_db + + +# ─────────────────────────── Tests for _get_branch_name ─────────────────────────── + +class TestGetBranchName: + """Tests for _get_branch_name() version-string parsing.""" + + @pytest.fixture(autouse=True) + def _fresh_module(self, monkeypatch): + """Re-import systemd_stub fresh and expose the real _get_branch_name.""" + if "systemd_stub" in sys.modules: + del sys.modules["systemd_stub"] + self.ss = importlib.import_module("systemd_stub") + self.monkeypatch = monkeypatch + + def _set_version_file(self, tmp_path, version_str): + """Create a fake sonic_version.yml and patch the path.""" + vfile = tmp_path / "sonic_version.yml" + vfile.write_text(f'build_version: "{version_str}"\n') + self.monkeypatch.setattr(os.path, "exists", lambda p: p == str(vfile) or os.path.isfile(p)) + # Patch the version_file path inside _get_branch_name + original_fn = self.ss._get_branch_name + def patched(): + import types + # Temporarily replace the hard-coded path + src = original_fn.__code__ + # Simpler: just write to the expected path + return original_fn() + # Instead of complex patching, write to a temp file and patch open/exists + return str(vfile) + + def _mock_version(self, version_str): + """Mock _get_branch_name by patching the file read to return a specific version.""" + original_open = open + version_file = "/etc/sonic/sonic_version.yml" + + def fake_exists(path): + if path == version_file: + return True + return os.path.isfile(path) + + def fake_open(path, *args, **kwargs): + if path == version_file: + import io + return io.StringIO(f'build_version: "{version_str}"\n') + return original_open(path, *args, **kwargs) + + self.monkeypatch.setattr(os.path, "exists", fake_exists) + self.monkeypatch.setattr("builtins.open", fake_open) + + def test_master_branch(self): + self._mock_version("SONiC.master.921927-18199d73f") + assert self.ss._get_branch_name() == "master" + + def test_master_branch_no_prefix(self): + self._mock_version("master.100000-abcdef1234") + assert self.ss._get_branch_name() == "master" + + def test_internal_branch(self): + self._mock_version("SONiC.internal.135691748-dbb8d29985") + assert self.ss._get_branch_name() == "internal" + + def test_internal_branch_no_prefix(self): + self._mock_version("internal.999999-1234abcdef") + assert self.ss._get_branch_name() == "internal" + + def test_feature_branch_202411(self): + self._mock_version("SONiC.20241110.kw.24") + assert self.ss._get_branch_name() == "202411" + + def test_feature_branch_202412(self): + self._mock_version("SONiC.20241215.99") + assert self.ss._get_branch_name() == "202412" + + def test_feature_branch_202505(self): + self._mock_version("20250501.1") + assert self.ss._get_branch_name() == "202505" + + def test_private_unmatched(self): + self._mock_version("my-custom-build-v3") + assert self.ss._get_branch_name() == "private" + + def test_no_version_file(self): + """When no version file and nsenter also fails, returns 'private'.""" + self.monkeypatch.setattr(os.path, "exists", lambda p: False) + self.monkeypatch.setattr( + subprocess, "run", + lambda *a, **kw: types.SimpleNamespace(returncode=1, stdout="", stderr="") + ) + assert self.ss._get_branch_name() == "private" + + +# ─────────── Tests for branch-conditional container_checker in ensure_sync ─────────── + +def test_ensure_sync_uses_202411_checker(ss): + """When branch is 202411, ensure_sync uses the branch-specific container_checker.""" + ss_mod, container_fs, host_fs, commands, config_db = ss + + # Override _get_branch_name to return 202411 + ss_mod._get_branch_name = lambda: "202411" + + # Provide the 202411-specific checker in the container and a different one on host + container_fs["/usr/share/sonic/systemd_scripts/container_checker_202411"] = b"checker-202411" + host_fs["/bin/container_checker"] = b"old-checker" + + # Clear SYNC_ITEMS to focus only on the container_checker logic + ss_mod.SYNC_ITEMS[:] = [] + + ok = ss_mod.ensure_sync() + assert ok is True + assert host_fs["/bin/container_checker"] == b"checker-202411" + + +def test_ensure_sync_uses_default_checker(ss): + """When branch is not 202411, ensure_sync uses the default container_checker.""" + ss_mod, container_fs, host_fs, commands, config_db = ss + + # _get_branch_name already returns "202412" from fixture default + + # Provide the default checker in the container and a different one on host + container_fs["/usr/share/sonic/systemd_scripts/container_checker"] = b"checker-default" + host_fs["/bin/container_checker"] = b"old-checker" + + # Clear SYNC_ITEMS to focus only on the container_checker logic + ss_mod.SYNC_ITEMS[:] = [] + + ok = ss_mod.ensure_sync() + assert ok is True + assert host_fs["/bin/container_checker"] == b"checker-default" + + +def test_ensure_sync_202411_missing_checker_fails(ss): + """When branch is 202411 but the branch-specific checker is missing, sync fails.""" + ss_mod, container_fs, host_fs, commands, config_db = ss + + ss_mod._get_branch_name = lambda: "202411" + + # Don't provide the 202411 checker in container_fs + # Remove default checker too + container_fs.pop("/usr/share/sonic/systemd_scripts/container_checker_202411", None) + container_fs.pop("/usr/share/sonic/systemd_scripts/container_checker", None) + + ss_mod.SYNC_ITEMS[:] = [] + + ok = ss_mod.ensure_sync() + assert ok is False diff --git a/dockers/docker-telemetry-sidecar/etc/rsyslog.conf b/dockers/docker-telemetry-sidecar/etc/rsyslog.conf new file mode 100644 index 00000000000..09c0ed617e5 --- /dev/null +++ b/dockers/docker-telemetry-sidecar/etc/rsyslog.conf @@ -0,0 +1,77 @@ +# +# /etc/rsyslog.conf Configuration file for rsyslog. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html + + +################# +#### MODULES #### +################# + +$ModLoad imuxsock # provides support for local system logging + +# +# Set a rate limit on messages from the container +# +$SystemLogRateLimitInterval 300 +$SystemLogRateLimitBurst 20000 + +#$ModLoad imklog # provides kernel logging support +#$ModLoad immark # provides --MARK-- message capability + +# provides UDP syslog reception +#$ModLoad imudp +#$UDPServerRun 514 + +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 + + +########################### +#### GLOBAL DIRECTIVES #### +########################### + +# Set remote syslog server +template (name="ForwardFormatInContainer" type="string" string="<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%") +*.* action(type="omfwd" target="127.0.0.1" port="514" protocol="udp" Template="ForwardFormatInContainer") + +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + +# Define a custom template +$template SONiCFileFormat,"%TIMESTAMP%.%timestamp:::date-subseconds% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" +$ActionFileDefaultTemplate SONiCFileFormat + +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 + +# +# Where to place spool and state files +# +$WorkDirectory /var/spool/rsyslog + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf + +# +# Suppress duplicate messages and report "message repeated n times" +# +$RepeatedMsgReduction on + +############### +#### RULES #### +############### + diff --git a/dockers/docker-telemetry-sidecar/etc/rsyslog.d/supervisor.conf b/dockers/docker-telemetry-sidecar/etc/rsyslog.d/supervisor.conf new file mode 100644 index 00000000000..f1d9bcdc995 --- /dev/null +++ b/dockers/docker-telemetry-sidecar/etc/rsyslog.d/supervisor.conf @@ -0,0 +1,10 @@ +module(load="imfile" mode="inotify") # Ensure "inotify" mode is used +$WorkDirectory /var/log/supervisor +# Start Monitoring the file +input(type="imfile" + File="/var/log/supervisor/supervisord.log" + Tag="supervisord" + Severity="info" + Facility="local0" + PersistStateInterval="1") + diff --git a/dockers/docker-telemetry-sidecar/systemd_scripts/container_checker_202411 b/dockers/docker-telemetry-sidecar/systemd_scripts/container_checker_202411 new file mode 100644 index 00000000000..43b3ef7a470 --- /dev/null +++ b/dockers/docker-telemetry-sidecar/systemd_scripts/container_checker_202411 @@ -0,0 +1,237 @@ +#!/usr/bin/env python3 + +""" +container_checker + +This script is intended to be run by Monit. It will write an alerting message into +syslog if it found containers which were expected to run but were not running. At +the same time, if some containers were unexpected to run, it also writes an alerting +syslog message. Note that if print(...) statement in this script was executed, the +string in it will be appended to Monit syslog messages. + +The following is an example in Monit configuration file to show how Monit will run +this script: + +check program container_checker with path "/usr/bin/container_checker" + if status != 0 for 5 times within 5 cycles then alert repeat every 1 cycles +""" + +import docker +import sys + +from sonic_py_common import multi_asic, device_info +from swsscommon import swsscommon + +EVENTS_PUBLISHER_SOURCE = "sonic-events-host" +EVENTS_PUBLISHER_TAG = "event-down-ctr" + +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + return False + +def get_expected_running_containers(): + """ + @summary: This function will get the expected running & always-enabled containers by following the rule: + The 'state' field of container in 'FEATURE' table should not be 'disabled' or 'always_disabled'. + If the device has Multi-ASIC, this function will get container list by determining the + value of field 'has_global_scope', the number of ASICs and the value of field + 'has_per_asic_scope'. + If the device has single ASIC, the container name was put into the list. + @return: A set which contains the expected running containers and a set that has + containers marked as "always_enabled". + """ + config_db = swsscommon.ConfigDBConnector() + config_db.connect() + feature_table = config_db.get_table("FEATURE") + + expected_running_containers = set() + always_running_containers = set() + + # Get current asic presence list. For multi_asic system, multi instance containers + # should be checked only for asics present. + asics_id_presence = multi_asic.get_asic_presence_list() + + # Some services may run all the instances irrespective of asic presence. + # Add those to exception list. + # database service: Currently services have dependency on all database services to + # be up irrespective of asic presence. + # bgp service: Currently bgp runs all instances. Once this is fixed to be config driven, + # it will be removed from exception list. + run_all_instance_list = ['database', 'bgp'] + + container_list = [] + for container_name in feature_table.keys(): + # skip frr_bmp since it's not container just bmp option used by bgpd + if container_name == "frr_bmp": + continue + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + expected_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + expected_running_containers.add(container_name + str(asic_id)) + else: + expected_running_containers.add(container_name) + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name].get("has_global_scope", "True") == "True": + always_running_containers.add(container_name) + if feature_table[container_name].get("has_per_asic_scope", "False") == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + if asic_id in asics_id_presence or container_name in run_all_instance_list: + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) + + if device_info.is_supervisor() or device_info.is_smartswitch(): + always_running_containers.add("database-chassis") + + if device_info.is_smartswitch(): + raw_dpustable = config_db.get_table("DPUS") + for dpu_name in raw_dpustable: + container_name = f"databasedpu{dpu_name.replace('dpu', '')}" + always_running_containers.add(container_name) + + return expected_running_containers, always_running_containers + +def get_current_running_from_DB(always_running_containers): + """ + @summary: This function will get the current running container list + from FEATURE table @ STATE_DB, if this table is available. + @return: a tuple + First: Return value indicating if info can be obtained from + DB or not. + Second: A set which contains the current running containers, + if this info is available in DB. + """ + running_containers = set() + + state_db = swsscommon.DBConnector("STATE_DB", 0) + tbl = swsscommon.Table(state_db, "FEATURE") + if not tbl.getKeys(): + return running_containers + + for name in tbl.getKeys(): + data = dict(tbl.get(name)[1]) + if data.get('container_id'): + running_containers.add(name) + + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + RUNNING = 'running' + for name in always_running_containers: + try: + container = DOCKER_CLIENT.containers.get(name) + container_state = container.attrs.get('State', {}) + if container_state.get('Status', "") == RUNNING: + running_containers.add(name) + except (docker.errors.NotFound, docker.errors.APIError) as err: + print("Failed to get container '{}'. Error: '{}'".format(name, err)) + pass + + return running_containers + +def get_current_running_from_dockers(): + """ + @summary: This function will get all running containers from + the list of docker containers in running state. + If namespace == 'sonic': it's rollout-ed via kubernetes so add io.kubernetes.container.name + If namespace is missing/empty: it's image native container, add ctr.name directly + @return: A set which contains containers that are + in running state. + """ + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + running_containers = set() + + try: + for ctr in DOCKER_CLIENT.containers.list(filters={"status": "running"}): + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + elif not ns: + running_containers.add(ctr.name) + + except docker.errors.APIError as err: + print(f"Failed to retrieve the running container list. Error: '{err}'") + pass + except docker.errors.DockerException as err: + print(f"Docker client error: '{err}'") + pass + return running_containers + +def get_current_running_containers(always_running_containers): + """ + @summary: This function will get the list of currently running containers. + If available in STATE-DB, get from DB else from list of dockers. + + @return: A set of currently running containers. + """ + + current_running_containers = get_current_running_from_DB(always_running_containers) + current_running_containers.update(get_current_running_from_dockers()) + return current_running_containers + + +def publish_events(lst): + events_handle = swsscommon.events_init_publisher(EVENTS_PUBLISHER_SOURCE) + params = swsscommon.FieldValueMap() + + for ctr in lst: + params["ctr_name"] = ctr; + swsscommon.event_publish(events_handle, EVENTS_PUBLISHER_TAG, params) + + swsscommon.events_deinit_publisher(events_handle) + + +def main(): + """ + @summary: This function will compare the difference between the current running containers + and the containers which were expected to run. If containers which were exepcted + to run were not running, then an alerting message will be written into syslog. + """ + expected_running_containers, always_running_containers = get_expected_running_containers() + current_running_containers = get_current_running_containers(always_running_containers) + + expected_running_containers |= always_running_containers + not_running_containers = expected_running_containers.difference(current_running_containers) + if not_running_containers: + publish_events(not_running_containers) + print("Expected containers not running: " + ", ".join(not_running_containers)) + sys.exit(3) + + +if __name__ == "__main__": + main() + sys.exit(0) diff --git a/dockers/docker-telemetry-sidecar/systemd_stub.py b/dockers/docker-telemetry-sidecar/systemd_stub.py index aa719898fa8..3ce0247e559 100644 --- a/dockers/docker-telemetry-sidecar/systemd_stub.py +++ b/dockers/docker-telemetry-sidecar/systemd_stub.py @@ -2,6 +2,8 @@ from __future__ import annotations import os +import re +import subprocess import time import argparse from typing import List @@ -34,11 +36,82 @@ SYNC_ITEMS: List[SyncItem] = [ SyncItem(_TELEMETRY_SRC, "/usr/local/bin/telemetry.sh"), - SyncItem("/usr/share/sonic/systemd_scripts/container_checker", "/bin/container_checker"), SyncItem("/usr/share/sonic/scripts/k8s_pod_control.sh", "/usr/share/sonic/scripts/k8s_pod_control.sh"), SyncItem(CONTAINER_TELEMETRY_SERVICE, HOST_TELEMETRY_SERVICE, mode=0o644), ] +# Compile regex patterns once at module level to avoid repeated compilation +_MASTER_PATTERN = re.compile(r'^(?:SONiC\.)?master\.\d+-[a-f0-9]+$', re.IGNORECASE) +_INTERNAL_PATTERN = re.compile(r'^(?:SONiC\.)?internal\.\d+-[a-f0-9]+$', re.IGNORECASE) +_DATE_PATTERN = re.compile(r'^(?:SONiC\.)?\d{8}\b', re.IGNORECASE) +_DATE_EXTRACT_PATTERN = re.compile(r'^(?:SONiC\.)?(\d{4})(\d{2})\d{2}\b', re.IGNORECASE) + +def _get_branch_name() -> str: + """ + Extract branch name from SONiC version at runtime. + Follows the logic from sonic-mgmt/tests/test_pretest.py get_asic_and_branch_name(). + + Supported patterns: + 1. Master: [SONiC.]master.921927-18199d73f -> returns "master" + 2. Internal: [SONiC.]internal.135691748-dbb8d29985 -> returns "internal" + 3. Official feature branch: [SONiC.]YYYYMMDD.XX -> returns YYYYMM (e.g., 202505) + 4. Private/unmatched: returns "private" + """ + version = "" + try: + # Try reading from sonic_version.yml + version_file = "/etc/sonic/sonic_version.yml" + if os.path.exists(version_file): + with open(version_file, 'r') as f: + for line in f: + if 'build_version:' in line.lower(): + version = line.split(':', 1)[1].strip().strip('"\'') + break + + if not version: + # Fallback: try nsenter to host + result = subprocess.run( + ["nsenter", "-t", "1", "-m", "-u", "-i", "-n", "sonic-cfggen", "-y", "/etc/sonic/sonic_version.yml", "-v", "build_version"], + capture_output=True, text=True, timeout=5 + ) + if result.returncode == 0: + version = result.stdout.strip().strip('"\'') + except Exception as e: + logger.log_warning(f"Failed to read SONiC version: {e}") + version = "" + + if not version: + logger.log_error("No SONiC version found") + return "private" + + # Pattern 1: Master - [SONiC.]master.XXXXXX-XXXXXXXX + if _MASTER_PATTERN.match(version): + logger.log_notice(f"Detected master branch from version: {version}") + return "master" + + # Pattern 2: Internal - [SONiC.]internal.XXXXXXXXX-XXXXXXXXXX + elif _INTERNAL_PATTERN.match(version): + logger.log_notice(f"Detected internal branch from version: {version}") + return "internal" + + # Pattern 3: Official feature branch - [SONiC.]YYYYMMDD.* (e.g., 20241110.kw.24) + elif _DATE_PATTERN.match(version): + date_match = _DATE_EXTRACT_PATTERN.search(version) + if date_match: + year, month = date_match.groups() + branch = f"{year}{month}" + logger.log_notice(f"Detected branch {branch} from version: {version}") + return branch + else: + logger.log_warning(f"Failed to parse date from version: {version}") + return "private" + + # Pattern 4: Private image or unmatched pattern + else: + logger.log_notice(f"Unmatched version pattern (private): {version}") + return "private" + + POST_COPY_ACTIONS = { "/lib/systemd/system/telemetry.service": [ ["sudo", "systemctl", "daemon-reload"], @@ -105,9 +178,20 @@ def reconcile_config_db_once() -> None: else: _ensure_cname_absent(GNMI_CLIENT_CNAME) - def ensure_sync() -> bool: - return sync_items(SYNC_ITEMS, POST_COPY_ACTIONS) + branch_name = _get_branch_name() + + if branch_name == "202411": + # For 202411 branch, use the branch-specific container_checker + container_checker_src = "/usr/share/sonic/systemd_scripts/container_checker_202411" + else: + # For 202412 and other branches, use the default container_checker + container_checker_src = "/usr/share/sonic/systemd_scripts/container_checker" + + items: List[SyncItem] = SYNC_ITEMS + [ + SyncItem(container_checker_src, "/bin/container_checker"), + ] + return sync_items(items, POST_COPY_ACTIONS) def parse_args() -> argparse.Namespace: p = argparse.ArgumentParser( diff --git a/dockers/docker-telemetry-watchdog/watchdog/debian/rules b/dockers/docker-telemetry-watchdog/watchdog/debian/rules index 0ecfaac60f9..9771b9f0c79 100644 --- a/dockers/docker-telemetry-watchdog/watchdog/debian/rules +++ b/dockers/docker-telemetry-watchdog/watchdog/debian/rules @@ -9,6 +9,10 @@ override_dh_auto_build: cargo build --release --all +override_dh_auto_install: + # do nothing + : + override_dh_auto_clean: cargo clean --release diff --git a/dockers/dockerfile-macros.j2 b/dockers/dockerfile-macros.j2 index 5d45ee8ec72..1fa69422db1 100644 --- a/dockers/dockerfile-macros.j2 +++ b/dockers/dockerfile-macros.j2 @@ -1,8 +1,8 @@ {% macro install_debian_packages(packages) -%} -RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f --no-remove; } || return 1; }; \ - {%- for deb in packages %} - dpkg_apt /debs/{{ deb }} {%- if not loop.last %} && \ {%- endif %} - {%- endfor %} +RUN dpkg -i \ +{%- for deb in packages %} + /debs/{{ deb }} {%- if not loop.last %} \ {%- endif %} +{%- endfor %} || apt-get -y install -f --no-remove {%- endmacro %} {% macro install_python2_wheels(packages) -%} @@ -47,4 +47,4 @@ COPY \ {% macro rsync_from_builder_stage() -%} RUN --mount=type=bind,from=base,target=/changes-to-image rsync -axAX --omit-dir-times --no-D --exclude=/sys --exclude=/proc --exclude=/dev --exclude=resolv.conf /changes-to-image/ / -{%- endmacro %} \ No newline at end of file +{%- endmacro %} diff --git a/files/Aboot/boot0.j2 b/files/Aboot/boot0.j2 index 7e29cb95492..857fd0cabfe 100644 --- a/files/Aboot/boot0.j2 +++ b/files/Aboot/boot0.j2 @@ -489,7 +489,7 @@ write_kdump_cmdline() { local sid="$(cmdline_get sid | sed 's/Ssd$//')" case "$sid" in Lodoga*|*Quicksilver*|*Moby|Shearwater*|Moranda*|Gardena*|PikeIsland*|\ - Wolverine*|Clearwater2*|OtterLake*|QuartzDd*|Redstart8Mk2Quartz4*|CitrineDd*) + Wolverine*|Clearwater2*|OtterLake*|QuartzDd*|Redstart8Mk2*Quartz4*|Redstart8Mk2*CitrineDd*) if ! cmdline_has crashkernel; then cmdline_add crashkernel=0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G fi @@ -559,6 +559,7 @@ write_platform_specific_cmdline() { aboot_machine=arista_7050cx3_32s cmdline_add logs_inram=on cmdline_add libata.force=2.00:noncq + cmdline_add nohz=off fi if [ "$sid" = "LodogaPrime" ]; then aboot_machine=arista_7050cx3_32c diff --git a/files/build/versions b/files/build/versions new file mode 120000 index 00000000000..612aed21f07 --- /dev/null +++ b/files/build/versions @@ -0,0 +1 @@ +versions-public \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm similarity index 57% rename from files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm rename to files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm index 671b8d92a01..39fa50ee009 100644 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm +++ b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm @@ -1,4 +1,15 @@ +doca-sdk-argp==3.3.0055-1 +doca-sdk-common==3.3.0055-1 +doca-sdk-dpdk-bridge==3.3.0055-1 +doca-sdk-flow==3.3.0055-1 +frr==10.4.1-sonic-0 libdashapi==1.0.0 +libdoca-sdk-argp-dev==3.3.0055-1 +libdoca-sdk-common-dev==3.3.0055-1 +libdoca-sdk-dpdk-bridge-dev==3.3.0055-1 +libdoca-sdk-flow-dev==3.3.0055-1 +libgrpc-dev==1.39.0-1 +libibverbs-dev==2601.0.1-1 libnl-3-200==3.7.0-0.2+b1sonic1 libnl-3-dev==3.7.0-0.2+b1sonic1 libnl-cli-3-200==3.7.0-0.2+b1sonic1 @@ -9,6 +20,9 @@ libnl-nf-3-200==3.7.0-0.2+b1sonic1 libnl-nf-3-dev==3.7.0-0.2+b1sonic1 libnl-route-3-200==3.7.0-0.2+b1sonic1 libnl-route-3-dev==3.7.0-0.2+b1sonic1 +libnvhws-dev==26.01.3-1 +libnvhws1==26.01.3-1 +librxpcompiler-dev==22.05.1 libsai==1.0.0 libsaimetadata==1.0.0 libsaimetadata-dev==1.0.0 @@ -25,17 +39,24 @@ libteam5==1.31-1 libteamdctl0==1.31-1 libyang==1.0.73 libyang-cpp==1.0.73 -libyang-dev==1.0.73 +libyang-dev==3.12.2-1 libyang3==3.12.2-1 +mlnx-dpdk==22.11.0-2510.2.1 +mlnx-dpdk-dev==22.11.0-2510.2.1 +mlnx-ofed-kernel-utils==26.01.OFED.26.01.0.2.9.1-1 +mlnx-tools==2601.0.0-1 p4lang-bmv2==1.15.0-7 p4lang-p4c==1.2.4.2-2 p4lang-pi==0.1.0-15 python3-libyang==3.1.0-1 python3-swsscommon==1.0.0 python3-yang==1.0.73 +rdma-core==2601.0.1-1 +rxp-compiler==22.05.1 +sdn-appliance==1.5-1mlnx1 sonic-bmp==0.1 sonic-mgmt-common==1.0.0 sonic-mgmt-common-codegen==1.0.0 stp==1.0.0 -sys-sdk-dev==1.mlnx.4.8.2096 -sys-sdk-main==1.mlnx.4.8.2096 +sys-sdk-dev==1.mlnx.4.8.3404 +sys-sdk-main==1.mlnx.4.8.3404 diff --git a/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm-arm64 b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm-arm64 new file mode 100644 index 00000000000..84e045e8dc2 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm-arm64 @@ -0,0 +1 @@ +libyang-dev==1.0.73 diff --git a/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf new file mode 100644 index 00000000000..84e045e8dc2 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf @@ -0,0 +1 @@ +libyang-dev==1.0.73 diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3 b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3 similarity index 82% rename from files/build/versions/build/build-sonic-slave-bookworm/versions-py3 rename to files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3 index 922288cd809..91aa14e1ccd 100644 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3 +++ b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3 @@ -1,4 +1,4 @@ -blessed==1.25.0 +blessed==1.30.0 click-log==0.4.0 colorful==0.5.8 deepdiff==8.6.1 @@ -6,7 +6,7 @@ docker==7.1.0 docker-image-py==0.1.13 enlighten==1.14.1 enum34==1.1.10 -filelock==3.20.0 +filelock==3.24.3 freezegun==1.5.5 ijson==3.2.3 inotify==0.2.12 @@ -22,17 +22,21 @@ netaddr==0.8.0 netifaces==0.11.0 orderly-set==5.5.0 paramiko==4.0.0 +pexpect==4.9.0 prefixed==0.9.0 prettyprinter==0.18.0 +ptyprocess==0.7.0 pycairo==1.26.1 -pynacl==1.6.1 +pynacl==1.6.2 +pyroute2==0.9.5 python-arptable==0.0.2 -responses==0.25.8 +responses==0.26.0 scp==0.14.5 semantic-version==2.10.0 supervisor==4.3.0 systemd-python==235 tabulate==0.9.0 toposort==1.6 +wcwidth==0.6.0 www-authenticate==0.9.2 xmltodict==0.12.0 diff --git a/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3-all-arm64 b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3-all-arm64 new file mode 100644 index 00000000000..5d807806795 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3-all-arm64 @@ -0,0 +1,6 @@ +bitarray==2.8.1 +cffi==2.0.0 +pyyaml==6.0.1 +requests==2.32.5 +urllib3==2.6.3 +zipp==1.2.0 diff --git a/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3-all-armhf b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3-all-armhf new file mode 100644 index 00000000000..5d807806795 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-bookworm/versions-py3-all-armhf @@ -0,0 +1,6 @@ +bitarray==2.8.1 +cffi==2.0.0 +pyyaml==6.0.1 +requests==2.32.5 +urllib3==2.6.3 +zipp==1.2.0 diff --git a/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie b/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie new file mode 100644 index 00000000000..3ac0a4426de --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie @@ -0,0 +1,55 @@ +bfscripts==4.14.0-13868 +gpio-mlxbf3-dkms==1.0-0 +kernel-mft-dkms==4.34.0-145 +kernel-mft-dkms-modules-6.12.41+deb13-sonic-arm64==4.34.0 +libdashapi==1.0.0 +libnl-3-200==3.7.0-0.2+b1sonic1 +libnl-3-dev==3.7.0-0.2+b1sonic1 +libnl-cli-3-200==3.7.0-0.2+b1sonic1 +libnl-cli-3-dev==3.7.0-0.2+b1sonic1 +libnl-genl-3-200==3.7.0-0.2+b1sonic1 +libnl-genl-3-dev==3.7.0-0.2+b1sonic1 +libnl-nf-3-200==3.7.0-0.2+b1sonic1 +libnl-nf-3-dev==3.7.0-0.2+b1sonic1 +libnl-route-3-200==3.7.0-0.2+b1sonic1 +libnl-route-3-dev==3.7.0-0.2+b1sonic1 +libpcre16-3==2:8.39-15 +libpcre3==2:8.39-15 +libpcre3-dev==2:8.39-15 +libpcre32-3==2:8.39-15 +libpcrecpp0v5==2:8.39-15 +libswsscommon==1.0.0 +libswsscommon-dev==1.0.0 +libtac-dev==1.4.1-1 +libtac2==1.4.1-1 +libyang==1.0.73 +libyang-cpp==1.0.73 +libyang-dev==3.12.2-1 +libyang3==3.12.2-1 +linux-headers-6.12.41+deb13-common-sonic==6.12.41-1 +linux-headers-6.12.41+deb13-sonic-amd64==6.12.41-1 +linux-headers-6.12.41+deb13-sonic-arm64==6.12.41-1 +linux-image-6.12.41+deb13-sonic-amd64-unsigned==6.12.41-1 +linux-image-6.12.41+deb13-sonic-arm64-unsigned==6.12.41-1 +linux-kbuild-6.12.41+deb13==6.12.41-1 +mft==4.34.0-145 +mft-oem==4.34.0-145 +mlnx-iproute2==2601.0.2-1 +mlnx-ofed-kernel-dkms==26.01.OFED.26.01.0.2.9.1-1 +mlnx-ofed-kernel-utils==26.01.OFED.26.01.0.2.9.1-1 +mlnx-tools==2601.0.0-1 +mlx-bootctl-dkms==1.3-0 +mlxbf-bootctl==2.1 +mlxbf-bootimages==4.14.0-13868 +mlxbf-gige-dkms==1.0-0 +mlxbf-pka-dkms==2.0-1 +mlxbf-ptm-dkms==1.0-0 +mlxbf-tmfifo-dkms==1.0-0 +pinctrl-mlxbf3-dkms==1.0-0 +pwr-mlxbf-dkms==1.0-0 +python3-libyang==3.1.0-1 +python3-swsscommon==1.0.0 +python3-yang==1.0.73 +sdhci-of-dwcmshc-dkms==1.0-0 +sonic-platform-pddf==1.1 +sonic-platform-pddf-sym==1.1 diff --git a/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie-arm64 b/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie-arm64 new file mode 100644 index 00000000000..84e045e8dc2 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie-arm64 @@ -0,0 +1 @@ +libyang-dev==1.0.73 diff --git a/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie-armhf b/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie-armhf new file mode 100644 index 00000000000..047cd0a5540 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-trixie/versions-deb-trixie-armhf @@ -0,0 +1,3 @@ +libyang-dev==1.0.73 +linux-headers-6.12.41+deb13-sonic-armmp==6.12.41-1 +linux-image-6.12.41+deb13-sonic-armmp==6.12.41-1 diff --git a/files/build/versions/build/build-sonic-slave-trixie/versions-py3 b/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3 similarity index 79% rename from files/build/versions/build/build-sonic-slave-trixie/versions-py3 rename to files/build/versions-public/build/build-sonic-slave-trixie/versions-py3 index de57f1068ae..70105b9bfe9 100644 --- a/files/build/versions/build/build-sonic-slave-trixie/versions-py3 +++ b/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3 @@ -2,7 +2,7 @@ click-log==0.4.0 colorful==0.5.8 docker==7.1.0 docker-image-py==0.1.13 -filelock==3.20.0 +filelock==3.24.3 ijson==3.2.3 inotify==0.2.12 ipaddress==1.0.23 @@ -14,9 +14,13 @@ lazy-object-proxy==1.12.0 libyang==3.1.0 netaddr==0.8.0 pddf-platform==1.0 +pexpect==4.9.0 prettyprinter==0.18.0 +ptyprocess==0.7.0 pycairo==1.26.1 -responses==0.25.8 +pyroute2==0.9.5 +pytest-mock==3.15.1 +responses==0.26.0 semantic-version==2.10.0 tabulate==0.9.0 toposort==1.6 diff --git a/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3-all-arm64 b/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3-all-arm64 new file mode 100644 index 00000000000..700c39d6392 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3-all-arm64 @@ -0,0 +1,2 @@ +bitarray==2.8.1 +scp==0.14.5 diff --git a/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3-all-armhf b/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3-all-armhf new file mode 100644 index 00000000000..700c39d6392 --- /dev/null +++ b/files/build/versions-public/build/build-sonic-slave-trixie/versions-py3-all-armhf @@ -0,0 +1,2 @@ +bitarray==2.8.1 +scp==0.14.5 diff --git a/files/build/versions-public/default/versions-docker b/files/build/versions-public/default/versions-docker new file mode 100644 index 00000000000..9226ff21061 --- /dev/null +++ b/files/build/versions-public/default/versions-docker @@ -0,0 +1,10 @@ +amd64:amd64/debian:bookworm==sha256:9cd199264f968a0ec04bac1255b6ab64d68544de638378f33e8ab2ea748d9c71 +amd64:debian:bookworm==sha256:34e7f0ae7c10a61bfbef6e1b2ed205d9b47bb12e90c50696f729a5c7a01cf1f2 +amd64:debian:trixie==sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 +amd64:p4lang/behavioral-model:latest==sha256:ee8034f3f3d3b9bea7a7fd8edb5d1757bd4dc664d4e50113537e704f6cc8e8e5 +arm64:arm64v8/debian:bookworm==sha256:2886b9b2445fbcd18861eb83c3778ceae01f787eef05699808cd15497452094d +arm64:debian:bookworm==sha256:34e7f0ae7c10a61bfbef6e1b2ed205d9b47bb12e90c50696f729a5c7a01cf1f2 +arm64:debian:trixie==sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 +armhf:arm32v7/debian:bookworm==sha256:7ceb2095f7a687e7c6b05f4ffe5b45c49a5ac12f6212e6fc4d419a602aec8d35 +armhf:debian:bookworm==sha256:34e7f0ae7c10a61bfbef6e1b2ed205d9b47bb12e90c50696f729a5c7a01cf1f2 +armhf:debian:trixie==sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 diff --git a/files/build/versions/default/versions-git b/files/build/versions-public/default/versions-git similarity index 70% rename from files/build/versions/default/versions-git rename to files/build/versions-public/default/versions-git index 1acaa363d8a..9b19eb54cb7 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions-public/default/versions-git @@ -5,19 +5,19 @@ https://github.com/daveolson53/audisp-tacplus.git==559c9f22edd4f2dea0ecedffb3ad9 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287 https://github.com/facebook/tac_plus==dd38c2d727ff252ab2e1188c6d7087425376d845 -https://github.com/flashrom/flashrom.git==c042b4c32b7bcf12e05f82643b5a9b8668a7b296 -https://github.com/FreeRADIUS/freeradius-server.git==74ef0e3da2de28c40054febe9b78261ce9da66db +https://github.com/flashrom/flashrom.git==ad75e79a2b2fece98234667d7a21fc5f97118f2b +https://github.com/FreeRADIUS/freeradius-server.git==0a69ca18ff2e2ab5d51c52df9f87034d0006df4d https://github.com/FreeRADIUS/pam_radius.git==d17fc655f0007728b67d0d25c0ca20b6048aa7a1 https://github.com/google/gnxi.git==612869a62faaaf2956ed60296ad801513ab62d29 https://github.com/jeroennijhof/pam_tacplus.git==b839c440e33c36eced9dcbc287fcfe6237c4c4ce https://github.com/karimra/gnoic.git==2b416818af4946eecc3adc199713f20f39710f40 https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 -https://github.com/openconfig/oc-pyang.git==4607fd1987d4f586aba03b40f222015cb3ef8161 -https://github.com/redis/librdb.git==83b7852bbc1b21caea04cebdb1bd90345738655a -https://github.com/sflow/host-sflow==dbeacec2177b4f8157fccaf078ab93a4484afe46 +https://github.com/openconfig/oc-pyang.git==a116b53b1c1a149bc9a5d42dc26f3d0ab797846a +https://github.com/redis/librdb.git==0615a0f59714a50310b69fd87c72e02ee7af47e6 +https://github.com/sflow/host-sflow==f64cf3f655e47fcea7dcefd224ce359b13d2ceb4 https://github.com/sflow/sflowtool==c4213f2ea91773b80628b1bebb9cd08bdec6612b -https://github.com/sonic-net/DASH.git==8377343f3cd1af9af6eb34fd9d310b6aa2ad667f +https://github.com/sonic-net/DASH.git==62f9f0530609cc3420570f8f82c82f9bdeff1c32 https://salsa.debian.org/debian/monit.git==fae0a5c57cc8caed4d8c29202d528e535d3f4252 -https://salsa.debian.org/grub-team/grub.git==60bd5b52b6330557c3cc8ae6bf5c0408949fc308 +https://salsa.debian.org/grub-team/grub.git==4ab0b2ce97b35364da2b108523e18985f12da72a https://salsa.debian.org/kernel-team/initramfs-tools.git==8c65a4965ee3529288c88565c7715692bfcd3422 https://salsa.debian.org/tai271828/rasdaemon.git==51a7f485f8b2e2ae43e613f19c5a387595174132 diff --git a/files/build/versions-public/default/versions-mirror b/files/build/versions-public/default/versions-mirror new file mode 100644 index 00000000000..59beb8f2afd --- /dev/null +++ b/files/build/versions-public/default/versions-mirror @@ -0,0 +1,16 @@ +azure.archive.ubuntu.com_ubuntu_dists_focal==2020-04-23T17:33:17Z +azure.archive.ubuntu.com_ubuntu_dists_focal-backports==2026-02-21T22:38:09Z +azure.archive.ubuntu.com_ubuntu_dists_focal-security==2026-02-21T22:31:09Z +azure.archive.ubuntu.com_ubuntu_dists_focal-updates==2026-02-21T22:34:26Z +debian==20260221T001129Z +debian-security==20260221T001223Z +download.docker.com_linux_debian_dists_bookworm==2026-02-20T07:27:15Z +download.docker.com_linux_debian_dists_trixie==2026-02-20T07:27:15Z +packages.trafficmanager.net_snapshot_debian-security_20260221T001223Z_dists_bookworm-security==2026-02-20T21:43:09Z +packages.trafficmanager.net_snapshot_debian-security_20260221T001223Z_dists_trixie-security==2026-02-20T21:43:10Z +packages.trafficmanager.net_snapshot_debian_20260221T001129Z_dists_bookworm==2026-01-10T22:28:35Z +packages.trafficmanager.net_snapshot_debian_20260221T001129Z_dists_bookworm-backports==2026-02-20T20:17:00Z +packages.trafficmanager.net_snapshot_debian_20260221T001129Z_dists_bookworm-updates==2026-02-20T20:16:59Z +packages.trafficmanager.net_snapshot_debian_20260221T001129Z_dists_trixie==2026-01-10T10:28:38Z +packages.trafficmanager.net_snapshot_debian_20260221T001129Z_dists_trixie-backports==2026-02-20T20:17:00Z +packages.trafficmanager.net_snapshot_debian_20260221T001129Z_dists_trixie-updates==2026-02-20T20:16:59Z diff --git a/files/build/versions-public/default/versions-web b/files/build/versions-public/default/versions-web new file mode 100644 index 00000000000..de22a8aff33 --- /dev/null +++ b/files/build/versions-public/default/versions-web @@ -0,0 +1,117 @@ +http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_6.1.0-3.debian.tar.xz==fc7fd2b3eebb09770c1608dcddda878e +http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_6.1.0-3.dsc==c3116f907750a9e903d605b18256839f +http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_6.1.0.orig.tar.xz==f3ff4461e25dbc5ef1fb7a9167a9523d +http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.9-2.debian.tar.xz==833a30b64d7b257ce27e6bfa91a33b96 +http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.9-2.dsc==f75e4908e4c841e569447376be6bb043 +http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.9.orig.tar.xz==ffa00f68d63e723c21b8a091c5c0271b +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1-2.debian.tar.xz==64fbb939e9c93d14e5a9040b45e5b459 +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1-2.dsc==9f39c78ebbf7d66194de179dc12de49e +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1.orig.tar.gz==36c6ca77212373b0cff478ae9e5d32af +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1.orig.tar.gz.asc==6db320501d5766198bc2da9515c62bbb +http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.1.debian.tar.xz==2dfa6e22972d0af32fd7afe99734a304 +http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.1.dsc==efbde3517ddc5ac129532871651444af +http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0.orig.tar.gz==f60e47b5eb50bbeed48a9f43bb08dd5e +http://debian-archive.trafficmanager.net/debian/pool/main/liby/libyang/libyang_3.12.2-1.debian.tar.xz==3f8c497b000b1ec30fb66f107f61107a +http://debian-archive.trafficmanager.net/debian/pool/main/liby/libyang/libyang_3.12.2-1.dsc==346672dc8c2fc303a133051205deedc7 +http://debian-archive.trafficmanager.net/debian/pool/main/liby/libyang/libyang_3.12.2.orig.tar.xz==3bb7e265e14eb5cb817e9608bb7a6baf +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-bmv2_1.15.0-7.debian.tar.xz==f4d249b77d4f8d120b229834aac02df5 +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-bmv2_1.15.0-7.dsc==38011efbe33e6a461d36ca2c683e2019 +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-bmv2_1.15.0.orig.tar.gz==cbbb4a0d5b1e17dca0532c3ca761e05c +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-p4c_1.2.4.2-2.debian.tar.xz==7ea7d64c9147bd93a790af57693ce36f +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-p4c_1.2.4.2-2.dsc==dfbdeaac367213500bfe65111a955d0f +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-p4c_1.2.4.2.orig.tar.gz==b1008dffbe236d065c5557f2d4629aa9 +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-pi_0.1.0-15.debian.tar.xz==b9d8e4ce4cb66385250cf6dded0ef57a +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-pi_0.1.0-15.dsc==ee4f5c84d621a5dbfbe368baad031af4 +http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-pi_0.1.0.orig.tar.gz==551d3780d615557674e93fa11210499d +http://www.mellanox.com/downloads/MFT/mft-4.34.0-145-aarch64-deb.tgz==8cbab51bd161b2f2f1cccc7a610c4aa8 +http://www.mellanox.com/downloads/MFT/mft-4.34.0-145-x86_64-deb.tgz==c6d68339ee34d84f94438c79d4ce9f52 +https://deb.debian.org/debian/pool/main/b/bash/bash_5.2.37-2.debian.tar.xz==5a87fe5e2077763dd62ad40716804954 +https://deb.debian.org/debian/pool/main/b/bash/bash_5.2.37-2.dsc==c9d75e69a27738c24a25fff61285998b +https://deb.debian.org/debian/pool/main/b/bash/bash_5.2.37.orig.tar.xz==6075acd95528d14013fcde1ae279efdf +https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.10.7.dsc==b7c20dcfa144f7905dae83f907878201 +https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.10.7.tar.xz==8a29aa85664696551fa8ac0601e649f3 +https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0-0.2.debian.tar.xz==a36598f37197fcad7228f22196dd7f2f +https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0-0.2.dsc==2d88ff65e3531c5dd0095cabac6ed27a +https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0.orig.tar.gz==b381405afd14e466e35d29a112480333 +https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0.orig.tar.gz.asc==d68e65e8f10f59d374d2611cafe9a421 +https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31-1.debian.tar.xz==26fef506b62eb28e3356781a707c2440 +https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31-1.dsc==f27b8eee722b8595ab45344e4bd3cbe7 +https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31.orig.tar.xz==eec2e9c38e9a4c2cdb7e4954d110a118 +https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1-7.debian.tar.xz==a6135296076789766d5037281fd6e277 +https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1-7.dsc==ce345ed4c63d1ec10849bd1d4f497b18 +https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1.orig.tar.gz==689148621a2eaa734497b12bed1c5202 +https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1.orig.tar.gz.asc==1c0cb23a67bd4e5d25a8dc423ed65a5e +https://download.docker.com/linux/debian/gpg==1afae06b34a13c1b3d9cb61a26285a15 +https://github.com/aristanetworks/sonic-firmware/raw/24716c4e03f223d8e18afff786ac427f6ac77fe0/phy/phy-credo_1.0_amd64.deb==14e233cd68bc5db22eb8c9e177242851 +https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64==2dc74b7ad6bdd6b6b08f6802d14fc1fd +https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-arm64==94415d08ed2f86a49375f25a7f2f9cca +https://github.com/CumulusNetworks/ifupdown2/archive/3.0.0-1.tar.gz==755459b3a58fbc11625336846cea7420 +https://github.com/fullstorydev/grpcurl/releases/download/v1.9.1/grpcurl_1.9.1_linux_x86_64.tar.gz==a263191ce012be65578b74613c688a3c +https://github.com/karimra/gnoic/releases/download/v0.2.0/checksums.txt==8c760c498ad8a61d0b4ad3207970f45f +https://github.com/karimra/gnoic/releases/download/v0.2.0/gnoic_0.2.0_linux_x86_64.tar.gz==253944c283b2cfc3abe7b65db2242ca9 +https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh==2e8b2fb7d799d83acf895e20bd1966aa +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-bookworm/mlxbf-bootctl_2.1_arm64.deb==74254c1e2ff1adcd1f89f50bf17797cc +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/bfscripts_4.14.0-13868_all.deb==dc7f4beef8c471729fd8137b46016fbe +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/gpio-mlxbf3-dkms_1.0-0_all.deb==005c9e1856f061a545fc55b31f910f21 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlx-bootctl-dkms_1.3-0_all.deb==f5ff2be259bf23e45972202d5f42a9ca +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlxbf-bootctl_2.1_arm64.deb==a4fc488a842daf7ca29e3c656ade70de +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlxbf-bootimages-signed_4.14.0-13868_arm64.deb==c03384ed7aed0e445332c3c9bcbcaa5d +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlxbf-gige-dkms_1.0-0_all.deb==1448f88fe07b9168c72a925cf2014e97 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlxbf-pka-dkms_2.0-1_all.deb==3f6fb859c6e388449ee3a5cb65d803f7 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlxbf-ptm-dkms_1.0-0_all.deb==16c8a2f49f5d56ca47f954277276f59a +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/mlxbf-tmfifo-dkms_1.0-0_all.deb==4c3ce6823ae752c93eff6bd1edc32f88 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/pinctrl-mlxbf3-dkms_1.0-0_all.deb==3f548f98ad53b7ca5e7e494fcefeaf93 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/pwr-mlxbf-dkms_1.0-0_all.deb==7e9875aec107c0333a0c9837e2fefacc +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-bfsoc-4.14.0-13868-trixie/sdhci-of-dwcmshc-dkms_1.0-0_all.deb==de34fd40258d46c3b253afdaabace786 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-fw-48.0410/fw-BlueField-3-rel-32_48_0410.mfa==0999b099a9d5a4af11d95c7995492b8c +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sai-SAIBuild0.0.50.0-bookworm/mlnx-sai-dbgsym_1.mlnx.SAIBuild0.0.50.0_arm64.deb==025b497d100b91d24baf5609499f9f77 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sai-SAIBuild0.0.50.0-bookworm/mlnx-sai_1.mlnx.SAIBuild0.0.50.0_arm64.deb==4c0e50df785ea7694168a8545c2f2503 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//doca-sdk-argp_3.3.0055-1_arm64.deb==a65c9483be32dbb036f819f6c298f5af +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//doca-sdk-common_3.3.0055-1_arm64.deb==7420ee9cc76da01c121ce68c4debc774 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//doca-sdk-dpdk-bridge_3.3.0055-1_arm64.deb==c38cfac6d5e43e82aafc861741d342eb +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//doca-sdk-flow_3.3.0055-1_arm64.deb==58fc77a94035fe219bdbb5a1a7ae0108 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//ibverbs-providers_2601.0.1-1_arm64.deb==afb123f9470ff910ab69d04d6be2c73b +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libdoca-sdk-argp-dev_3.3.0055-1_arm64.deb==b00128b14b0cbebdc332fe0d23809e1a +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libdoca-sdk-common-dev_3.3.0055-1_arm64.deb==90c03287f3efea1c59ea3a03b03b73c3 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libdoca-sdk-dpdk-bridge-dev_3.3.0055-1_arm64.deb==82bd9ed64dc83525a0b270f0df004d0f +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libdoca-sdk-flow-dev_3.3.0055-1_arm64.deb==a9e5b602a7aa1b83679727d4adda9d2e +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libgrpc-dev_1.39.0-1_arm64.deb==32844d61acded31535dc1123c1fc9c1e +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libibverbs-dev_2601.0.1-1_arm64.deb==2e03379c9f19612a053db1ebca7399ce +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libibverbs1_2601.0.1-1_arm64.deb==7377072e43c0dbf44d55a0221a1118cf +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libnvhws-dev_26.01.3-1_arm64.deb==85a943be9cda01b6f946d800599e0d4c +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//libnvhws1_26.01.3-1_arm64.deb==1b351873b80f35cacafbea013540a5ce +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//librxpcompiler-dev_22.05.1_arm64.deb==ec65d50661b6ae02c3ae60bd500f21b7 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//mlnx-dpdk-dev_22.11.0-2510.2.1_arm64.deb==548a1ab66a075a23e543f4a1cc74be8a +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//mlnx-dpdk_22.11.0-2510.2.1_arm64.deb==3261fe7341b5efd28f740d19fe46b7cd +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//mlnx-iproute2_2601.0.2-1_arm64.deb==925d96754353e6230d58beb8f463ea51 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//mlnx-ofed-kernel-utils_26.01.OFED.26.01.0.2.9.1-1_arm64.deb==0a126b8ef09464af1f3333b8560a1f86 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//mlnx-tools_2601.0.0-1_arm64.deb==9bfdb674e9619abc205fed2d357c8613 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//rdma-core_2601.0.1-1_arm64.deb==0db6bd1c614b3f819c9a673e6795dd5d +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//rxp-compiler_22.05.1_arm64.deb==119dceb73207009b32807c564a781ec9 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-bookworm//sdn-appliance_1.5-1mlnx1_arm64.deb==e1161f3bb9091881852b31c0fd73667c +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-trixie//mlnx-iproute2_2601.0.2-1_arm64.deb==75d5e6155242d229b7633f365ccb4dfe +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-trixie//mlnx-ofed-kernel-dkms_26.01.OFED.26.01.0.2.9.1-1_all.deb==3011e4a1d8d54de4a44095bb1fd9ddd6 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-trixie//mlnx-ofed-kernel-utils_26.01.OFED.26.01.0.2.9.1-1_arm64.deb==0a126b8ef09464af1f3333b8560a1f86 +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/dpu-sdk-26.1-RC3-trixie//mlnx-tools_2601.0.0-1_arm64.deb==e650c76c6a2c552cd21f24aa6c27527e +https://github.com/Mellanox/sonic-bluefield-packages/releases/download/rshim-2.6.4-trixie-amd64/rshim_2.6.4_amd64.deb==dfe853a85c84c6cb178a35d457cf001f +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.3404/fw-SPC-rel-13_2016_3404-EVB.mfa==170a2c36fb1e0854d3f30afe97a7b90c +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.3404/fw-SPC2-rel-29_2016_3404-EVB.mfa==4c23c8e948e19c7873d69a2815394cd7 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.3404/fw-SPC3-rel-30_2016_3404-EVB.mfa==31b26a420c3392b042e30a6046b54008 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.3404/fw-SPC4-rel-34_2016_3404-EVB.mfa==6e5680450bd50b62c120a3a2eee61557 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.3404/fw-SPC5-rel-37_2016_3404-EVB.mfa==bca80fd75651c0725ffa2fcb134ee6ab +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sai-SAIBuild2511.35.3400.0-bookworm-amd64/mlnx-sai-dbgsym_1.mlnx.SAIBuild2511.35.3400.0_amd64.deb==c9fa3cfa4be5aa6f5046dbbc1b443cf0 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sai-SAIBuild2511.35.3400.0-bookworm-amd64/mlnx-sai_1.mlnx.SAIBuild2511.35.3400.0_amd64.deb==2d150e80b50c583989c20a50fbade706 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.8.3404-bookworm-amd64/sys-sdk_1.mlnx.4.8.3404_amd64-dev.deb==36e07aa1a5b078f642fa587f397b2ba5 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.8.3404-bookworm-amd64/sys-sdk_1.mlnx.4.8.3404_amd64.deb==538a2c2766c60833c517f379be94defe +https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads/4.8.3404.zip==1fd54fed22fdb125923498db4cc1971a +https://github.com/nanomsg/nanomsg/archive/1.2.2.tar.gz==22525d90e9e34099f8f25dfcf6515bfb +https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol-contrib_0.144.0_linux_amd64.deb==eb434c72277d208d0f2218da6666dd45 +https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol-contrib_0.144.0_linux_arm64.deb==98ca208ac0f38b10611382add01ef98c +https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol-contrib_0.144.0_linux_armv7.deb==65cbdc3debe9ac968be5d1e09aeaf9a1 +https://github.com/seladb/PcapPlusPlus/archive/refs/tags/v24.09.tar.gz==5ae65d152e8b76390ce28806bc085ffd +https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py==b16e05ede6aed78f7abadae1185f487d +https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar==cda48eb414c8b4585e280c3fb2656e24 +https://sh.rustup.rs==ddcc91013258e42c0df0ec1c26c92359 +https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init==17d1313bdd6bbcfcec9344f6dd7e05ca +https://static.rust-lang.org/rustup/dist/armv7-unknown-linux-gnueabihf/rustup-init==e59124baaee31e5dce382b468f76c3e4 +https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init==b492784060539969a92e14663c0796d1 diff --git a/files/build/versions/dockers/docker-auditd-watchdog/versions-deb-bookworm b/files/build/versions-public/dockers/docker-auditd-watchdog/versions-deb-bookworm similarity index 100% rename from files/build/versions/dockers/docker-auditd-watchdog/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-auditd-watchdog/versions-deb-bookworm diff --git a/files/build/versions/dockers/docker-auditd-watchdog/versions-deb-bookworm-arm64 b/files/build/versions-public/dockers/docker-auditd-watchdog/versions-deb-bookworm-arm64 similarity index 100% rename from files/build/versions/dockers/docker-auditd-watchdog/versions-deb-bookworm-arm64 rename to files/build/versions-public/dockers/docker-auditd-watchdog/versions-deb-bookworm-arm64 diff --git a/files/build/versions/dockers/docker-auditd-watchdog/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-auditd-watchdog/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-auditd-watchdog/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-auditd-watchdog/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-auditd-watchdog/versions-py3 b/files/build/versions-public/dockers/docker-auditd-watchdog/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-auditd-watchdog/versions-py3 rename to files/build/versions-public/dockers/docker-auditd-watchdog/versions-py3 diff --git a/files/build/versions/dockers/docker-base-bookworm/versions-deb-bookworm b/files/build/versions-public/dockers/docker-base-bookworm/versions-deb-bookworm similarity index 96% rename from files/build/versions/dockers/docker-base-bookworm/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-base-bookworm/versions-deb-bookworm index 9ec740358a6..e881e51411b 100644 --- a/files/build/versions/dockers/docker-base-bookworm/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-base-bookworm/versions-deb-bookworm @@ -7,7 +7,7 @@ libatomic1==12.2.0-14+deb12u1 libbpf1==1:1.1.2-0+deb12u1 libbrotli1==1.0.9-2+b6 libbsd0==0.11.7-2 -libcap2-bin==1:2.66-4+deb12u2 +libcap2-bin==1:2.66-4+deb12u2+b2 libcurl4==7.88.1-10+deb12u14 libdaemon0==0.14-7.1 libdbus-1-3==1.14.10-1~deb12u1 @@ -46,7 +46,7 @@ libreadline8==8.2-1.3 librtmp1==2.4+20151223.gitfa8646d.1-2+b2 libsasl2-2==2.1.28+dfsg-10 libsasl2-modules-db==2.1.28+dfsg-10 -libsodium23==1.0.18-1 +libsodium23==1.0.18-1+deb12u1 libsqlite3-0==3.40.1-2+deb12u2 libssh2-1==1.10.0-3+b1 libssl-dev==3.0.11-1~deb12u2+fips @@ -74,7 +74,7 @@ python3.11==3.11.2-6+deb12u6 python3.11-minimal==3.11.2-6+deb12u6 readline-common==8.2-1.3 redis-tools==5:7.0.15-1~deb12u6 -rsync==3.2.7-1+deb12u2 +rsync==3.2.7-1+deb12u4 rsyslog==8.2302.0-1+deb12u1 socat==1.7.4.1-3 symcrypt-openssl==0.1 diff --git a/files/build/versions/dockers/docker-base-bookworm/versions-py3 b/files/build/versions-public/dockers/docker-base-bookworm/versions-py3 similarity index 91% rename from files/build/versions/dockers/docker-base-bookworm/versions-py3 rename to files/build/versions-public/dockers/docker-base-bookworm/versions-py3 index 472f8cb1f0b..c231db35198 100644 --- a/files/build/versions/dockers/docker-base-bookworm/versions-py3 +++ b/files/build/versions-public/dockers/docker-base-bookworm/versions-py3 @@ -1,7 +1,7 @@ j2cli==0.3.10 jinja2==3.1.6 markupsafe==3.0.3 -pip==25.3 +pip==26.0.1 setuptools==66.1.1 supervisord-dependent-startup==1.4.0 toposort==1.10 diff --git a/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm b/files/build/versions-public/dockers/docker-bmp-watchdog/versions-deb-bookworm similarity index 58% rename from files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-bmp-watchdog/versions-deb-bookworm index 1c455fcbe06..a0c1649c62f 100644 --- a/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-bmp-watchdog/versions-deb-bookworm @@ -1,21 +1,36 @@ apt-utils==2.6.1 +icu-devtools==72.1-3+deb12u1 libboost-serialization1.83.0==1.83.0-4.2~bpo12+1 +libc-dev-bin==2.36-9+deb12u13 +libc6-dev==2.36-9+deb12u13 +libcrypt-dev==1:4.4.33-2 libhiredis0.14==0.14.1-3 +libicu-dev==72.1-3+deb12u1 +libicu72==72.1-3+deb12u1 libk5crypto3==1.20.1-2+deb12u4 libnl-3-200==3.7.0-0.2+b1sonic1 libnl-cli-3-200==3.7.0-0.2+b1sonic1 libnl-genl-3-200==3.7.0-0.2+b1sonic1 libnl-nf-3-200==3.7.0-0.2+b1sonic1 libnl-route-3-200==3.7.0-0.2+b1sonic1 +libnsl-dev==1.3.0-2 libpcre3==2:8.39-15 libpython3.11==3.11.2-6+deb12u6 libswsscommon==1.0.0 +libtirpc-dev==1.3.3+ds-1 +libxml2==2.9.14+dfsg-1.3~deb12u5 +libxml2-dev==2.9.14+dfsg-1.3~deb12u5 +libxslt1-dev==1.1.35-1+deb12u3 +libxslt1.1==1.1.35-1+deb12u3 libyaml-0-2==0.2.5-1 libyang==1.0.73 libyang-cpp==1.0.73 +linux-libc-dev==6.1.162-1 python3-swsscommon==1.0.0 python3-yaml==6.0-3+b2 python3-yang==1.0.73 +rpcsvc-proto==1.4.3-1 sonic-db-cli==1.0.0 sonic-eventd==1.0.0-0 sonic-supervisord-utilities-rs==1.0.0 +zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-bmp-watchdog/versions-py3 b/files/build/versions-public/dockers/docker-bmp-watchdog/versions-py3 similarity index 94% rename from files/build/versions/dockers/docker-bmp-watchdog/versions-py3 rename to files/build/versions-public/dockers/docker-bmp-watchdog/versions-py3 index 6e94aee194a..8930e0d56c1 100644 --- a/files/build/versions/dockers/docker-bmp-watchdog/versions-py3 +++ b/files/build/versions-public/dockers/docker-bmp-watchdog/versions-py3 @@ -12,7 +12,7 @@ pyangbind==0.8.2 pyyaml==6.0.3 redis==5.0.1 redis-dump-load==1.1 -regex==2025.11.3 +regex==2026.2.19 six==1.17.0 tabulate==0.9.0 xmltodict==0.12.0 diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm b/files/build/versions-public/dockers/docker-config-engine-bookworm/versions-deb-bookworm similarity index 85% rename from files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-config-engine-bookworm/versions-deb-bookworm index 491be1e2355..53a7b0722ba 100644 --- a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-config-engine-bookworm/versions-deb-bookworm @@ -1,5 +1,6 @@ apt-utils==2.6.1 binutils==2.40-2 +binutils-aarch64-linux-gnu==2.40-2 binutils-common==2.40-2 binutils-x86-64-linux-gnu==2.40-2 bzip2==1.0.8-5+b1 @@ -10,6 +11,7 @@ g++==4:12.2.0-3 g++-12==12.2.0-14+deb12u1 gcc==4:12.2.0-3 gcc-12==12.2.0-14+deb12u1 +icu-devtools==72.1-3+deb12u1 libasan8==12.2.0-14+deb12u1 libbinutils==2.40-2 libboost-serialization1.83.0==1.83.0-4.2~bpo12+1 @@ -25,6 +27,9 @@ libgcc-12-dev==12.2.0-14+deb12u1 libgomp1==12.2.0-14+deb12u1 libgprofng0==2.40-2 libhiredis0.14==0.14.1-3 +libhwasan0==12.2.0-14+deb12u1 +libicu-dev==72.1-3+deb12u1 +libicu72==72.1-3+deb12u1 libisl23==0.25-1.1 libitm1==12.2.0-14+deb12u1 libjs-jquery==3.6.1+dfsg+~3.5.14-1 @@ -50,10 +55,14 @@ libswsscommon==1.0.0 libtirpc-dev==1.3.3+ds-1 libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 +libxml2==2.9.14+dfsg-1.3~deb12u5 +libxml2-dev==2.9.14+dfsg-1.3~deb12u5 +libxslt1-dev==1.1.35-1+deb12u3 +libxslt1.1==1.1.35-1+deb12u3 libyaml-0-2==0.2.5-1 libyang==1.0.73 libyang-cpp==1.0.73 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 make==4.3-4.1 patch==2.7.6-7 python3-swsscommon==1.0.0 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-config-engine-bookworm/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-config-engine-bookworm/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-gnmi-watchdog/versions-py3 b/files/build/versions-public/dockers/docker-config-engine-bookworm/versions-py3 similarity index 94% rename from files/build/versions/dockers/docker-gnmi-watchdog/versions-py3 rename to files/build/versions-public/dockers/docker-config-engine-bookworm/versions-py3 index 6e94aee194a..8930e0d56c1 100644 --- a/files/build/versions/dockers/docker-gnmi-watchdog/versions-py3 +++ b/files/build/versions-public/dockers/docker-config-engine-bookworm/versions-py3 @@ -12,7 +12,7 @@ pyangbind==0.8.2 pyyaml==6.0.3 redis==5.0.1 redis-dump-load==1.1 -regex==2025.11.3 +regex==2026.2.19 six==1.17.0 tabulate==0.9.0 xmltodict==0.12.0 diff --git a/files/build/versions/dockers/docker-dash-engine/versions-deb-focal b/files/build/versions-public/dockers/docker-dash-engine/versions-deb-focal similarity index 100% rename from files/build/versions/dockers/docker-dash-engine/versions-deb-focal rename to files/build/versions-public/dockers/docker-dash-engine/versions-deb-focal diff --git a/files/build/versions/dockers/docker-dash-engine/versions-py3 b/files/build/versions-public/dockers/docker-dash-engine/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-dash-engine/versions-py3 rename to files/build/versions-public/dockers/docker-dash-engine/versions-py3 diff --git a/files/build/versions/dockers/docker-dash-ha/versions-deb-bookworm b/files/build/versions-public/dockers/docker-dash-ha/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-dash-ha/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-dash-ha/versions-deb-bookworm index f94524f97a4..42fadb065dd 100644 --- a/files/build/versions/dockers/docker-dash-ha/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-dash-ha/versions-deb-bookworm @@ -11,20 +11,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-database/versions-deb-bookworm b/files/build/versions-public/dockers/docker-database/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-database/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-database/versions-deb-bookworm index 2950c6b83a0..e729177fe01 100644 --- a/files/build/versions/dockers/docker-database/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-database/versions-deb-bookworm @@ -10,7 +10,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -18,13 +18,13 @@ libmpfr6==4.2.0-1 libprotobuf32==3.21.12-3 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 redis-server==5:7.0.15-1~deb12u6 diff --git a/files/build/versions/dockers/docker-database/versions-py3 b/files/build/versions-public/dockers/docker-database/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-database/versions-py3 rename to files/build/versions-public/dockers/docker-database/versions-py3 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm b/files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm similarity index 93% rename from files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm index 025673331fe..bf344135ace 100644 --- a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm @@ -38,7 +38,7 @@ libexpat1-dev==2.5.0-1+deb12u2 libexplain51==1.4.D001-12+b1 libfido2-1==1.12.0-2+b1 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 @@ -64,8 +64,8 @@ libpython3.11-dev==3.11.2-6+deb12u6 libquadmath0==12.2.0-14+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 @@ -73,11 +73,11 @@ libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 lsof==4.95.0-1 make==4.3-4.1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 patch==2.7.6-7 pkg-config==1.8.1-1 pkgconf==1.8.1-1 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm-arm64 b/files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm-arm64 similarity index 100% rename from files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm-arm64 rename to files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm-arm64 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-dhcp-relay/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-py3 b/files/build/versions-public/dockers/docker-dhcp-relay/versions-py3 similarity index 76% rename from files/build/versions/dockers/docker-dhcp-relay/versions-py3 rename to files/build/versions-public/dockers/docker-dhcp-relay/versions-py3 index 14a28e75c51..cbf2fbec501 100644 --- a/files/build/versions/dockers/docker-dhcp-relay/versions-py3 +++ b/files/build/versions-public/dockers/docker-dhcp-relay/versions-py3 @@ -1,3 +1,3 @@ freezegun==1.5.5 -psutil==7.1.3 +psutil==7.2.2 python-dateutil==2.9.0.post0 diff --git a/files/build/versions/dockers/docker-dhcp-server/versions-deb-bookworm b/files/build/versions-public/dockers/docker-dhcp-server/versions-deb-bookworm similarity index 91% rename from files/build/versions/dockers/docker-dhcp-server/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-dhcp-server/versions-deb-bookworm index 0957537cd11..f70fd6f0ee4 100644 --- a/files/build/versions/dockers/docker-dhcp-server/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-dhcp-server/versions-deb-bookworm @@ -33,7 +33,7 @@ libedit2==3.1-20221030-2 libexpat1-dev==2.5.0-1+deb12u2 libfido2-1==1.12.0-2+b1 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 @@ -51,14 +51,14 @@ libmpc3==1.3.1-1 libmpfr6==4.2.0-1 libnsl-dev==1.3.0-2 libpcap0.8==1.10.3-1 -libpq5==15.14-0+deb12u1 +libpq5==15.16-0+deb12u1 libpython3-dev==3.11.2-1+b1 libpython3.11-dev==3.11.2-6+deb12u6 libquadmath0==12.2.0-14+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 @@ -66,12 +66,12 @@ libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 make==4.3-4.1 mariadb-common==1:10.11.14-0+deb12u2 mysql-common==5.8+1.1.0 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 patch==2.7.6-7 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 diff --git a/files/build/versions/dockers/docker-dhcp-server/versions-py3 b/files/build/versions-public/dockers/docker-dhcp-server/versions-py3 similarity index 76% rename from files/build/versions/dockers/docker-dhcp-server/versions-py3 rename to files/build/versions-public/dockers/docker-dhcp-server/versions-py3 index 14a28e75c51..cbf2fbec501 100644 --- a/files/build/versions/dockers/docker-dhcp-server/versions-py3 +++ b/files/build/versions-public/dockers/docker-dhcp-server/versions-py3 @@ -1,3 +1,3 @@ freezegun==1.5.5 -psutil==7.1.3 +psutil==7.2.2 python-dateutil==2.9.0.post0 diff --git a/files/build/versions/dockers/docker-eventd/versions-deb-bookworm b/files/build/versions-public/dockers/docker-eventd/versions-deb-bookworm similarity index 83% rename from files/build/versions/dockers/docker-eventd/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-eventd/versions-deb-bookworm index b25ce1417ad..2fce3bfb000 100644 --- a/files/build/versions/dockers/docker-eventd/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-eventd/versions-deb-bookworm @@ -9,20 +9,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-fpm-frr/versions-deb-bookworm b/files/build/versions-public/dockers/docker-fpm-frr/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-fpm-frr/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-fpm-frr/versions-deb-bookworm index 757d38c9a37..377b1c68adc 100644 --- a/files/build/versions/dockers/docker-fpm-frr/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-fpm-frr/versions-deb-bookworm @@ -16,7 +16,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -26,12 +26,12 @@ libpci3==1:3.9.0-4 libpcre2-posix3==10.42-1 libsensors-config==1:3.6.0-7.1 libsensors5==1:3.6.0-7.1 -libsnmp-base==5.9.3+dfsg-2 -libsnmp40==5.9.3+dfsg-2 +libsnmp-base==5.9.3+dfsg-2+deb12u1 +libsnmp40==5.9.3+dfsg-2+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 @@ -39,8 +39,8 @@ libyang3==3.12.2-1 libyang3-dbgsym==3.12.2-1 logrotate==3.21.0-1 lsof==4.95.0-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 pci.ids==0.0~2023.04.11-1 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 diff --git a/files/build/versions/dockers/docker-fpm-frr/versions-py3 b/files/build/versions-public/dockers/docker-fpm-frr/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-fpm-frr/versions-py3 rename to files/build/versions-public/dockers/docker-fpm-frr/versions-py3 diff --git a/files/build/versions/dockers/docker-gbsyncd-agera2/versions-deb-bookworm b/files/build/versions-public/dockers/docker-gbsyncd-agera2/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-gbsyncd-agera2/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-gbsyncd-agera2/versions-deb-bookworm index 600f3159bb3..f1f9b7d6599 100644 --- a/files/build/versions/dockers/docker-gbsyncd-agera2/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-gbsyncd-agera2/versions-deb-bookworm @@ -12,7 +12,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -21,20 +21,20 @@ libnsl-dev==1.3.0-2 libprotobuf-dev==3.21.12-3 libprotobuf-lite32==3.21.12-3 libprotobuf32==3.21.12-3 -libsaiagera2==3.14.0-1 +libsaiagera2==3.14.0-2 libsaimetadata==1.0.0 libsairedis==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +linux-libc-dev==6.1.162-1 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 rpcsvc-proto==1.4.3-1 diff --git a/files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bookworm b/files/build/versions-public/dockers/docker-gbsyncd-broncos/versions-deb-bookworm similarity index 86% rename from files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-gbsyncd-broncos/versions-deb-bookworm index 741b191af4d..f58010706b4 100644 --- a/files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-gbsyncd-broncos/versions-deb-bookworm @@ -12,7 +12,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -26,15 +26,15 @@ libsaimetadata==1.0.0 libsairedis==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +linux-libc-dev==6.1.162-1 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 rpcsvc-proto==1.4.3-1 diff --git a/files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bookworm b/files/build/versions-public/dockers/docker-gbsyncd-credo/versions-deb-bookworm similarity index 77% rename from files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-gbsyncd-credo/versions-deb-bookworm index 616c05221a5..5cd5168992e 100644 --- a/files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-gbsyncd-credo/versions-deb-bookworm @@ -9,27 +9,28 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 -libsaicredo==0.9.9 -libsaicredo-blackhawk==0.9.9 -libsaicredo-owl==0.9.9 libsaimetadata==1.0.0 libsairedis==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 +saicredo-blackhawk==1.2.4 +saicredo-crt88322==1.2.4 +saicredo-owl==1.2.4 +saicredo-saicredo==1.2.4 sensible-utils==0.0.17+nmu1 sonic-db-cli-dbgsym==1.0.0 sonic-eventd-dbgsym==1.0.0-0 diff --git a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bookworm b/files/build/versions-public/dockers/docker-gbsyncd-vs/versions-deb-bookworm similarity index 97% rename from files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-gbsyncd-vs/versions-deb-bookworm index 1abd9b09844..11cf969b3c7 100644 --- a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-gbsyncd-vs/versions-deb-bookworm @@ -128,7 +128,7 @@ libgc1==1:8.2.2-3 libgcc-12-dev==12.2.0-14+deb12u1 libgfortran-12-dev==12.2.0-14+deb12u1 libgfortran5==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgmp-dev==2:6.2.1+dfsg1-1.1 libgmpxx4ldbl==2:6.2.1+dfsg1-1.1 libgomp1==12.2.0-14+deb12u1 @@ -160,7 +160,7 @@ libmagic-mgc==1:5.44-3 libmagic1==1:5.44-3 libmpc3==1.3.1-1 libmpfr6==4.2.0-1 -libmunge2==0.5.15-2 +libmunge2==0.5.15-2+deb12u1 libnanomsg-dev==1.1.5+dfsg-1.1+b1 libnanomsg5==1.1.5+dfsg-1.1+b1 libnl-3-dev==3.7.0-0.2+b1sonic1 @@ -208,8 +208,8 @@ libsaivs==1.0.0 libsaivs-dbgsym==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libswsscommon-dbgsym==1.0.0 libthrift-0.17.0==0.17.0-2+b2 @@ -226,11 +226,11 @@ libxau6==1:1.0.9-1 libxcb1==1.15-1 libxdmcp6==1:1.1.2-3 libxext6==2:1.3.4-1+b1 -libxml2==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 libxnvctrl0==525.85.05-3~deb12u1 libyang-cpp-dbgsym==1.0.73 libz3-4==4.8.12-3.1 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 llvm==1:14.0-55.7~deb12u1 llvm-14==1:14.0.6-12 llvm-14-linker-tools==1:14.0.6-12 @@ -244,8 +244,8 @@ nss-plugin-pem==1.0.8+1-1 ocl-icd-libopencl1==2.3.1-1 openmpi-bin==4.1.4-3+b1 openmpi-common==4.1.4-3 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 p4lang-bmv2==1.15.0-7 p4lang-p4c==1.2.4.2-2 p4lang-pi==0.1.0-15 diff --git a/files/build/versions/dockers/docker-gbsyncd-vs/versions-py3 b/files/build/versions-public/dockers/docker-gbsyncd-vs/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-gbsyncd-vs/versions-py3 rename to files/build/versions-public/dockers/docker-gbsyncd-vs/versions-py3 diff --git a/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm b/files/build/versions-public/dockers/docker-gnmi-watchdog/versions-deb-bookworm similarity index 58% rename from files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-gnmi-watchdog/versions-deb-bookworm index 1c455fcbe06..a0c1649c62f 100644 --- a/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-gnmi-watchdog/versions-deb-bookworm @@ -1,21 +1,36 @@ apt-utils==2.6.1 +icu-devtools==72.1-3+deb12u1 libboost-serialization1.83.0==1.83.0-4.2~bpo12+1 +libc-dev-bin==2.36-9+deb12u13 +libc6-dev==2.36-9+deb12u13 +libcrypt-dev==1:4.4.33-2 libhiredis0.14==0.14.1-3 +libicu-dev==72.1-3+deb12u1 +libicu72==72.1-3+deb12u1 libk5crypto3==1.20.1-2+deb12u4 libnl-3-200==3.7.0-0.2+b1sonic1 libnl-cli-3-200==3.7.0-0.2+b1sonic1 libnl-genl-3-200==3.7.0-0.2+b1sonic1 libnl-nf-3-200==3.7.0-0.2+b1sonic1 libnl-route-3-200==3.7.0-0.2+b1sonic1 +libnsl-dev==1.3.0-2 libpcre3==2:8.39-15 libpython3.11==3.11.2-6+deb12u6 libswsscommon==1.0.0 +libtirpc-dev==1.3.3+ds-1 +libxml2==2.9.14+dfsg-1.3~deb12u5 +libxml2-dev==2.9.14+dfsg-1.3~deb12u5 +libxslt1-dev==1.1.35-1+deb12u3 +libxslt1.1==1.1.35-1+deb12u3 libyaml-0-2==0.2.5-1 libyang==1.0.73 libyang-cpp==1.0.73 +linux-libc-dev==6.1.162-1 python3-swsscommon==1.0.0 python3-yaml==6.0-3+b2 python3-yang==1.0.73 +rpcsvc-proto==1.4.3-1 sonic-db-cli==1.0.0 sonic-eventd==1.0.0-0 sonic-supervisord-utilities-rs==1.0.0 +zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-py3 b/files/build/versions-public/dockers/docker-gnmi-watchdog/versions-py3 similarity index 94% rename from files/build/versions/dockers/docker-config-engine-bookworm/versions-py3 rename to files/build/versions-public/dockers/docker-gnmi-watchdog/versions-py3 index 6e94aee194a..8930e0d56c1 100644 --- a/files/build/versions/dockers/docker-config-engine-bookworm/versions-py3 +++ b/files/build/versions-public/dockers/docker-gnmi-watchdog/versions-py3 @@ -12,7 +12,7 @@ pyangbind==0.8.2 pyyaml==6.0.3 redis==5.0.1 redis-dump-load==1.1 -regex==2025.11.3 +regex==2026.2.19 six==1.17.0 tabulate==0.9.0 xmltodict==0.12.0 diff --git a/files/build/versions/dockers/docker-lldp/versions-deb-bookworm b/files/build/versions-public/dockers/docker-lldp/versions-deb-bookworm similarity index 79% rename from files/build/versions/dockers/docker-lldp/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-lldp/versions-deb-bookworm index 563eea63a46..0a640b65963 100644 --- a/files/build/versions/dockers/docker-lldp/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-lldp/versions-deb-bookworm @@ -10,7 +10,7 @@ libdw1==0.188-2.1 libedit2==3.1-20221030-2 libevent-2.1-7==2.1.12-stable-8 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -18,20 +18,20 @@ libmpfr6==4.2.0-1 libpci3==1:3.9.0-4 libsensors-config==1:3.6.0-7.1 libsensors5==1:3.6.0-7.1 -libsnmp-base==5.9.3+dfsg-2 -libsnmp40==5.9.3+dfsg-2 +libsnmp-base==5.9.3+dfsg-2+deb12u1 +libsnmp40==5.9.3+dfsg-2+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 -libxml2==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 libyang-cpp-dbgsym==1.0.73 lldpd==1.0.16-1+deb12u1 lldpd-dbgsym==1.0.16-1+deb12u1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 pci.ids==0.0~2023.04.11-1 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 diff --git a/files/build/versions/dockers/docker-macsec/versions-deb-bookworm b/files/build/versions-public/dockers/docker-macsec/versions-deb-bookworm similarity index 85% rename from files/build/versions/dockers/docker-macsec/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-macsec/versions-deb-bookworm index 79dbc6eeb5d..c159715e275 100644 --- a/files/build/versions/dockers/docker-macsec/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-macsec/versions-deb-bookworm @@ -9,7 +9,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -17,13 +17,13 @@ libmpfr6==4.2.0-1 libpcsclite1==1.9.9-2 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-mux/versions-deb-bookworm b/files/build/versions-public/dockers/docker-mux/versions-deb-bookworm similarity index 86% rename from files/build/versions/dockers/docker-mux/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-mux/versions-deb-bookworm index 0a780a32561..ccd25425540 100644 --- a/files/build/versions/dockers/docker-mux/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-mux/versions-deb-bookworm @@ -13,20 +13,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-nat/versions-deb-bookworm b/files/build/versions-public/dockers/docker-nat/versions-deb-bookworm similarity index 86% rename from files/build/versions/dockers/docker-nat/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-nat/versions-deb-bookworm index 1b837bb6dc5..0bf070b56ce 100644 --- a/files/build/versions/dockers/docker-nat/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-nat/versions-deb-bookworm @@ -12,7 +12,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libip4tc2==1.8.9-2 @@ -25,14 +25,14 @@ libnfnetlink0==1.0.2-2 libnftnl11==1.2.4-2 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 netbase==6.4 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm b/files/build/versions-public/dockers/docker-orchagent/versions-deb-bookworm similarity index 64% rename from files/build/versions/dockers/docker-orchagent/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-orchagent/versions-deb-bookworm index a12d36df514..ed6351e02e8 100644 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-orchagent/versions-deb-bookworm @@ -1,23 +1,42 @@ arping==2.23-1 +binutils==2.40-2 +binutils-aarch64-linux-gnu==2.40-2 +binutils-common==2.40-2 bridge-utils==1.7.1-1 conntrack==1:1.4.7-1+b2 +cpp==4:12.2.0-3 +cpp-12==12.2.0-14+deb12u1 +gcc-12==12.2.0-14+deb12u1 gdb==13.1-3 gdbserver==13.1-3 ifupdown==0.8.41 +libasan8==12.2.0-14+deb12u1 libbabeltrace1==1.5.11-1+b2 +libbinutils==2.40-2 libboost-regex1.74.0==1.74.0+ds1-21 libcbor0.8==0.8.0-2+b1 +libcc1-0==12.2.0-14+deb12u1 +libctf-nobfd0==2.40-2 +libctf0==2.40-2 libcurl3-gnutls==7.88.1-10+deb12u14 libdebuginfod-common==0.188-2.1 libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libgcc-12-dev==12.2.0-14+deb12u1 +libglib2.0-0==2.74.6-2+deb12u8 +libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 +libgprofng0==2.40-2 +libhwasan0==12.2.0-14+deb12u1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 +libisl23==0.25-1.1 +libitm1==12.2.0-14+deb12u1 libkmod2==30+20221128-1 +liblsan0==12.2.0-14+deb12u1 +libmpc3==1.3.1-1 libmpfr6==4.2.0-1 libnet1==1.1.6+dfsg-3.2 libnetfilter-conntrack3==1.0.9-3 @@ -27,15 +46,17 @@ libpci3==1:3.9.0-4 libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 +libtsan2==12.2.0-14+deb12u1 +libubsan1==12.2.0-14+deb12u1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 ndisc6==1.0.5-1+b2 ndppd==0.2.5-6 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 pci.ids==0.0~2023.04.11-1 pciutils==1:3.9.0-4 python3-netifaces==0.11.0-2+b1 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-orchagent/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-snmp/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-orchagent/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-orchagent/versions-py3 b/files/build/versions-public/dockers/docker-orchagent/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-orchagent/versions-py3 rename to files/build/versions-public/dockers/docker-orchagent/versions-py3 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm b/files/build/versions-public/dockers/docker-platform-monitor/versions-deb-bookworm similarity index 90% rename from files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-platform-monitor/versions-deb-bookworm index d6645adb220..bf2e1cf3a8e 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-platform-monitor/versions-deb-bookworm @@ -1,4 +1,5 @@ binutils==2.40-2 +binutils-aarch64-linux-gnu==2.40-2 binutils-common==2.40-2 binutils-x86-64-linux-gnu==2.40-2 bzip2==1.0.8-5+b1 @@ -26,6 +27,7 @@ gdbserver==13.1-3 i2c-tools==4.3-2+b3 ipmitool==1.8.19-4+deb12u2 iputils-ping==3:20221126-1+deb12u1 +kmod==30+20221128-1 libapparmor1==3.0.8-3 libasan8==12.2.0-14+deb12u1 libbabeltrace1==1.5.11-1+b2 @@ -54,12 +56,13 @@ libfreeipmi17==1.6.10-1+b1 libfreetype6==2.12.1+dfsg-5+deb12u4 libfribidi0==1.0.8-2.1 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 libgraphite2-3==1.3.14-1 libharfbuzz0b==6.0.0+dfsg-3 +libhwasan0==12.2.0-14+deb12u1 libi2c0==4.3-2+b3 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -80,7 +83,7 @@ libpangocairo-1.0-0==1.50.12+ds-1 libpangoft2-1.0-0==1.50.12+ds-1 libpci3==1:3.9.0-4 libpixman-1-0==0.42.2-1 -libpng16-16==1.6.39-2+deb12u1 +libpng16-16==1.6.39-2+deb12u3 libpython3-dev==3.11.2-1+b1 libpython3.11-dev==3.11.2-6+deb12u6 libquadmath0==12.2.0-14+deb12u1 @@ -91,8 +94,8 @@ libsensors5==1:3.6.0-7.1 libsensors5-dbgsym==1:3.6.0-7.1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libswsscommon-dbgsym==1.0.0 libthai-data==0.1.29-1 @@ -109,16 +112,18 @@ libxcb-shm0==1.15-1 libxcb1==1.15-1 libxdmcp6==1:1.1.2-3 libxext6==2:1.3.4-1+b1 -libxml2==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 libxrender1==1:0.9.10-1.1 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 lm-sensors==1:3.6.0-7.1 lm-sensors-dbgsym==1:3.6.0-7.1 make==4.3-4.1 +mft==4.34.0-145 +mlxbf-bootctl==2.1 nvme-cli==2.4+really2.3-3 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 patch==2.7.6-7 pci.ids==0.0~2023.04.11-1 pciutils==1:3.9.0-4 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-platform-monitor/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-platform-monitor/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py3 b/files/build/versions-public/dockers/docker-platform-monitor/versions-py3 similarity index 75% rename from files/build/versions/dockers/docker-platform-monitor/versions-py3 rename to files/build/versions-public/dockers/docker-platform-monitor/versions-py3 index 3c5702ddaf8..9a403159892 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py3 +++ b/files/build/versions-public/dockers/docker-platform-monitor/versions-py3 @@ -1,7 +1,7 @@ attrs==22.2.0 blkinfo==0.2.0 -build==1.3.0 -certifi==2025.11.12 +build==1.4.0 +certifi==2026.1.4 charset-normalizer==3.4.4 enum34==1.1.10 grpcio==1.51.1 @@ -12,12 +12,12 @@ inotify==0.2.12 jsonschema==2.6.0 libpci==0.2 netifaces==0.11.0 -packaging==25.0 +packaging==26.0 protobuf==4.25.8 -psutil==7.1.3 +psutil==7.2.2 pyproject_hooks==1.2.0 pyrsistent==0.18.1 requests==2.32.5 -smbus2==0.5.0 +smbus2==0.6.0 thrift==0.13.0 -urllib3==2.6.2 +urllib3==2.6.3 diff --git a/files/build/versions/dockers/docker-ptf/versions-deb-bookworm b/files/build/versions-public/dockers/docker-ptf/versions-deb-bookworm similarity index 94% rename from files/build/versions/dockers/docker-ptf/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-ptf/versions-deb-bookworm index 5b8f802b160..5b44d43aabb 100644 --- a/files/build/versions/dockers/docker-ptf/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-ptf/versions-deb-bookworm @@ -33,7 +33,7 @@ dbus-user-session==1.14.10-1~deb12u1 dconf-gsettings-backend==0.40.0-4 dconf-service==0.40.0-4 diffstat==1.65-1 -dirmngr==2.2.40-1.1+deb12u1 +dirmngr==2.2.40-1.1+deb12u2 dmsetup==2:1.02.185-2 dpkg-dev==1.21.22 ed==1.19-1 @@ -60,17 +60,17 @@ gettext-base==0.21-12 gfortran==4:12.2.0-3 gfortran-12==12.2.0-14+deb12u1 gir1.2-glib-2.0==1.74.0-3 -git==1:2.39.5-0+deb12u2 -git-man==1:2.39.5-0+deb12u2 -gnupg==2.2.40-1.1+deb12u1 -gnupg-l10n==2.2.40-1.1+deb12u1 -gnupg-utils==2.2.40-1.1+deb12u1 -gpg==2.2.40-1.1+deb12u1 -gpg-agent==2.2.40-1.1+deb12u1 -gpg-wks-client==2.2.40-1.1+deb12u1 -gpg-wks-server==2.2.40-1.1+deb12u1 -gpgconf==2.2.40-1.1+deb12u1 -gpgsm==2.2.40-1.1+deb12u1 +git==1:2.39.5-0+deb12u3 +git-man==1:2.39.5-0+deb12u3 +gnupg==2.2.40-1.1+deb12u2 +gnupg-l10n==2.2.40-1.1+deb12u2 +gnupg-utils==2.2.40-1.1+deb12u2 +gpg==2.2.40-1.1+deb12u2 +gpg-agent==2.2.40-1.1+deb12u2 +gpg-wks-client==2.2.40-1.1+deb12u2 +gpg-wks-server==2.2.40-1.1+deb12u2 +gpgconf==2.2.40-1.1+deb12u2 +gpgsm==2.2.40-1.1+deb12u2 gsettings-desktop-schemas==43.0-1 gstreamer1.0-gl==1.22.0-3+deb12u5 gstreamer1.0-plugins-base==1.22.0-3+deb12u5 @@ -79,7 +79,7 @@ hicolor-icon-theme==0.17-2 hping3==3.a2.ds2-10 ibverbs-providers==44.0-2 icu-devtools==72.1-3+deb12u1 -inetutils-telnet==2:2.4-2+deb12u1 +inetutils-telnet==2:2.4-2+deb12u2 iproute2==6.1.0-3 iptables==1.8.9-2 iputils-ping==3:20221126-1+deb12u1 @@ -120,6 +120,7 @@ libbcg729-0==1.1.1-2 libbinutils==2.40-2 libblas3==3.11.0-2 libboost-atomic1.74.0==1.74.0+ds1-21 +libboost-atomic1.81.0==1.81.0-5+deb12u1 libboost-atomic1.83-dev==1.83.0-4.2~bpo12+1 libboost-atomic1.83.0==1.83.0-4.2~bpo12+1 libboost-chrono1.83-dev==1.83.0-4.2~bpo12+1 @@ -203,7 +204,7 @@ libc6-i386==2.36-9+deb12u13 libcaf-openmpi-3==2.10.1-1+b1 libcairo-gobject2==1.16.0-7 libcairo2==1.16.0-7 -libcap2-bin==1:2.66-4+deb12u2 +libcap2-bin==1:2.66-4+deb12u2+b2 libcbor0.8==0.8.0-2+b1 libcc1-0==12.2.0-14+deb12u1 libcdparanoia0==3.10.2+debian-14 @@ -283,22 +284,23 @@ libgcc-12-dev==12.2.0-14+deb12u1 libgd3==2.3.3-9 libgdbm-compat4==1.23-3 libgdbm6==1.23-3 -libgdk-pixbuf-2.0-0==2.42.10+dfsg-1+deb12u2 -libgdk-pixbuf2.0-bin==2.42.10+dfsg-1+deb12u2 -libgdk-pixbuf2.0-common==2.42.10+dfsg-1+deb12u2 +libgdk-pixbuf-2.0-0==2.42.10+dfsg-1+deb12u3 +libgdk-pixbuf2.0-bin==2.42.10+dfsg-1+deb12u3 +libgdk-pixbuf2.0-common==2.42.10+dfsg-1+deb12u3 libgfortran-12-dev==12.2.0-14+deb12u1 libgfortran5==12.2.0-14+deb12u1 libgirepository-1.0-1==1.74.0-3 libgl1==1.6.0-1 libgl1-mesa-dri==22.3.6-1+deb12u1 libglapi-mesa==22.3.6-1+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 -libglib2.0-data==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 +libglib2.0-data==2.74.6-2+deb12u8 libglvnd0==1.6.0-1 libglx-mesa0==22.3.6-1+deb12u1 libglx0==1.6.0-1 libgmp-dev==2:6.2.1+dfsg1-1.1 libgmpxx4ldbl==2:6.2.1+dfsg1-1.1 +libgnutls30==3.7.9-2+deb12u6 libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 @@ -373,7 +375,7 @@ libmpc3==1.3.1-1 libmpfr6==4.2.0-1 libmpg123-0==1.31.2-1+deb12u1 libmtdev1==1.1.6-1 -libmunge2==0.5.15-2 +libmunge2==0.5.15-2+deb12u1 libnanomsg-dev==1.1.5+dfsg-1.1+b1 libnanomsg5==1.1.5+dfsg-1.1+b1 libncurses-dev==6.4-4 @@ -409,7 +411,7 @@ libopenmpi-dev==4.1.4-3+b1 libopenmpi3==4.1.4-3+b1 libopus0==1.3.1-3 liborc-0.4-0==1:0.4.33-2 -libpam-cap==1:2.66-4+deb12u2 +libpam-cap==1:2.66-4+deb12u2+b2 libpam-systemd==252.39-1~deb12u1 libpango-1.0-0==1.50.12+ds-1 libpangocairo-1.0-0==1.50.12+ds-1 @@ -426,7 +428,7 @@ libpixman-1-0==0.42.2-1 libpkgconf3==1.8.1-1 libpmix-dev==4.2.2-1+deb12u1 libpmix2==4.2.2-1+deb12u1 -libpng16-16==1.6.39-2+deb12u1 +libpng16-16==1.6.39-2+deb12u3 libpopt0==1.19+dfsg-1 libproc2-0==2:4.0.2-3 libprotobuf-dev==3.21.12-3 @@ -482,16 +484,16 @@ libsm6==2:1.2.3-1 libsmi2ldbl==0.4.8+dfsg2-16 libsnappy1v5==1.1.9-3 libsndfile1==1.2.0-1+deb12u1 -libsodium23==1.0.18-1 +libsodium23==1.0.18-1+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 libspandsp2==0.0.6+dfsg-2+b1 libspeexdsp1==1.2.1-1 libsqlite3-0==3.40.1-2+deb12u2 -libssh-gcrypt-4==0.10.6-0+deb12u1 +libssh-gcrypt-4==0.10.6-0+deb12u2 libssh2-1==1.10.0-3+b1 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libsvtav1enc1==1.4.1+dfsg-1 libsystemd-shared==252.39-1~deb12u1 @@ -527,7 +529,7 @@ libwayland-client0==1.21.0-1 libwayland-cursor0==1.21.0-1 libwayland-egl1==1.21.0-1 libwayland-server0==1.21.0-1 -libwbclient0==2:4.17.12+dfsg-0+deb12u2 +libwbclient0==2:4.17.12+dfsg-0+deb12u3 libwebp7==1.2.4-0.2+deb12u1 libwebpdemux2==1.2.4-0.2+deb12u1 libwebpmux3==1.2.4-0.2+deb12u1 @@ -572,8 +574,8 @@ libxi6==2:1.8-1+b1 libxinerama1==2:1.1.4-3 libxkbcommon-x11-0==1.5.0-1 libxkbcommon0==1.5.0-1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 +libxml2-dev==2.9.14+dfsg-1.3~deb12u5 libxmuu1==2:1.1.3-3 libxnvctrl0==525.85.05-3~deb12u1 libxpm4==1:3.5.12-1.1+deb12u1 @@ -589,7 +591,7 @@ libyaml-0-2==0.2.5-1 libyuv0==0.0~git20230123.b2528b0-1 libz3-4==4.8.12-3.1 libz3-dev==4.8.12-3.1 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 llvm==1:14.0-55.7~deb12u1 llvm-14==1:14.0.6-12 llvm-14-dev==1:14.0.6-12 @@ -623,7 +625,7 @@ openmpi-common==4.1.4-3 openssh-client==1:9.2p1-2+deb12u7 openssh-server==1:9.2p1-2+deb12u7 openssh-sftp-server==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssl==3.0.18-1~deb12u2 p4lang-bmv2==1.15.0-7 p4lang-p4c==1.2.4.2-2 p4lang-pi==0.1.0-15 @@ -733,7 +735,7 @@ systemd==252.39-1~deb12u1 systemd-sysv==252.39-1~deb12u1 tcpd==7.6.q-32 tcpdump==4.99.3-1 -telnet==0.17+2.4-2+deb12u1 +telnet==0.17+2.4-2+deb12u2 thrift-compiler==0.17.0-2+b2 tk8.6-blt2.5==2.5.3+dfsg-4.1 tmux==3.3a-3 diff --git a/files/build/versions/dockers/docker-ptf/versions-py3 b/files/build/versions-public/dockers/docker-ptf/versions-py3 similarity index 60% rename from files/build/versions/dockers/docker-ptf/versions-py3 rename to files/build/versions-public/dockers/docker-ptf/versions-py3 index 37527930fc9..4fc5d71523b 100644 --- a/files/build/versions/dockers/docker-ptf/versions-py3 +++ b/files/build/versions-public/dockers/docker-ptf/versions-py3 @@ -1,37 +1,45 @@ +asttokens==3.0.1 bcrypt==5.0.0 blinker==1.9.0 cffi==2.0.0 click==8.3.1 -cryptography==46.0.3 -cython==3.2.2 +cryptography==46.0.5 +cython==3.2.4 decorator==5.2.1 dpkt==1.9.8 enum34==1.1.10 exabgp==4.2.25 -flask==3.0.3 -grpcio==1.76.0 -grpcio-tools==1.76.0 +executing==2.2.1 +flask==3.1.3 +grpcio==1.78.1 +grpcio-tools==1.78.1 invoke==2.2.1 ipaddress==1.0.23 -ipython==5.4.1 +ipython==9.10.0 +ipython_pygments_lexers==1.1.1 itsdangerous==2.2.0 +jedi==0.19.2 jinja2==3.1.6 lxml==6.0.2 markupsafe==3.0.3 +matplotlib-inline==0.2.1 nnpy==1.4.2 paramiko==4.0.0 +parso==0.8.6 pexpect==4.9.0 pickleshare==0.7.5 pip==23.0.1 plumbum==1.10.0 prompt-toolkit==1.0.18 +prompt_toolkit==3.0.52 protobuf==3.20.3 ptyprocess==0.7.0 -pyaml==25.7.0 +pure_eval==0.2.3 +pyaml==26.2.1 pybrctl==0.1.4 -pycparser==2.23 +pycparser==3.0 pygments==2.19.2 -pynacl==1.6.1 +pynacl==1.6.2 pyrasite==2.0 pyro4==4.82 pysubnettree==0.38.1 @@ -40,16 +48,17 @@ pyyaml==6.0.3 retrying==1.4.2 rpyc==6.0.2 saithrift==0.9 -scapy==2.5.0 +scapy==2.7.0 serpent==1.42 setuptools==51.0.0 simplegeneric==0.8.1 -six==1.16.0 +six==1.17.0 +stack-data==0.6.3 supervisor==4.3.0 thrift==0.22.0 -tornado==6.5.3 +tornado==6.5.4 traitlets==5.14.3 typing_extensions==4.15.0 -unittest-xml-reporting==3.2.0 -wcwidth==0.2.14 -werkzeug==3.1.2 +unittest-xml-reporting==4.0.0 +wcwidth==0.6.0 +werkzeug==3.1.6 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm b/files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm index d9bfb2dc9c0..f566a120dd1 100644 --- a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm @@ -9,20 +9,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 radvd==1:2.19-1+b1 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 b/files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 similarity index 100% rename from files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 rename to files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-router-advertiser/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-sflow/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sflow/versions-deb-bookworm similarity index 85% rename from files/build/versions/dockers/docker-sflow/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-sflow/versions-deb-bookworm index 372e992d1c7..a7cdf0e0829 100644 --- a/files/build/versions/dockers/docker-sflow/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-sflow/versions-deb-bookworm @@ -12,20 +12,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 psample==1.1-1 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-bookworm b/files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm similarity index 82% rename from files/build/versions/dockers/docker-snmp/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm index 8e7139fe2c0..5f96e08587d 100644 --- a/files/build/versions/dockers/docker-snmp/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm @@ -28,7 +28,7 @@ libexpat1-dev==2.5.0-1+deb12u2 libfido2-1==1.12.0-2+b1 libfreeipmi17==1.6.10-1+b1 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 @@ -49,32 +49,32 @@ libpython3.11-dev==3.11.2-6+deb12u6 libquadmath0==12.2.0-14+deb12u1 libsensors-config==1:3.6.0-7.1 libsensors5==1:3.6.0-7.1 -libsnmp-base==5.9.3+dfsg-2 -libsnmp40==5.9.3+dfsg-2 -libsnmp40-dbgsym==5.9.3+dfsg-2 +libsnmp-base==5.9.3+dfsg-2+deb12u1 +libsnmp40==5.9.3+dfsg-2+deb12u1 +libsnmp40-dbgsym==5.9.3+dfsg-2+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +linux-libc-dev==6.1.162-1 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 pci.ids==0.0~2023.04.11-1 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 python3.11-dev==3.11.2-6+deb12u6 rpcsvc-proto==1.4.3-1 sensible-utils==0.0.17+nmu1 -snmp==5.9.3+dfsg-2 -snmp-dbgsym==5.9.3+dfsg-2 -snmpd==5.9.3+dfsg-2 -snmpd-dbgsym==5.9.3+dfsg-2 +snmp==5.9.3+dfsg-2+deb12u1 +snmp-dbgsym==5.9.3+dfsg-2+deb12u1 +snmpd==5.9.3+dfsg-2+deb12u1 +snmpd-dbgsym==5.9.3+dfsg-2+deb12u1 sonic-db-cli-dbgsym==1.0.0 sonic-eventd-dbgsym==1.0.0-0 sshpass==1.09-1+b1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm-arm64 b/files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm-arm64 similarity index 100% rename from files/build/versions/dockers/docker-platform-monitor/versions-deb-bookworm-arm64 rename to files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm-arm64 diff --git a/files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm-armhf new file mode 100644 index 00000000000..76806cf3ac6 --- /dev/null +++ b/files/build/versions-public/dockers/docker-snmp/versions-deb-bookworm-armhf @@ -0,0 +1 @@ +binutils-arm-linux-gnueabihf==2.40-2 diff --git a/files/build/versions/dockers/docker-snmp/versions-py3 b/files/build/versions-public/dockers/docker-snmp/versions-py3 similarity index 79% rename from files/build/versions/dockers/docker-snmp/versions-py3 rename to files/build/versions-public/dockers/docker-snmp/versions-py3 index d093fa28085..cc99301e4da 100644 --- a/files/build/versions/dockers/docker-snmp/versions-py3 +++ b/files/build/versions-public/dockers/docker-snmp/versions-py3 @@ -1,4 +1,4 @@ hiredis==3.3.0 -psutil==7.1.3 +psutil==7.2.2 python_arptable==0.0.2 smbus==1.1.post2 diff --git a/files/build/versions/dockers/docker-sonic-bmp/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sonic-bmp/versions-deb-bookworm similarity index 83% rename from files/build/versions/dockers/docker-sonic-bmp/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-sonic-bmp/versions-deb-bookworm index 9a2da4e40eb..74865eab2f5 100644 --- a/files/build/versions/dockers/docker-sonic-bmp/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-sonic-bmp/versions-deb-bookworm @@ -9,20 +9,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-sonic-bmp/versions-py3 b/files/build/versions-public/dockers/docker-sonic-bmp/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-sonic-bmp/versions-py3 rename to files/build/versions-public/dockers/docker-sonic-bmp/versions-py3 diff --git a/files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sonic-gnmi/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-sonic-gnmi/versions-deb-bookworm index 4193502ff9b..109d646f9dc 100644 --- a/files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-sonic-gnmi/versions-deb-bookworm @@ -9,20 +9,20 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm similarity index 90% rename from files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm index e5b2cfef95b..f145c9566c5 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm @@ -30,7 +30,7 @@ libedit2==3.1-20221030-2 libexpat1-dev==2.5.0-1+deb12u2 libfido2-1==1.12.0-2+b1 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 @@ -50,19 +50,19 @@ libpython3.11-dev==3.11.2-6+deb12u6 libquadmath0==12.2.0-14+deb12u1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libunwind8==1.6.2-3 -libxml2==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +linux-libc-dev==6.1.162-1 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 python3.11-dev==3.11.2-6+deb12u6 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-bookworm-arm64 b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-arm64 similarity index 100% rename from files/build/versions/dockers/docker-snmp/versions-deb-bookworm-arm64 rename to files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-arm64 diff --git a/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-armhf new file mode 100644 index 00000000000..76806cf3ac6 --- /dev/null +++ b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-armhf @@ -0,0 +1 @@ +binutils-arm-linux-gnueabihf==2.40-2 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-py3 similarity index 60% rename from files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 rename to files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-py3 index 8416ee08204..58bb7e7aac5 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions-public/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -1,5 +1,5 @@ -certifi==2025.11.12 +certifi==2026.1.4 charset-normalizer==3.4.4 idna==3.11 requests==2.32.5 -urllib3==2.6.2 +urllib3==2.6.3 diff --git a/files/build/versions-public/dockers/docker-sonic-otel/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sonic-otel/versions-deb-bookworm new file mode 100644 index 00000000000..f34d9a4c8d3 --- /dev/null +++ b/files/build/versions-public/dockers/docker-sonic-otel/versions-deb-bookworm @@ -0,0 +1,37 @@ +gdb==13.1-3 +gdbserver==13.1-3 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u14 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2+deb12u8 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3+deb12u1 +libipt2==2.0.5-1 +libmpfr6==4.2.0-1 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +libyang-cpp-dbgsym==1.0.73 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 +otelcol-contrib==0.144.0 +python3-swsscommon-dbgsym==1.0.0 +python3-yang-dbgsym==1.0.73 +sensible-utils==0.0.17+nmu1 +sonic-db-cli-dbgsym==1.0.0 +sonic-eventd-dbgsym==1.0.0-0 +sshpass==1.09-1+b1 +strace==6.1-0.1 +ucf==3.0043+nmu1+deb12u1 +vim==2:9.0.1378-2+deb12u2 +vim-runtime==2:9.0.1378-2+deb12u2 +wget==1.21.3-1+deb12u1 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sonic-vs/versions-deb-bookworm similarity index 82% rename from files/build/versions/dockers/docker-sonic-vs/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-sonic-vs/versions-deb-bookworm index 3b4ade9daf7..005b586712c 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-sonic-vs/versions-deb-bookworm @@ -11,22 +11,22 @@ dbus-bin==1.14.10-1~deb12u1 dbus-daemon==1.14.10-1~deb12u1 dbus-session-bus-common==1.14.10-1~deb12u1 dbus-system-bus-common==1.14.10-1~deb12u1 -dirmngr==2.2.40-1.1+deb12u1 +dirmngr==2.2.40-1.1+deb12u2 dpkg-dev==1.21.22 ethtool==1:6.1-1 fontconfig-config==2.14.1-4 fonts-dejavu-core==2.37-6 frr==10.4.1-sonic-0 gir1.2-glib-2.0==1.74.0-3 -gnupg==2.2.40-1.1+deb12u1 -gnupg-l10n==2.2.40-1.1+deb12u1 -gnupg-utils==2.2.40-1.1+deb12u1 -gpg==2.2.40-1.1+deb12u1 -gpg-agent==2.2.40-1.1+deb12u1 -gpg-wks-client==2.2.40-1.1+deb12u1 -gpg-wks-server==2.2.40-1.1+deb12u1 -gpgconf==2.2.40-1.1+deb12u1 -gpgsm==2.2.40-1.1+deb12u1 +gnupg==2.2.40-1.1+deb12u2 +gnupg-l10n==2.2.40-1.1+deb12u2 +gnupg-utils==2.2.40-1.1+deb12u2 +gpg==2.2.40-1.1+deb12u2 +gpg-agent==2.2.40-1.1+deb12u2 +gpg-wks-client==2.2.40-1.1+deb12u2 +gpg-wks-server==2.2.40-1.1+deb12u2 +gpgconf==2.2.40-1.1+deb12u2 +gpgsm==2.2.40-1.1+deb12u2 icu-devtools==72.1-3+deb12u1 ifupdown==0.8.41 iptables==1.8.9-2 @@ -45,8 +45,8 @@ libedit2==3.1-20221030-2 libeina1a==1.26.3-1+b1 libfido2-1==1.12.0-2+b1 libgirepository-1.0-1==1.74.0-3 -libglib2.0-0==2.74.6-2+deb12u7 -libglib2.0-data==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 +libglib2.0-data==2.74.6-2+deb12u8 libgssapi-krb5-2==1.20.1-2+deb12u1+fips libgssrpc4==1.20.1-2+deb12u1+fips libicu-dev==72.1-3+deb12u1 @@ -79,16 +79,16 @@ libprotobuf-c-dev==1.4.1-1+b1 libprotobuf-c1==1.4.1-1+b1 libprotoc32==3.21.12-3 libsaivs==1.0.0 -libsodium-dev==1.0.18-1 -libssl3==3.0.17-1~deb12u3 +libsodium-dev==1.0.18-1+deb12u1 +libssl3==3.0.18-1~deb12u2 libteam-utils==1.31-1 libtirpc-dev==1.3.3+ds-1 libunwind8==1.6.2-3 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 +libxml2-dev==2.9.14+dfsg-1.3~deb12u5 libyang3==3.12.2-1 libzmq3-dev==4.3.4-6 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 logrotate==3.21.0-1 lsof==4.95.0-1 ndisc6==1.0.5-1+b2 @@ -96,7 +96,7 @@ netbase==6.4 openssh-client==1:9.2p1-2+deb12u7 openssh-server==1:9.2p1-2+deb12u7 openssh-sftp-server==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssl==3.0.18-1~deb12u2 pinentry-curses==1.2.1-1 pkgconf==1.8.1-1 protobuf-c-compiler==1.4.1-1+b1 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions-public/dockers/docker-sonic-vs/versions-py3 similarity index 73% rename from files/build/versions/dockers/docker-sonic-vs/versions-py3 rename to files/build/versions-public/dockers/docker-sonic-vs/versions-py3 index 041caaf6f49..37f690b5d61 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions-public/dockers/docker-sonic-vs/versions-py3 @@ -1,36 +1,37 @@ bcrypt==5.0.0 -blessed==1.25.0 -certifi==2025.11.12 +blessed==1.30.0 +certifi==2026.1.4 cffi==2.0.0 charset-normalizer==3.4.4 click==8.1.8 click-log==0.4.0 colorful==0.5.8 -cryptography==46.0.3 +cryptography==46.0.5 dbus-python==1.4.0 docker==7.1.0 docker-image-py==0.1.13 enlighten==1.14.1 -filelock==3.20.0 +filelock==3.24.3 idna==3.11 invoke==2.2.1 jsonpatch==1.33 lazy-object-proxy==1.12.0 -m2crypto==0.46.2 +m2crypto==0.47.0 netifaces==0.11.0 +packaging==26.0 paramiko==4.0.0 pexpect==4.9.0 prefixed==0.9.0 prettyprinter==0.18.0 -protobuf==6.33.2 -psutil==7.1.3 +protobuf==6.33.5 +psutil==7.2.2 ptyprocess==0.7.0 pyangbind==0.8.1 pycairo==1.26.1 -pycparser==2.23 +pycparser==3.0 pygments==2.19.2 pygobject==3.42.2 -pynacl==1.6.1 +pynacl==1.6.2 pyroute2==0.9.5 requests==2.32.5 scapy==2.5.0 @@ -38,6 +39,6 @@ scp==0.14.5 semantic-version==2.10.0 systemd-python==235 toposort==1.6 -urllib3==2.6.2 -wcwidth==0.2.14 +urllib3==2.6.3 +wcwidth==0.6.0 www-authenticate==0.9.2 diff --git a/files/build/versions/dockers/docker-swss-layer-bookworm/versions-deb-bookworm b/files/build/versions-public/dockers/docker-swss-layer-bookworm/versions-deb-bookworm similarity index 100% rename from files/build/versions/dockers/docker-swss-layer-bookworm/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-swss-layer-bookworm/versions-deb-bookworm diff --git a/files/build/versions-public/dockers/docker-syncd-bluefield/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-bluefield/versions-deb-bookworm new file mode 100644 index 00000000000..89252c94137 --- /dev/null +++ b/files/build/versions-public/dockers/docker-syncd-bluefield/versions-deb-bookworm @@ -0,0 +1,60 @@ +binutils==2.40-2 +binutils-aarch64-linux-gnu==2.40-2 +binutils-common==2.40-2 +binutils-dev==2.40-2 +doca-sdk-argp==3.3.0055-1 +doca-sdk-common==3.3.0055-1 +doca-sdk-dpdk-bridge==3.3.0055-1 +doca-sdk-flow==3.3.0055-1 +ethtool==1:6.1-1 +hwdata==0.368-1 +ibverbs-providers==2601.0.1-1 +kmod==30+20221128-1 +libbinutils==2.40-2 +libctf-nobfd0==2.40-2 +libctf0==2.40-2 +libdbus-1-dev==1.14.10-1~deb12u1 +libexpat1-dev==2.5.0-1+deb12u2 +libgprofng0==2.40-2 +libgrpc-dev==1.39.0-1 +libibverbs-dev==2601.0.1-1 +libibverbs1==2601.0.1-1 +libjs-jquery==3.6.1+dfsg+~3.5.14-1 +libjs-sphinxdoc==5.3.0-4 +libjs-underscore==1.13.4~dfsg+~1.11.4-3 +libkmod2==30+20221128-1 +libnl-3-dev==3.7.0-0.2+b1sonic1 +libnl-route-3-dev==3.7.0-0.2+b1sonic1 +libnuma1==2.0.16-1 +libnvhws1==26.01.3-1 +libpcap0.8==1.10.3-1 +libpcap0.8-dev==1.10.3-1 +libpci3==1:3.9.0-4 +libpkgconf3==1.8.1-1 +libpython3-dev==3.11.2-1+b1 +libpython3.11-dev==3.11.2-6+deb12u6 +librxpcompiler-dev==22.05.1 +libsaimetadata==1.0.0 +libsairedis==1.0.0 +lsof==4.95.0-1 +mft==4.34.0-145 +mlnx-dpdk==22.11.0-2510.2.1 +mlnx-iproute2==2601.0.2-1 +mlnx-ofed-kernel-utils==26.01.OFED.26.01.0.2.9.1-1 +mlnx-sai==1.mlnx.SAIBuild0.0.50.0 +mlnx-tools==2601.0.0-1 +pci.ids==0.0~2023.04.11-1 +pciutils==1:3.9.0-4 +pkg-config==1.8.1-1 +pkgconf==1.8.1-1 +pkgconf-bin==1.8.1-1 +python3-dev==3.11.2-1+b1 +python3-pip==23.0.1+dfsg-1 +python3.11-dev==3.11.2-6+deb12u6 +rxp-compiler==22.05.1 +sdn-appliance==1.5-1mlnx1 +sgml-base==1.31 +syncd==1.0.0 +udev==252.39-1~deb12u1 +usb.ids==2025.07.26-0+deb12u1 +xml-core==0.18+nmu1 diff --git a/files/build/versions-public/dockers/docker-syncd-bluefield/versions-py3 b/files/build/versions-public/dockers/docker-syncd-bluefield/versions-py3 new file mode 100644 index 00000000000..5378bd18333 --- /dev/null +++ b/files/build/versions-public/dockers/docker-syncd-bluefield/versions-py3 @@ -0,0 +1,2 @@ +clang==14.0 +ctypeslib2==2.4.0 diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bookworm similarity index 92% rename from files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bookworm index aeb77ac602d..ae7246b0304 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bookworm @@ -23,7 +23,7 @@ libdouble-conversion3==3.2.1-1 libdpkg-perl==1.21.22 libexpat1-dev==2.5.0-1+deb12u2 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgprofng0==2.40-2 libicu72==72.1-3+deb12u1 @@ -47,18 +47,18 @@ libqt5dbus5==5.15.8+dfsg-11+deb12u3 libqt5network5==5.15.8+dfsg-11+deb12u3 libquadmath0==12.2.0-14+deb12u1 librhash0==1.4.3-3 -libssl3==3.0.17-1~deb12u3 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libthrift-0.17.0==0.17.0-2+b2 libtirpc-dev==1.3.3+ds-1 libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libuv1==1.44.2-1+deb12u1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -linux-libc-dev==6.1.158-1 +libxml2==2.9.14+dfsg-1.3~deb12u5 +linux-libc-dev==6.1.162-1 make==4.3-4.1 netbase==6.4 -openssl==3.0.17-1~deb12u3 +openssl==3.0.18-1~deb12u2 patch==2.7.6-7 python3-scapy==2.5.0+dfsg-2 python3.11-dev==3.11.2-6+deb12u6 diff --git a/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-py3 b/files/build/versions-public/dockers/docker-syncd-brcm-dnx-rpc/versions-py3 similarity index 70% rename from files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-py3 rename to files/build/versions-public/dockers/docker-syncd-brcm-dnx-rpc/versions-py3 index c0ba430e7c0..337559effbb 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-py3 +++ b/files/build/versions-public/dockers/docker-syncd-brcm-dnx-rpc/versions-py3 @@ -1,4 +1,4 @@ cffi==1.16.0 nnpy==1.4.2 -pycparser==2.23 +pycparser==3.0 scapy==2.5.0 diff --git a/files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-brcm-dnx/versions-deb-bookworm similarity index 86% rename from files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-brcm-dnx/versions-deb-bookworm index 76e6b71bb77..d69cc621e2c 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-brcm-dnx/versions-deb-bookworm @@ -11,7 +11,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -23,14 +23,14 @@ libsairedis==1.0.0 libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 lz4==1.9.4-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-brcm-rpc/versions-deb-bookworm similarity index 92% rename from files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-brcm-rpc/versions-deb-bookworm index aeb77ac602d..ae7246b0304 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-brcm-rpc/versions-deb-bookworm @@ -23,7 +23,7 @@ libdouble-conversion3==3.2.1-1 libdpkg-perl==1.21.22 libexpat1-dev==2.5.0-1+deb12u2 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgprofng0==2.40-2 libicu72==72.1-3+deb12u1 @@ -47,18 +47,18 @@ libqt5dbus5==5.15.8+dfsg-11+deb12u3 libqt5network5==5.15.8+dfsg-11+deb12u3 libquadmath0==12.2.0-14+deb12u1 librhash0==1.4.3-3 -libssl3==3.0.17-1~deb12u3 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libthrift-0.17.0==0.17.0-2+b2 libtirpc-dev==1.3.3+ds-1 libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libuv1==1.44.2-1+deb12u1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -linux-libc-dev==6.1.158-1 +libxml2==2.9.14+dfsg-1.3~deb12u5 +linux-libc-dev==6.1.162-1 make==4.3-4.1 netbase==6.4 -openssl==3.0.17-1~deb12u3 +openssl==3.0.18-1~deb12u2 patch==2.7.6-7 python3-scapy==2.5.0+dfsg-2 python3.11-dev==3.11.2-6+deb12u6 diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-py3 b/files/build/versions-public/dockers/docker-syncd-brcm-rpc/versions-py3 similarity index 70% rename from files/build/versions/dockers/docker-syncd-brcm-rpc/versions-py3 rename to files/build/versions-public/dockers/docker-syncd-brcm-rpc/versions-py3 index c0ba430e7c0..337559effbb 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-py3 +++ b/files/build/versions-public/dockers/docker-syncd-brcm-rpc/versions-py3 @@ -1,4 +1,4 @@ cffi==1.16.0 nnpy==1.4.2 -pycparser==2.23 +pycparser==3.0 scapy==2.5.0 diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-brcm/versions-deb-bookworm similarity index 87% rename from files/build/versions/dockers/docker-syncd-brcm/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-brcm/versions-deb-bookworm index 371a525bd53..bdf093bd7b5 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-brcm/versions-deb-bookworm @@ -11,7 +11,7 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -24,14 +24,14 @@ libsairedis==1.0.0 libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 lz4==1.9.4-1 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-mlnx-rpc/versions-deb-bookworm similarity index 94% rename from files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-mlnx-rpc/versions-deb-bookworm index 52b33ba2c6c..8d68cecd6e2 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-mlnx-rpc/versions-deb-bookworm @@ -24,7 +24,7 @@ libdouble-conversion3==3.2.1-1 libdpkg-perl==1.21.22 libexpat1-dev==2.5.0-1+deb12u2 libgcc-12-dev==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgomp1==12.2.0-14+deb12u1 libgprofng0==2.40-2 libisl23==0.25-1.1 @@ -47,17 +47,17 @@ libqt5dbus5==5.15.8+dfsg-11+deb12u3 libqt5network5==5.15.8+dfsg-11+deb12u3 libquadmath0==12.2.0-14+deb12u1 librhash0==1.4.3-3 -libssl3==3.0.17-1~deb12u3 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libthrift-0.17.0==0.17.0-2+b2 libtirpc-dev==1.3.3+ds-1 libtsan2==12.2.0-14+deb12u1 libubsan1==12.2.0-14+deb12u1 libuv1==1.44.2-1+deb12u1 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 make==4.3-4.1 netbase==6.4 -openssl==3.0.17-1~deb12u3 +openssl==3.0.18-1~deb12u2 patch==2.7.6-7 python3-pip==23.0.1+dfsg-1 python3-scapy==2.5.0+dfsg-2 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-py3 b/files/build/versions-public/dockers/docker-syncd-mlnx-rpc/versions-py3 similarity index 76% rename from files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-py3 rename to files/build/versions-public/dockers/docker-syncd-mlnx-rpc/versions-py3 index e36f0d30bae..6848ca67e94 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-py3 +++ b/files/build/versions-public/dockers/docker-syncd-mlnx-rpc/versions-py3 @@ -1,5 +1,5 @@ cffi==1.16.0 nnpy==1.4.2 -pycparser==2.23 +pycparser==3.0 scapy==2.5.0 thrift==0.17.0 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-mlnx/versions-deb-bookworm similarity index 84% rename from files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-mlnx/versions-deb-bookworm index 6ba034b5198..ad67abe74ce 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-mlnx/versions-deb-bookworm @@ -15,7 +15,7 @@ libdw1==0.188-2.1 libedit2==3.1-20221030-2 libexpat1-dev==2.5.0-1+deb12u2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -34,19 +34,19 @@ libsairedis==1.0.0 libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.3+ds-1 libunwind8==1.6.2-3 -libxml2==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 libyang-cpp-dbgsym==1.0.73 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 mft==4.34.0-145 mft-fwtrace-cfg==1.0.0 -mlnx-sai==1.mlnx.SAIBuild2505.33.2.67 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +mlnx-sai==1.mlnx.SAIBuild2511.35.3400.0 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 pci.ids==0.0~2023.04.11-1 pciutils==1:3.9.0-4 python3-attr==22.2.0-1 @@ -63,7 +63,7 @@ sshpass==1.09-1+b1 strace==6.1-0.1 syncd==1.0.0 syncd-dbgsym==1.0.0 -sys-sdk-main==1.mlnx.4.8.2096 +sys-sdk-main==1.mlnx.4.8.3404 ucf==3.0043+nmu1+deb12u1 vim==2:9.0.1378-2+deb12u2 vim-runtime==2:9.0.1378-2+deb12u2 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 b/files/build/versions-public/dockers/docker-syncd-mlnx/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-syncd-mlnx/versions-py3 rename to files/build/versions-public/dockers/docker-syncd-mlnx/versions-py3 diff --git a/files/build/versions/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-arm64 b/files/build/versions-public/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-arm64 similarity index 100% rename from files/build/versions/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-arm64 rename to files/build/versions-public/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-arm64 diff --git a/files/build/versions/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-armhf similarity index 100% rename from files/build/versions/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-armhf rename to files/build/versions-public/dockers/docker-syncd-mrvl-prestera/versions-deb-bookworm-armhf diff --git a/files/build/versions/dockers/docker-syncd-vs/versions-deb-bookworm b/files/build/versions-public/dockers/docker-syncd-vs/versions-deb-bookworm similarity index 97% rename from files/build/versions/dockers/docker-syncd-vs/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-syncd-vs/versions-deb-bookworm index 1abd9b09844..11cf969b3c7 100644 --- a/files/build/versions/dockers/docker-syncd-vs/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-syncd-vs/versions-deb-bookworm @@ -128,7 +128,7 @@ libgc1==1:8.2.2-3 libgcc-12-dev==12.2.0-14+deb12u1 libgfortran-12-dev==12.2.0-14+deb12u1 libgfortran5==12.2.0-14+deb12u1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgmp-dev==2:6.2.1+dfsg1-1.1 libgmpxx4ldbl==2:6.2.1+dfsg1-1.1 libgomp1==12.2.0-14+deb12u1 @@ -160,7 +160,7 @@ libmagic-mgc==1:5.44-3 libmagic1==1:5.44-3 libmpc3==1.3.1-1 libmpfr6==4.2.0-1 -libmunge2==0.5.15-2 +libmunge2==0.5.15-2+deb12u1 libnanomsg-dev==1.1.5+dfsg-1.1+b1 libnanomsg5==1.1.5+dfsg-1.1+b1 libnl-3-dev==3.7.0-0.2+b1sonic1 @@ -208,8 +208,8 @@ libsaivs==1.0.0 libsaivs-dbgsym==1.0.0 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 libswsscommon-dbgsym==1.0.0 libthrift-0.17.0==0.17.0-2+b2 @@ -226,11 +226,11 @@ libxau6==1:1.0.9-1 libxcb1==1.15-1 libxdmcp6==1:1.1.2-3 libxext6==2:1.3.4-1+b1 -libxml2==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 libxnvctrl0==525.85.05-3~deb12u1 libyang-cpp-dbgsym==1.0.73 libz3-4==4.8.12-3.1 -linux-libc-dev==6.1.158-1 +linux-libc-dev==6.1.162-1 llvm==1:14.0-55.7~deb12u1 llvm-14==1:14.0.6-12 llvm-14-linker-tools==1:14.0.6-12 @@ -244,8 +244,8 @@ nss-plugin-pem==1.0.8+1-1 ocl-icd-libopencl1==2.3.1-1 openmpi-bin==4.1.4-3+b1 openmpi-common==4.1.4-3 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 p4lang-bmv2==1.15.0-7 p4lang-p4c==1.2.4.2-2 p4lang-pi==0.1.0-15 diff --git a/files/build/versions/dockers/docker-syncd-vs/versions-py3 b/files/build/versions-public/dockers/docker-syncd-vs/versions-py3 similarity index 100% rename from files/build/versions/dockers/docker-syncd-vs/versions-py3 rename to files/build/versions-public/dockers/docker-syncd-vs/versions-py3 diff --git a/files/build/versions/dockers/docker-sysmgr/versions-deb-bookworm b/files/build/versions-public/dockers/docker-sysmgr/versions-deb-bookworm similarity index 85% rename from files/build/versions/dockers/docker-sysmgr/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-sysmgr/versions-deb-bookworm index c9b6a68c3d8..e6501765bbf 100644 --- a/files/build/versions/dockers/docker-sysmgr/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-sysmgr/versions-deb-bookworm @@ -12,7 +12,7 @@ libecore1==1.26.3-1+b1 libedit2==3.1-20221030-2 libeina1a==1.26.3-1+b1 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 @@ -20,13 +20,13 @@ libmpfr6==4.2.0-1 libprotobuf32==3.21.12-3 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-teamd/versions-deb-bookworm b/files/build/versions-public/dockers/docker-teamd/versions-deb-bookworm similarity index 85% rename from files/build/versions/dockers/docker-teamd/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-teamd/versions-deb-bookworm index 2faf354e02c..78f68ae3bc9 100644 --- a/files/build/versions/dockers/docker-teamd/versions-deb-bookworm +++ b/files/build/versions-public/dockers/docker-teamd/versions-deb-bookworm @@ -9,23 +9,23 @@ libdebuginfod1==0.188-2.1 libdw1==0.188-2.1 libedit2==3.1-20221030-2 libfido2-1==1.12.0-2+b1 -libglib2.0-0==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 libgpm2==1.20.7-10+b1 libicu72==72.1-3+deb12u1 libipt2==2.0.5-1 libmpfr6==4.2.0-1 libsource-highlight-common==3.1.9-4.2 libsource-highlight4v5==3.1.9-4.2+b3 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libswsscommon-dbgsym==1.0.0 libteam-utils==1.31-1 libteam-utils-dbgsym==1.31-1 libteamdctl0-dbgsym==1.31-1 libunwind8==1.6.2-3 libyang-cpp-dbgsym==1.0.73 -openssh-client==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssh-client==1:9.2p1-2+deb12u5+fips +openssl==3.0.18-1~deb12u2 python3-swsscommon-dbgsym==1.0.0 python3-yang-dbgsym==1.0.73 sensible-utils==0.0.17+nmu1 diff --git a/files/build/versions/dockers/docker-telemetry-watchdog/versions-deb-bookworm b/files/build/versions-public/dockers/docker-telemetry-watchdog/versions-deb-bookworm similarity index 100% rename from files/build/versions/dockers/docker-telemetry-watchdog/versions-deb-bookworm rename to files/build/versions-public/dockers/docker-telemetry-watchdog/versions-deb-bookworm diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm b/files/build/versions-public/dockers/sonic-slave-bookworm/versions-deb-bookworm similarity index 91% rename from files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm rename to files/build/versions-public/dockers/sonic-slave-bookworm/versions-deb-bookworm index f32b2a2d343..e20fc7a416d 100644 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm +++ b/files/build/versions-public/dockers/sonic-slave-bookworm/versions-deb-bookworm @@ -25,11 +25,13 @@ automake==1:1.16.5-1.3 autopoint==0.21-12 autotools-dev==20220109.1 bash-completion==1:2.11-6 -bc==1.07.1-3+b1 -bind9-dnsutils==1:9.18.41-1~deb12u1 -bind9-host==1:9.18.41-1~deb12u1 -bind9-libs==1:9.18.41-1~deb12u1 +bc==1.07.1-3 +bind9-dnsutils==1:9.18.44-1~deb12u1 +bind9-host==1:9.18.44-1~deb12u1 +bind9-libs==1:9.18.44-1~deb12u1 binutils==2.40-2 +binutils-aarch64-linux-gnu==2.40-2 +binutils-arm-linux-gnueabihf==2.40-2 binutils-common==2.40-2 binutils-x86-64-linux-gnu==2.40-2 bison==2:3.8.2+dfsg-1+b1 @@ -58,6 +60,8 @@ cowdancer==0.89 cpio==2.13+dfsg-7.1 cpp==4:12.2.0-3 cpp-12==12.2.0-14+deb12u1 +cpp-12-arm-linux-gnueabihf==12.2.0-14cross1 +cpp-arm-linux-gnueabihf==4:12.2.0-3 cppcheck==2.10-2 cppzmq-dev==4.9.0-1 cron==3.0pl1-162 @@ -72,7 +76,7 @@ dbus-system-bus-common==1.14.10-1~deb12u1 dbus-user-session==1.14.10-1~deb12u1 dconf-gsettings-backend==0.40.0-4 dconf-service==0.40.0-4 -dctrl-tools==2.24-3+b1 +dctrl-tools==2.24-3 debhelper==13.11.4 debian-keyring==2022.12.24 debootstrap==1.0.128+nmu2+deb12u2 @@ -92,12 +96,12 @@ dh-runit==2.15.2 dh-strip-nondeterminism==1.13.1-1 dictionaries-common==1.29.5 diffstat==1.65-1 -dirmngr==2.2.40-1.1+deb12u1 -distro-info-data==0.58+deb12u5 +dirmngr==2.2.40-1.1+deb12u2 +distro-info-data==0.58+deb12u6 dkms==3.0.10-8+deb12u1 dmidecode==3.4-1 dmsetup==2:1.02.185-2 -dnsutils==1:9.18.41-1~deb12u1 +dnsutils==1:9.18.44-1~deb12u1 docbook==4.5-10 docbook-dsssl==1.79-10 docbook-to-man==1:2.0.0-45 @@ -106,14 +110,14 @@ docbook-xml==4.5-12 docker-buildx-plugin==0.10.5-1~debian.12~bookworm docker-ce==5:24.0.2-1~debian.12~bookworm docker-ce-cli==5:24.0.2-1~debian.12~bookworm -docker-ce-rootless-extras==5:29.1.2-1~debian.12~bookworm +docker-ce-rootless-extras==5:29.2.1-1~debian.12~bookworm docker-compose-plugin==2.18.1-1~debian.12~bookworm docutils-common==0.19+dfsg-6 dosfstools==4.2-1 doxygen==1.9.4-4 dpkg-dev==1.21.22 dput==1.1.3 -dvipng==1.15-1.1+b1 +dvipng==1.15-1.1 dvisvgm==3.0.3-1 dwz==0.15-1 eatmydata==130-2 @@ -149,7 +153,11 @@ g++-12==12.2.0-14+deb12u1 gawk==1:5.2.1-2 gcc==4:12.2.0-3 gcc-12==12.2.0-14+deb12u1 +gcc-12-arm-linux-gnueabihf==12.2.0-14cross1 +gcc-12-arm-linux-gnueabihf-base==12.2.0-14cross1 +gcc-12-cross-base==12.2.0-14cross1 gcc-12-multilib==12.2.0-14+deb12u1 +gcc-arm-linux-gnueabihf==4:12.2.0-3 gcc-multilib==4:12.2.0-3 gcovr==5.2-1 gdb==13.1-3 @@ -163,22 +171,22 @@ ghostscript==10.0.0~dfsg-11+deb12u8 gir1.2-atk-1.0==2.46.0-5 gir1.2-atspi-2.0==2.46.0-5 gir1.2-freedesktop==1.74.0-3 -gir1.2-gdkpixbuf-2.0==2.42.10+dfsg-1+deb12u2 +gir1.2-gdkpixbuf-2.0==2.42.10+dfsg-1+deb12u3 gir1.2-glib-2.0==1.74.0-3 gir1.2-gtk-3.0==3.24.38-2~deb12u3 gir1.2-harfbuzz-0.0==6.0.0+dfsg-3 gir1.2-packagekitglib-1.0==1.2.6-5 gir1.2-pango-1.0==1.50.12+ds-1 -git==1:2.39.5-0+deb12u2 +git==1:2.39.5-0+deb12u3 git-buildpackage==0.9.30 -git-man==1:2.39.5-0+deb12u2 +git-man==1:2.39.5-0+deb12u3 glib-networking==2.74.0-4 glib-networking-common==2.74.0-4 glib-networking-services==2.74.0-4 -gnupg==2.2.40-1.1+deb12u1 -gnupg-l10n==2.2.40-1.1+deb12u1 -gnupg-utils==2.2.40-1.1+deb12u1 -gnupg2==2.2.40-1.1+deb12u1 +gnupg==2.2.40-1.1+deb12u2 +gnupg-l10n==2.2.40-1.1+deb12u2 +gnupg-utils==2.2.40-1.1+deb12u2 +gnupg2==2.2.40-1.1+deb12u2 gobject-introspection==1.74.0-3 golang==2:1.19~1 golang-1.19==1.19.8-2 @@ -189,15 +197,19 @@ golang-doc==2:1.19~1 golang-go==2:1.19~1 golang-src==2:1.19~1 googletest==1.12.1-0.2 -gpg==2.2.40-1.1+deb12u1 -gpg-agent==2.2.40-1.1+deb12u1 -gpg-wks-client==2.2.40-1.1+deb12u1 -gpg-wks-server==2.2.40-1.1+deb12u1 -gpgconf==2.2.40-1.1+deb12u1 -gpgsm==2.2.40-1.1+deb12u1 +gpg==2.2.40-1.1+deb12u2 +gpg-agent==2.2.40-1.1+deb12u2 +gpg-wks-client==2.2.40-1.1+deb12u2 +gpg-wks-server==2.2.40-1.1+deb12u2 +gpgconf==2.2.40-1.1+deb12u2 +gpgsm==2.2.40-1.1+deb12u2 graphviz==2.42.2-7+deb12u1 groff==1.22.4-10 groff-base==1.22.4-10 +grub-common==2.06-13+deb12u1 +grub-efi-arm64-bin==2.06-13+deb12u1 +grub-efi-arm64-signed==1+2.06+13+deb12u1 +grub2-common==2.06-13+deb12u1 gsettings-desktop-schemas==43.0-1 gsfonts==2:20200910-7 gstreamer1.0-libav==1.22.0-2 @@ -213,10 +225,10 @@ i965-va-driver==2.4.1+dfsg1-1 ibverbs-providers==44.0-2 icc-profiles-free==2.0.1+dfsg-1.1 icu-devtools==72.1-3+deb12u1 -imagemagick==8:6.9.11.60+dfsg-1.6+deb12u4 -imagemagick-6-common==8:6.9.11.60+dfsg-1.6+deb12u4 -imagemagick-6.q16==8:6.9.11.60+dfsg-1.6+deb12u4 -inetutils-telnet==2:2.4-2+deb12u1 +imagemagick==8:6.9.11.60+dfsg-1.6+deb12u6 +imagemagick-6-common==8:6.9.11.60+dfsg-1.6+deb12u6 +imagemagick-6.q16==8:6.9.11.60+dfsg-1.6+deb12u6 +inetutils-telnet==2:2.4-2+deb12u2 inkscape==1.2.2-2+b1 install-info==6.8-6+b1 intel-media-va-driver==23.1.1+dfsg1-1 @@ -278,6 +290,7 @@ libarchive13==3.6.2-1+deb12u3 libargon2-1==0~20171227-0.3+deb12u1 libarray-intspan-perl==2.004-2 libasan8==12.2.0-14+deb12u1 +libasan8-armhf-cross==12.2.0-14cross1 libasm-java==9.4-1 libasound2==1.2.8-1+b1 libasound2-data==1.2.8-1 @@ -296,6 +309,7 @@ libatkmm-1.6-1v5==2.28.3-1 libatm1==1:2.5.1-4+b2 libatm1-dev==1:2.5.1-4+b2 libatomic1==12.2.0-14+deb12u1 +libatomic1-armhf-cross==12.2.0-14cross1 libatspi2.0-0==2.46.0-5 libatspi2.0-dev==2.46.0-5 libattr1-dev==1:2.5.1-4 @@ -414,6 +428,7 @@ libc-ares2==1.18.1-3 libc-dev-bin==2.36-9+deb12u13 libc-devtools==2.36-9+deb12u13 libc-l10n==2.36-9+deb12u13 +libc6-armhf-cross==2.36-8cross1 libc6-dbg==2.36-9+deb12u13 libc6-dev==2.36-9+deb12u13 libc6-dev-i386==2.36-9+deb12u13 @@ -428,9 +443,9 @@ libcairo-script-interpreter2==1.16.0-7 libcairo2==1.16.0-7 libcairo2-dev==1.16.0-7 libcairomm-1.0-1v5==1.14.4-2 -libcap-dev==1:2.66-4+deb12u2 +libcap-dev==1:2.66-4+deb12u2+b2 libcap-ng-dev==0.8.3-1+b3 -libcap2-bin==1:2.66-4+deb12u2 +libcap2-bin==1:2.66-4+deb12u2+b2 libcapstone4==4.0.2-5 libcapture-tiny-perl==0.48-2 libcarp-clan-perl==6.08-2 @@ -476,8 +491,8 @@ libcommons-compress-java==1.22-1 libcommons-configuration-java==1.10-6 libcommons-digester-java==1.8.1-5 libcommons-io-java==2.11.0-2 -libcommons-lang-java==2.6-10 -libcommons-lang3-java==3.12.0-2 +libcommons-lang-java==2.6-10+deb12u1 +libcommons-lang3-java==3.12.0-2+deb12u1 libcommons-logging-java==1.2-3 libcommons-parent-java==56-1 libcommons-text-java==1.10.0-1 @@ -660,14 +675,16 @@ libgbm1==22.3.6-1+deb12u1 libgc-dev==1:8.2.2-3 libgc1==1:8.2.2-3 libgcc-12-dev==12.2.0-14+deb12u1 +libgcc-12-dev-armhf-cross==12.2.0-14cross1 +libgcc-s1-armhf-cross==12.2.0-14cross1 libgd-perl==2.76-4+b1 libgd3==2.3.3-9 libgdbm-compat4==1.23-3 libgdbm6==1.23-3 -libgdk-pixbuf-2.0-0==2.42.10+dfsg-1+deb12u2 -libgdk-pixbuf-2.0-dev==2.42.10+dfsg-1+deb12u2 -libgdk-pixbuf2.0-bin==2.42.10+dfsg-1+deb12u2 -libgdk-pixbuf2.0-common==2.42.10+dfsg-1+deb12u2 +libgdk-pixbuf-2.0-0==2.42.10+dfsg-1+deb12u3 +libgdk-pixbuf-2.0-dev==2.42.10+dfsg-1+deb12u3 +libgdk-pixbuf2.0-bin==2.42.10+dfsg-1+deb12u3 +libgdk-pixbuf2.0-common==2.42.10+dfsg-1+deb12u3 libgeronimo-annotation-1.3-spec-java==1.3-1 libgeronimo-interceptor-3.0-spec-java==1.0.1-4 libgetopt-long-descriptive-perl==0.111-1 @@ -690,11 +707,11 @@ libglapi-mesa==22.3.6-1+deb12u1 libgles-dev==1.6.0-1 libgles1==1.6.0-1 libgles2==1.6.0-1 -libglib2.0-0==2.74.6-2+deb12u7 -libglib2.0-bin==2.74.6-2+deb12u7 -libglib2.0-data==2.74.6-2+deb12u7 -libglib2.0-dev==2.74.6-2+deb12u7 -libglib2.0-dev-bin==2.74.6-2+deb12u7 +libglib2.0-0==2.74.6-2+deb12u8 +libglib2.0-bin==2.74.6-2+deb12u8 +libglib2.0-data==2.74.6-2+deb12u8 +libglib2.0-dev==2.74.6-2+deb12u8 +libglib2.0-dev-bin==2.74.6-2+deb12u8 libglibmm-2.4-1v5==2.66.5-2 libglu1-mesa==9.0.2-1.1 libglu1-mesa-dev==9.0.2-1.1 @@ -709,8 +726,10 @@ libgme0==0.6.3-6 libgmock-dev==1.12.1-0.2 libgmp-dev==2:6.2.1+dfsg1-1.1 libgmpxx4ldbl==2:6.2.1+dfsg1-1.1 -libgnutls-dane0==3.7.9-2+deb12u5 +libgnutls-dane0==3.7.9-2+deb12u6 +libgnutls30==3.7.9-2+deb12u6 libgomp1==12.2.0-14+deb12u1 +libgomp1-armhf-cross==12.2.0-14cross1 libgoogle-perftools4==2.10-1 libgpgme11==1.18.0-3+b1 libgpm2==1.20.7-10+b1 @@ -775,6 +794,7 @@ libhttp-tiny-multipart-perl==0.08-2 libhttpclient-java==4.5.14-1 libhttpcore-java==4.4.16-1 libhunspell-1.7-0==1.7.1-1 +libhwasan0==12.2.0-14+deb12u1 libhwloc-dev==2.9.0-1 libhwloc-plugins==2.9.0-1 libhwloc15==2.9.0-1 @@ -790,8 +810,8 @@ libidn12==1.41-1 libiec61883-0==1.2.0-6+b1 libigdgmm12==22.3.3+ds1-1 libijs-0.35==0.35-15 -libimage-magick-perl==8:6.9.11.60+dfsg-1.6+deb12u4 -libimage-magick-q16-perl==8:6.9.11.60+dfsg-1.6+deb12u4 +libimage-magick-perl==8:6.9.11.60+dfsg-1.6+deb12u6 +libimage-magick-q16-perl==8:6.9.11.60+dfsg-1.6+deb12u6 libimagequant0==2.17.0-1 libimath-3-1-29==3.1.6-1 libimport-into-perl==1.002005-2 @@ -916,10 +936,10 @@ liblzo2-2==2.10-2 liblzo2-dev==2.10-2 libmagic-mgc==1:5.44-3 libmagic1==1:5.44-3 -libmagick++-6.q16-8==8:6.9.11.60+dfsg-1.6+deb12u4 -libmagickcore-6.q16-6==8:6.9.11.60+dfsg-1.6+deb12u4 -libmagickcore-6.q16-6-extra==8:6.9.11.60+dfsg-1.6+deb12u4 -libmagickwand-6.q16-6==8:6.9.11.60+dfsg-1.6+deb12u4 +libmagick++-6.q16-8==8:6.9.11.60+dfsg-1.6+deb12u6 +libmagickcore-6.q16-6==8:6.9.11.60+dfsg-1.6+deb12u6 +libmagickcore-6.q16-6-extra==8:6.9.11.60+dfsg-1.6+deb12u6 +libmagickwand-6.q16-6==8:6.9.11.60+dfsg-1.6+deb12u6 libmail-sendmail-perl==0.80-3 libmailtools-perl==2.21-2 libmariadb-dev==1:10.11.14-0+deb12u2 @@ -971,12 +991,12 @@ libmpg123-0==1.31.2-1+deb12u1 libmro-compat-perl==0.15-2 libmtdev1==1.1.6-1 libmujs2==1.3.2-1 -libmunge2==0.5.15-2 +libmunge2==0.5.15-2+deb12u1 libmysofa1==1.3.1~dfsg0-1 libnamespace-autoclean-perl==0.29-2 libnamespace-clean-perl==0.27-2 -libnanomsg-dev==1.1.5+dfsg-1.1+b1 -libnanomsg5==1.1.5+dfsg-1.1+b1 +libnanomsg-dev==1.1.5+dfsg-1.1 +libnanomsg5==1.1.5+dfsg-1.1 libncurses-dev==6.4-4 libncurses5-dev==6.4-4 libncurses6==6.4-4 @@ -993,7 +1013,7 @@ libnetaddr-ip-perl==4.079+dfsg-2+b1 libnetfilter-conntrack-dev==1.0.9-3 libnetfilter-conntrack3==1.0.9-3 libnetpbm11==2:11.01.00-2 -libnetsnmptrapd40==5.9.3+dfsg-2 +libnetsnmptrapd40==5.9.3+dfsg-2+deb12u1 libnewt-dev==0.52.23-1+b1 libnewt0.52==0.52.23-1+b1 libnfnetlink-dev==1.0.2-2 @@ -1007,6 +1027,7 @@ libnl-3-200==3.7.0-0.2+b1 libnl-3-dev==3.7.0-0.2+b1 libnl-route-3-200==3.7.0-0.2+b1 libnl-route-3-dev==3.7.0-0.2+b1 +libnode108==18.20.4+dfsg-1~deb12u1 libnorm-dev==1.5.9+dfsg-2 libnorm1==1.5.9+dfsg-2 libnpth0==1.6-3 @@ -1048,9 +1069,9 @@ libpackage-stash-perl==0.40-1 libpackage-stash-xs-perl==0.30-1+b1 libpackagekit-glib2-18==1.2.6-5 libpadwalker-perl==2.5-1+b3 -libpam-cap==1:2.66-4+deb12u2 +libpam-cap==1:2.66-4+deb12u2+b2 libpam-systemd==252.39-1~deb12u1 -libpam0g-dev==1.5.2-6+deb12u1 +libpam0g-dev==1.5.2-6+deb12u2 libpango-1.0-0==1.50.12+ds-1 libpango1.0-dev==1.50.12+ds-1 libpangocairo-1.0-0==1.50.12+ds-1 @@ -1117,9 +1138,9 @@ libplexus-velocity-java==1.2-3.1 libpmem1==1.12.1-2 libpmix-dev==4.2.2-1+deb12u1 libpmix2==4.2.2-1+deb12u1 -libpng-dev==1.6.39-2+deb12u1 -libpng-tools==1.6.39-2+deb12u1 -libpng16-16==1.6.39-2+deb12u1 +libpng-dev==1.6.39-2+deb12u3 +libpng-tools==1.6.39-2+deb12u3 +libpng16-16==1.6.39-2+deb12u3 libpocketsphinx3==0.8+5prealpha+1-15 libpod-constants-perl==0.19-2 libpod-parser-perl==1.65-1 @@ -1254,14 +1275,14 @@ libsnappy-jni==1.1.8.3-1 libsnappy1v5==1.1.9-3 libsndfile1==1.2.0-1+deb12u1 libsndio7.0==1.9.0-0.3+b2 -libsnmp-base==5.9.3+dfsg-2 -libsnmp-dev==5.9.3+dfsg-2 -libsnmp-perl==5.9.3+dfsg-2 -libsnmp40==5.9.3+dfsg-2 +libsnmp-base==5.9.3+dfsg-2+deb12u1 +libsnmp-dev==5.9.3+dfsg-2+deb12u1 +libsnmp-perl==5.9.3+dfsg-2+deb12u1 +libsnmp40==5.9.3+dfsg-2+deb12u1 libsoap-lite-perl==1.27-3 libsocket6-perl==0.29-3 -libsodium-dev==1.0.18-1 -libsodium23==1.0.18-1 +libsodium-dev==1.0.18-1+deb12u1 +libsodium23==1.0.18-1+deb12u1 libsord-0-0==0.16.14+git221008-1 libsort-versions-perl==1.62-3 libsoup2.4-1==2.74.3-1+deb12u1 @@ -1278,12 +1299,13 @@ libsqlite3-0==3.40.1-2+deb12u2 libsqlite3-dev==3.40.1-2+deb12u2 libsratom-0-0==0.6.14-1 libsrt1.5-gnutls==1.5.1-1+deb12u1 -libssh-4==0.10.6-0+deb12u1 -libssh-gcrypt-4==0.10.6-0+deb12u1 +libssh-4==0.10.6-0+deb12u2 +libssh-gcrypt-4==0.10.6-0+deb12u2 libssh2-1==1.10.0-3+b1 -libssl-dev==3.0.17-1~deb12u3 -libssl3==3.0.17-1~deb12u3 +libssl-dev==3.0.18-1~deb12u2 +libssl3==3.0.18-1~deb12u2 libstdc++-12-dev==12.2.0-14+deb12u1 +libstdc++6-armhf-cross==12.2.0-14cross1 libstemmer0d==2.2.0-2 libstrictures-perl==2.000006-1 libstring-copyright-perl==0.003014-1 @@ -1362,11 +1384,12 @@ libtype-tiny-perl==2.002001-1 libtype-tiny-xs-perl==0.025-1 libtypes-serialiser-perl==1.01-1 libubsan1==12.2.0-14+deb12u1 +libubsan1-armhf-cross==12.2.0-14cross1 libuchardet0==0.0.7-1 libucx0==1.13.1-1 libudev-dev==252.39-1~deb12u1 libudfread0==1.1.2-1 -libunbound8==1.17.1-2+deb12u3 +libunbound8==1.17.1-2+deb12u4 libunicode-map-perl==0.112-13+b1 libunicode-utf8-perl==0.62-2 libunivocity-parsers-java==2.9.1-1 @@ -1401,7 +1424,7 @@ libvisual-0.4-0==0.4.0-19 libvorbis0a==1.3.7-1 libvorbisenc2==1.3.7-1 libvorbisfile3==1.3.7-1 -libvpx7==1.12.0-1+deb12u4 +libvpx7==1.12.0-1+deb12u5 libvte-2.91-0==0.70.6-2~deb12u1 libvte-2.91-common==0.70.6-2~deb12u1 libvulkan-dev==1.3.239.0-1 @@ -1514,9 +1537,9 @@ libxml-sax-perl==1.02+dfsg-3 libxml-simple-perl==2.25-2 libxml-twig-perl==1:3.52-2 libxml-xpathengine-perl==0.14-2 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxml2-utils==2.9.14+dfsg-1.3~deb12u4 +libxml2==2.9.14+dfsg-1.3~deb12u5 +libxml2-dev==2.9.14+dfsg-1.3~deb12u5 +libxml2-utils==2.9.14+dfsg-1.3~deb12u5 libxmlb2==0.3.10-2 libxmlgraphics-commons-java==2.8-2 libxmlrpc-lite-perl==0.717-5 @@ -1531,6 +1554,7 @@ libxrender1==1:0.9.10-1.1 libxs-parse-keyword-perl==0.33-1 libxs-parse-sublike-perl==0.16-1+b2 libxshmfence1==1.3-1 +libxslt1-dev==1.1.35-1+deb12u3 libxslt1.1==1.1.35-1+deb12u3 libxss1==1:1.2.3-1 libxstring-perl==0.005-2+b1 @@ -1566,12 +1590,14 @@ libzvbi0==0.2.41-1 libzzip-0-13==0.13.72+dfsg.1-1.1 licensecheck==3.3.5-1 lintian==2.116.3+deb12u1 -linux-compiler-gcc-12-x86==6.1.158-1 -linux-headers-6.1.0-41-amd64==6.1.158-1 -linux-headers-6.1.0-41-common==6.1.158-1 -linux-headers-amd64==6.1.158-1 -linux-kbuild-6.1==6.1.158-1 -linux-libc-dev==6.1.158-1 +linux-compiler-gcc-12-x86==6.1.162-1 +linux-headers-6.1.0-43-amd64==6.1.162-1 +linux-headers-6.1.0-43-arm64==6.1.162-1 +linux-headers-6.1.0-43-common==6.1.162-1 +linux-headers-amd64==6.1.162-1 +linux-headers-arm64==6.1.162-1 +linux-kbuild-6.1==6.1.162-1 +linux-libc-dev==6.1.162-1 linuxdoc-tools==0.9.82-1 llvm==1:14.0-55.7~deb12u1 llvm-14==1:14.0.6-12 @@ -1611,6 +1637,7 @@ mesa-vulkan-drivers==22.3.6-1+deb12u1 meson==1.0.1-5 mime-support==3.66 module-assistant==0.11.11 +mokutil==0.6.0-2 mpi-default-bin==1.14 mpi-default-dev==1.14 mupdf-tools==1.21.1+ds2-1+b4 @@ -1622,21 +1649,29 @@ netpbm==2:11.01.00-2 nftables==1.0.6-2+deb12u2 ninja-build==1.11.1-2~deb12u1 nlohmann-json3-dev==3.11.2-2 +node-acorn==8.8.1+ds+~cs25.17.7-2 +node-busboy==1.6.0+~cs2.6.0-2 +node-cjs-module-lexer==1.2.2+dfsg-5 node-jquery==3.6.1+dfsg+~3.5.14-1 +node-undici==5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4 +node-xtend==4.0.2-3 +nodejs==18.20.4+dfsg-1~deb12u1 +nodejs-doc==18.20.4+dfsg-1~deb12u1 nss-plugin-pem==1.0.8+1-1 ocl-icd-libopencl1==2.3.1-1 openjade==1.4devel1-22 -openjdk-17-jdk==17.0.17+10-1~deb12u1 -openjdk-17-jdk-headless==17.0.17+10-1~deb12u1 -openjdk-17-jre==17.0.17+10-1~deb12u1 -openjdk-17-jre-headless==17.0.17+10-1~deb12u1 +openjdk-17-jdk==17.0.18+8-1~deb12u1 +openjdk-17-jdk-headless==17.0.18+8-1~deb12u1 +openjdk-17-jre==17.0.18+8-1~deb12u1 +openjdk-17-jre-headless==17.0.18+8-1~deb12u1 openmpi-bin==4.1.4-3+b1 openmpi-common==4.1.4-3 opensp==1.5.2-13+b2 openssh-client==1:9.2p1-2+deb12u7 openssh-server==1:9.2p1-2+deb12u7 openssh-sftp-server==1:9.2p1-2+deb12u7 -openssl==3.0.17-1~deb12u3 +openssl==3.0.18-1~deb12u2 +os-prober==1.81 ovmf==2022.11-6+deb12u2 packagekit==1.2.6-5 packagekit-tools==1.2.6-5 @@ -1826,7 +1861,7 @@ python3-psutil==5.9.4-1+b1 python3-ptyprocess==0.7.0-5 python3-pure-eval==0.2.2-1 python3-py==1.11.0-1 -python3-pyasn1==0.4.8-3 +python3-pyasn1==0.4.8-3+deb12u1 python3-pyasn1-modules==0.2.8-1 python3-pycparser==2.21-1 python3-pyelftools==0.29-1 @@ -1862,7 +1897,7 @@ python3-typing-extensions==4.4.0-1 python3-tz==2022.7.1-4 python3-ufolib2==0.14.0+dfsg1-1 python3-unidiff==0.7.3-1 -python3-urllib3==1.26.12-1+deb12u1 +python3-urllib3==1.26.12-1+deb12u3 python3-venv==3.11.2-1+b1 python3-wadllib==1.3.6-4 python3-wcwidth==0.2.5+dfsg1-1.1 @@ -1878,12 +1913,12 @@ python3.11-dbg==3.11.2-6+deb12u6 python3.11-dev==3.11.2-6+deb12u6 python3.11-minimal==3.11.2-6+deb12u6 python3.11-venv==3.11.2-6+deb12u6 -qemu-block-extra==1:7.2+dfsg-7+deb12u16 -qemu-system-common==1:7.2+dfsg-7+deb12u16 -qemu-system-data==1:7.2+dfsg-7+deb12u16 -qemu-system-gui==1:7.2+dfsg-7+deb12u16 -qemu-system-x86==1:7.2+dfsg-7+deb12u16 -qemu-utils==1:7.2+dfsg-7+deb12u16 +qemu-block-extra==1:7.2+dfsg-7+deb12u18 +qemu-system-common==1:7.2+dfsg-7+deb12u18 +qemu-system-data==1:7.2+dfsg-7+deb12u18 +qemu-system-gui==1:7.2+dfsg-7+deb12u18 +qemu-system-x86==1:7.2+dfsg-7+deb12u18 +qemu-utils==1:7.2+dfsg-7+deb12u18 qt5-gtk-platformtheme==5.15.8+dfsg-11+deb12u3 qt5-qmake==5.15.8+dfsg-11+deb12u3 qt5-qmake-bin==5.15.8+dfsg-11+deb12u3 @@ -1900,7 +1935,7 @@ rpcsvc-proto==1.4.3-1 rpm-common==4.18.0+dfsg-1+deb12u1 rpm2cpio==4.18.0+dfsg-1+deb12u1 rrdtool==1.7.2-4+b8 -rsync==3.2.7-1+deb12u2 +rsync==3.2.7-1+deb12u4 rsyslog==8.2302.0-1+deb12u1 ruby==1:3.1 ruby-all-dev==1:3.1 @@ -1925,6 +1960,10 @@ sgmlspl==1.03ii-38 shared-mime-info==2.2-1 sharutils==1:4.15.2-9 shellcheck==0.9.0-1 +shim-helpers-arm64-signed==1+15.8+1~deb12u1 +shim-signed==1.44~1+deb12u1+15.8-1~deb12u1 +shim-signed-common==1.44~1+deb12u1+15.8-1~deb12u1 +shim-unsigned==15.8-1~deb12u1 slirp4netns==1.2.0-1 software-properties-common==0.99.30-4.1~deb12u1 sphinx-common==5.3.0-4 @@ -1932,7 +1971,7 @@ sphinx-rtd-theme-common==1.2.0+dfsg-1 squashfs-tools==1:4.5.1-1 stgit==0.19-1.1 strace==6.1-0.1 -sudo==1.9.13p3-1+deb12u2 +sudo==1.9.13p3-1+deb12u3 swig==4.1.0-0.2 swig4.0==4.1.0-0.2 systemd==252.39-1~deb12u1 @@ -1944,7 +1983,7 @@ tcl-expect==5.45.4-2+b1 tcl8.6==8.6.13+dfsg-2 tcpdump==4.99.3-1 teckit==2.5.11+ds1-1+b1 -telnet==0.17+2.4-2+deb12u1 +telnet==0.17+2.4-2+deb12u2 tex-common==6.18 tex-gyre==20180621-6 texi2html==1.82+dfsg1-7 @@ -1980,7 +2019,7 @@ velocity==1.7-6 vim==2:9.0.1378-2+deb12u2 vim-common==2:9.0.1378-2+deb12u2 vim-runtime==2:9.0.1378-2+deb12u2 -watchdog==5.16-1+b2 +watchdog==5.16-1+b1 wayland-protocols==1.31-1 wdiff==1.2.2-5 wget==1.21.3-1+deb12u1 diff --git a/files/build/versions-public/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf b/files/build/versions-public/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf new file mode 100644 index 00000000000..d969533810c --- /dev/null +++ b/files/build/versions-public/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf @@ -0,0 +1,3 @@ +linux-compiler-gcc-12-arm==6.1.162-1 +linux-headers-6.1.0-43-armmp==6.1.162-1 +linux-headers-armmp==6.1.162-1 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3 b/files/build/versions-public/dockers/sonic-slave-bookworm/versions-py3 similarity index 96% rename from files/build/versions/dockers/sonic-slave-bookworm/versions-py3 rename to files/build/versions-public/dockers/sonic-slave-bookworm/versions-py3 index d9e7b684605..a33fe921b8c 100644 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3 +++ b/files/build/versions-public/dockers/sonic-slave-bookworm/versions-py3 @@ -41,7 +41,7 @@ executing==1.2.0 fastentrypoints==0.12 fonttools==4.38.0 fs==2.4.16 -fsspec==2025.12.0 +fsspec==2026.2.0 gbp==0.9.30 gcovr==5.2 gpg==1.18.0 @@ -100,8 +100,8 @@ platformdirs==2.6.0 pluggy==1.0.0+repack ply==3.11 prompt-toolkit==3.0.36 -protobuf==4.21.12 -psutil==5.9.4 +protobuf==4.25.8 +psutil==7.2.2 ptyprocess==0.7.0 pure-eval==0.0.0 py==1.11.0 @@ -111,7 +111,7 @@ pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser==2.21 pyelftools==0.29 -pyfakefs==5.10.2 +pyfakefs==6.1.1 pygments==2.14.0 pygobject==3.42.2 pyhamcrest==2.0.3 @@ -132,8 +132,8 @@ pytz==2022.7.1 pyxdg==0.28 pyyaml==6.0 pyyaml-include==2.2 -redis==7.1.0 -regex==2025.11.3 +redis==7.2.0 +regex==2026.2.19 requests==2.28.1 roman==3.3 scapy==2.5.0 diff --git a/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie b/files/build/versions-public/dockers/sonic-slave-trixie/versions-deb-trixie similarity index 89% rename from files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie rename to files/build/versions-public/dockers/sonic-slave-trixie/versions-deb-trixie index 028581cab2c..116123a2997 100644 --- a/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie +++ b/files/build/versions-public/dockers/sonic-slave-trixie/versions-deb-trixie @@ -6,7 +6,6 @@ ant==1.10.15-1 ant-optional==1.10.15-1 apparmor==4.1.0-1 appstream==1.0.5-1 -apt==3.0.3 apt-file==3.3 apt-transport-https==3.0.3 apt-utils==3.0.3 @@ -14,8 +13,8 @@ arch-test==0.22-1 asciidoctor==2.0.23-1 aspell==0.60.8.1-4 aspell-en==2020.12.07-0-1 -at-spi2-common==2.56.2-1 -at-spi2-core==2.56.2-1 +at-spi2-common==2.56.2-1+deb13u1 +at-spi2-core==2.56.2-1+deb13u1 auditd==1:4.0.2-2+b2 augeas-lenses==1.14.1-1 augeas-tools==1.14.1-1+b3 @@ -27,19 +26,22 @@ automake==1:1.17-4 autopoint==0.23.1-2 autotools-dev==20240727.1 bash-completion==1:2.16.0-7 -bc==1.07.1-4 -bind9-dnsutils==1:9.20.15-1~deb13u1 -bind9-host==1:9.20.15-1~deb13u1 -bind9-libs==1:9.20.15-1~deb13u1 -binfmt-support==2.2.2-7 +bc==1.07.1-4+b1 +bind9-dnsutils==1:9.20.18-1~deb13u1 +bind9-host==1:9.20.18-1~deb13u1 +bind9-libs==1:9.20.18-1~deb13u1 +binfmt-support==2.2.2-7+b1 binutils==2.44-3 +binutils-aarch64-linux-gnu==2.44-3 +binutils-arm-linux-gnueabihf==2.44-3 binutils-common==2.44-3 +binutils-gold==2.44-2 +binutils-gold-aarch64-linux-gnu==2.44-2 binutils-x86-64-linux-gnu==2.44-3 bison==2:3.8.2+dfsg-1+b2 blt==2.5.3+dfsg-8 bsd-mailx==8.1.2-0.20220412cvs-1.1 bsdextrautils==2.41-5 -bsdutils==1:2.41-5 build-essential==12.12 byacc==1:2.0.20241231-1 bzip2==1.0.8-6 @@ -56,14 +58,18 @@ cm-super-minimal==0.3.4-17 cmake==3.31.6-2 cmake-data==3.31.6-2 cmocka-doc==1.1.7-3 -comerr-dev==2.1-1.47.2-3+b3 +comerr-dev==2.1-1.47.2-3+b7 containerd.io==1.6.21-1 -cowbuilder==0.90 -cowdancer==0.90 +cowbuilder==0.90+b1 +cowdancer==0.90+b1 cpio==2.15+dfsg-2 cpp==4:14.2.0-1 cpp-14==14.2.0-19 +cpp-14-aarch64-linux-gnu==14.2.0-19 +cpp-14-arm-linux-gnueabihf==14.2.0-19cross1 cpp-14-x86-64-linux-gnu==14.2.0-19 +cpp-aarch64-linux-gnu==4:14.2.0-1 +cpp-arm-linux-gnueabihf==4:14.2.0-1 cpp-x86-64-linux-gnu==4:14.2.0-1 cppcheck==2.17.1-2 cppzmq-dev==4.10.0-1+b2 @@ -94,14 +100,14 @@ devscripts==2.25.15+deb13u1 dh-apparmor==4.1.0-1 dh-autoreconf==20 dh-dkms==3.2.2-1~deb13u1 -dh-exec==0.30 +dh-exec==0.30+b1 dh-make==2.202503 dh-python==6.20250414 dh-runit==2.16.4 dh-strip-nondeterminism==1.14.1-2 dictionaries-common==1.30.10 diffstat==1.67-1 -dirmngr==2.4.7-21+b3 +dirmngr==2.4.7-21+deb13u1+b1 distro-info==1.13 distro-info-data==0.66+deb13u1 dkms==3.2.2-1~deb13u1 @@ -115,22 +121,21 @@ docbook-xml==4.5-13 docker-buildx-plugin==0.10.5-1~debian.12~bookworm docker-ce==5:24.0.2-1~debian.12~bookworm docker-ce-cli==5:24.0.2-1~debian.12~bookworm -docker-ce-rootless-extras==5:29.1.2-1~debian.12~bookworm +docker-ce-rootless-extras==5:29.2.1-1~debian.12~bookworm docker-compose-plugin==2.18.1-1~debian.12~bookworm docutils-common==0.21.2+dfsg-2 dosfstools==4.2-1.2 doxygen==1.9.8+ds-2.1 -dpkg==1.22.21 dpkg-dev==1.22.21 dput==1.2.4 dvipng==1.18-1 dvisvgm==3.4.4+ds-1 dwz==0.15-1+b1 -e2fsprogs==1.47.2-3+b3 +e2fsprogs==1.47.2-3+b7 e2fsprogs-l10n==1.47.2-3 eatmydata==131-2 ed==1.21.1-1 -efibootmgr==18-2 +efibootmgr==18-2+b1 emacsen-common==3.0.8 enchant-2==2.8.2+dfsg1-3 equivs==2.3.2 @@ -139,7 +144,7 @@ exim4-config==4.98.2-1 exim4-daemon-light==4.98.2-1 expat==2.7.1-2 fakeroot==1.37.1.1-1 -fastjar==2:0.98-7 +fastjar==2:0.98-7+b1 fig2dev==1:3.2.9a-4 file==1:5.46-5 flex==2.6.4-8.2+b4 @@ -162,13 +167,21 @@ fonts-tuffy==20120614-3 fonts-urw-base35==20200910-8 g++==4:14.2.0-1 g++-14==14.2.0-19 +g++-14-aarch64-linux-gnu==14.2.0-19 g++-14-x86-64-linux-gnu==14.2.0-19 +g++-aarch64-linux-gnu==4:14.2.0-1 g++-x86-64-linux-gnu==4:14.2.0-1 -gawk==1:5.2.1-2+b1 +gawk==1:5.2.1-2+b2 gcc==4:14.2.0-1 gcc-14==14.2.0-19 +gcc-14-aarch64-linux-gnu==14.2.0-19 +gcc-14-arm-linux-gnueabihf==14.2.0-19cross1 +gcc-14-arm-linux-gnueabihf-base==14.2.0-19cross1 +gcc-14-cross-base==14.2.0-19cross1 gcc-14-multilib==14.2.0-19 gcc-14-x86-64-linux-gnu==14.2.0-19 +gcc-aarch64-linux-gnu==4:14.2.0-1 +gcc-arm-linux-gnueabihf==4:14.2.0-1 gcc-multilib==4:14.2.0-1 gcc-x86-64-linux-gnu==4:14.2.0-1 gcovr==7.2+really-1.1 @@ -182,31 +195,31 @@ gfortran-14==14.2.0-19 gfortran-14-x86-64-linux-gnu==14.2.0-19 gfortran-x86-64-linux-gnu==4:14.2.0-1 ghostscript==10.05.1~dfsg-1+deb13u1 -gir1.2-atk-1.0==2.56.2-1 -gir1.2-atspi-2.0==2.56.2-1 +gir1.2-atk-1.0==2.56.2-1+deb13u1 +gir1.2-atspi-2.0==2.56.2-1+deb13u1 gir1.2-cloudproviders-0.3.0==0.3.6-2 gir1.2-freedesktop==1.84.0-1 gir1.2-freedesktop-dev==1.84.0-1 gir1.2-gdkpixbuf-2.0==2.42.12+dfsg-4 gir1.2-girepository-2.0==1.84.0-1 gir1.2-girepository-2.0-dev==1.84.0-1 -gir1.2-glib-2.0==2.84.4-3~deb13u1 -gir1.2-glib-2.0-dev==2.84.4-3~deb13u1 +gir1.2-glib-2.0==2.84.4-3~deb13u2 +gir1.2-glib-2.0-dev==2.84.4-3~deb13u2 gir1.2-gtk-3.0==3.24.49-3 gir1.2-harfbuzz-0.0==10.2.0-1+b1 gir1.2-ibus-1.0==1.5.32-2 gir1.2-pango-1.0==1.56.3-1 -girepository-tools==2.84.4-3~deb13u1 +girepository-tools==2.84.4-3~deb13u2 git==1:2.47.3-0+deb13u1 git-buildpackage==0.9.38 git-man==1:2.47.3-0+deb13u1 glib-networking==2.80.1-1 glib-networking-common==2.80.1-1 glib-networking-services==2.80.1-1 -gnupg==2.4.7-21 -gnupg-l10n==2.4.7-21 -gnupg-utils==2.4.7-21+b3 -gnupg2==2.4.7-21 +gnupg==2.4.7-21+deb13u1 +gnupg-l10n==2.4.7-21+deb13u1 +gnupg-utils==2.4.7-21+deb13u1+b1 +gnupg2==2.4.7-21+deb13u1 gobject-introspection==1.84.0-1 gobject-introspection-bin==1.84.0-1 golang==2:1.24~2 @@ -218,15 +231,20 @@ golang-doc==2:1.24~2 golang-go==2:1.24~2 golang-src==2:1.24~2 googletest==1.16.0-1 -gpg==2.4.7-21+b3 -gpg-agent==2.4.7-21+b3 -gpg-wks-client==2.4.7-21+b3 -gpgconf==2.4.7-21+b3 -gpgsm==2.4.7-21+b3 -gpgv==2.4.7-21+b3 +gpg==2.4.7-21+deb13u1+b1 +gpg-agent==2.4.7-21+deb13u1+b1 +gpg-wks-client==2.4.7-21+deb13u1+b1 +gpgconf==2.4.7-21+deb13u1+b1 +gpgsm==2.4.7-21+deb13u1+b1 +gpgv==2.4.7-21+deb13u1+b1 graphviz==2.42.4-3 groff==1.23.0-9 groff-base==1.23.0-9 +grub-common==2.12-9 +grub-efi-arm64-bin==2.12-9 +grub-efi-arm64-signed==1+2.12+9 +grub-efi-arm64-unsigned==2.12-9 +grub2-common==2.12-9 gsettings-desktop-schemas==48.0-1 gstreamer1.0-libav==1.26.2-1 gstreamer1.0-plugins-base==1.26.2-1 @@ -234,17 +252,17 @@ gstreamer1.0-plugins-good==1.26.2-1 gstreamer1.0-x==1.26.2-1 gtk-update-icon-cache==4.18.6+ds-2 guile-3.0-libs==3.0.10+really3.0.10-4 -help2man==1.49.3 +help2man==1.49.3+b1 hicolor-icon-theme==0.18-2 hunspell-en-us==1:2020.12.07-4 hwdata==0.394-1 i965-va-driver==2.4.1+dfsg1-2 ibverbs-providers==56.1-1 icu-devtools==76.1-4 -imagemagick==8:7.1.1.43+dfsg1-1+deb13u3 -imagemagick-7-common==8:7.1.1.43+dfsg1-1+deb13u3 -imagemagick-7.q16==8:7.1.1.43+dfsg1-1+deb13u3 -inetutils-telnet==2:2.6-3 +imagemagick==8:7.1.1.43+dfsg1-1+deb13u5 +imagemagick-7-common==8:7.1.1.43+dfsg1-1+deb13u5 +imagemagick-7.q16==8:7.1.1.43+dfsg1-1+deb13u5 +inetutils-telnet==2:2.6-3+deb13u2 inkscape==1.4-6 install-info==7.1.1-1+b1 intel-media-va-driver==25.2.3+dfsg1-1 @@ -294,7 +312,7 @@ libalgorithm-merge-perl==0.08-5 libaliased-perl==0.34-3 libamd-comgr2==6.0+git20231212.4510c28+dfsg-3+b2 libamdhip64-5==5.7.1-6+deb13u1 -libann0==1.1.2+doc-9+b1 +libann0==1.1.2+doc-9+b2 libaom3==3.12.1-1 libaopalliance-java==20070526-7 libapache-pom-java==33-2 @@ -303,13 +321,13 @@ libapparmor1==4.1.0-1 libappconfig-perl==1.71-2.3 libappstream5==1.0.5-1 libapt-pkg-perl==0.1.42 -libapt-pkg7.0==3.0.3 libarchive-cpio-perl==0.10-3 libarchive-zip-perl==1.68-1 libarchive13t64==3.7.4-4 libargon2-1==0~20190702+dfsg-4+b2 libarray-intspan-perl==2.004-2 libasan8==14.2.0-19 +libasan8-armhf-cross==14.2.0-19cross1 libasm-java==9.8-1 libasound2-data==1.2.14-1 libasound2-dev==1.2.14-1 @@ -319,18 +337,19 @@ libass9==1:0.17.3-1+b1 libassuan9==3.0.2-2 libasyncns0==0.8-6+b5 libatinject-jsr330-api-java==1.0+ds1-6 -libatk-bridge2.0-0t64==2.56.2-1 -libatk-bridge2.0-dev==2.56.2-1 +libatk-bridge2.0-0t64==2.56.2-1+deb13u1 +libatk-bridge2.0-dev==2.56.2-1+deb13u1 libatk-wrapper-java==0.40.0-3 libatk-wrapper-java-jni==0.40.0-3+b3 -libatk1.0-0t64==2.56.2-1 -libatk1.0-dev==2.56.2-1 +libatk1.0-0t64==2.56.2-1+deb13u1 +libatk1.0-dev==2.56.2-1+deb13u1 libatkmm-1.6-1v5==2.28.4-1+b2 libatm1-dev==1:2.5.1-7 libatm1t64==1:2.5.1-7 libatomic1==14.2.0-19 -libatspi2.0-0t64==2.56.2-1 -libatspi2.0-dev==2.56.2-1 +libatomic1-armhf-cross==14.2.0-19cross1 +libatspi2.0-0t64==2.56.2-1+deb13u1 +libatspi2.0-dev==2.56.2-1+deb13u1 libattr1-dev==1:2.5.2-3 libaudit-dev==1:4.0.2-2+b2 libaugeas0==1.14.1-1+b3 @@ -356,7 +375,6 @@ libbinutils==2.44-3 libbit-vector-perl==7.4-3+b3 libblas3==3.12.1-6 libblkid-dev==2.41-5 -libblkid1==2.41-5 libblkio1==1.5.0-2 libblosc1==1.21.5+ds-1+b2 libblosc2-4==2.17.1+ds-1 @@ -477,18 +495,17 @@ libbsd-dev==0.12.2-2 libbsh-java==2.0b4-20 libburn4t64==1.5.6-1.1+b1 libbz2-dev==1.0.8-6 -libc-ares-dev==1.34.5-1 -libc-ares2==1.34.5-1 -libc-bin==2.41-12 -libc-dev-bin==2.41-12 -libc-l10n==2.41-12 -libc6==2.41-12 -libc6-dbg==2.41-12 -libc6-dev==2.41-12 -libc6-dev-i386==2.41-12 -libc6-dev-x32==2.41-12 -libc6-i386==2.41-12 -libc6-x32==2.41-12 +libc-ares-dev==1.34.5-1+deb13u1 +libc-ares2==1.34.5-1+deb13u1 +libc-dev-bin==2.41-12+deb13u1 +libc-l10n==2.41-12+deb13u1 +libc6-armhf-cross==2.41-11cross1 +libc6-dbg==2.41-12+deb13u1 +libc6-dev==2.41-12+deb13u1 +libc6-dev-i386==2.41-12+deb13u1 +libc6-dev-x32==2.41-12+deb13u1 +libc6-i386==2.41-12+deb13u1 +libc6-x32==2.41-12+deb13u1 libcaca0==0.99.beta20-5 libcacard0==1:2.8.0-3+b2 libcaf-openmpi-3t64==2.10.2+ds-4 @@ -497,13 +514,12 @@ libcairo-script-interpreter2==1.18.4-1+b1 libcairo2==1.18.4-1+b1 libcairo2-dev==1.18.4-1+b1 libcairomm-1.0-1v5==1.14.5-2+b1 -libcap-dev==1:2.75-10+b1 +libcap-dev==1:2.75-10+b3 libcap-ng-dev==0.8.5-4+b1 -libcap2==1:2.75-10+b1 -libcap2-bin==1:2.75-10+b1 +libcap2-bin==1:2.75-10+b3 libcapstone5==5.0.6-1 libcapture-tiny-perl==0.50-1 -libcares2==1.34.5-1 +libcares2==1.34.5-1+deb13u1 libcarp-clan-perl==6.08-2 libcbor0.10==0.10.2-2 libcc1-0==14.2.0-19 @@ -541,7 +557,7 @@ libcoarrays-dev==2.10.2+ds-4 libcoarrays-openmpi-dev==2.10.2+ds-4 libcodec2-1.2==1.2.0-3 libcolord2==1.4.7-3 -libcom-err2==1.47.2-3+b3 +libcom-err2==1.47.2-3+b7 libcommon-sense-perl==3.75-3+b5 libcommons-beanutils-java==1.10.1-1.1 libcommons-cli-java==1.6.0-1 @@ -640,9 +656,12 @@ libdpkg-perl==1.22.21 libdrm-amdgpu1==2.4.124-2 libdrm-common==2.4.124-2 libdrm-dev==2.4.124-2 +libdrm-etnaviv1==2.4.124-2 +libdrm-freedreno1==2.4.124-2 libdrm-intel1==2.4.124-2 libdrm-nouveau2==2.4.124-2 libdrm-radeon1==2.4.124-2 +libdrm-tegra0==2.4.124-2 libdrm2==2.4.124-2 libduktape207==2.7.0-2+b2 libdv4t64==1.0.0-17.1+b1 @@ -692,7 +711,7 @@ libexpat1-dev==2.7.1-2 libexplain-dev==1.4.D001-16 libexplain51t64==1.4.D001-16 libexporter-tiny-perl==1.006002-1 -libext2fs2t64==1.47.2-3+b3 +libext2fs2t64==1.47.2-3+b7 libfabric1==2.1.0-1.1 libfakeroot==1.37.1.1-1 libfastjson4==1.2304.0-2 @@ -749,6 +768,8 @@ libgbm1==25.0.7-2 libgc-dev==1:8.2.8-1 libgc1==1:8.2.8-1 libgcc-14-dev==14.2.0-19 +libgcc-14-dev-armhf-cross==14.2.0-19cross1 +libgcc-s1-armhf-cross==14.2.0-19cross1 libgcrypt20==1.11.0-7 libgd-perl==2.78-1+b3 libgd3==2.3.3-13 @@ -769,11 +790,11 @@ libgfortran5==14.2.0-19 libgfrpc0==11.1-6 libgfxdr0==11.1-6 libgif7==5.2.2-1+b1 -libgio-2.0-dev==2.84.4-3~deb13u1 -libgio-2.0-dev-bin==2.84.4-3~deb13u1 +libgio-2.0-dev==2.84.4-3~deb13u2 +libgio-2.0-dev-bin==2.84.4-3~deb13u2 libgirepository-1.0-1==1.84.0-1 libgirepository-1.0-dev==1.84.0-1 -libgirepository-2.0-0==2.84.4-3~deb13u1 +libgirepository-2.0-0==2.84.4-3~deb13u2 libgirepository1.0-dev==1.84.0-1 libgit-wrapper-perl==0.048-2 libgitlab-api-v4-perl==0.27-1 @@ -783,11 +804,11 @@ libgl1-mesa-dri==25.0.7-2 libgles-dev==1.7.0-1+b2 libgles1==1.7.0-1+b2 libgles2==1.7.0-1+b2 -libglib2.0-0t64==2.84.4-3~deb13u1 -libglib2.0-bin==2.84.4-3~deb13u1 -libglib2.0-data==2.84.4-3~deb13u1 -libglib2.0-dev==2.84.4-3~deb13u1 -libglib2.0-dev-bin==2.84.4-3~deb13u1 +libglib2.0-0t64==2.84.4-3~deb13u2 +libglib2.0-bin==2.84.4-3~deb13u2 +libglib2.0-data==2.84.4-3~deb13u2 +libglib2.0-dev==2.84.4-3~deb13u2 +libglib2.0-dev-bin==2.84.4-3~deb13u2 libglibmm-2.4-1t64==2.66.8-1 libglu1-mesa==9.0.2-1.1+b3 libglu1-mesa-dev==9.0.2-1.1+b3 @@ -802,11 +823,12 @@ libgme0==0.6.3-7+b2 libgmock-dev==1.16.0-1 libgmp-dev==2:6.3.0+dfsg-3 libgmpxx4ldbl==2:6.3.0+dfsg-3 -libgnutls-dane0t64==3.8.9-3 -libgnutls-openssl27t64==3.8.9-3 -libgnutls28-dev==3.8.9-3 -libgnutls30t64==3.8.9-3 +libgnutls-dane0t64==3.8.9-3+deb13u2 +libgnutls-openssl27t64==3.8.9-3+deb13u2 +libgnutls28-dev==3.8.9-3+deb13u2 +libgnutls30t64==3.8.9-3+deb13u2 libgomp1==14.2.0-19 +libgomp1-armhf-cross==14.2.0-19cross1 libgoogle-perftools4t64==2.16-1 libgpg-error-l10n==1.51-4 libgpg-error0==1.51-4 @@ -902,8 +924,8 @@ libidn2-dev==2.3.8-2 libiec61883-0==1.2.0-7 libigdgmm12==22.7.2+ds1-1 libijs-0.35==0.35-15.2 -libimage-magick-perl==8:7.1.1.43+dfsg1-1+deb13u3 -libimage-magick-q16-perl==8:7.1.1.43+dfsg1-1+deb13u3 +libimage-magick-perl==8:7.1.1.43+dfsg1-1+deb13u5 +libimage-magick-q16-perl==8:7.1.1.43+dfsg1-1+deb13u5 libimagequant0==2.18.0-1+b2 libimath-3-1-29t64==3.1.12-1+b3 libimport-into-perl==1.002005-2 @@ -972,8 +994,8 @@ libjsp-api-java==2.3.4-3 libjsr305-java==0.1~+svn49-12 libjte2==1.22-4+b2 libjtidy-java==7+svn20110807-6 -libjudy-dev==1.0.5-5.1 -libjudydebian1==1.0.5-5.1 +libjudy-dev==1.0.5-5.1+b1 +libjudydebian1==1.0.5-5.1+b1 libjxl0.11==0.11.1-4 libjxr-tools==1.2~git20170615.f752187-5.3 libjxr0t64==1.2~git20170615.f752187-5.3 @@ -990,7 +1012,6 @@ libkrb5support0==1.21.3-5 libksba8==1.6.7-2+b1 liblab-gamut1==2.42.4-3 liblapack3==3.12.1-6 -liblastlog2-2==2.41-5 liblcms2-2==2.16-2 libldap-common==2.6.10+dfsg-1 libldap-dev==2.6.10+dfsg-1 @@ -1032,9 +1053,9 @@ liblzo2-2==2.10-3+b1 liblzo2-dev==2.10-3+b1 libmagic-mgc==1:5.46-5 libmagic1t64==1:5.46-5 -libmagickcore-7.q16-10==8:7.1.1.43+dfsg1-1+deb13u3 -libmagickcore-7.q16-10-extra==8:7.1.1.43+dfsg1-1+deb13u3 -libmagickwand-7.q16-10==8:7.1.1.43+dfsg1-1+deb13u3 +libmagickcore-7.q16-10==8:7.1.1.43+dfsg1-1+deb13u5 +libmagickcore-7.q16-10-extra==8:7.1.1.43+dfsg1-1+deb13u5 +libmagickwand-7.q16-10==8:7.1.1.43+dfsg1-1+deb13u5 libmail-sendmail-perl==0.80-3 libmailtools-perl==2.22-1 libmariadb-dev==1:11.8.3-0+deb13u1 @@ -1064,7 +1085,7 @@ libmaven-shared-utils-java==3.4.2-1 libmaven-site-plugin-java==3.21.0-1 libmaven3-core-java==3.9.9-1 libmaxminddb0==1.12.2-1 -libmbedcrypto16==3.6.4-2 +libmbedcrypto16==3.6.5-0.1~deb13u1 libmd-dev==1.1.0-2+b1 libmd4c0==0.5.2-2+b1 libmime-tools-perl==5.515-1 @@ -1079,7 +1100,6 @@ libmoose-perl==2.2207-1+b3 libmoosex-aliases-perl==0.11-2 libmoox-aliases-perl==0.001006-2 libmount-dev==2.41-5 -libmount1==2.41-5 libmouse-perl==2.5.11-1+b1 libmp3lame0==3.100-6+b3 libmpc3==1.3.1-1+b3 @@ -1089,7 +1109,7 @@ libmpg123-0t64==1.32.10-1 libmro-compat-perl==0.15-2 libmtdev1t64==1.1.7-1 libmujs3==1.3.6-1 -libmunge2==0.5.16-1 +libmunge2==0.5.16-1.1~deb13u1 libmupdf25.1==1.25.1+ds1-6 libmysofa1==1.3.3+dfsg-1 libnamespace-autoclean-perl==0.31-1 @@ -1111,7 +1131,7 @@ libnetaddr-ip-perl==4.079+dfsg-2+b5 libnetfilter-conntrack-dev==1.1.0-1 libnetfilter-conntrack3==1.1.0-1 libnetpbm11t64==2:11.10.02-1 -libnetsnmptrapd40t64==5.9.4+dfsg-2 +libnetsnmptrapd40t64==5.9.4+dfsg-2+deb13u1 libnewt-dev==0.52.25-1 libnewt0.52==0.52.25-1 libnfnetlink-dev==1.0.2-3 @@ -1132,6 +1152,7 @@ libnl-genl-3-200==3.7.0-2 libnl-genl-3-dev==3.7.0-2 libnl-route-3-200==3.7.0-2 libnl-route-3-dev==3.7.0-2 +libnode115==20.19.2+dfsg-1 libnorm-dev==1.5.9+dfsg-3.1+b2 libnorm1t64==1.5.9+dfsg-3.1+b2 libnpth0t64==1.8-3 @@ -1174,13 +1195,9 @@ libpackage-deprecationmanager-perl==0.18-1 libpackage-stash-perl==0.40-1 libpackage-stash-xs-perl==0.30-1+b4 libpadwalker-perl==2.5-1+b6 -libpam-cap==1:2.75-10+b1 +libpam-cap==1:2.75-10+b3 libpam-doc==1.7.0-5 -libpam-modules==1.7.0-5 -libpam-modules-bin==1.7.0-5 -libpam-runtime==1.7.0-5 libpam-systemd==257.9-1~deb13u1 -libpam0g==1.7.0-5 libpam0g-dev==1.7.0-5 libpango-1.0-0==1.56.3-1 libpango1.0-dev==1.56.3-1 @@ -1208,7 +1225,6 @@ libpciaccess-dev==0.17-3+b3 libpciaccess0==0.17-3+b3 libpcre2-16-0==10.46-1~deb13u1 libpcre2-32-0==10.46-1~deb13u1 -libpcre2-8-0==10.46-1~deb13u1 libpcre2-dev==10.46-1~deb13u1 libpcre2-posix3==10.46-1~deb13u1 libpcsclite-dev==2.3.3-1 @@ -1250,9 +1266,9 @@ libplexus-xml-java==3.0.1-2 libpmem1==1.13.1-1.1+b1 libpmix-dev==5.0.7-1 libpmix2t64==5.0.7-1 -libpng-dev==1.6.48-1+deb13u1 -libpng-tools==1.6.48-1+deb13u1 -libpng16-16t64==1.6.48-1+deb13u1 +libpng-dev==1.6.48-1+deb13u3 +libpng-tools==1.6.48-1+deb13u3 +libpng16-16t64==1.6.48-1+deb13u3 libpocketsphinx3==0.8+5prealpha+1-15+b4 libpod-constants-perl==0.19-2 libpod-parser-perl==1.67-1 @@ -1387,21 +1403,20 @@ libslf4j-java==1.7.32-2 libslirp0==4.8.0-1+b1 libsm-dev==2:1.2.6-1 libsm6==2:1.2.6-1 -libsmartcols1==2.41-5 libsnappy-java==1.1.10.7-1 libsnappy-jni==1.1.10.7-1 libsnappy1v5==1.2.2-1 libsndfile1==1.2.2-2+b1 libsndio-dev==1.10.0-0.1 libsndio7.0==1.10.0-0.1 -libsnmp-base==5.9.4+dfsg-2 -libsnmp-dev==5.9.4+dfsg-2 -libsnmp-perl==5.9.4+dfsg-2 -libsnmp40t64==5.9.4+dfsg-2 +libsnmp-base==5.9.4+dfsg-2+deb13u1 +libsnmp-dev==5.9.4+dfsg-2+deb13u1 +libsnmp-perl==5.9.4+dfsg-2+deb13u1 +libsnmp40t64==5.9.4+dfsg-2+deb13u1 libsoap-lite-perl==1.27-3 libsocket6-perl==0.29-3+b4 -libsodium-dev==1.0.18-1+b2 -libsodium23==1.0.18-1+b2 +libsodium-dev==1.0.18-1+deb13u1 +libsodium23==1.0.18-1+deb13u1 libsord-0-0==0.16.18-1 libsort-versions-perl==1.62-3 libsoup-3.0-0==3.6.5-3 @@ -1416,17 +1431,16 @@ libsphinxbase3t64==0.8+5prealpha+1-21+b1 libspice-server1==0.15.2-1+b1 libspreadsheet-parseexcel-perl==0.6600-1 libspreadsheet-writeexcel-perl==2.40-4 -libsqlite3-0==3.46.1-7 libsqlite3-dev==3.46.1-7 libsratom-0-0==0.6.18-1 libsrt1.5-gnutls==1.5.4-1 -libss2==1.47.2-3+b3 +libss2==1.47.2-3+b7 libssh-4==0.11.2-1+deb13u1 libssh2-1-dev==1.11.1-1 libssh2-1t64==1.11.1-1 -libssl-dev==3.5.4-1~deb13u1 -libssl3t64==3.5.4-1~deb13u1 +libssl-dev==3.5.4-1~deb13u2 libstdc++-14-dev==14.2.0-19 +libstdc++6-armhf-cross==14.2.0-19cross1 libstemmer0d==2.2.0-4+b2 libstrictures-perl==2.000006-1 libstring-copyright-perl==0.003014-1 @@ -1454,7 +1468,6 @@ libsys-hostname-long-perl==1.5-3 libsysprof-capture-4-dev==48.0-2 libsystemd-dev==257.9-1~deb13u1 libsystemd-shared==257.9-1~deb13u1 -libsystemd0==257.9-1~deb13u1 libsz2==1.1.3-1+b1 libtag2==2.0.2-2 libtask-weaken-perl==1.06-2 @@ -1513,14 +1526,14 @@ libtype-tiny-perl==2.004000-2 libtype-tiny-xs-perl==0.025-2+b1 libtypes-serialiser-perl==1.01-1 libubsan1==14.2.0-19 +libubsan1-armhf-cross==14.2.0-19cross1 libuchardet0==0.0.8-1+b2 libucx0==1.18.1+ds-2+b1 libudev-dev==257.9-1~deb13u1 -libudev1==257.9-1~deb13u1 libudfread0==1.1.2-1+b2 libunbound8==1.22.0-2+deb13u1 libunibreak6==6.1-3 -libunicode-map-perl==0.112-13+b5 +libunicode-map-perl==0.112-13+b4 libunicode-utf8-perl==0.62-3 libunistring5==1.3-2 libunivocity-parsers-java==2.9.1-1 @@ -1535,7 +1548,6 @@ libusb-1.0-0-dev==2:1.0.28-1 libusb-1.0-doc==2:1.0.28-1 libusb-dev==2:0.1.12-35+b1 libusbredirparser1t64==0.15.0-1 -libuuid1==2.41-5 libuv1t64==1.50.0-2 libv4l-0t64==1.30.1-1 libv4lconvert0t64==1.30.1-1 @@ -1553,17 +1565,17 @@ libverto-libev1t64==0.3.1-1.2+b2 libverto1t64==0.3.1-1.2+b2 libvidstab1.1==1.1.0-2+b2 libvirglrenderer1==1.1.0-2 -libvirt-clients==11.3.0-3+deb13u1 -libvirt-common==11.3.0-3+deb13u1 -libvirt-l10n==11.3.0-3+deb13u1 -libvirt0==11.3.0-3+deb13u1 +libvirt-clients==11.3.0-3+deb13u2 +libvirt-common==11.3.0-3+deb13u2 +libvirt-l10n==11.3.0-3+deb13u2 +libvirt0==11.3.0-3+deb13u2 libvisio-0.1-1==0.1.7-1+b5 libvisual-0.4-0==0.4.2-2+b2 libvorbis0a==1.3.7-3 libvorbisenc2==1.3.7-3 libvorbisfile3==1.3.7-3 libvpl2==1:2.14.0-1+b1 -libvpx9==1.15.0-2.1 +libvpx9==1.15.0-2.1+deb13u1 libvte-2.91-0==0.80.1-1 libvte-2.91-common==0.80.1-1 libvulkan-dev==1.4.309.0-1 @@ -1692,6 +1704,7 @@ libxrender1==1:0.9.12-1 libxs-parse-keyword-perl==0.48-2 libxs-parse-sublike-perl==0.37-1 libxshmfence1==1.3.3-1 +libxslt1-dev==1.1.35-1.2+deb13u2 libxslt1.1==1.1.35-1.2+deb13u2 libxss-dev==1:1.2.3-1+b3 libxss1==1:1.2.3-1+b3 @@ -1733,7 +1746,7 @@ libzzip-0-13t64==0.13.78+dfsg.1-0.1 licensecheck==3.3.9-1 lintian==2.122.0 linux-base==4.12 -linux-libc-dev==6.12.57-1 +linux-libc-dev==6.12.73-1 linux-sysctl-defaults==4.12 linuxdoc-tools==0.9.86-1 llvm==1:19.0-63 @@ -1745,27 +1758,26 @@ llvm-19-tools==1:19.1.7-3+b1 llvm-runtime==1:19.0-63 lmdb-doc==0.9.31-1 lmodern==2.005-1 -locales==2.41-12 -login==1:4.16.0-2+really2.41-5 -logrotate==3.22.0-1 -logsave==1.47.2-3+b3 +locales==2.41-12+deb13u1 +logrotate==3.22.0-1+b2 +logsave==1.47.2-3+b7 lsb-release==12.1-1 lsof==4.99.4+dfsg-2 lua-bitop==1.0.2-7+b2 lua-bitop-dev==1.0.2-7+b2 lua-cjson==2.1.0+dfsg-2.2+b2 lua-cjson-dev==2.1.0+dfsg-2.2+b2 -luit==2.0.20240910-1 -lynx==2.9.2-1 +luit==2.0.20240910-1+b1 +lynx==2.9.2-1+b1 lynx-common==2.9.2-1 lz4==1.10.0-4 lzip==1.25-3 -lzop==1.04-2 +lzop==1.04-2+b1 m4==1.4.19-8 mailcap==3.74 make==4.4.1-2 man-db==2.13.1-1 -man2html-base==1.6g-16 +man2html-base==1.6g-16+b2 manpages==6.9.1-1 manpages-dev==6.9.1-1 mariadb-common==1:11.8.3-0+deb13u1 @@ -1779,7 +1791,7 @@ mesa-vdpau-drivers==25.0.7-2 mesa-vulkan-drivers==25.0.7-2 meson==1.7.0-1 module-assistant==0.11.14 -mount==2.41-5 +mokutil==0.7.2-1 mpi-default-bin==1.18 mpi-default-dev==1.18 mtools==4.0.48-1 @@ -1792,38 +1804,47 @@ netbase==6.5 netpbm==2:11.10.02-1 nettle-dev==3.10.1-1 nftables==1.1.3-1 -ninja-build==1.12.1-1 +ninja-build==1.12.1-1+b1 nlohmann-json3-dev==3.11.3-2.1 +node-acorn==8.8.1+ds+~cs25.17.7-2 +node-balanced-match==2.0.0-1 +node-brace-expansion==2.0.1+~1.1.0-2 +node-cjs-module-lexer==1.2.3+dfsg-1 +node-corepack==0.24.0-5 +node-minimatch==9.0.3-6 node-popper2==2.11.2-8 +node-undici==7.3.0+dfsg1+~cs24.12.11-1 +node-xtend==4.0.2-3 +nodejs==20.19.2+dfsg-1 +nodejs-doc==20.19.2+dfsg-1 numba-doc==0.61.2+dfsg-1 ocl-icd-libopencl1==2.3.3-1 openjade==1.4devel1-23.3 -openjdk-21-jdk==21.0.9+10-1~deb13u1 -openjdk-21-jdk-headless==21.0.9+10-1~deb13u1 -openjdk-21-jre==21.0.9+10-1~deb13u1 -openjdk-21-jre-headless==21.0.9+10-1~deb13u1 +openjdk-21-jdk==21.0.10+7-1~deb13u1 +openjdk-21-jdk-headless==21.0.10+7-1~deb13u1 +openjdk-21-jre==21.0.10+7-1~deb13u1 +openjdk-21-jre-headless==21.0.10+7-1~deb13u1 openmpi-bin==5.0.7-1 openmpi-common==5.0.7-1 opensp==1.5.2-15.2 openssh-client==1:10.0p1-7 openssh-server==1:10.0p1-7 openssh-sftp-server==1:10.0p1-7 -openssl==3.5.4-1~deb13u1 -openssl-provider-legacy==3.5.4-1~deb13u1 -ovmf==2025.02-8 +openssl==3.5.4-1~deb13u2 +os-prober==1.83 +ovmf==2025.02-8+deb13u1 pahole==1.30-1 pandoc==3.1.11.1+ds-2 pandoc-data==3.1.11.1-3 pango1.0-tools==1.56.3-1 parted==3.6-5 patch==2.8-2 -patchutils==0.4.2-1 +patchutils==0.4.2-1+b1 pbuilder==0.231.1 -pbzip2==1.1.13-1 +pbzip2==1.1.13-1+b1 pci.ids==0.0~2025.06.09-1 pciutils==1:3.13.0-2 perl==5.40.1-6 -perl-base==5.40.1-6 perl-modules-5.40==5.40.1-6 perl-openssl-defaults==7+b2 php-cli==2:8.4+96 @@ -1842,12 +1863,12 @@ php-text-template==4.0.1-4 php-timer==7.0.1-4 php-tokenizer==1.2.3-2 php-xml==2:8.4+96 -php8.4-cli==8.4.11-1 -php8.4-common==8.4.11-1 -php8.4-mbstring==8.4.11-1 -php8.4-opcache==8.4.11-1 -php8.4-readline==8.4.11-1 -php8.4-xml==8.4.11-1 +php8.4-cli==8.4.16-1~deb13u1 +php8.4-common==8.4.16-1~deb13u1 +php8.4-mbstring==8.4.16-1~deb13u1 +php8.4-opcache==8.4.16-1~deb13u1 +php8.4-readline==8.4.16-1~deb13u1 +php8.4-xml==8.4.16-1~deb13u1 phpunit==11.5.19-1 phpunit-cli-parser==3.0.2-2 phpunit-code-unit==3.0.3-1 @@ -1864,7 +1885,7 @@ phpunit-object-reflector==4.0.1-4 phpunit-recursion-context==6.0.2-4 phpunit-type==5.1.2-3 phpunit-version==5.0.2-2 -pigz==2.8-1 +pigz==2.8-1+b1 pinentry-curses==1.3.1-2 pixz==1.0.7-4 pkg-config==1.8.1-4 @@ -1876,9 +1897,9 @@ pnp.ids==0.394-1 po-debconf==1.0.21+nmu1 pocketsphinx-en-us==0.8+5prealpha+1-15 poppler-data==0.4.12-1 -pps-tools==1.0.2-2 +pps-tools==1.0.2-2+b1 preview-latex-style==13.2-1.1 -pristine-tar==1.50+nmu2 +pristine-tar==1.50+nmu2+b1 procmail==3.24+really3.22-4 procps==2:4.0.4-9 protobuf-c-compiler==1.5.1-1 @@ -1976,7 +1997,7 @@ python3-m2crypto==0.42.0-3 python3-magic==2:0.4.27-3 python3-mako==1.3.9-1 python3-markdown==3.7-2 -python3-markupsafe==2.1.5-1+b3 +python3-markupsafe==2.1.5-1+b4 python3-matplotlib==3.10.1+dfsg1-4 python3-matplotlib-inline==0.1.7-1 python3-mccabe==0.7.0-1 @@ -2005,8 +2026,8 @@ python3-paramiko==3.5.1-3 python3-parse==1.20.2-1 python3-parso==0.8.4-1 python3-pexpect==4.9-3 -python3-pil==11.1.0-5+b1 -python3-pil.imagetk==11.1.0-5+b1 +python3-pil==11.1.0-5+deb13u1 +python3-pil.imagetk==11.1.0-5+deb13u1 python3-pip==25.1.1+dfsg-1 python3-pip-whl==25.1.1+dfsg-1 python3-pkg-resources==78.1.1-0.1 @@ -2022,7 +2043,7 @@ python3-psutils==3.3.8-1 python3-ptyprocess==0.7.0-6 python3-pure-eval==0.2.3-1 python3-puremagic==1.28-1 -python3-pyasn1==0.6.1-1 +python3-pyasn1==0.6.1-1+deb13u1 python3-pyasn1-modules==0.4.1-2 python3-pycparser==2.22-2 python3-pycryptodome==3.20.0+dfsg-3 @@ -2054,7 +2075,7 @@ python3-sphinxcontrib.jquery==4.1-5 python3-stack-data==0.6.3-1 python3-stdeb==0.10.0-5 python3-sympy==1.13.3-5 -python3-systemd==235-1+b6 +python3-systemd==235-1+b7 python3-tables==3.10.2-2 python3-tables-lib==3.10.2-2+b1 python3-thrift==0.19.0-4+b1 @@ -2069,7 +2090,7 @@ python3-typing-extensions==4.13.2-1 python3-tz==2025.2-3 python3-ufolib2==0.17.1+dfsg1-1 python3-unidiff==0.7.5-2 -python3-urllib3==2.3.0-3 +python3-urllib3==2.3.0-3+deb13u1 python3-venv==3.13.5-1 python3-wcwidth==0.2.13+dfsg1-1 python3-webencodings==0.5.1-5 @@ -2079,38 +2100,38 @@ python3-xdg==0.28-2 python3-yaml==6.0.2-1+b2 python3-zipp==3.21.0-1 python3-zope.interface==7.2-1+b1 -python3-zopfli==0.2.3.post1-1+b1 +python3-zopfli==0.2.3.post1-1 python3.13==3.13.5-2 python3.13-dbg==3.13.5-2 python3.13-dev==3.13.5-2 python3.13-minimal==3.13.5-2 python3.13-tk==3.13.5-2 python3.13-venv==3.13.5-2 -qemu-block-extra==1:10.0.6+ds-0+deb13u2 -qemu-system-common==1:10.0.6+ds-0+deb13u2 -qemu-system-data==1:10.0.6+ds-0+deb13u2 -qemu-system-gui==1:10.0.6+ds-0+deb13u2 -qemu-system-modules-opengl==1:10.0.6+ds-0+deb13u2 -qemu-system-modules-spice==1:10.0.6+ds-0+deb13u2 -qemu-system-x86==1:10.0.6+ds-0+deb13u2 -qemu-utils==1:10.0.6+ds-0+deb13u2 +qemu-block-extra==1:10.0.7+ds-0+deb13u1+b1 +qemu-system-common==1:10.0.7+ds-0+deb13u1+b1 +qemu-system-data==1:10.0.7+ds-0+deb13u1 +qemu-system-gui==1:10.0.7+ds-0+deb13u1+b1 +qemu-system-modules-opengl==1:10.0.7+ds-0+deb13u1+b1 +qemu-system-modules-spice==1:10.0.7+ds-0+deb13u1+b1 +qemu-system-x86==1:10.0.7+ds-0+deb13u1+b1 +qemu-utils==1:10.0.7+ds-0+deb13u1+b1 qt5-gtk-platformtheme==5.15.15+dfsg-6 qt5-qmake==5.15.15+dfsg-6 qt5-qmake-bin==5.15.15+dfsg-6 qtbase5-dev==5.15.15+dfsg-6 qtbase5-dev-tools==5.15.15+dfsg-6 -qtchooser==66-2 +qtchooser==66-2+b1 qttranslations5-l10n==5.15.15-2 qtwayland5==5.15.15-3 quilt==0.68-1 rake==13.2.1-1 readline-common==8.2-6 remake==4.3+dbg-1.6+dfsg-2 -rpcsvc-proto==1.4.3-1 +rpcsvc-proto==1.4.3-1+b1 rpm-common==4.20.1+dfsg-3 rpm2cpio==4.20.1+dfsg-3 rrdtool==1.7.2-4.2+b5 -rsync==3.4.1+ds1-5 +rsync==3.4.1+ds1-5+deb13u1 rsyslog==8.2504.0-1 ruby==1:3.3+b1 ruby-all-dev==1:3.3+b1 @@ -2141,12 +2162,16 @@ sgmlspl==1.03ii-38 shared-mime-info==2.4-5+b2 sharutils==1:4.15.2-12 shellcheck==0.10.0-1 +shim-helpers-arm64-signed==1+15.8+1 +shim-signed==1.47+15.8-1 +shim-signed-common==1.47+15.8-1 +shim-unsigned==15.8-1 slirp4netns==1.2.1-1.1 sphinx-common==8.1.3-5 sphinx-rtd-theme-common==3.0.2+dfsg-2 -sq==1.3.1-2+b1 -squashfs-tools==1:4.6.1-1 -ss-dev==2.0-1.47.2-3+b3 +sq==1.3.1-2+b2 +squashfs-tools==1:4.6.1-1+b1 +ss-dev==2.0-1.47.2-3+b7 stgit==0.19-2 strace==6.13+ds-1 sudo==1.9.16p2-3 @@ -2156,13 +2181,13 @@ systemd-cryptsetup==257.9-1~deb13u1 systemd-sysv==257.9-1~deb13u1 systemd-timesyncd==257.9-1~deb13u1 systemtap-sdt-dev==5.1-5 -t1utils==1.41-4 +t1utils==1.41-4+b1 tcl==8.6.16 tcl-expect==5.45.4-4 tcl8.6==8.6.16+dfsg-1 tcpdump==4.99.5-2 teckit==2.5.12+ds1-1+b1 -telnet==0.17+2.6-3 +telnet==0.17+2.6-3+deb13u2 tex-common==6.19 tex-gyre==20180621-6 texi2html==1.82+dfsg1-7 @@ -2179,7 +2204,7 @@ texlive-pictures==2024.20250309-1 texlive-plain-generic==2024.20250309-2 texlive-xetex==2024.20250309-1 thrift-compiler==0.19.0-4+b1 -time==1.9-0.2 +time==1.9-0.2+b1 tiny-initramfs==0.1-6.1 tiny-initramfs-core==0.1-6.1 tipa==2:1.3-21 @@ -2192,7 +2217,6 @@ unicode-data==15.1.0-1 unzip==6.0-29 usb.ids==2025.07.26-1 usbutils==1:018-2 -util-linux==2.41-5 uuid-dev==2.41-5 va-driver-all==2.22.0-3 valgrind==1:3.24.0-3 @@ -2213,7 +2237,7 @@ x11-xserver-utils==7.7+11 x11proto-dev==2024.1-1 xauth==1:1.1.2-1.1 xdelta==1.1.3-10.7 -xdelta3==3.0.11-dfsg-1.2 +xdelta3==3.0.11-dfsg-1.2+b1 xdg-user-dirs==0.18-2 xdg-utils==1.2.1-2 xfonts-base==1:1.0.5+nmu1 @@ -2222,7 +2246,7 @@ xfonts-unifont==1:15.1.01-1 xfonts-utils==1:7.7+7 xkb-data==2.42-1 xml-core==0.19 -xmlstarlet==1.6.1-4 +xmlstarlet==1.6.1-4+b1 xorg-sgml-doctools==1:1.11-1.1 xorriso==1.5.6-1.2+b1 xserver-common==2:21.1.16-1.3+deb13u1 diff --git a/files/build/versions-public/dockers/sonic-slave-trixie/versions-deb-trixie-armhf b/files/build/versions-public/dockers/sonic-slave-trixie/versions-deb-trixie-armhf new file mode 100644 index 00000000000..97b241a4e93 --- /dev/null +++ b/files/build/versions-public/dockers/sonic-slave-trixie/versions-deb-trixie-armhf @@ -0,0 +1,45 @@ +bc==1.07.1-4 +binfmt-support==2.2.2-7 +cowbuilder==0.90 +cowdancer==0.90 +cpp-14-arm-linux-gnueabihf==14.2.0-19 +dctrl-tools==2.24-3 +dh-exec==0.30 +dwz==0.15-1+b2 +efibootmgr==18-2 +fastjar==2:0.98-7 +g++-14-arm-linux-gnueabihf==14.2.0-19 +g++-arm-linux-gnueabihf==4:14.2.0-1 +gcc-14-arm-linux-gnueabihf==14.2.0-19 +help2man==1.49.3 +libdrm-exynos1==2.4.124-2 +libdrm-omap1==2.4.124-2 +libfcgi-perl==0.82+ds-3+b1 +libjudy-dev==1.0.5-5.1 +libjudydebian1==1.0.5-5.1 +liblist-moreutils-xs-perl==0.430-4+b1 +libmpich12==4.3.0+really4.2.1-1 +libnanomsg-dev==1.1.5+dfsg-1.1 +libnanomsg5==1.1.5+dfsg-1.1 +libsereal-decoder-perl==5.004+ds-1+b4 +libunicode-map-perl==0.112-13+b5 +logrotate==3.22.0-1 +luit==2.0.20240910-1 +lynx==2.9.2-1 +lzop==1.04-2 +man2html-base==1.6g-16 +ninja-build==1.12.1-1 +patchutils==0.4.2-1 +pbzip2==1.1.13-1 +pigz==2.8-1 +pps-tools==1.0.2-2 +pristine-tar==1.50+nmu2 +python3-markupsafe==2.1.5-1+b3 +python3-systemd==235-1+b6 +qtchooser==66-2 +rpcsvc-proto==1.4.3-1 +squashfs-tools==1:4.6.1-1 +t1utils==1.41-4 +time==1.9-0.2 +xdelta3==3.0.11-dfsg-1.2 +xmlstarlet==1.6.1-4 diff --git a/files/build/versions/dockers/sonic-slave-trixie/versions-py3 b/files/build/versions-public/dockers/sonic-slave-trixie/versions-py3 similarity index 98% rename from files/build/versions/dockers/sonic-slave-trixie/versions-py3 rename to files/build/versions-public/dockers/sonic-slave-trixie/versions-py3 index bd3aee98af6..b8b8888d61b 100644 --- a/files/build/versions/dockers/sonic-slave-trixie/versions-py3 +++ b/files/build/versions-public/dockers/sonic-slave-trixie/versions-py3 @@ -44,7 +44,7 @@ executing==2.2.0 fastentrypoints==0.12 fonttools==4.57.0 fs==2.4.16 -fsspec==2025.12.0 +fsspec==2026.2.0 gbp==0.9.38 gcovr==7.2 gpg==1.24.2 @@ -113,8 +113,8 @@ ply==3.11 pooch==1.8.2 prefixed==0.7.0 prompt_toolkit==3.0.51 -protobuf==5.29.5 -psutil==7.0.0 +protobuf==5.29.6 +psutil==7.2.2 psutils==3.3.8 ptyprocess==0.7.0 pure_eval==0.2.3 @@ -127,7 +127,7 @@ pyasn1_modules==0.4.1 pycparser==2.22 pycryptodomex==3.20.0 pyelftools==0.32 -pyfakefs==5.10.2 +pyfakefs==6.1.1 pygments==2.18.0 pygobject==3.50.0 pyhamcrest==2.1.0 @@ -151,7 +151,7 @@ pytz==2025.2 pyxdg==0.28 pyyaml==6.0.2 pyyaml-include==2.2 -redis==7.1.0 +redis==7.2.0 regex==2024.11.6 requests==2.32.3 roman==5.0 diff --git a/files/build/versions/host-base-image/versions-deb-trixie b/files/build/versions-public/host-base-image/versions-deb-trixie similarity index 90% rename from files/build/versions/host-base-image/versions-deb-trixie rename to files/build/versions-public/host-base-image/versions-deb-trixie index 32c00b954d1..7ca0f35fd93 100644 --- a/files/build/versions/host-base-image/versions-deb-trixie +++ b/files/build/versions-public/host-base-image/versions-deb-trixie @@ -1,7 +1,7 @@ apt==3.0.3 -base-files==13.8+deb13u2 +base-files==13.8+deb13u3 base-passwd==3.6.7 -bash==5.2.37-2+b5 +bash==5.2.37-2+b7 bsdutils==1:2.41-5 coreutils==9.7-3 dash==0.5.12-12 @@ -12,7 +12,7 @@ diffutils==1:3.10-4 dpkg==1.22.21 findutils==4.10.0-3 gcc-14-base==14.2.0-19 -grep==3.11-4 +grep==3.11-4+b1 gzip==1.13-1 hostname==3.25 init-system-helpers==1.69~deb13u1 @@ -24,10 +24,10 @@ libaudit1==1:4.0.2-2+b2 libblkid1==2.41-5 libbsd0==0.12.2-2 libbz2-1.0==1.0.8-6 -libc-bin==2.41-12 -libc6==2.41-12 +libc-bin==2.41-12+deb13u1 +libc6==2.41-12+deb13u1 libcap-ng0==0.8.5-4+b1 -libcap2==1:2.75-10+b1 +libcap2==1:2.75-10+b3 libcrypt1==1:4.4.38-1 libdb5.3t64==5.3.28+dfsg2-9 libdebconfclient0==0.280 @@ -69,8 +69,8 @@ ncurses-bin==6.5+20250216-2 openssl-provider-legacy==3.5.4-1~deb13u1 passwd==1:4.17.4-2 perl-base==5.40.1-6 -sed==4.9-2 -sqv==1.3.0-3 +sed==4.9-2+b1 +sqv==1.3.0-3+b2 sysvinit-utils==3.14-4 tar==1.35+dfsg-3.1 tzdata==2025b-4+deb13u1 diff --git a/files/build/versions-public/host-base-image/versions-deb-trixie-armhf b/files/build/versions-public/host-base-image/versions-deb-trixie-armhf new file mode 100644 index 00000000000..860d2634cf5 --- /dev/null +++ b/files/build/versions-public/host-base-image/versions-deb-trixie-armhf @@ -0,0 +1,2 @@ +grep==3.11-4 +sed==4.9-2 diff --git a/files/build/versions/host-image/versions-deb-trixie b/files/build/versions-public/host-image/versions-deb-trixie similarity index 81% rename from files/build/versions/host-image/versions-deb-trixie rename to files/build/versions-public/host-image/versions-deb-trixie index e8a409ef227..40adbb2ceb5 100644 --- a/files/build/versions/host-image/versions-deb-trixie +++ b/files/build/versions-public/host-image/versions-deb-trixie @@ -2,28 +2,33 @@ acl==2.3.2-2+b1 adduser==3.152 apparmor==4.1.0-1 apt-transport-https==3.0.3 -arping==2.25-1 +arping==2.25-1+b1 audisp-tacplus==1.0.2 auditd==1:4.0.2-2+b2 bash==5.2.37-2 bash-completion==1:2.16.0-7 bash-tacplus==1.0.0 +bfscripts==4.14.0-13868 binutils==2.44-3 +binutils-aarch64-linux-gnu==2.44-3 binutils-common==2.44-3 binutils-x86-64-linux-gnu==2.44-3 -bridge-utils==1.7.1-4+b1 +bluefield-platform-modules==2.0 +bridge-utils==1.7.1-4 bsdextrautils==2.41-5 bsdmainutils==12.1.8 -busybox==1:1.37.0-6+b3 +busybox==1:1.37.0-6+b5 ca-certificates==20250419 cgroup-tools==3.1.0-2+b2 chrony==4.6.1-3 -conntrack==1:1.4.8-2 +conntrack==1:1.4.8-2+b1 containerd.io==1.7.27-1 cpio==2.15+dfsg-2 cpp==4:14.2.0-1 cpp-14==14.2.0-19 +cpp-14-aarch64-linux-gnu==14.2.0-19 cpp-14-x86-64-linux-gnu==14.2.0-19 +cpp-aarch64-linux-gnu==4:14.2.0-1 cpp-x86-64-linux-gnu==4:14.2.0-1 cracklib-runtime==2.9.6-5.2+b1 cron==3.0pl1-197 @@ -41,10 +46,10 @@ dmsetup==2:1.02.205-2 docker-ce==5:28.2.2-1~debian.13~trixie docker-ce-cli==5:28.2.2-1~debian.13~trixie dpkg-dev==1.22.21 -e2fsprogs==1.47.2-3+b3 +e2fsprogs==1.47.2-3+b7 eatmydata==131-2 -ebtables==2.0.11-6 -efibootmgr==18-2 +ebtables==2.0.11-6+b2 +efibootmgr==18-2+b1 efitools==1.9.2-3.5 ethtool==1:6.14.2-1 fdisk==2.41-5 @@ -60,22 +65,24 @@ fonts-dejavu-mono==2.37-8 freeipmi-common==1.6.15-1 gcc==4:14.2.0-1 gcc-14==14.2.0-19 +gcc-14-aarch64-linux-gnu==14.2.0-19 gcc-14-x86-64-linux-gnu==14.2.0-19 +gcc-aarch64-linux-gnu==4:14.2.0-1 gcc-x86-64-linux-gnu==4:14.2.0-1 -gdisk==1.0.10-2 +gdisk==1.0.10-2+b1 gettext-base==0.23.1-2 gir1.2-girepository-2.0==1.84.0-1 -gir1.2-glib-2.0==2.84.4-3~deb13u1 -gpg==2.4.7-21+b3 -gpgconf==2.4.7-21+b3 +gir1.2-glib-2.0==2.84.4-3~deb13u2 +gpg==2.4.7-21+deb13u1+b1 +gpgconf==2.4.7-21+deb13u1+b1 grub-common==2.06-13+deb13u1 grub2-common==2.06-13+deb13u1 haveged==1.9.19-12 hdparm==9.65+ds-1.1 hping3==3.a2.ds2-10.1 -hw-management==1.mlnx.7.0050.2002 +hw-management==1.mlnx.7.0050.2930 i2c-tools==4.4-2 -ifmetric==0.3-5 +ifmetric==0.3-5+b1 ifupdown2==3.0.0-1 initramfs-tools==0.142 initramfs-tools-core==0.142 @@ -89,7 +96,8 @@ j2cli==0.3.12b-5 jq==1.7.1-6+deb13u1 kdump-tools==1:1.10.7 kernel-mft-dkms-modules-6.12.41+deb13-sonic-amd64==4.34.0 -kexec-tools==1:2.0.29-2+b2 +kernel-mft-dkms-modules-6.12.41+deb13-sonic-arm64==4.34.0 +kexec-tools==1:2.0.29-2+b1 klibc-utils==2.0.14-1 kmod==34.2-2 ldap-utils==2.6.10+dfsg-1 @@ -108,19 +116,22 @@ libbinutils==2.44-3 libboost-serialization1.83.0==1.83.0-4.2 libbpf1==1:1.5.0-3 libbrotli1==1.1.0-2+b7 -libc-l10n==2.41-12 -libcap2-bin==1:2.75-10+b1 -libcares2==1.34.5-1 +libc-dev-bin==2.41-12+deb13u1 +libc-l10n==2.41-12+deb13u1 +libc6-dev==2.41-12+deb13u1 +libcap2-bin==1:2.75-10+b3 +libcares2==1.34.5-1+deb13u1 libcbor0.10==0.10.2-2 libcc1-0==14.2.0-19 libcgroup3==3.1.0-2+b2 -libcom-err2==1.47.2-3+b3 +libcom-err2==1.47.2-3+b7 libcrack2==2.9.6-5.2+b1 libcrypt-dev==1:4.4.38-1 libctf-nobfd0==2.44-3 libctf0==2.44-3 libcurl3t64-gnutls==8.14.1-2+deb13u2 libcurl4t64==8.14.1-2+deb13u2 +libdashapi==1.0.0 libdbd-sqlite3-perl==1.76-1 libdbi-perl==1.647-1 libdbus-1-3==1.16.2-2 @@ -135,7 +146,7 @@ libefivar1t64==38-3.1+b1 libelf1t64==0.192-4 libestr0==0.1.11-2 libexpat1==2.7.1-2 -libext2fs2t64==1.47.2-3+b3 +libext2fs2t64==1.47.2-3+b7 libfastjson4==1.2304.0-2 libfdisk1==2.41-5 libfdt1==1.7.2-2+b1 @@ -150,8 +161,8 @@ libgcrypt20==1.11.0-7 libgdbm-compat4t64==1.24-2 libgdbm6t64==1.24-2 libgirepository-1.0-1==1.84.0-1 -libglib2.0-0t64==2.84.4-3~deb13u1 -libgnutls30t64==3.8.9-3 +libglib2.0-0t64==2.84.4-3~deb13u2 +libgnutls30t64==3.8.9-3+deb13u2 libgomp1==14.2.0-19 libgpg-error0==1.51-4 libgpm2==1.20.7-11+b2 @@ -230,7 +241,7 @@ libpci3==1:3.13.0-2 libpcre3==2:8.39-15 libperl5.40==5.40.1-6 libpgm-5.3-0t64==5.3.128~dfsg-2.1+b1 -libpng16-16t64==1.6.48-1+deb13u1 +libpng16-16t64==1.6.48-1+deb13u3 libpopt0==1.19+dfsg-2 libproc2-0==2:4.0.4-9 libprotobuf32t64==3.21.12-11 @@ -253,8 +264,8 @@ libsensors5==1:3.6.2-2 libserialport0==0.1.2-1 libsframe1==2.44-3 libslang2==2.3.3-5+b2 -libsodium23==1.0.18-1+b2 -libss2==1.47.2-3+b3 +libsodium23==1.0.18-1+deb13u1 +libss2==1.47.2-3+b7 libssh2-1t64==1.11.1-1 libssl-dev==3.5.4-1+fips libssl3t64==3.5.4-1+fips @@ -270,6 +281,18 @@ libtirpc-common==1.3.6+ds-1 libtirpc3t64==1.3.6+ds-1 libtraceevent1==1:1.8.4-2 libtsan2==14.2.0-19 +libtss2-esys-3.0.2-0t64==4.1.3-1.2 +libtss2-fapi1t64==4.1.3-1.2 +libtss2-mu-4.0.1-0t64==4.1.3-1.2 +libtss2-rc0t64==4.1.3-1.2 +libtss2-sys1t64==4.1.3-1.2 +libtss2-tcti-cmd0t64==4.1.3-1.2 +libtss2-tcti-device0t64==4.1.3-1.2 +libtss2-tcti-libtpms0t64==4.1.3-1.2 +libtss2-tcti-mssim0t64==4.1.3-1.2 +libtss2-tcti-spi-helper0t64==4.1.3-1.2 +libtss2-tcti-swtpm0t64==4.1.3-1.2 +libtss2-tctildr0t64==4.1.3-1.2 libubootenv-tool==0.3.5-0.1+b2 libubootenv0.1==0.3.5-0.1+b2 libubsan1==14.2.0-19 @@ -289,6 +312,8 @@ libxenstore4==4.20.2+7-g1badcf5035-0+deb13u1 libxentoolcore1==4.20.2+7-g1badcf5035-0+deb13u1 libxentoollog1==4.20.2+7-g1badcf5035-0+deb13u1 libxml2==2.12.7+dfsg+really2.9.14-2.1+deb13u2 +libxml2-dev==2.12.7+dfsg+really2.9.14-2.1+deb13u2 +libxslt1-dev==1.1.35-1.2+deb13u2 libxslt1.1==1.1.35-1.2+deb13u2 libxtables12==1.8.11-2 libyajl2==2.1.0-5+b2 @@ -298,24 +323,32 @@ libyang-cpp==1.0.73 libzmq5==4.3.5-1+b3 linux-base==4.12 linux-image-6.12.41+deb13-sonic-amd64-unsigned==6.12.41-1 -linux-perf==6.12.57-1 +linux-image-6.12.41+deb13-sonic-arm64-unsigned==6.12.41-1 +linux-libc-dev==6.12.73-1 +linux-perf==6.12.73-1 linux-sysctl-defaults==4.12 -locales==2.41-12 -logrotate==3.22.0-1 -logsave==1.47.2-3+b3 +locales==2.41-12+deb13u1 +logrotate==3.22.0-1+b2 +logsave==1.47.2-3+b7 lsof==4.99.4+dfsg-2 -makedumpfile==1:1.7.6-1 +makedumpfile==1:1.7.6-1+b1 media-types==13.0.0 mft==4.34.0-145 mft-fwtrace-cfg==1.0.0 mft-oem==4.34.0-145 minicom==2.10-1 +mlnx-iproute2==2601.0.2-1 +mlnx-ofed-kernel-modules-6.12.41+deb13-sonic-arm64==26.01.OFED.26.01.0.2.9.1 +mlnx-ofed-kernel-utils==26.01.OFED.26.01.0.2.9.1-1 +mlnx-tools==2601.0.0-1 +mlxbf-bootctl==2.1 +mlxbf-bootimages==4.14.0-13868 mokutil==0.7.2-1 monit==1:5.34.3-1 mtd-utils==1:2.3.0-1 -mtr-tiny==0.95-1.1+b1 -ncal==12.1.8 -ndisc6==1.0.7-1 +mtr-tiny==0.95-1.1+b2 +ncal==12.1.8+b1 +ndisc6==1.0.7-1+b1 net-tools==2.10-1.3 netbase==6.5 netfilter-persistent==1.0.23 @@ -326,12 +359,13 @@ openssh-client==1:10.0p1-7+fips openssh-server==1:10.0p1-7+fips openssh-sftp-server==1:10.0p1-7+fips openssl==3.5.4-1+fips +openssl-provider-legacy==3.5.4-1~deb13u2 pci.ids==0.0~2025.06.09-1 pciutils==1:3.13.0-2 perl==5.40.1-6 perl-modules-5.40==5.40.1-6 -picocom==3.1-4 -pigz==2.8-1 +picocom==3.1-4+b1 +pigz==2.8-1+b1 pkgconf==1.8.1-4 procps==2:4.0.4-9 psmisc==23.7-2 @@ -360,7 +394,7 @@ python3-jaraco.text==4.0.0-1 python3-jinja2==3.1.6-1 python3-lxml==5.4.0-1 python3-m2crypto==0.42.0-3 -python3-markupsafe==2.1.5-1+b3 +python3-markupsafe==2.1.5-1+b4 python3-minimal==3.13.5-1 python3-more-itertools==10.7.0-1 python3-nacl==1.5.0-7 @@ -381,7 +415,7 @@ python3-setuptools==78.1.1-0.1 python3-swsscommon==1.0.0 python3-typeguard==4.4.2-1 python3-typing-extensions==4.13.2-1 -python3-urllib3==2.3.0-3 +python3-urllib3==2.3.0-3+deb13u1 python3-watchdog==6.0.0-1 python3-wcwidth==0.2.13+dfsg1-1 python3-wheel==0.46.1-2 @@ -393,7 +427,8 @@ python3.13-minimal==3.13.5-2+fips rasdaemon==0.6.8-1 readline-common==8.2-6 resolvconf==1.94 -rshim==2.5.7 +rpcsvc-proto==1.4.3-1+b1 +rshim==2.6.4 rsyslog==8.2504.0-1 runit-helper==2.16.4 sbsigntool==0.9.4-3.2 @@ -411,21 +446,24 @@ sonic-platform-pddf==1.1 sonic-rsyslog-plugin==1.0.0-0 sonic-utilities-data==1.0-1 sqlite3==3.46.1-7 -squashfs-tools==1:4.6.1-1 +squashfs-tools==1:4.6.1-1+b1 ssh==1:10.0p1-7+fips sudo==1.9.16p2-3 -sx-kernel==1.mlnx.4.8.2096 +sx-kernel==1.mlnx.4.8.3404 symcrypt-openssl==0.1 sysfsutils==2.1.1-7 syslog-counter==1.0.0 -sysstat==12.7.5-2 +sysstat==12.7.5-2+b2 systemd==257.9-1~deb13u1 -systemd-bootchart==235-2 +systemd-bootchart==235-2+b1 systemd-sonic-generator==1.0.0 systemd-sysv==257.9-1~deb13u1 tcpdump==4.99.5-2 tcptraceroute==1.5beta7+debian-4.2 +tpm-udev==0.6+nmu1 +tpm2-tools==5.7-1+b1 traceroute==1:2.1.6-1 +tzdata-legacy==2025b-4+deb13u1 u-boot-tools==2025.01-3 ucf==3.0052 udev==257.9-1~deb13u1 @@ -438,7 +476,8 @@ vim-runtime==2:9.1.1230-2 wireless-regdb==2025.07.10-1 x11-common==1:7.7+24+deb13u1 xml-core==0.19 -xmlstarlet==1.6.1-4 +xmlstarlet==1.6.1-4+b1 xxd==2:9.1.1230-2 xz-utils==5.8.1-1 +zlib1g-dev==1:1.3.dfsg+really1.3.1-1+b1 zstd==1.5.7+dfsg-1 diff --git a/files/build/versions-public/host-image/versions-deb-trixie-arm64 b/files/build/versions-public/host-image/versions-deb-trixie-arm64 new file mode 100644 index 00000000000..129e1269a55 --- /dev/null +++ b/files/build/versions-public/host-image/versions-deb-trixie-arm64 @@ -0,0 +1,4 @@ +grub-common==2.12-9 +grub2-common==2.12-9 +libfuse3-4==3.17.2-3 +mrvlprestera==1.0 diff --git a/files/build/versions/host-image/versions-deb-trixie-armhf b/files/build/versions-public/host-image/versions-deb-trixie-armhf similarity index 51% rename from files/build/versions/host-image/versions-deb-trixie-armhf rename to files/build/versions-public/host-image/versions-deb-trixie-armhf index f9b067a61b3..b633a5ef8a8 100644 --- a/files/build/versions/host-image/versions-deb-trixie-armhf +++ b/files/build/versions-public/host-image/versions-deb-trixie-armhf @@ -1,19 +1,30 @@ +arping==2.25-1 binutils-arm-linux-gnueabihf==2.44-3 -bridge-utils==1.7.1-4 +conntrack==1:1.4.8-2 cpp-14-arm-linux-gnueabihf==14.2.0-19 cpp-arm-linux-gnueabihf==4:14.2.0-1 +ebtables==2.0.11-6 +efibootmgr==18-2 gcc-14-arm-linux-gnueabihf==14.2.0-19 gcc-arm-linux-gnueabihf==4:14.2.0-1 +gdisk==1.0.10-2 grub-common==2.12-9 grub2-common==2.12-9 +ifmetric==0.3-5 kexec-tools==1:2.0.29-2 -libc-dev-bin==2.41-12 -libc6-dev==2.41-12 libfuse3-4==3.17.2-3 -libxml2-dev==2.12.7+dfsg+really2.9.14-2.1+deb13u2 -libxslt1-dev==1.1.35-1.2+deb13u2 linux-image-6.12.41+deb13-sonic-armmp==6.12.41-1 -linux-libc-dev==6.12.57-1 +logrotate==3.22.0-1 +makedumpfile==1:1.7.6-1 mrvlprestera==1.0 +mtr-tiny==0.95-1.1+b1 +ncal==12.1.8 +ndisc6==1.0.7-1 +picocom==3.1-4 +pigz==2.8-1 +python3-markupsafe==2.1.5-1+b3 rpcsvc-proto==1.4.3-1 -zlib1g-dev==1:1.3.dfsg+really1.3.1-1+b1 +squashfs-tools==1:4.6.1-1 +sysstat==12.7.5-2 +systemd-bootchart==235-2 +tpm2-tools==5.7-1 diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions-public/host-image/versions-py3 similarity index 90% rename from files/build/versions/host-image/versions-py3 rename to files/build/versions-public/host-image/versions-py3 index cc295a0ffa6..d3493381b27 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions-public/host-image/versions-py3 @@ -6,8 +6,8 @@ bcrypt==4.2.0 bitarray==2.8.1 blessed==1.21.0 blkinfo==0.2.0 -build==1.3.0 -certifi==2025.11.12 +build==1.4.0 +certifi==2026.1.4 cffi==1.17.1 chardet==5.2.0 charset-normalizer==3.4.4 @@ -19,7 +19,7 @@ dbus-python==1.4.0 docker==7.1.0 docker-image-py==0.1.13 enlighten==1.11.2 -filelock==3.20.0 +filelock==3.24.3 grpcio==1.66.2 grpcio-tools==1.66.2 idna==3.11 @@ -54,8 +54,8 @@ pip==25.1.1 ply==3.11 prefixed==0.7.0 prettyprinter==0.18.0 -protobuf==5.29.5 -psutil==7.1.3 +protobuf==5.29.6 +psutil==7.2.2 ptyprocess==0.7.0 pyang==2.7.1 pyangbind==0.8.2 @@ -77,16 +77,16 @@ scp==0.14.5 semantic-version==2.10.0 setuptools==78.1.1 six==1.17.0 -smbus2==0.5.0 +smbus2==0.6.0 systemd-python==235 tabulate==0.9.0 -telnetlib3==2.0.8 +telnetlib3==2.6.0 toposort==1.6 typeguard==4.4.2 typing_extensions==4.13.2 -urllib3==2.6.2 +urllib3==2.6.3 watchdog==6.0.0 -wcwidth==0.2.13 +wcwidth==0.6.0 wheel==0.46.1 www-authenticate==0.9.2 xmltodict==0.12.0 diff --git a/files/build/versions-public/host-image/versions-py3-all-armhf b/files/build/versions-public/host-image/versions-py3-all-armhf new file mode 100644 index 00000000000..20abe985289 --- /dev/null +++ b/files/build/versions-public/host-image/versions-py3-all-armhf @@ -0,0 +1 @@ +protobuf==6.33.5 diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-arm64 b/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-arm64 deleted file mode 100644 index ac9f1a794a8..00000000000 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-arm64 +++ /dev/null @@ -1,10 +0,0 @@ -bitarray==2.8.1 -cffi==2.0.0 -pexpect==4.9.0 -ptyprocess==0.7.0 -pyroute2==0.9.5 -pyyaml==6.0.1 -requests==2.32.5 -urllib3==2.6.2 -wcwidth==0.2.14 -zipp==1.2.0 diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-armhf b/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-armhf deleted file mode 100644 index d22a1439670..00000000000 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-armhf +++ /dev/null @@ -1,8 +0,0 @@ -bitarray==2.8.1 -cffi==2.0.0 -pexpect==4.9.0 -ptyprocess==0.7.0 -pyroute2==0.9.5 -pyyaml==6.0.1 -urllib3==2.6.2 -wcwidth==0.2.14 diff --git a/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie b/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie deleted file mode 100644 index 042a0ca9f95..00000000000 --- a/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie +++ /dev/null @@ -1,27 +0,0 @@ -kernel-mft-dkms==4.34.0-145 -libnl-cli-3-200==3.7.0-0.2+b1sonic1 -libnl-cli-3-dev==3.7.0-0.2+b1sonic1 -libnl-nf-3-200==3.7.0-0.2+b1sonic1 -libnl-nf-3-dev==3.7.0-0.2+b1sonic1 -libpcre16-3==2:8.39-15 -libpcre3==2:8.39-15 -libpcre3-dev==2:8.39-15 -libpcre32-3==2:8.39-15 -libpcrecpp0v5==2:8.39-15 -libswsscommon==1.0.0 -libswsscommon-dev==1.0.0 -libtac-dev==1.4.1-1 -libtac2==1.4.1-1 -libyang==1.0.73 -libyang-cpp==1.0.73 -libyang-dev==1.0.73 -libyang3==3.12.2-1 -linux-headers-6.12.41+deb13-common-sonic==6.12.41-1 -linux-headers-6.12.41+deb13-sonic-amd64==6.12.41-1 -linux-image-6.12.41+deb13-sonic-amd64-unsigned==6.12.41-1 -linux-kbuild-6.12.41+deb13==6.12.41-1 -python3-libyang==3.1.0-1 -python3-swsscommon==1.0.0 -python3-yang==1.0.73 -sonic-platform-pddf==1.1 -sonic-platform-pddf-sym==1.1 diff --git a/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie-arm64 b/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie-arm64 deleted file mode 100644 index 4b8a1bfd70f..00000000000 --- a/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie-arm64 +++ /dev/null @@ -1,8 +0,0 @@ -libnl-3-200==3.7.0-0.2+b1sonic1 -libnl-3-dev==3.7.0-0.2+b1sonic1 -libnl-genl-3-200==3.7.0-0.2+b1sonic1 -libnl-genl-3-dev==3.7.0-0.2+b1sonic1 -libnl-route-3-200==3.7.0-0.2+b1sonic1 -libnl-route-3-dev==3.7.0-0.2+b1sonic1 -linux-headers-6.12.41+deb13-sonic-arm64==6.12.41-1 -linux-image-6.12.41+deb13-sonic-arm64-unsigned==6.12.41-1 diff --git a/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie-armhf b/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie-armhf deleted file mode 100644 index 565a43369d7..00000000000 --- a/files/build/versions/build/build-sonic-slave-trixie/versions-deb-trixie-armhf +++ /dev/null @@ -1,8 +0,0 @@ -libnl-3-200==3.7.0-0.2+b1sonic1 -libnl-3-dev==3.7.0-0.2+b1sonic1 -libnl-genl-3-200==3.7.0-0.2+b1sonic1 -libnl-genl-3-dev==3.7.0-0.2+b1sonic1 -libnl-route-3-200==3.7.0-0.2+b1sonic1 -libnl-route-3-dev==3.7.0-0.2+b1sonic1 -linux-headers-6.12.41+deb13-sonic-armmp==6.12.41-1 -linux-image-6.12.41+deb13-sonic-armmp==6.12.41-1 diff --git a/files/build/versions/build/build-sonic-slave-trixie/versions-py3-all-arm64 b/files/build/versions/build/build-sonic-slave-trixie/versions-py3-all-arm64 deleted file mode 100644 index ba8d3996d74..00000000000 --- a/files/build/versions/build/build-sonic-slave-trixie/versions-py3-all-arm64 +++ /dev/null @@ -1,5 +0,0 @@ -bitarray==2.8.1 -pexpect==4.9.0 -ptyprocess==0.7.0 -pyroute2==0.9.5 -scp==0.14.5 diff --git a/files/build/versions/build/build-sonic-slave-trixie/versions-py3-all-armhf b/files/build/versions/build/build-sonic-slave-trixie/versions-py3-all-armhf deleted file mode 100644 index ba8d3996d74..00000000000 --- a/files/build/versions/build/build-sonic-slave-trixie/versions-py3-all-armhf +++ /dev/null @@ -1,5 +0,0 @@ -bitarray==2.8.1 -pexpect==4.9.0 -ptyprocess==0.7.0 -pyroute2==0.9.5 -scp==0.14.5 diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker deleted file mode 100644 index 17055620118..00000000000 --- a/files/build/versions/default/versions-docker +++ /dev/null @@ -1,10 +0,0 @@ -amd64:amd64/debian:bookworm==sha256:830fe902fd6e29c2d3cebef306cd5a9b33f49ca4322f6ef82847e19f987fb282 -amd64:debian:bookworm==sha256:7e5bc0e499a8d50cb1e32287944a90b9ec8fd7d500673e75daff3f52882f5798 -amd64:debian:trixie==sha256:653dfb9f86c3782e8369d5f7d29bb8faba1f4bff9025db46e807fa4c22903671 -amd64:p4lang/behavioral-model:latest==sha256:ce45720e28a96a50f275c1b511cd84c2558b62f2cf7a7e506765183bc3fb2e32 -arm64:arm64v8/debian:bookworm==sha256:6ee560263164f07cdf4b03efbd60a2bb0d323dcd399c4197d5be599802ecd621 -arm64:debian:bookworm==sha256:7e5bc0e499a8d50cb1e32287944a90b9ec8fd7d500673e75daff3f52882f5798 -arm64:debian:trixie==sha256:653dfb9f86c3782e8369d5f7d29bb8faba1f4bff9025db46e807fa4c22903671 -armhf:arm32v7/debian:bookworm==sha256:8d8e05122934174c2007368565aff508cb3dcfa194919e95f59d584e51246930 -armhf:debian:bookworm==sha256:7e5bc0e499a8d50cb1e32287944a90b9ec8fd7d500673e75daff3f52882f5798 -armhf:debian:trixie==sha256:653dfb9f86c3782e8369d5f7d29bb8faba1f4bff9025db46e807fa4c22903671 diff --git a/files/build/versions/default/versions-mirror b/files/build/versions/default/versions-mirror deleted file mode 100644 index 8736ac6d5a1..00000000000 --- a/files/build/versions/default/versions-mirror +++ /dev/null @@ -1,17 +0,0 @@ -azure.archive.ubuntu.com_ubuntu_dists_focal==2020-04-23T17:33:17Z -azure.archive.ubuntu.com_ubuntu_dists_focal-backports==2025-12-11T16:47:23Z -azure.archive.ubuntu.com_ubuntu_dists_focal-security==2025-12-11T16:38:54Z -azure.archive.ubuntu.com_ubuntu_dists_focal-updates==2025-12-11T16:42:50Z -deb.nodesource.com_node%5f14.x_dists_bookworm==2023-02-17T00:35:29Z -debian==20251211T001456Z -debian-security==20251211T001340Z -download.docker.com_linux_debian_dists_bookworm==2025-12-11T16:15:25Z -download.docker.com_linux_debian_dists_trixie==2025-12-11T16:15:25Z -packages.trafficmanager.net_snapshot_debian-security_20251211T001340Z_dists_bookworm-security==2025-12-10T22:29:44Z -packages.trafficmanager.net_snapshot_debian-security_20251211T001340Z_dists_trixie-security==2025-12-10T22:29:45Z -packages.trafficmanager.net_snapshot_debian_20251211T001456Z_dists_bookworm==2025-09-06T11:02:45Z -packages.trafficmanager.net_snapshot_debian_20251211T001456Z_dists_bookworm-backports==2025-12-10T20:23:39Z -packages.trafficmanager.net_snapshot_debian_20251211T001456Z_dists_bookworm-updates==2025-12-10T20:23:39Z -packages.trafficmanager.net_snapshot_debian_20251211T001456Z_dists_trixie==2025-11-15T10:36:56Z -packages.trafficmanager.net_snapshot_debian_20251211T001456Z_dists_trixie-backports==2025-12-10T20:23:39Z -packages.trafficmanager.net_snapshot_debian_20251211T001456Z_dists_trixie-updates==2025-12-10T20:23:39Z diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web deleted file mode 100644 index 9979de75970..00000000000 --- a/files/build/versions/default/versions-web +++ /dev/null @@ -1,72 +0,0 @@ -http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_6.1.0-3.debian.tar.xz==fc7fd2b3eebb09770c1608dcddda878e -http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_6.1.0-3.dsc==c3116f907750a9e903d605b18256839f -http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_6.1.0.orig.tar.xz==f3ff4461e25dbc5ef1fb7a9167a9523d -http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.9-2.debian.tar.xz==833a30b64d7b257ce27e6bfa91a33b96 -http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.9-2.dsc==f75e4908e4c841e569447376be6bb043 -http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.9.orig.tar.xz==ffa00f68d63e723c21b8a091c5c0271b -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1-2.debian.tar.xz==64fbb939e9c93d14e5a9040b45e5b459 -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1-2.dsc==9f39c78ebbf7d66194de179dc12de49e -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1.orig.tar.gz==36c6ca77212373b0cff478ae9e5d32af -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1.orig.tar.gz.asc==6db320501d5766198bc2da9515c62bbb -http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.1.debian.tar.xz==2dfa6e22972d0af32fd7afe99734a304 -http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.1.dsc==efbde3517ddc5ac129532871651444af -http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0.orig.tar.gz==f60e47b5eb50bbeed48a9f43bb08dd5e -http://debian-archive.trafficmanager.net/debian/pool/main/liby/libyang/libyang_3.12.2-1.debian.tar.xz==3f8c497b000b1ec30fb66f107f61107a -http://debian-archive.trafficmanager.net/debian/pool/main/liby/libyang/libyang_3.12.2-1.dsc==346672dc8c2fc303a133051205deedc7 -http://debian-archive.trafficmanager.net/debian/pool/main/liby/libyang/libyang_3.12.2.orig.tar.xz==3bb7e265e14eb5cb817e9608bb7a6baf -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-bmv2_1.15.0-7.debian.tar.xz==f4d249b77d4f8d120b229834aac02df5 -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-bmv2_1.15.0-7.dsc==38011efbe33e6a461d36ca2c683e2019 -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-bmv2_1.15.0.orig.tar.gz==cbbb4a0d5b1e17dca0532c3ca761e05c -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-p4c_1.2.4.2-2.debian.tar.xz==7ea7d64c9147bd93a790af57693ce36f -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-p4c_1.2.4.2-2.dsc==dfbdeaac367213500bfe65111a955d0f -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-p4c_1.2.4.2.orig.tar.gz==b1008dffbe236d065c5557f2d4629aa9 -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-pi_0.1.0-15.debian.tar.xz==b9d8e4ce4cb66385250cf6dded0ef57a -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-pi_0.1.0-15.dsc==ee4f5c84d621a5dbfbe368baad031af4 -http://download.opensuse.org/repositories/home:/p4lang/Debian_11/p4lang-pi_0.1.0.orig.tar.gz==551d3780d615557674e93fa11210499d -http://www.mellanox.com/downloads/MFT/mft-4.34.0-145-x86_64-deb.tgz==c6d68339ee34d84f94438c79d4ce9f52 -https://deb.debian.org/debian/pool/main/b/bash/bash_5.2.37-2.debian.tar.xz==5a87fe5e2077763dd62ad40716804954 -https://deb.debian.org/debian/pool/main/b/bash/bash_5.2.37-2.dsc==c9d75e69a27738c24a25fff61285998b -https://deb.debian.org/debian/pool/main/b/bash/bash_5.2.37.orig.tar.xz==6075acd95528d14013fcde1ae279efdf -https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.10.7.dsc==b7c20dcfa144f7905dae83f907878201 -https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.10.7.tar.xz==8a29aa85664696551fa8ac0601e649f3 -https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0-0.2.debian.tar.xz==a36598f37197fcad7228f22196dd7f2f -https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0-0.2.dsc==2d88ff65e3531c5dd0095cabac6ed27a -https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0.orig.tar.gz==b381405afd14e466e35d29a112480333 -https://deb.debian.org/debian/pool/main/libn/libnl3/libnl3_3.7.0.orig.tar.gz.asc==d68e65e8f10f59d374d2611cafe9a421 -https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31-1.debian.tar.xz==26fef506b62eb28e3356781a707c2440 -https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31-1.dsc==f27b8eee722b8595ab45344e4bd3cbe7 -https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31.orig.tar.xz==eec2e9c38e9a4c2cdb7e4954d110a118 -https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1-7.debian.tar.xz==a6135296076789766d5037281fd6e277 -https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1-7.dsc==ce345ed4c63d1ec10849bd1d4f497b18 -https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1.orig.tar.gz==689148621a2eaa734497b12bed1c5202 -https://deb.debian.org/debian/pool/main/o/openssh/openssh_10.0p1.orig.tar.gz.asc==1c0cb23a67bd4e5d25a8dc423ed65a5e -https://deb.nodesource.com/gpgkey/nodesource.gpg.key==003b51a89a133b5db4cca98b2dea3117 -https://deb.nodesource.com/node_14.x/dists/bookworm/Release==249bac8daff55b81a1b40c2c283e317d -https://deb.nodesource.com/setup_14.x==c30873f4a513bb935afaf8f65e7de9e1 -https://download.docker.com/linux/debian/gpg==1afae06b34a13c1b3d9cb61a26285a15 -https://github.com/aristanetworks/sonic-firmware/raw/24716c4e03f223d8e18afff786ac427f6ac77fe0/phy/phy-credo_1.0_amd64.deb==14e233cd68bc5db22eb8c9e177242851 -https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64==89248680f7d19c124f9c093873f8ed59 -https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-arm64==b696a1c0e36abe8768d6bfe35d187e75 -https://github.com/CumulusNetworks/ifupdown2/archive/3.0.0-1.tar.gz==755459b3a58fbc11625336846cea7420 -https://github.com/fullstorydev/grpcurl/releases/download/v1.9.1/grpcurl_1.9.1_linux_x86_64.tar.gz==a263191ce012be65578b74613c688a3c -https://github.com/karimra/gnoic/releases/download/v0.1.0/checksums.txt==596e4993493864bf7c58711d5b4c09a1 -https://github.com/karimra/gnoic/releases/download/v0.1.0/gnoic_0.1.0_linux_x86_64.tar.gz==5098ef96ff03883c1fb95c79c2e3b20c -https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh==2e8b2fb7d799d83acf895e20bd1966aa -https://github.com/Mellanox/sonic-bluefield-packages/releases/download/rshim-2.5.7-trixie-amd64/rshim_2.5.7_amd64.deb==8320da5f1ea22445a1df60699b75ac92 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.2096/fw-SPC-rel-13_2016_2096-EVB.mfa==457b9d329230bb7f0d0c57251bcde489 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.2096/fw-SPC2-rel-29_2016_2096-EVB.mfa==5c2ddad375c3d3760d3d3d31b7eecd3a -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.2096/fw-SPC3-rel-30_2016_2096-EVB.mfa==d3ad931db64ad223f473b326c371bf1d -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.2096/fw-SPC4-rel-34_2016_2096-EVB.mfa==cb2fa5eec82cc6a53f3c5dca17e0d324 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2016.2096/fw-SPC5-rel-37_2016_2096-EVB.mfa==98e552d47dac6122a6801228af8e4c9d -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sai-SAIBuild2505.33.2.67-bookworm-amd64/mlnx-sai-dbgsym_1.mlnx.SAIBuild2505.33.2.67_amd64.deb==f0c0306833245581e4feafaba5775bad -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sai-SAIBuild2505.33.2.67-bookworm-amd64/mlnx-sai_1.mlnx.SAIBuild2505.33.2.67_amd64.deb==7ca1fef314d2695fc96de5bd1fb3b53f -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.8.2096-bookworm-amd64/sys-sdk_1.mlnx.4.8.2096_amd64-dev.deb==2626df0612b4099d0ddff3ccd77670c5 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.8.2096-bookworm-amd64/sys-sdk_1.mlnx.4.8.2096_amd64.deb==825d2dd3e7db0dc3a873c67e2e8ddc13 -https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads/4.8.2096.zip==b3dc71405f5b238af42df646e2f1cd94 -https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz==6f56ef28c93cee644e8c4aaaef7cfb55 -https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py==b16e05ede6aed78f7abadae1185f487d -https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar==cda48eb414c8b4585e280c3fb2656e24 -https://sh.rustup.rs==ddcc91013258e42c0df0ec1c26c92359 -https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init==17d1313bdd6bbcfcec9344f6dd7e05ca -https://static.rust-lang.org/rustup/dist/armv7-unknown-linux-gnueabihf/rustup-init==e59124baaee31e5dce382b468f76c3e4 -https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init==b492784060539969a92e14663c0796d1 diff --git a/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm-arm64 b/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm-arm64 deleted file mode 100644 index 9032f664a38..00000000000 --- a/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm-arm64 +++ /dev/null @@ -1,15 +0,0 @@ -icu-devtools==72.1-3+deb12u1 -libc-dev-bin==2.36-9+deb12u13 -libc6-dev==2.36-9+deb12u13 -libcrypt-dev==1:4.4.33-2 -libicu-dev==72.1-3+deb12u1 -libicu72==72.1-3+deb12u1 -libnsl-dev==1.3.0-2 -libtirpc-dev==1.3.3+ds-1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxslt1-dev==1.1.35-1+deb12u3 -libxslt1.1==1.1.35-1+deb12u3 -linux-libc-dev==6.1.158-1 -rpcsvc-proto==1.4.3-1 -zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm-armhf b/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm-armhf deleted file mode 100644 index 9032f664a38..00000000000 --- a/files/build/versions/dockers/docker-bmp-watchdog/versions-deb-bookworm-armhf +++ /dev/null @@ -1,15 +0,0 @@ -icu-devtools==72.1-3+deb12u1 -libc-dev-bin==2.36-9+deb12u13 -libc6-dev==2.36-9+deb12u13 -libcrypt-dev==1:4.4.33-2 -libicu-dev==72.1-3+deb12u1 -libicu72==72.1-3+deb12u1 -libnsl-dev==1.3.0-2 -libtirpc-dev==1.3.3+ds-1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxslt1-dev==1.1.35-1+deb12u3 -libxslt1.1==1.1.35-1+deb12u3 -linux-libc-dev==6.1.158-1 -rpcsvc-proto==1.4.3-1 -zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm-arm64 b/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm-arm64 deleted file mode 100644 index 2a55552d6c9..00000000000 --- a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm-arm64 +++ /dev/null @@ -1,9 +0,0 @@ -binutils-aarch64-linux-gnu==2.40-2 -icu-devtools==72.1-3+deb12u1 -libhwasan0==12.2.0-14+deb12u1 -libicu-dev==72.1-3+deb12u1 -libicu72==72.1-3+deb12u1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxslt1-dev==1.1.35-1+deb12u3 -libxslt1.1==1.1.35-1+deb12u3 diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm-armhf b/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm-armhf deleted file mode 100644 index 15f8784987c..00000000000 --- a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm-armhf +++ /dev/null @@ -1,8 +0,0 @@ -binutils-arm-linux-gnueabihf==2.40-2 -icu-devtools==72.1-3+deb12u1 -libicu-dev==72.1-3+deb12u1 -libicu72==72.1-3+deb12u1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxslt1-dev==1.1.35-1+deb12u3 -libxslt1.1==1.1.35-1+deb12u3 diff --git a/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm-arm64 b/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm-arm64 deleted file mode 100644 index 9032f664a38..00000000000 --- a/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm-arm64 +++ /dev/null @@ -1,15 +0,0 @@ -icu-devtools==72.1-3+deb12u1 -libc-dev-bin==2.36-9+deb12u13 -libc6-dev==2.36-9+deb12u13 -libcrypt-dev==1:4.4.33-2 -libicu-dev==72.1-3+deb12u1 -libicu72==72.1-3+deb12u1 -libnsl-dev==1.3.0-2 -libtirpc-dev==1.3.3+ds-1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxslt1-dev==1.1.35-1+deb12u3 -libxslt1.1==1.1.35-1+deb12u3 -linux-libc-dev==6.1.158-1 -rpcsvc-proto==1.4.3-1 -zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm-armhf b/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm-armhf deleted file mode 100644 index 9032f664a38..00000000000 --- a/files/build/versions/dockers/docker-gnmi-watchdog/versions-deb-bookworm-armhf +++ /dev/null @@ -1,15 +0,0 @@ -icu-devtools==72.1-3+deb12u1 -libc-dev-bin==2.36-9+deb12u13 -libc6-dev==2.36-9+deb12u13 -libcrypt-dev==1:4.4.33-2 -libicu-dev==72.1-3+deb12u1 -libicu72==72.1-3+deb12u1 -libnsl-dev==1.3.0-2 -libtirpc-dev==1.3.3+ds-1 -libxml2==2.9.14+dfsg-1.3~deb12u4 -libxml2-dev==2.9.14+dfsg-1.3~deb12u4 -libxslt1-dev==1.1.35-1+deb12u3 -libxslt1.1==1.1.35-1+deb12u3 -linux-libc-dev==6.1.158-1 -rpcsvc-proto==1.4.3-1 -zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm-arm64 b/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm-arm64 deleted file mode 100644 index 03c7cf58044..00000000000 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm-arm64 +++ /dev/null @@ -1,21 +0,0 @@ -binutils==2.40-2 -binutils-aarch64-linux-gnu==2.40-2 -binutils-common==2.40-2 -cpp==4:12.2.0-3 -cpp-12==12.2.0-14+deb12u1 -gcc-12==12.2.0-14+deb12u1 -libasan8==12.2.0-14+deb12u1 -libbinutils==2.40-2 -libcc1-0==12.2.0-14+deb12u1 -libctf-nobfd0==2.40-2 -libctf0==2.40-2 -libgcc-12-dev==12.2.0-14+deb12u1 -libgomp1==12.2.0-14+deb12u1 -libgprofng0==2.40-2 -libhwasan0==12.2.0-14+deb12u1 -libisl23==0.25-1.1 -libitm1==12.2.0-14+deb12u1 -liblsan0==12.2.0-14+deb12u1 -libmpc3==1.3.1-1 -libtsan2==12.2.0-14+deb12u1 -libubsan1==12.2.0-14+deb12u1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm-armhf b/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm-armhf deleted file mode 100644 index c2743e8f4bc..00000000000 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm-armhf +++ /dev/null @@ -1,16 +0,0 @@ -binutils==2.40-2 -binutils-arm-linux-gnueabihf==2.40-2 -binutils-common==2.40-2 -cpp==4:12.2.0-3 -cpp-12==12.2.0-14+deb12u1 -gcc-12==12.2.0-14+deb12u1 -libasan8==12.2.0-14+deb12u1 -libbinutils==2.40-2 -libcc1-0==12.2.0-14+deb12u1 -libctf-nobfd0==2.40-2 -libctf0==2.40-2 -libgcc-12-dev==12.2.0-14+deb12u1 -libgomp1==12.2.0-14+deb12u1 -libisl23==0.25-1.1 -libmpc3==1.3.1-1 -libubsan1==12.2.0-14+deb12u1 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-arm64 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-arm64 deleted file mode 100644 index 435661ecfe0..00000000000 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-bookworm-arm64 +++ /dev/null @@ -1,2 +0,0 @@ -binutils-aarch64-linux-gnu==2.40-2 -libhwasan0==12.2.0-14+deb12u1 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-arm64 b/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-arm64 deleted file mode 100644 index ea9703679df..00000000000 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-arm64 +++ /dev/null @@ -1,44 +0,0 @@ -bc==1.07.1-3 -binutils-aarch64-linux-gnu==2.40-2 -binutils-arm-linux-gnueabihf==2.40-2 -cpp-12-arm-linux-gnueabihf==12.2.0-14cross1 -cpp-arm-linux-gnueabihf==4:12.2.0-3 -dctrl-tools==2.24-3 -dvipng==1.15-1.1 -gcc-12-arm-linux-gnueabihf==12.2.0-14cross1 -gcc-12-arm-linux-gnueabihf-base==12.2.0-14cross1 -gcc-12-cross-base==12.2.0-14cross1 -gcc-arm-linux-gnueabihf==4:12.2.0-3 -grub-common==2.06-13+deb12u1 -grub-efi-arm64-bin==2.06-13+deb12u1 -grub-efi-arm64-signed==1+2.06+13+deb12u1 -grub2-common==2.06-13+deb12u1 -libasan8-armhf-cross==12.2.0-14cross1 -libatomic1-armhf-cross==12.2.0-14cross1 -libc6-armhf-cross==2.36-8cross1 -libgcc-12-dev-armhf-cross==12.2.0-14cross1 -libgcc-s1-armhf-cross==12.2.0-14cross1 -libgomp1-armhf-cross==12.2.0-14cross1 -libhwasan0==12.2.0-14+deb12u1 -libnanomsg-dev==1.1.5+dfsg-1.1 -libnanomsg5==1.1.5+dfsg-1.1 -libnode108==18.20.4+dfsg-1~deb12u1 -libstdc++6-armhf-cross==12.2.0-14cross1 -libubsan1-armhf-cross==12.2.0-14cross1 -libxslt1-dev==1.1.35-1+deb12u3 -linux-headers-6.1.0-41-arm64==6.1.158-1 -linux-headers-arm64==6.1.158-1 -mokutil==0.6.0-2 -node-acorn==8.8.1+ds+~cs25.17.7-2 -node-busboy==1.6.0+~cs2.6.0-2 -node-cjs-module-lexer==1.2.2+dfsg-5 -node-undici==5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4 -node-xtend==4.0.2-3 -nodejs==18.20.4+dfsg-1~deb12u1 -nodejs-doc==18.20.4+dfsg-1~deb12u1 -os-prober==1.81 -shim-helpers-arm64-signed==1+15.8+1~deb12u1 -shim-signed==1.44~1+deb12u1+15.8-1~deb12u1 -shim-signed-common==1.44~1+deb12u1+15.8-1~deb12u1 -shim-unsigned==15.8-1~deb12u1 -watchdog==5.16-1+b1 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf b/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf deleted file mode 100644 index 6625df7fc68..00000000000 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf +++ /dev/null @@ -1,19 +0,0 @@ -bc==1.07.1-3 -binutils-arm-linux-gnueabihf==2.40-2 -dctrl-tools==2.24-3 -dvipng==1.15-1.1 -libnanomsg-dev==1.1.5+dfsg-1.1 -libnanomsg5==1.1.5+dfsg-1.1 -libnode108==18.20.4+dfsg-1~deb12u1 -libxslt1-dev==1.1.35-1+deb12u3 -linux-compiler-gcc-12-arm==6.1.158-1 -linux-headers-6.1.0-41-armmp==6.1.158-1 -linux-headers-armmp==6.1.158-1 -node-acorn==8.8.1+ds+~cs25.17.7-2 -node-busboy==1.6.0+~cs2.6.0-2 -node-cjs-module-lexer==1.2.2+dfsg-5 -node-undici==5.15.0+dfsg1+~cs20.10.9.3-1+deb12u4 -node-xtend==4.0.2-3 -nodejs==18.20.4+dfsg-1~deb12u1 -nodejs-doc==18.20.4+dfsg-1~deb12u1 -watchdog==5.16-1+b1 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-mirror b/files/build/versions/dockers/sonic-slave-bookworm/versions-mirror deleted file mode 100644 index 289b806a78b..00000000000 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-mirror +++ /dev/null @@ -1 +0,0 @@ -download.docker.com_linux_debian_dists_bookworm==2025-12-09T10:53:47Z diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3-all-arm64 b/files/build/versions/dockers/sonic-slave-bookworm/versions-py3-all-arm64 deleted file mode 100644 index 7a8ed78512f..00000000000 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3-all-arm64 +++ /dev/null @@ -1,2 +0,0 @@ -protobuf==4.25.8 -psutil==7.1.3 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3-all-armhf b/files/build/versions/dockers/sonic-slave-bookworm/versions-py3-all-armhf deleted file mode 100644 index 7a8ed78512f..00000000000 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3-all-armhf +++ /dev/null @@ -1,2 +0,0 @@ -protobuf==4.25.8 -psutil==7.1.3 diff --git a/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie-arm64 b/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie-arm64 deleted file mode 100644 index c8fc41e92d6..00000000000 --- a/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie-arm64 +++ /dev/null @@ -1,95 +0,0 @@ -base-files==13.8+deb13u2 -bash==5.2.37-2+b5 -bc==1.07.1-4+b1 -binfmt-support==2.2.2-7+b1 -binutils-aarch64-linux-gnu==2.44-3 -binutils-arm-linux-gnueabihf==2.44-3 -binutils-gold==2.44-2 -binutils-gold-aarch64-linux-gnu==2.44-2 -coreutils==9.7-3 -cowbuilder==0.90+b1 -cowdancer==0.90+b1 -cpp-14-aarch64-linux-gnu==14.2.0-19 -cpp-14-arm-linux-gnueabihf==14.2.0-19cross1 -cpp-aarch64-linux-gnu==4:14.2.0-1 -cpp-arm-linux-gnueabihf==4:14.2.0-1 -debianutils==5.23.2 -dh-exec==0.30+b1 -diffutils==1:3.10-4 -efibootmgr==18-2+b1 -fastjar==2:0.98-7+b1 -g++-14-aarch64-linux-gnu==14.2.0-19 -g++-aarch64-linux-gnu==4:14.2.0-1 -gawk==1:5.2.1-2+b2 -gcc-14-aarch64-linux-gnu==14.2.0-19 -gcc-14-arm-linux-gnueabihf==14.2.0-19cross1 -gcc-14-arm-linux-gnueabihf-base==14.2.0-19cross1 -gcc-14-cross-base==14.2.0-19cross1 -gcc-aarch64-linux-gnu==4:14.2.0-1 -gcc-arm-linux-gnueabihf==4:14.2.0-1 -grub-common==2.12-9 -grub-efi-arm64-bin==2.12-9 -grub-efi-arm64-signed==1+2.12+9 -grub-efi-arm64-unsigned==2.12-9 -grub2-common==2.12-9 -help2man==1.49.3+b1 -init-system-helpers==1.69~deb13u1 -libann0==1.1.2+doc-9+b2 -libasan8-armhf-cross==14.2.0-19cross1 -libatomic1-armhf-cross==14.2.0-19cross1 -libc6-armhf-cross==2.41-11cross1 -libdebconfclient0==0.280 -libdrm-etnaviv1==2.4.124-2 -libdrm-freedreno1==2.4.124-2 -libdrm-tegra0==2.4.124-2 -libgcc-14-dev-armhf-cross==14.2.0-19cross1 -libgcc-s1-armhf-cross==14.2.0-19cross1 -libgomp1-armhf-cross==14.2.0-19cross1 -libjudy-dev==1.0.5-5.1+b1 -libjudydebian1==1.0.5-5.1+b1 -libnode115==20.19.2+dfsg-1 -libstdc++6-armhf-cross==14.2.0-19cross1 -libubsan1-armhf-cross==14.2.0-19cross1 -libunicode-map-perl==0.112-13+b4 -libxslt1-dev==1.1.35-1.2+deb13u2 -login.defs==1:4.17.4-2 -logrotate==3.22.0-1+b2 -luit==2.0.20240910-1+b1 -lynx==2.9.2-1+b1 -lzop==1.04-2+b1 -man2html-base==1.6g-16+b2 -mokutil==0.7.2-1 -ninja-build==1.12.1-1+b1 -node-acorn==8.8.1+ds+~cs25.17.7-2 -node-balanced-match==2.0.0-1 -node-brace-expansion==2.0.1+~1.1.0-2 -node-cjs-module-lexer==1.2.3+dfsg-1 -node-corepack==0.24.0-5 -node-minimatch==9.0.3-6 -node-undici==7.3.0+dfsg1+~cs24.12.11-1 -node-xtend==4.0.2-3 -nodejs==20.19.2+dfsg-1 -nodejs-doc==20.19.2+dfsg-1 -os-prober==1.83 -passwd==1:4.17.4-2 -patchutils==0.4.2-1+b1 -pbzip2==1.1.13-1+b1 -pigz==2.8-1+b1 -pps-tools==1.0.2-2+b1 -pristine-tar==1.50+nmu2+b1 -python3-markupsafe==2.1.5-1+b4 -python3-systemd==235-1+b7 -python3-zopfli==0.2.3.post1-1 -qtchooser==66-2+b1 -rpcsvc-proto==1.4.3-1+b1 -shim-helpers-arm64-signed==1+15.8+1 -shim-signed==1.47+15.8-1 -shim-signed-common==1.47+15.8-1 -shim-unsigned==15.8-1 -squashfs-tools==1:4.6.1-1+b1 -sqv==1.3.0-3 -t1utils==1.41-4+b1 -time==1.9-0.2+b1 -tzdata==2025b-4+deb13u1 -xdelta3==3.0.11-dfsg-1.2+b1 -xmlstarlet==1.6.1-4+b1 diff --git a/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie-armhf b/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie-armhf deleted file mode 100644 index cfe41221ec0..00000000000 --- a/files/build/versions/dockers/sonic-slave-trixie/versions-deb-trixie-armhf +++ /dev/null @@ -1,45 +0,0 @@ -base-files==13.8+deb13u2 -bash==5.2.37-2+b5 -binutils-arm-linux-gnueabihf==2.44-3 -coreutils==9.7-3 -cpp-14-arm-linux-gnueabihf==14.2.0-19 -cpp-arm-linux-gnueabihf==4:14.2.0-1 -dctrl-tools==2.24-3 -debianutils==5.23.2 -diffutils==1:3.10-4 -dwz==0.15-1+b2 -g++-14-arm-linux-gnueabihf==14.2.0-19 -g++-arm-linux-gnueabihf==4:14.2.0-1 -gawk==1:5.2.1-2+b2 -gcc-14-arm-linux-gnueabihf==14.2.0-19 -gcc-arm-linux-gnueabihf==4:14.2.0-1 -init-system-helpers==1.69~deb13u1 -libdebconfclient0==0.280 -libdrm-etnaviv1==2.4.124-2 -libdrm-exynos1==2.4.124-2 -libdrm-freedreno1==2.4.124-2 -libdrm-omap1==2.4.124-2 -libdrm-tegra0==2.4.124-2 -libfcgi-perl==0.82+ds-3+b1 -liblist-moreutils-xs-perl==0.430-4+b1 -libmpich12==4.3.0+really4.2.1-1 -libnanomsg-dev==1.1.5+dfsg-1.1 -libnanomsg5==1.1.5+dfsg-1.1 -libnode115==20.19.2+dfsg-1 -libsereal-decoder-perl==5.004+ds-1+b4 -libxslt1-dev==1.1.35-1.2+deb13u2 -login.defs==1:4.17.4-2 -node-acorn==8.8.1+ds+~cs25.17.7-2 -node-balanced-match==2.0.0-1 -node-brace-expansion==2.0.1+~1.1.0-2 -node-cjs-module-lexer==1.2.3+dfsg-1 -node-corepack==0.24.0-5 -node-minimatch==9.0.3-6 -node-undici==7.3.0+dfsg1+~cs24.12.11-1 -node-xtend==4.0.2-3 -nodejs==20.19.2+dfsg-1 -nodejs-doc==20.19.2+dfsg-1 -passwd==1:4.17.4-2 -python3-zopfli==0.2.3.post1-1 -sqv==1.3.0-3 -tzdata==2025b-4+deb13u1 diff --git a/files/build/versions/dockers/sonic-slave-trixie/versions-py3-all-arm64 b/files/build/versions/dockers/sonic-slave-trixie/versions-py3-all-arm64 deleted file mode 100644 index c13f21131d8..00000000000 --- a/files/build/versions/dockers/sonic-slave-trixie/versions-py3-all-arm64 +++ /dev/null @@ -1 +0,0 @@ -psutil==7.1.3 diff --git a/files/build/versions/dockers/sonic-slave-trixie/versions-py3-all-armhf b/files/build/versions/dockers/sonic-slave-trixie/versions-py3-all-armhf deleted file mode 100644 index c13f21131d8..00000000000 --- a/files/build/versions/dockers/sonic-slave-trixie/versions-py3-all-armhf +++ /dev/null @@ -1 +0,0 @@ -psutil==7.1.3 diff --git a/files/build/versions/host-base-image/versions-deb-trixie-arm64 b/files/build/versions/host-base-image/versions-deb-trixie-arm64 deleted file mode 100644 index b66d5a561e1..00000000000 --- a/files/build/versions/host-base-image/versions-deb-trixie-arm64 +++ /dev/null @@ -1,2 +0,0 @@ -grep==3.11-4+b1 -sed==4.9-2+b1 diff --git a/files/build/versions/host-image/versions-deb-trixie-arm64 b/files/build/versions/host-image/versions-deb-trixie-arm64 deleted file mode 100644 index 0bc1b204ac2..00000000000 --- a/files/build/versions/host-image/versions-deb-trixie-arm64 +++ /dev/null @@ -1,36 +0,0 @@ -arping==2.25-1+b1 -binutils-aarch64-linux-gnu==2.44-3 -bridge-utils==1.7.1-4 -conntrack==1:1.4.8-2+b1 -cpp-14-aarch64-linux-gnu==14.2.0-19 -cpp-aarch64-linux-gnu==4:14.2.0-1 -ebtables==2.0.11-6+b2 -efibootmgr==18-2+b1 -gcc-14-aarch64-linux-gnu==14.2.0-19 -gcc-aarch64-linux-gnu==4:14.2.0-1 -gdisk==1.0.10-2+b1 -grub-common==2.12-9 -grub2-common==2.12-9 -ifmetric==0.3-5+b1 -kexec-tools==1:2.0.29-2+b1 -libc-dev-bin==2.41-12 -libc6-dev==2.41-12 -libfuse3-4==3.17.2-3 -libxml2-dev==2.12.7+dfsg+really2.9.14-2.1+deb13u2 -libxslt1-dev==1.1.35-1.2+deb13u2 -linux-image-6.12.41+deb13-sonic-arm64-unsigned==6.12.41-1 -linux-libc-dev==6.12.57-1 -logrotate==3.22.0-1+b2 -makedumpfile==1:1.7.6-1+b1 -mrvlprestera==1.0 -mtr-tiny==0.95-1.1+b2 -ncal==12.1.8+b1 -ndisc6==1.0.7-1+b1 -picocom==3.1-4+b1 -pigz==2.8-1+b1 -python3-markupsafe==2.1.5-1+b4 -rpcsvc-proto==1.4.3-1+b1 -squashfs-tools==1:4.6.1-1+b1 -sysstat==12.7.5-2+b2 -systemd-bootchart==235-2+b1 -zlib1g-dev==1:1.3.dfsg+really1.3.1-1+b1 diff --git a/files/build/versions/host-image/versions-py3-all-armhf b/files/build/versions/host-image/versions-py3-all-armhf deleted file mode 100644 index 1e6b9feb738..00000000000 --- a/files/build/versions/host-image/versions-py3-all-armhf +++ /dev/null @@ -1 +0,0 @@ -protobuf==6.33.2 diff --git a/files/build_templates/bmc_config.json.j2 b/files/build_templates/bmc_config.json.j2 new file mode 100644 index 00000000000..d6e6b5b6c7c --- /dev/null +++ b/files/build_templates/bmc_config.json.j2 @@ -0,0 +1,4 @@ +{ + "bmc_nos_account_username": "{{ bmc_nos_account_username }}", + "bmc_root_account_default_password": "{{ bmc_root_account_default_password }}" +} diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 6f1c75996eb..2df4752ecad 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -27,6 +27,20 @@ link_namespace() { } {%- endif %} +{%- if docker_container_name == "pmon" %} +get_pmon_device_mounts() { + local devregex='i2c-[0-9]+|ipmi[0-9]+|sd[a-z]+|mmcblk[0-9].*|nvme[0-9].*|uio.*|watchdog[0-9]*' + local devpathregex="$(echo "$devregex" | sed -E 's#(^|\|)#\1/dev/#g')" + for device in $(find /dev/ -maxdepth 1 | grep -E "$devpathregex"); do + if [ ! -L "$device" ] && [ -b "$device" -o -c "$device" ]; then + echo "--device=$device" + else + echo "--mount=type=bind,source=$device,destination=$device" + fi + done +} +{%- endif %} + function updateSyslogConf() { # On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers @@ -160,10 +174,10 @@ function waitForAllInstanceDatabaseConfigJsonFilesReady() done done fi - # Delay a second to allow all instance database_config.json files to be completely generated and fully accessible. + # Delay 5 seconds to allow all instance database_config.json files to be completely generated and fully accessible. # This delay is needed to make sure that the database_config.json files are correctly rendered from j2 template - # files ( renderning takes some time ) - sleep 1 + # files ( rendering takes some time ) + sleep 5 fi } {%- endif %} @@ -469,17 +483,30 @@ start() { {%- if docker_container_name == "swss" %} # Insert "create_only_config_db_buffers" attribute + CREATE_ONLY_CONFIG_DB_BUFFERS_JSON_FOUND=false + + PLATFORM_FOLDER="/usr/share/sonic/device/$PLATFORM" + if [ -d "$PLATFORM_FOLDER" ]; then + if [ -f "$PLATFORM_FOLDER/create_only_config_db_buffers.json" ]; then + CREATE_ONLY_CONFIG_DB_BUFFERS_JSON_FOUND=true + fi + fi + HWSKU_FOLDER="/usr/share/sonic/device/$PLATFORM/$HWSKU" if [ -d "$HWSKU_FOLDER" ]; then - CREATE_ONLY_CONFIG_DB_BUFFERS_JSON="$HWSKU_FOLDER/create_only_config_db_buffers.json" - if [ -f "$CREATE_ONLY_CONFIG_DB_BUFFERS_JSON" ]; then - $SONIC_DB_CLI CONFIG_DB HSET 'DEVICE_METADATA|localhost' create_only_config_db_buffers true + if [ -f "$HWSKU_FOLDER/create_only_config_db_buffers.json" ]; then + CREATE_ONLY_CONFIG_DB_BUFFERS_JSON_FOUND=true fi + SUPPORTING_BULK_COUNTER_GROUPS="$HWSKU_FOLDER/supporting_bulk_counter_groups" if [ -f "$SUPPORTING_BULK_COUNTER_GROUPS" ]; then $SONIC_DB_CLI CONFIG_DB HSET 'DEVICE_METADATA|localhost' supporting_bulk_counter_groups@ $(cat $SUPPORTING_BULK_COUNTER_GROUPS) fi fi + + if [ "$CREATE_ONLY_CONFIG_DB_BUFFERS_JSON_FOUND" = true ]; then + $SONIC_DB_CLI CONFIG_DB HSET 'DEVICE_METADATA|localhost' create_only_config_db_buffers true + fi {%- endif %} DOCKERCHECK=`docker inspect --type container ${DOCKERNAME} 2>/dev/null` @@ -659,7 +686,16 @@ start() { fi {%- if sonic_asic_platform == "mellanox" %} - # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version +{%- if docker_container_name == "syncd" %} + if [[ $DEV != "" ]]; then + mkdir -p /dev/shm/asic$DEV + ASIC_MNT="-v /dev/sxdevs/sxcdev$(($DEV+1)):/dev/sxdevs/sxcdev:rw \ + -v /dev/sxdevs/bfdcdev$(($DEV+1)):/dev/sxdevs/bfdcdev:rw \ + -v /dev/shm/asic$DEV:/dev/shm/:rw" + else + ASIC_MNT="-v /dev/shm:/dev/shm:rw " + fi +{%- endif %} {%- if docker_container_name == "pmon" %} if [[ $NUM_DPU -gt 0 ]]; then SMARTSWITCH_MNT=" -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket" @@ -684,24 +720,20 @@ start() { {%- if sonic_asic_platform == "mellanox" %} {%- if docker_container_name == "syncd" %} -v /var/log/mellanox:/var/log/mellanox:rw \ - -v /var/log/sdk_dbg:/var/log/sdk_dbg:rw \ - -v mlnx_sdk_socket:/var/run/sx_sdk \ - -v /tmp/nv-syncd-shared/:/tmp \ - -v /dev/shm:/dev/shm:rw \ + -v /var/log/sdk_dbg:/var/log/sdk_dbg:rw \ + -v mlnx_sdk_socket$DEV:/var/run/sx_sdk \ + -v /tmp/nv-syncd-shared/$DEV:/tmp \ -v /var/log/sai_failure_dump:/var/log/sai_failure_dump:rw \ -v /usr/bin/asic_detect:/usr/bin/asic_detect:rw \ -e SX_API_SOCKET_FILE=/var/run/sx_sdk/sx_api.sock \ + $ASIC_MNT \ {%- elif docker_container_name == "pmon" %} $(if [ -e /sys/devices/platform/mlxplat ]; then echo "-v /sys/devices/platform/mlxplat:/sys/devices/platform/mlxplat:rw"; fi) \ -v /sys/module/sx_core:/sys/module/sx_core:rw \ -v /var/run/hw-management:/var/run/hw-management:rw \ -v /etc/hw-management-sensors:/etc/hw-management-sensors:ro \ - -v mlnx_sdk_socket:/var/run/sx_sdk \ -v /tmp/nv-syncd-shared/:/tmp \ $SMARTSWITCH_MNT \ - -v /dev/shm:/dev/shm:rw \ - -e SX_API_SOCKET_FILE=/var/run/sx_sdk/sx_api.sock \ - -v /dev/shm:/dev/shm:rw \ {%- else %} {%- if mount_default_tmpfs|default("n") == "y" %} --tmpfs /tmp \ @@ -724,14 +756,7 @@ start() { {%- endif %} {%- if docker_container_name == "pmon" %} -v /usr/share/sonic/firmware:/usr/share/sonic/firmware:rw \ - $(if [ -e "/dev/i2c-0" ]; then echo "--device=/dev/i2c-0:/dev/i2c-0"; fi) \ - $(if [ -e "/dev/ipmi0" ]; then echo "--device=/dev/ipmi0:/dev/ipmi0"; fi) \ - $(if [ -e "/dev/sda" ]; then echo "--device=/dev/sda:/dev/sda"; fi) \ - $(if [ -e "/dev/sdb" ]; then echo "--device=/dev/sdb:/dev/sdb"; fi) \ - $(if [ -e "/dev/watchdog" ]; then echo "--device=/dev/watchdog:/dev/watchdog"; fi) \ - $(for watchdog in /sys/class/watchdog/*; do if [ -d "$watchdog" ]; then device_name=$(basename "$watchdog"); dev_file="/dev/$device_name"; if [ -e "$dev_file" ]; then echo "--device=$dev_file:$dev_file"; fi; fi; done) \ - $(for blockdev in /sys/block/*; do if [ -d "$blockdev" ]; then device_name=$(basename "$blockdev"); if [[ "$device_name" =~ ^(sd[a-z]+|nvme[0-9]+n[0-9]+)$ ]] && [[ ! "$device_name" =~ (boot|loop) ]]; then dev_file="/dev/$device_name"; if [ -e "$dev_file" ]; then echo "--device=$dev_file:$dev_file"; fi; fi; fi; done) \ - $(for dev_file in /dev/nvme*; do if [ -e "$dev_file" ]; then echo "--device=$dev_file:$dev_file"; fi; done) \ + $(get_pmon_device_mounts) \ {%- endif %} {%- if docker_container_name == "swss" %} -e ASIC_VENDOR={{ sonic_asic_platform }} \ diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index 1d1c1817b49..a9bc99c4cf8 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -29,6 +29,9 @@ "PORT": { "FLEX_COUNTER_STATUS": "enable" }, + "PORT_PHY_ATTR": { + "FLEX_COUNTER_STATUS": "enable" + }, "RIF": { "FLEX_COUNTER_STATUS": "enable" }, @@ -84,9 +87,10 @@ {% do features.append(("restapi", "enabled", false, "enabled")) %} {%- endif %} {%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", true, "enabled")) %}{% endif %} -{%- if include_macsec == "y" %}{% do features.append(("macsec", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'SpineRouter' and DEVICE_RUNTIME_METADATA['MACSEC_SUPPORTED'] %}enabled{% else %}disabled{% endif %}", false, "enabled")) %}{% endif %} +{%- if include_macsec == "y" %}{% do features.append(("macsec", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in ['SpineRouter', 'UpperSpineRouter'] and DEVICE_RUNTIME_METADATA['MACSEC_SUPPORTED'] %}enabled{% else %}disabled{% endif %}", false, "enabled")) %}{% endif %} {%- if include_system_gnmi == "y" %}{% do features.append(("gnmi", "enabled", true, "enabled")) %}{% endif %} {%- if include_system_telemetry == "y" %}{% do features.append(("telemetry", "enabled", true, "enabled")) %}{% endif %} +{%- if include_system_otel == "y" %}{% do features.append(("otel", "disabled", false, "enabled")) %}{% endif %} {%- if include_system_eventd == "y" and BUILD_REDUCE_IMAGE_SIZE == "y" %} {% do features.append(("eventd","disabled", false, "enabled")) %} {%- elif include_system_eventd == "y" %} diff --git a/files/build_templates/per_namespace/dash-ha.service.j2 b/files/build_templates/per_namespace/dash-ha.service.j2 index f14e8e1eb06..d47540dde41 100644 --- a/files/build_templates/per_namespace/dash-ha.service.j2 +++ b/files/build_templates/per_namespace/dash-ha.service.j2 @@ -10,7 +10,7 @@ StartLimitBurst=3 [Service] User={{ sonicadmin_user }} -ExecCondition=/bin/bash /usr/local/bin/is-npu-or-dpu.sh +ExecCondition=/bin/bash /usr/local/bin/is-npu-or-dpu.sh -n ExecStartPre=/usr/local/bin/{{docker_container_name}}.sh start{% if multi_instance == 'true' %} %i{% endif %} ExecStart=/usr/local/bin/{{docker_container_name}}.sh wait{% if multi_instance == 'true' %} %i{% endif %} ExecStop=/usr/local/bin/{{docker_container_name}}.sh stop{% if multi_instance == 'true' %} %i{% endif %} diff --git a/files/build_templates/per_namespace/syncd.service.j2 b/files/build_templates/per_namespace/syncd.service.j2 index 17f3b2fed5b..45bb08b6db5 100644 --- a/files/build_templates/per_namespace/syncd.service.j2 +++ b/files/build_templates/per_namespace/syncd.service.j2 @@ -22,8 +22,8 @@ After=config-setup.service BindsTo=sonic.target After=sonic.target {% if sonic_asic_platform == 'mellanox' %} -Requires=nv-syncd-shared.service -After=nv-syncd-shared.service +Requires=mlnx-fw-manager.service sx-kernel.service nv-syncd-shared.service +After=mlnx-fw-manager.service sx-kernel.service nv-syncd-shared.service {% endif %} [Service] @@ -34,6 +34,9 @@ ExecStart=/usr/local/bin/syncd.sh wait{% if multi_instance == 'true' %} %i{% end ExecStop=/usr/local/bin/syncd.sh stop{% if multi_instance == 'true' %} %i{% endif %} {% if sonic_asic_platform == 'mellanox' %} TimeoutStartSec=480 +{% if multi_instance == 'true' %} +TimeoutStopSec=180 +{% endif %} {% endif %} [Install] diff --git a/files/build_templates/pmon.service.j2 b/files/build_templates/pmon.service.j2 index 75a997ce258..0904e37c963 100644 --- a/files/build_templates/pmon.service.j2 +++ b/files/build_templates/pmon.service.j2 @@ -2,9 +2,6 @@ Description=Platform monitor container Requires=database.service config-setup.service After=database.service config-setup.service -{% if sonic_asic_platform == 'mellanox' %} -After=syncd.service -{% endif %} BindsTo=sonic.target After=sonic.target StartLimitIntervalSec=1200 diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index bc8e54f6b3c..fa1912b7c5d 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -119,6 +119,12 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get updat sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install efitools sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install mokutil +# Install tpm-tools +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install tpm2-tools + +sudo cp src/sonic-platform-common/sonic_platform_base/bmc_fw_update.py $FILESYSTEM_ROOT/usr/bin/bmc_fw_update.py +sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/bmc_fw_update.py + # Apply environtment configuration files sudo cp $IMAGE_CONFIGS/environment/environment $FILESYSTEM_ROOT/etc/ sudo cp $IMAGE_CONFIGS/environment/motd $FILESYSTEM_ROOT/etc/ @@ -667,6 +673,12 @@ j2 files/build_templates/config-setup.service.j2 | sudo tee $FILESYSTEM_ROOT_USR sudo cp $IMAGE_CONFIGS/config-setup/config-setup $FILESYSTEM_ROOT/usr/bin/config-setup sudo mkdir -p $FILESYSTEM_ROOT/etc/config-setup sudo cp $IMAGE_CONFIGS/config-setup/config-setup.conf $FILESYSTEM_ROOT/etc/config-setup/config-setup.conf +sudo mkdir -p $FILESYSTEM_ROOT/etc/config-setup/config-migration-pre-hooks.d +sudo cp $IMAGE_CONFIGS/config-setup/01-pre-security-cipher $FILESYSTEM_ROOT/etc/config-setup/config-migration-pre-hooks.d/01-pre-security-cipher +sudo chmod +x $FILESYSTEM_ROOT/etc/config-setup/config-migration-pre-hooks.d/01-pre-security-cipher +sudo mkdir -p $FILESYSTEM_ROOT/etc/config-setup/config-migration-post-hooks.d +sudo cp $IMAGE_CONFIGS/config-setup/01-post-security-cipher $FILESYSTEM_ROOT/etc/config-setup/config-migration-post-hooks.d/01-post-security-cipher +sudo chmod +x $FILESYSTEM_ROOT/etc/config-setup/config-migration-post-hooks.d/01-post-security-cipher echo "config-setup.service" | sudo tee -a $GENERATED_SERVICE_FILE sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable config-setup.service @@ -709,16 +721,36 @@ sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/dummy-midplane.netdev sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable midplane-network-npu.service #echo "midplane-network-dpu.service" | sudo tee -a $GENERATED_SERVICE_FILE sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable midplane-network-dpu.service +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/system/dash-ha.service +for i in {0..7}; do + sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/system/dash-ha@dpu${i}.service +done # According to the issue: https://github.com/systemd/systemd/issues/19106, To disable ManageForeignRoutingPolicyRules to avoid the ip rules being deleted by systemd-networkd sudo sed -i 's/#ManageForeignRoutingPolicyRules=yes/ManageForeignRoutingPolicyRules=no/g' $FILESYSTEM_ROOT/etc/systemd/networkd.conf sudo mkdir $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/systemd-networkd.service.d sudo cp $IMAGE_CONFIGS/midplane-network/systemd-networkd.override.conf $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/systemd-networkd.service.d/override.conf -# Copy systemd-networkd-wait-online override configuration -sudo mkdir -p $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/systemd-networkd-wait-online.service.d -sudo cp $IMAGE_CONFIGS/midplane-network/systemd-networkd-wait-online.override.conf $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/systemd-networkd-wait-online.service.d/override.conf -sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable systemd-networkd-wait-online.service +# For Pensando platform: mask systemd-networkd services since dpu.init handles everything +# Must be done AFTER the generic enable command above +if [[ $CONFIGURED_PLATFORM == pensando ]]; then + # Mask systemd-networkd and wait-online - dpu.init handles interface and DHCP + sudo ln -sf /dev/null $FILESYSTEM_ROOT/etc/systemd/system/systemd-networkd.service + sudo ln -sf /dev/null $FILESYSTEM_ROOT/etc/systemd/system/systemd-networkd-wait-online.service + + # database.service must wait for dpu.service (interface + DHCP) + sudo mkdir -p $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/database.service.d + cat < /dev/null +[Unit] +Requires=dpu.service +After=dpu.service +EOF +else + # Copy systemd-networkd-wait-online override configuration + sudo mkdir -p $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/systemd-networkd-wait-online.service.d + sudo cp $IMAGE_CONFIGS/midplane-network/systemd-networkd-wait-online.override.conf $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/systemd-networkd-wait-online.service.d/override.conf + sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable systemd-networkd-wait-online.service +fi # Copy backend-acl script and service file sudo cp $IMAGE_CONFIGS/backend_acl/backend-acl.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/backend-acl.service @@ -909,13 +941,34 @@ sudo LANG=C DOCKER_HOST="$DOCKER_HOST" chroot $FILESYSTEM_ROOT /usr/local/bin/ge {% if include_kubernetes == "y" %} ## Pull in kubernetes docker images echo "pulling universal k8s images ..." +{% if DEFAULT_CONTAINER_REGISTRY is defined and DEFAULT_CONTAINER_REGISTRY %} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}pause:${K8s_GCR_IO_PAUSE_VERSION} +{% else %} sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull k8s.gcr.io/pause:${K8s_GCR_IO_PAUSE_VERSION} +{% endif %} echo "docker images pull complete" {% endif %} {% if include_kubernetes_master == "y" %} # Pull in kubernetes master docker images echo "pulling kubernetes master images ..." +{% if DEFAULT_CONTAINER_REGISTRY is defined and DEFAULT_CONTAINER_REGISTRY %} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}pause:${MASTER_PAUSE_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}kube-apiserver:${MASTER_KUBERNETES_CONTAINER_IMAGE_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}kube-controller-manager:${MASTER_KUBERNETES_CONTAINER_IMAGE_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}kube-scheduler:${MASTER_KUBERNETES_CONTAINER_IMAGE_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}kube-proxy:${MASTER_KUBERNETES_CONTAINER_IMAGE_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}coredns/coredns:${MASTER_COREDNS_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}etcd:${MASTER_ETCD_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}kubernetesui/metrics-scraper:${MASTER_UI_METRIC_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}kubernetesui/dashboard:${MASTER_UI_DASH_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}distroless/genevamdm:${MASTER_MDM_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag ${DEFAULT_CONTAINER_REGISTRY}distroless/genevamdm:${MASTER_MDM_VERSION} linuxgeneva-microsoft.azurecr.io/distroless/genevamdm:latest +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}distroless/genevamdsd:${MASTER_MDS_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag ${DEFAULT_CONTAINER_REGISTRY}distroless/genevamdsd:${MASTER_MDS_VERSION} linuxgeneva-microsoft.azurecr.io/distroless/genevamdsd:latest +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull ${DEFAULT_CONTAINER_REGISTRY}distroless/genevafluentd_td-agent:${MASTER_FLUENTD_VERSION} +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag ${DEFAULT_CONTAINER_REGISTRY}distroless/genevafluentd_td-agent:${MASTER_FLUENTD_VERSION} linuxgeneva-microsoft.azurecr.io/distroless/genevafluentd_td-agent:latest +{% else %} sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull k8s.gcr.io/pause:${MASTER_PAUSE_VERSION} sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull k8s.gcr.io/kube-apiserver:${MASTER_KUBERNETES_CONTAINER_IMAGE_VERSION} sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull k8s.gcr.io/kube-controller-manager:${MASTER_KUBERNETES_CONTAINER_IMAGE_VERSION} @@ -931,6 +984,7 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIV sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag linuxgeneva-microsoft.azurecr.io/distroless/genevamdsd:${MASTER_MDS_VERSION} linuxgeneva-microsoft.azurecr.io/distroless/genevamdsd:latest sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS pull linuxgeneva-microsoft.azurecr.io/distroless/genevafluentd_td-agent:${MASTER_FLUENTD_VERSION} sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag linuxgeneva-microsoft.azurecr.io/distroless/genevafluentd_td-agent:${MASTER_FLUENTD_VERSION} linuxgeneva-microsoft.azurecr.io/distroless/genevafluentd_td-agent:latest +{% endif %} echo "kubernetes master docker images pull complete" # Install python packages for mdm metrics collection service usage sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install psutil @@ -1123,11 +1177,20 @@ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/get_component_versions.py sudo cp platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py -j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh -sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh sudo cp -r platform/mellanox/asic_detect $FILESYSTEM_ROOT/usr/bin/asic_detect sudo chmod -R 777 $FILESYSTEM_ROOT/usr/bin/asic_detect/ +sudo cp platform/mellanox/files/sx-kernel.sh $FILESYSTEM_ROOT/usr/bin/sx-kernel.sh +sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/sx-kernel.sh + +sudo cp platform/mellanox/files/sx-kernel.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/ +sudo chmod 644 $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/sx-kernel.service +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable sx-kernel.service + +sudo cp platform/mellanox/files/mlnx-fw-manager.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/ +sudo chmod 644 $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/mlnx-fw-manager.service +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable mlnx-fw-manager.service + # Install mlnx-sonic-platform Python 3 package install_pip_package {{mlnx_platform_api_py3_wheel_path}} @@ -1166,8 +1229,6 @@ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/bfnet.sh $FILESYSTEM_ROOT/usr/bin/platfo sudo install -m 755 platform/nvidia-bluefield/byo/sonic-byo.py $FILESYSTEM_ROOT/usr/bin/sonic-byo.py sudo install -m 755 platform/nvidia-bluefield/nasa-cli-helper/nasa-cli-helper.py $FILESYSTEM_ROOT/usr/bin/nasa-cli-helper.py -SONIC_PLATFORM={{sonic_asic_platform}} j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh -sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh sudo cp -r platform/mellanox/asic_detect $FILESYSTEM_ROOT/usr/bin/asic_detect sudo chmod -R 777 $FILESYSTEM_ROOT/usr/bin/asic_detect/ @@ -1205,8 +1266,9 @@ sudo rm -rf $FILESYSTEM_ROOT/tmp/mask_disabled_services.py sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-dbus + {% if installer_python_debs.strip() -%} -# Install FIPS python package will break apt-get purge command, so install after all purge command finish +# Install FIPS python package will break apt-get purge command, so install after all purge command finish if [ "$INCLUDE_FIPS" == y ]; then install_deb_package {{installer_python_debs}} fi @@ -1230,3 +1292,11 @@ sudo touch $FILESYSTEM_ROOT_ETC_SONIC/enable_multidb install_deb_package $debs_path/syslog-counter_*.deb +## Copy over set-vrf-strict-mode.service +{% if ENABLE_VRF_STRICT == "y" %} +sudo cp $IMAGE_CONFIGS/set-vrf-strict-mode/set-vrf-strict-mode.service $FILESYSTEM_ROOT/etc/systemd/system/set-vrf-strict-mode.service + +# Install set-vrf-strict-mode service +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable set-vrf-strict-mode +{% endif %} + diff --git a/files/docker/docker.service.conf b/files/docker/docker.service.conf index 73d953ecfdd..ea7f29f5180 100644 --- a/files/docker/docker.service.conf +++ b/files/docker/docker.service.conf @@ -1,4 +1,14 @@ +# Docker daemon systemd service override configuration +# +# IMPORTANT: The -H fd:// flag is required for systemd socket activation. +# This allows Docker clients to connect to /var/run/docker.sock before +# docker.service starts - systemd listens on the socket and passes it to +# dockerd when the service starts. If changed to -H unix://, dockerd creates +# a new socket instead of inheriting the one systemd was listening on, causing +# early Docker commands to hang indefinitely. +# See: https://github.com/sonic-net/sonic-buildimage/issues/25383 + [Service] Environment=GODEBUG=netdns=cgo ExecStart= -ExecStart=/usr/bin/dockerd -H unix:// --storage-driver=overlay2 --bip=240.127.1.1/24 --iptables=false --ipv6=true --fixed-cidr-v6=fd00::/80 +ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay2 --bip=240.127.1.1/24 --iptables=false --ipv6=true --fixed-cidr-v6=fd00::/80 diff --git a/files/dsc/dpu.init b/files/dsc/dpu.init index e636bf77b11..73630335a89 100755 --- a/files/dsc/dpu.init +++ b/files/dsc/dpu.init @@ -27,13 +27,34 @@ DPU_DOCKER_INFO_DIR=/host/dpu-docker-info TAG=latest IMAGE_NAME=docker-dpu +function log_msg() { + echo "$1" | tee /dev/kmsg /dev/console +} + +function generate_ssh_host_keys() +{ + # Generate SSH host keys + log_msg "Removing existing SSH host keys" + rm -rfd /etc/ssh/ssh_host* + sleep 1 + ssh-keygen -A + systemctl restart ssh.service + log_msg "SSH host keys generated successfully" +} + function start_polaris() { + # Run only if ssh.service is NOT active (inactive/failed/not-found) + if ! systemctl is-active --quiet ssh.service; then + log_msg "ssh.service is not active; regenerating host keys and restarting ssh" + generate_ssh_host_keys + fi + modprobe ionic_mnic modprobe mnet_uio_pdrv_genirq modprobe mdev modprobe pciesvc - insmod /usr/lib/modules/6.1.0-22-2-arm64/kernel/drivers/watchdog/softdog.ko soft_panic=1 soft_noboot=0 + insmod /usr/lib/modules/6.12.41+deb13-sonic-arm64/kernel/drivers/watchdog/softdog.ko soft_panic=1 soft_noboot=0 mkdir -p $HOST_DIR_POLARIS/update mkdir -p $HOST_DIR_POLARIS/sysconfig/config0 @@ -60,6 +81,8 @@ function start_polaris() echo $IMAGE_NAME:$TAG > $DPU_DOCKER_INFO_DIR/image /usr/sbin/ethtool -K Ethernet0 tx off sg off tso off rx off + echo 50 > $HOST_DIR_POLARIS/data/free_mem_threshold + docker ps -a --format "{{.ID}}\t{{.Image}}" | grep "$IMAGE_NAME:$TAG" | awk '{print $1}' | xargs -I {} docker rm {} docker run -v $HOST_DIR_POLARIS/update:/update -v $HOST_DIR_POLARIS/sysconfig/config0:/sysconfig/config0 -v $HOST_DIR_POLARIS/sysconfig/config1:/sysconfig/config1 -v $HOST_DIR_POLARIS/obfl/a:/obfl -v $HOST_DIR_POLARIS/obfl:/var/log/obfl -v $HOST_DIR_POLARIS/data:/data -v $HOST_DIR_POLARIS/share:/share -v $HOST_DIR_POLARIS/external:/external -v $HOST_DIR_POLARIS/mnt/a:/ro -v /dev:/dev -v /sys:/sys --net=host --name=$CONTAINER_NAME_POLARIS --privileged $IMAGE_NAME:$TAG & @@ -67,19 +90,70 @@ function start_polaris() if [ -f /boot/first_boot ]; then device="/usr/share/sonic/device" platform=$(grep 'onie_platform=' /host/machine.conf | cut -d '=' -f 2) - echo "python3 -m pip install $device/$platform/sonic_platform-1.0-py3-none-any.whl" + log_msg "python3 -m pip install $device/$platform/sonic_platform-1.0-py3-none-any.whl" python3 -m pip install $device/$platform/sonic_platform-1.0-py3-none-any.whl rm /boot/first_boot fi - sleep 5 + # Configure eth0-midplane interface with DHCP + # This must complete before database.service starts to get the midplane IP INTERFACE="eth0-midplane" - if ip link show "$INTERFACE" &> /dev/null; then - echo "dhclient -r $INTERFACE" - /usr/sbin/dhclient -r $INTERFACE + INTERFACE_WAIT_TIMEOUT=120 # Max seconds to wait for interface to appear + DHCP_MAX_RETRIES=30 + DHCP_RETRY_INTERVAL=2 + + log_msg "Waiting for interface $INTERFACE to be created by polaris container..." + + # Wait dynamically for eth0-midplane interface to be created + interface_wait_start=$(date +%s) + while true; do + if ip link show "$INTERFACE" &> /dev/null; then + log_msg "Interface $INTERFACE detected" + # Give it a moment to fully initialize + sleep 1 + break + fi + + elapsed=$(($(date +%s) - interface_wait_start)) + if [ $elapsed -ge $INTERFACE_WAIT_TIMEOUT ]; then + log_msg "Error: Interface $INTERFACE not found after ${INTERFACE_WAIT_TIMEOUT}s timeout" + log_msg "Check if polaris container is running correctly" + docker logs $CONTAINER_NAME_POLARIS 2>&1 | tail -20 + exit 1 + fi + + # Log progress every 10 seconds + if [ $((elapsed % 10)) -eq 0 ] && [ $elapsed -gt 0 ]; then + log_msg "Still waiting for $INTERFACE... (${elapsed}s elapsed)" + fi + sleep 1 - echo "dhclient $INTERFACE" - /usr/sbin/dhclient $INTERFACE + done + + log_msg "Releasing any existing DHCP lease on $INTERFACE" + /usr/sbin/dhclient -r $INTERFACE 2>/dev/null || true + sleep 1 + + log_msg "Starting DHCP client on $INTERFACE" + /usr/sbin/dhclient $INTERFACE + + # Wait for IP address to be assigned + log_msg "Waiting for IP address on $INTERFACE..." + retry_count=0 + while [ $retry_count -lt $DHCP_MAX_RETRIES ]; do + midplane_ip=$(ip -4 -o addr show $INTERFACE 2>/dev/null | awk '{print $4}' | cut -d'/' -f1) + if [ -n "$midplane_ip" ]; then + log_msg "Successfully obtained IP address: $midplane_ip on $INTERFACE" + break + fi + retry_count=$((retry_count + 1)) + log_msg "Waiting for DHCP... attempt $retry_count/$DHCP_MAX_RETRIES" + sleep $DHCP_RETRY_INTERVAL + done + + if [ -z "$midplane_ip" ]; then + log_msg "Warning: Failed to obtain IP address on $INTERFACE after $DHCP_MAX_RETRIES attempts" + log_msg "DHCP server may not be available. Continuing without midplane IP." fi } diff --git a/files/dsc/dpu.service b/files/dsc/dpu.service index ff6e5fc7db5..a44ee5986a8 100644 --- a/files/dsc/dpu.service +++ b/files/dsc/dpu.service @@ -15,3 +15,4 @@ RemainAfterExit=yes [Install] WantedBy=multi-user.target + diff --git a/files/image_config/config-setup/01-post-security-cipher b/files/image_config/config-setup/01-post-security-cipher new file mode 100755 index 00000000000..bbdc61330ca --- /dev/null +++ b/files/image_config/config-setup/01-post-security-cipher @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +# Restore cipher_pass file from persistent storage +if [ -f /host/security_cipher/cipher_pass.json ]; then + cp /host/security_cipher/cipher_pass.json /etc/cipher_pass.json + chmod 600 /etc/cipher_pass.json + echo "Restored /host/security_cipher/cipher_pass.json to /etc/" +fi + diff --git a/files/image_config/config-setup/01-pre-security-cipher b/files/image_config/config-setup/01-pre-security-cipher new file mode 100755 index 00000000000..cea088d6a84 --- /dev/null +++ b/files/image_config/config-setup/01-pre-security-cipher @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +# Ensure old_config directory exists +mkdir -p /host/security_cipher + +# Copy cipher_pass file to persistent storage +if [ -f /etc/cipher_pass.json ]; then + cp /etc/cipher_pass.json /host/security_cipher/cipher_pass.json + echo "Saved /etc/cipher_pass.json to /host/security_cipher/" +fi + diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index 7053cab08a3..614cbaa9a6c 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -170,15 +170,37 @@ copy_config_files_and_directories() done } -# Check if SONiC switch has booted after a warm reboot request +# Check if SONiC switch has booted after a warm reboot request. +# Prefers STATE_DB when available (reflects true warm boot state and +# gets cleared after warm boot completes). Falls back to /proc/cmdline +# only during the "boot" command when database services may not be up yet. check_system_warm_boot() { - SYSTEM_WARM_START=`sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable` - # SYSTEM_WARM_START could be empty, always make WARM_BOOT meaningful. - if [[ x"$SYSTEM_WARM_START" == x"true" ]]; then - WARM_BOOT="true" - else - WARM_BOOT="false" + WARM_BOOT="false" + + # Try STATE_DB first — authoritative source that reflects current + # warm boot state and is cleared after warm boot completes. + SYSTEM_WARM_START=$(sonic-db-cli STATE_DB hget "WARM_RESTART_ENABLE_TABLE|system" enable) + DB_RC=$? + + if [ $DB_RC -eq 0 ]; then + # DB is reachable — use its answer exclusively + if [[ x"$SYSTEM_WARM_START" == x"true" ]]; then + WARM_BOOT="true" + fi + return + fi + + # DB not available — fall back to /proc/cmdline only during boot, + # when database services may not have started yet. + # Outside of boot context, /proc/cmdline may contain a stale + # SONIC_BOOT_TYPE=warm from a previous warm reboot. + if [ "$CMD" = "boot" ]; then + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + WARM_BOOT="true" + ;; + esac fi } @@ -256,11 +278,24 @@ generate_config() } # Create SONiC configuration for first time bootup -# - If ZTP is enabled, ZTP configuraion is created -# - If ZTP is disabled, factory default configuration +# - If minigraph.xml is available, use it to generate configuration +# - If ZTP is enabled and no minigraph, ZTP configuration is created +# - If ZTP is disabled and no minigraph, factory default configuration # is created do_config_initialization() { + # If minigraph.xml is available, prefer it over ZTP/factory default. + # This avoids ZTP triggering a config reload that removes management IP + # when the device has a valid minigraph but no config_db.json + # (e.g., during upgrade path tests). + if [ -r ${MINGRAPH_FILE} ]; then + echo "No config_db.json found but minigraph.xml is available, using minigraph..." + reload_minigraph + rm -f /tmp/pending_config_initialization + sonic-db-cli CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1" + return 0 + fi + if ! ztp_is_enabled ; then echo "No configuration detected, generating factory default configuration..." generate_config factory ${CONFIG_DB_JSON} @@ -412,6 +447,18 @@ boot_config() do_config_migration fi + # During warm boot the existing configuration must be preserved. + # Never run config initialization or ZTP — doing so would generate + # a new config and trigger config reload, wiping management IP. + if [ x"${WARM_BOOT}" == x"true" ]; then + echo "Warm boot detected, skipping config initialization and ZTP." + # Mark config as initialized so subsequent boots don't re-trigger + # initialization unnecessarily (warm-reboot to new image scenario). + sonic-db-cli CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1" + rm -f /tmp/pending_config_initialization + return 0 + fi + # For multi-npu platfrom we don't support config initialization. Assumption # is there should be existing minigraph or config_db from previous image # file system to trigger. pending_config_initialization will remain set @@ -424,11 +471,14 @@ boot_config() do_config_initialization fi - # If no startup configuration is found, create a configuration to be used + # If no startup configuration is found, create a configuration to be used. + # do_config_initialization() will prefer minigraph.xml if available, + # falling back to ZTP or factory default only when no minigraph exists. if [ ! -e ${CONFIG_DB_JSON} ]; then do_config_initialization - # force ZTP to restart - if ztp_is_enabled ; then + # force ZTP to restart (only relevant when ZTP was actually used, + # i.e., when minigraph.xml was not available) + if [ ! -e ${MINGRAPH_FILE} ] && ztp_is_enabled ; then ztp_status=$(ztp status -c) if [ "$ztp_status" = "5:SUCCESS" ] || \ [ "$ztp_status" = "6:FAILED" ]; then diff --git a/files/image_config/interfaces/interfaces-config.sh b/files/image_config/interfaces/interfaces-config.sh index 669d12849f1..c80a73f6c49 100755 --- a/files/image_config/interfaces/interfaces-config.sh +++ b/files/image_config/interfaces/interfaces-config.sh @@ -86,7 +86,23 @@ resolvconf_updates_restore # Read sysctl conf files again sysctl -p /etc/sysctl.d/90-dhcp6-systcl.conf -systemctl restart networking +MAX_RETRIES=5 +RETRY_DELAY=2 +for ((i=1; i<=MAX_RETRIES; i++)); do + LOG_MARK=$(date '+%Y-%m-%d %H:%M:%S') + if systemctl restart networking; then + if journalctl -u networking --since "$LOG_MARK" | grep -q "error.*already running"; then + echo "interfaces-config: error during networking restart in attempt $i. Retrying in ${RETRY_DELAY} seconds..." + sleep "${RETRY_DELAY}" + else + echo "interfaces-config: systemctl restart networking succeeded on attempt $i" + break + fi + else + echo "interfaces-config: Attempt $i to restart networking failed. Retrying in ${RETRY_DELAY} seconds..." + sleep "${RETRY_DELAY}" + fi +done # Clean-up created files rm -f /tmp/ztp_input.json /tmp/ztp_port_data.json diff --git a/files/image_config/interfaces/interfaces.j2 b/files/image_config/interfaces/interfaces.j2 index 2d780ee721c..224694cb3a7 100644 --- a/files/image_config/interfaces/interfaces.j2 +++ b/files/image_config/interfaces/interfaces.j2 @@ -30,6 +30,14 @@ iface lo inet loopback {% endblock loopback %} {% block mgmt_interface %} +{%- if DEVICE_METADATA and 'bmc' in DEVICE_METADATA.keys() and ('bmc_if_name' in DEVICE_METADATA['bmc']) and ('bmc_if_addr' in DEVICE_METADATA['bmc']) and ('bmc_net_mask' in DEVICE_METADATA['bmc']) %} +# BMC interface +auto {{ DEVICE_METADATA['bmc']['bmc_if_name'] }} +iface {{ DEVICE_METADATA['bmc']['bmc_if_name'] }} inet static + address {{ DEVICE_METADATA['bmc']['bmc_if_addr'] }} + netmask {{ DEVICE_METADATA['bmc']['bmc_net_mask'] }} +{%- endif %} + # The management network interface {% if (ZTP_DHCP_DISABLED is not defined) and (ZTP is defined) and (ZTP['mode'] is defined and ZTP['mode']['profile'] == 'active') %} auto eth0 diff --git a/files/image_config/set-vrf-strict-mode/set-vrf-strict-mode.service b/files/image_config/set-vrf-strict-mode/set-vrf-strict-mode.service new file mode 100644 index 00000000000..56548579ebb --- /dev/null +++ b/files/image_config/set-vrf-strict-mode/set-vrf-strict-mode.service @@ -0,0 +1,12 @@ +[Unit] +Description=Set VRF strict mode after VRF module loads +After=network.target + +[Service] +Type=oneshot +ExecStartPre=/sbin/modprobe vrf +ExecStart=/bin/sh -c 'echo 1 > /proc/sys/net/vrf/strict_mode' +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/files/scripts/arp_update b/files/scripts/arp_update index 64cdaf1b703..240cd9fdfc2 100755 --- a/files/scripts/arp_update +++ b/files/scripts/arp_update @@ -14,6 +14,44 @@ logger () { command logger -i "$$" -t "arp_update" "$@" } +# Function to run a command with retries on failure +run_with_retry_cmd() { + local desc="$1"; shift + local max_tries=1 + local interval=3 + local i=1 + + while [ $i -le $max_tries ]; do + "$@" + local rc=$? + if [ $rc -eq 0 ]; then + return 0 + fi + if [ $i -lt $max_tries ]; then + logger -p warning "command '${desc}' failed on attempt ${i} (rc=${rc}); retrying (next attempt $((i + 1)) of ${max_tries})" + sleep $interval + fi + i=$((i + 1)) + done + + logger -p warning "command failed after ${max_tries} retries: ${desc}" + return 1 +} + +run_arping_with_retry() { + local ifname="$1" + local ip="$2" + run_with_retry_cmd "arping on ${ifname} to ${ip}" \ + arping -q -w 1 -c 1 -i "$ifname" "$ip" >/dev/null 2>&1 +} + +run_ndisc6_with_retry() { + local ifname="$1" + local ip="$2" + run_with_retry_cmd "ndisc6 on ${ifname} to ${ip}" \ + ndisc6 -q -w 1 -1 "$ip" "$ifname" >/dev/null 2>&1 +} + while /bin/true; do # find L3 interfaces which are UP, send ipv6 multicast pings ARP_UPDATE_VARS=$(sonic-cfggen -d -t ${ARP_UPDATE_VARS_FILE}) @@ -59,12 +97,11 @@ while /bin/true; do fi intf_up=$(ip link show $interface | grep "state UP") if [[ -n "$intf_up" ]]; then - pingcmd="timeout 0.2 $ping_prefix -I ${interface} -n -q -i 0 -c 1 -W 1 $nexthop >/dev/null" - eval $pingcmd - # STALE entries may appear more often, not logging to prevent periodic syslogs if [[ -z $(echo ${neigh_state} | grep 'STALE') ]]; then logger "static route nexthop not resolved ($neigh_state), pinging $nexthop on $interface" fi + run_with_retry_cmd "static route ping to $nexthop on $interface" \ + timeout 0.2 $ping_prefix -I "$interface" -n -q -i 0 -c 1 -W 1 "$nexthop" >/dev/null 2>&1 fi fi done @@ -97,7 +134,8 @@ while /bin/true; do ip="$( cut -d ',' -f 1 <<< "$neigh" )" mac="$( cut -d ',' -f 2 <<< "$neigh" )" if [[ -z $(sonic-db-cli ASIC_DB keys "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY*${mac}*") ]]; then - timeout 0.2 ping -c1 -w1 $ip > /dev/null + run_with_retry_cmd "stale neighbor ping to $ip" \ + timeout 0.2 ping -c1 -w1 "$ip" >/dev/null 2>&1 fi done @@ -111,7 +149,8 @@ while /bin/true; do if [[ $kernel_mac != $appl_db_mac ]]; then logger -p warning "MAC mismatch for ${ip} on ${intf} - kernel: ${kernel_mac}, APPL_DB: ${appl_db_mac}" ip neigh flush $ip - timeout 0.2 ping -c1 -w1 $ip > /dev/null + run_with_retry_cmd "mac mismatch ping to $ip" \ + timeout 0.2 ping -c1 -w1 "$ip" >/dev/null 2>&1 fi done @@ -119,25 +158,26 @@ while /bin/true; do SUBTYPE=$(sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'subtype' | tr '[:upper:]' '[:lower:]') for vlan in $VLAN; do # generate a list of arping commands: - # arping -q -w 0 -c 1 -i ; - # arping -q -w 0 -c 1 -i ; + # arping -q -w 1 -c 1 -i ; + # arping -q -w 1 -c 1 -i ; # ... - arpingcmd="sed -e 's/ / -i /' -e 's/^/arping -q -w 0 -c 1 /' -e 's/$/;/'" - ipcmd="ip -4 neigh show | grep $vlan | cut -d ' ' -f 1,3 | $arpingcmd" - - eval `eval $ipcmd` + while read -r ip ifname; do + [ -z "$ip" ] && continue + run_arping_with_retry "$ifname" "$ip" + done < <(ip -4 neigh show | grep "$vlan" | awk '{print $1, $3}') # send ipv6 multicast pings to Vlan interfaces to get/refresh link-local addrs ping6cmd="timeout 1 ping6 -I $vlan -n -q -i 0 -c 1 -W 0 ff02::1 >/dev/null" eval $ping6cmd # generate a list of ndisc6 commands (exclude link-local addrs since it is done above): - # ndisc6 -q -w 0 -1 ; - # ndisc6 -q -w 0 -1 ; + # ndisc6 -q -w 1 -1 ; + # ndisc6 -q -w 1 -1 ; # ... - ndisc6cmd="sed -e 's/^/ndisc6 -q -w 0 -1 /' -e 's/$/;/'" - ip6cmd="ip -6 neigh show | grep -v fe80 | grep $vlan | cut -d ' ' -f 1,3 | $ndisc6cmd" - eval `eval $ip6cmd` + while read -r ip ifname; do + [ -z "$ip" ] && continue + run_ndisc6_with_retry "$ifname" "$ip" + done < <(ip -6 neigh show | grep -v fe80 | grep "$vlan" | awk '{print $1, $3}') if [[ $SUBTYPE == "dualtor" ]]; then # capture all current failed/incomplete IPv6 neighbors in the kernel to avoid situations where new neighbors are learned @@ -162,9 +202,10 @@ while /bin/true; do # generates the following command for each FAILED or INCOMPLETE IPv6 neighbor # timeout 0.2 ping -n -q -i 0 -c 1 -W 1 -I >/dev/null if [[ ! -z "$unresolved_kernel_neighbors" ]]; then - ping6_template="sed -e 's/^/timeout 0.2 ping /' -e 's/,/ -n -q -i 0 -c 1 -W 1 -I /' -e 's/$/ >\/dev\/null;/'" - failed_ip6_neigh_cmd="echo \"$unresolved_kernel_neighbors\" | cut -d ' ' -f 1,3 --output-delimiter=',' | $ping6_template" - eval `eval "$failed_ip6_neigh_cmd"` + while read -r ip ifname; do + run_with_retry_cmd "failed ipv6 neighbor ping to $ip on $ifname" \ + timeout 0.2 ping -n -q -i 0 -c 1 -W 1 -I "$ifname" "$ip" >/dev/null 2>&1 + done < <(echo "$unresolved_kernel_neighbors" | awk '{print $1, $3}') # allow some time for any transient INCOMPLETE neighbors to transition to FAILED sleep 5 fi @@ -186,7 +227,7 @@ while /bin/true; do # sleep here before handling the mismatch as it is not required during startup - sleep 300 + sleep 120 # refresh neighbor entries from APP_DB in case of mismatch with kernel DBNEIGH=$(sonic-db-cli APPL_DB keys NEIGH_TABLE*) @@ -210,13 +251,13 @@ while /bin/true; do ip="$( cut -d ':' -f 3- <<< "$neigh" )" if [[ $intf == *"Vlan"* ]]; then if [[ $ip == *"."* ]] && [[ ! $KERNEIGH4 =~ "${ip},${intf}" ]]; then - pingcmd="timeout 0.2 ping -I $intf -n -q -i 0 -c 1 -W 1 $ip >/dev/null" - eval $pingcmd logger "mismatch arp entry, pinging ${ip} on ${intf}" + run_with_retry_cmd "db/kernel mismatch ping to ${ip} on ${intf}" \ + timeout 0.2 ping -I "$intf" -n -q -i 0 -c 1 -W 1 "$ip" >/dev/null 2>&1 elif [[ $ip == *":"* ]] && [[ ! $KERNEIGH6 =~ "${ip},${intf}" ]]; then - ping6cmd="timeout 0.2 ping6 -I $intf -n -q -i 0 -c 1 -W 1 $ip >/dev/null" - eval $ping6cmd logger "mismatch v6 nbr entry, pinging ${ip} on ${intf}" + run_with_retry_cmd "db/kernel mismatch ping6 to ${ip} on ${intf}" \ + timeout 0.2 ping6 -I "$intf" -n -q -i 0 -c 1 -W 1 "$ip" >/dev/null 2>&1 fi fi done diff --git a/files/scripts/restapi.sh b/files/scripts/restapi.sh new file mode 100755 index 00000000000..2cfe8416ba9 --- /dev/null +++ b/files/scripts/restapi.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +function debug() +{ + /usr/bin/logger "$1" + /bin/echo "$(date) - $1" >> "${DEBUGLOG}" +} + +start() { + debug "Starting ${SERVICE}$DEV service..." + + # start service docker + /usr/bin/${SERVICE}.sh start $DEV + debug "Started ${SERVICE}$DEV service..." +} + +wait() { + /usr/bin/${SERVICE}.sh wait $DEV +} + +stop() { + debug "Stopping ${SERVICE}$DEV service..." + + /usr/bin/${SERVICE}.sh stop $DEV + debug "Stopped ${SERVICE}$DEV service..." +} + +DEV=$2 + +SERVICE="restapi" +DEBUGLOG="/tmp/restapi-debug$DEV.log" + +case "$1" in + start|wait|stop) + $1 + ;; + *) + echo "Usage: $0 {start|wait|stop}" + exit 1 + ;; +esac diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 3888a34b76a..5f4376e7ced 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -408,6 +408,20 @@ start() { $SONIC_DB_CLI RESTAPI_DB FLUSHDB clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*', 'VNET_ROUTE*', 'MACSEC_PORT_TABLE*', 'MACSEC_INGRESS_SA_TABLE*', 'MACSEC_EGRESS_SA_TABLE*', 'MACSEC_INGRESS_SC_TABLE*', 'MACSEC_EGRESS_SC_TABLE*', 'VRF_OBJECT_TABLE*', 'VNET_MONITOR_TABLE*', 'BFD_SESSION_TABLE*', 'SYSTEM_NEIGH_TABLE*', 'FABRIC_PORT_TABLE*', 'TUNNEL_DECAP_TABLE*', 'TUNNEL_DECAP_TERM_TABLE*', 'HIGH_FREQUENCY_TELEMETRY_SESSION_TABLE*' " $SONIC_DB_CLI APPL_STATE_DB FLUSHDB + # Flush DPU remote databases (DPU device only) + # Only run if this is a DPU device (type=SmartSwitchDPU or switch_type=dpu) + DEVICE_TYPE=`$SONIC_DB_CLI CONFIG_DB hget "DEVICE_METADATA|localhost" type` + SWITCH_TYPE=`$SONIC_DB_CLI CONFIG_DB hget "DEVICE_METADATA|localhost" switch_type` + if [[ x"${DEVICE_TYPE}" == x"SmartSwitchDPU" || x"${SWITCH_TYPE}" == x"dpu" ]]; then + # Check if DPU_APPL_DB remote database is reachable + if $SONIC_DB_CLI DPU_APPL_DB PING >/dev/null 2>&1; then + debug "Flushing DPU remote databases (DPU_APPL_DB, DPU_STATE_DB, DPU_APPL_STATE_DB, DPU_COUNTERS_DB) ..." + $SONIC_DB_CLI DPU_APPL_DB FLUSHDB + $SONIC_DB_CLI DPU_STATE_DB FLUSHDB + $SONIC_DB_CLI DPU_APPL_STATE_DB FLUSHDB + $SONIC_DB_CLI DPU_COUNTERS_DB FLUSHDB + fi + fi clean_up_chassis_db_tables rm -rf /tmp/cache MEDIA_SETTINGS="/usr/share/sonic/device/$PLATFORM/media_settings.json" @@ -584,15 +598,12 @@ function check_ports_present() return 1 } -function check_service_exists() +function check_service_enabled() { - systemctl list-units --full -all 2>/dev/null | grep -Fq $1 - if [[ $? -eq 0 ]]; then + if systemctl is-enabled "$1" >/dev/null 2>&1; then echo true - return else echo false - return fi } @@ -601,7 +612,7 @@ function check_service_exists() DEPENDENT="" MULTI_INST_DEPENDENT="" -if [[ $(check_service_exists radv) == "true" ]]; then +if [[ $(check_service_enabled radv) == "true" ]]; then DEPENDENT="$DEPENDENT radv" fi @@ -622,7 +633,7 @@ check_add_bgp_dependency check_ports_present PORTS_PRESENT=$? -if [[ $PORTS_PRESENT == 0 ]] && [[ $(check_service_exists teamd) == "true" ]]; then +if [[ $PORTS_PRESENT == 0 ]] && [[ $(check_service_enabled "teamd${DEV:+@$DEV}") == "true" ]]; then MULTI_INST_DEPENDENT="teamd" fi diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index e5f3ca23327..dabc3a2dfce 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -2,34 +2,82 @@ . /usr/local/bin/syncd_common.sh +function remove_ethernet_interfaces() { + debug "remove_ethernet_interfaces: Removing all Ethernet interfaces (NET_NS: $NET_NS)..." + + local start_time=$(date +%s) + local ethernet_interfaces + if [[ -n "$NET_NS" ]]; then + ethernet_interfaces=$(ip netns exec "$NET_NS" ip link show | grep -o 'Ethernet[0-9]*' | sort -u) + else + ethernet_interfaces=$(ip link show | grep -o 'Ethernet[0-9]*' | sort -u) + fi + + if [[ -n "$ethernet_interfaces" ]]; then + local interface_count=$(echo "$ethernet_interfaces" | wc -w) + debug "remove_ethernet_interfaces: Found $interface_count Ethernet interfaces to remove" + + for interface in $ethernet_interfaces; do + if [[ -n "$NET_NS" ]]; then + ip netns exec "$NET_NS" ip link del "$interface" 2>/dev/null || debug "Failed to remove interface: $interface" + else + ip link del "$interface" 2>/dev/null || debug "Failed to remove interface: $interface" + fi + done + debug "remove_ethernet_interfaces: Finished removing $interface_count Ethernet interfaces" + else + debug "remove_ethernet_interfaces: No Ethernet interfaces found to remove" + fi + + local end_time=$(date +%s) + local duration=$((end_time - start_time)) + debug "remove_ethernet_interfaces: Execution time: ${duration}s (NET_NS: $NET_NS)" +} + +function reset_mellanox_drivers() { + local mlx_dev="/proc/mlx_sx/sx_core" + if [[ $DEV != "" ]]; then + mlx_dev="/proc/mlx_sx/asic$DEV/sx_core" + fi + + if [[ -f /var/run/mlx_sx_core_restart_required$DEV ]]; then + debug "Restarting Mellanox drivers for ASIC $DEV" + echo "pcidrv_restart" > $mlx_dev + rm -f /var/run/mlx_sx_core_restart_required$DEV 2>/dev/null || debug "Warning: Could not remove restart flag" + debug "Mellanox drivers restarted for ASIC $DEV" + fi + + remove_ethernet_interfaces +} + function startplatform() { # platform specific tasks - # start mellanox drivers regardless of - # boot type if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then BOOT_TYPE=`getBootType` if [[ x"$WARM_BOOT" == x"true" || x"$BOOT_TYPE" == x"fast" ]]; then export FAST_BOOT=1 fi - if [[ x"$WARM_BOOT" != x"true" ]]; then - if [[ x"$(/bin/systemctl is-active pmon)" == x"active" ]]; then - /bin/systemctl stop pmon - debug "pmon is active while syncd starting, stop it first" - fi + # Clear container's temporary directory before starting + rm -rf /tmp/nv-syncd-shared/$DEV/* 2>/dev/null + + local fw_upgrade_args="--status=all" + if [[ $DEV != "" ]]; then + fw_upgrade_args="--status=$DEV" + fi + mlnx-fw-manager $fw_upgrade_args + if [[ $? != "0" ]]; then + debug "ASIC$DEV firmware upgrade status check failed. Please check the firmware upgrade status manually." + exit 1 fi - debug "Starting Firmware update procedure" + reset_mellanox_drivers - /usr/bin/mlnx-fw-upgrade.sh -c -v - if [[ "$?" -ne "${EXIT_SUCCESS}" ]]; then - debug "Failed to upgrade fw. " "$?" "Restart syncd" - exit 1 + if ! echo "mlx_sx_core_restart_required" > /var/run/mlx_sx_core_restart_required$DEV 2>/dev/null; then + debug "Warning: Could not create restart flag file" fi - /etc/init.d/sxdkernel restart - debug "Firmware update procedure ended" fi if [[ x"$sonic_asic_platform" == x"broadcom" ]]; then @@ -89,13 +137,6 @@ function waitplatform() { } function stopplatform1() { - - if [[ x$sonic_asic_platform == x"mellanox" ]] && [[ x$TYPE == x"cold" ]]; then - debug "Stopping pmon service ahead of syncd..." - /bin/systemctl stop pmon - debug "Stopped pmon service" - fi - if [[ x$sonic_asic_platform == x"mellanox" ]]; then echo "health_check_trigger del_dev 1" > /proc/mlx_sx/sx_core fi @@ -133,13 +174,11 @@ function stopplatform1() { function stopplatform2() { # platform specific tasks - if [[ x"$WARM_BOOT" != x"true" ]]; then - if [ x$sonic_asic_platform == x'mellanox' ]; then - /etc/init.d/sxdkernel stop - elif [ x"$sonic_asic_platform" == x"nvidia-bluefield" ]; then - /usr/bin/bfnet.sh stop - fi - fi + if [[ x"$WARM_BOOT" != x"true" ]]; then + if [ x"$sonic_asic_platform" == x"nvidia-bluefield" ]; then + /usr/bin/bfnet.sh stop + fi + fi } OP=$1 diff --git a/get_docker-base.sh b/get_docker-base.sh index 91359c49bed..3f6ea9f6d22 100755 --- a/get_docker-base.sh +++ b/get_docker-base.sh @@ -12,7 +12,7 @@ set -x -e TARGET_PATH=$(sed -n 's/TARGET_PATH\s*=\s*//p' slave.mk) ## [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Read-only link of Azure Blob storage with shared access signature (SAS)")] -BASE_URL="https://packages.trafficmanager.net/public/docker-base.ea507753d98b0769e2a15be13003331f8ad38d1c15b40a683e05fc53b1463b10.gz" +BASE_URL="$BUILD_PUBLIC_URL/docker-base.ea507753d98b0769e2a15be13003331f8ad38d1c15b40a683e05fc53b1463b10.gz" base_image_name=docker-base docker_try_rmi $base_image_name diff --git a/platform/alpinevs b/platform/alpinevs new file mode 160000 index 00000000000..cd9e82441fb --- /dev/null +++ b/platform/alpinevs @@ -0,0 +1 @@ +Subproject commit cd9e82441fb67808d3d80dfe7eae7eb199b48f80 diff --git a/platform/barefoot/sonic-platform-modules-arista b/platform/barefoot/sonic-platform-modules-arista index e1c1c47481d..90971a883d5 160000 --- a/platform/barefoot/sonic-platform-modules-arista +++ b/platform/barefoot/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit e1c1c47481df04340bec9fdac1f3438e78c9d2a0 +Subproject commit 90971a883d5da50a1eec22e2ca0dbd03ace60c08 diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk index 206298598b6..851c62f2527 100755 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -93,8 +93,10 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \ $(NOKIA_IXR7220H5_64O_PLATFORM_MODULE) \ $(NOKIA_IXR7220H5_64D_PLATFORM_MODULE) \ $(NOKIA_IXR7220H5_32D_PLATFORM_MODULE) \ + $(NOKIA_IXR7220H6_64_PLATFORM_MODULE) \ $(NOKIA_IXR7250X1B_PLATFORM_MODULE) \ $(NOKIA_IXR7250X3B_PLATFORM_MODULE) \ + $(NOKIA_IXR7250X4_PLATFORM_MODULE) \ $(TENCENT_TCS8400_PLATFORM_MODULE) \ $(TENCENT_TCS9400_PLATFORM_MODULE) \ $(UFISPACE_S9311_64D_PLATFORM_MODULE) \ diff --git a/platform/broadcom/platform-modules-nokia.mk b/platform/broadcom/platform-modules-nokia.mk index eb830efb13c..c60aa53461e 100644 --- a/platform/broadcom/platform-modules-nokia.mk +++ b/platform/broadcom/platform-modules-nokia.mk @@ -8,6 +8,7 @@ NOKIA_IXR7220H4_64D_PLATFORM_MODULE_VERSION = 1.0 NOKIA_IXR7220H5_64D_PLATFORM_MODULE_VERSION = 1.0 NOKIA_IXR7220H5_64O_PLATFORM_MODULE_VERSION = 1.0 NOKIA_IXR7220H5_32D_PLATFORM_MODULE_VERSION = 1.0 +NOKIA_IXR7220H6_64_PLATFORM_MODULE_VERSION = 1.0 export NOKIA_IXR7250_PLATFORM_MODULE_VERSION export NOKIA_IXR7220D4_PLATFORM_MODULE_VERSION @@ -17,6 +18,7 @@ export NOKIA_IXR7220H4_64D_PLATFORM_MODULE_VERSION export NOKIA_IXR7220H5_64D_PLATFORM_MODULE_VERSION export NOKIA_IXR7220H5_64O_PLATFORM_MODULE_VERSION export NOKIA_IXR7220H5_32D_PLATFORM_MODULE_VERSION +export NOKIA_IXR7220H6_64_PLATFORM_MODULE_VERSION NOKIA_IXR7250_PLATFORM_MODULE = sonic-platform-nokia-chassis_$(NOKIA_IXR7250_PLATFORM_MODULE_VERSION)_amd64.deb $(NOKIA_IXR7250_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-nokia @@ -69,3 +71,13 @@ NOKIA_IXR7250X3B_PLATFORM_MODULE = sonic-platform-nokia-ixr7250x3b_$(NOKIA_IXR72 $(NOKIA_IXR7250X3B_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) $(NOKIA_IXR7250X3B_PLATFORM_MODULE)_PLATFORM = x86_64-nokia_ixr7250_x3b-r0 $(eval $(call add_extra_package,$(NOKIA_IXR7250_PLATFORM_MODULE),$(NOKIA_IXR7250X3B_PLATFORM_MODULE))) + +NOKIA_IXR7250X4_PLATFORM_MODULE = sonic-platform-nokia-ixr7250x4_$(NOKIA_IXR7250_PLATFORM_MODULE_VERSION)_amd64.deb +$(NOKIA_IXR7250X4_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) +$(NOKIA_IXR7250X4_PLATFORM_MODULE)_PLATFORM = x86_64-nokia_ixr7250_x4-r0 +$(eval $(call add_extra_package,$(NOKIA_IXR7250_PLATFORM_MODULE),$(NOKIA_IXR7250X4_PLATFORM_MODULE))) + +NOKIA_IXR7220H6_64_PLATFORM_MODULE = sonic-platform-nokia-ixr7220h6-64_$(NOKIA_IXR7220H6_64_PLATFORM_MODULE_VERSION)_amd64.deb +$(NOKIA_IXR7220H6_64_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) +$(NOKIA_IXR7220H6_64_PLATFORM_MODULE)_PLATFORM = x86_64-nokia_ixr7220_h6_64-r0 +$(eval $(call add_extra_package,$(NOKIA_IXR7250_PLATFORM_MODULE),$(NOKIA_IXR7220H6_64_PLATFORM_MODULE))) \ No newline at end of file diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index 26f24cb56c9..af8f742746f 100755 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -44,10 +44,10 @@ include $(PLATFORM_PATH)/../components/docker-gbsyncd-milleniob.mk endif BCMCMD = bcmcmd -$(BCMCMD)_URL = "https://packages.trafficmanager.net/public/20190307/bcmcmd" +$(BCMCMD)_URL = "$(BUILD_PUBLIC_URL)/20190307/bcmcmd" DSSERVE = dsserve -$(DSSERVE)_URL = "https://packages.trafficmanager.net/public/20190307/dsserve" +$(DSSERVE)_URL = "$(BUILD_PUBLIC_URL)/20190307/dsserve" SONIC_ONLINE_FILES += $(BCMCMD) $(DSSERVE) diff --git a/platform/broadcom/sai-dnx.mk b/platform/broadcom/sai-dnx.mk index 65cb41322f0..3b68bd0c305 100644 --- a/platform/broadcom/sai-dnx.mk +++ b/platform/broadcom/sai-dnx.mk @@ -1,8 +1,8 @@ # Broadcom DNX SAI definitions -LIBSAIBCM_DNX_VERSION = 14.1.0.1.0.0.0.0 +LIBSAIBCM_DNX_VERSION = 14.1.0.1.0.0.11.0 LIBSAIBCM_DNX_BRANCH_NAME = SAI_14.1.0_GA -LIBSAIBCM_DNX_URL_PREFIX = "https://packages.trafficmanager.net/public/sai/sai-broadcom/$(LIBSAIBCM_DNX_BRANCH_NAME)/$(LIBSAIBCM_DNX_VERSION)/dnx" +LIBSAIBCM_DNX_URL_PREFIX = "$(BUILD_PUBLIC_URL)/sai/sai-broadcom/$(LIBSAIBCM_DNX_BRANCH_NAME)/$(LIBSAIBCM_DNX_VERSION)/dnx" # SAI module for DNX Asic family BRCM_DNX_SAI = libsaibcm_dnx_$(LIBSAIBCM_DNX_VERSION)_amd64.deb diff --git a/platform/broadcom/sai-xgs.mk b/platform/broadcom/sai-xgs.mk index 7ea6ff8f82a..a48245cf6e5 100644 --- a/platform/broadcom/sai-xgs.mk +++ b/platform/broadcom/sai-xgs.mk @@ -1,8 +1,8 @@ # Broadcom XGS SAI definitions -LIBSAIBCM_XGS_VERSION = 14.1.0.1.0.0.0.1 +LIBSAIBCM_XGS_VERSION = 14.1.0.1.0.0.9.0 LIBSAIBCM_XGS_BRANCH_NAME = SAI_14.1.0_GA -LIBSAIBCM_XGS_URL_PREFIX = "https://packages.trafficmanager.net/public/sai/sai-broadcom/$(LIBSAIBCM_XGS_BRANCH_NAME)/$(LIBSAIBCM_XGS_VERSION)/xgs" +LIBSAIBCM_XGS_URL_PREFIX = "$(BUILD_PUBLIC_URL)/sai/sai-broadcom/$(LIBSAIBCM_XGS_BRANCH_NAME)/$(LIBSAIBCM_XGS_VERSION)/xgs" # Runtime package BRCM_XGS_SAI = libsaibcm_$(LIBSAIBCM_XGS_VERSION)_amd64.deb diff --git a/platform/broadcom/saibcm-modules-dnx b/platform/broadcom/saibcm-modules-dnx index 8b7340fce54..cd50cb45c10 160000 --- a/platform/broadcom/saibcm-modules-dnx +++ b/platform/broadcom/saibcm-modules-dnx @@ -1 +1 @@ -Subproject commit 8b7340fce542d391e867a57907198b6e984e266d +Subproject commit cd50cb45c1073b511efb3b2b7e82784a925907ad diff --git a/platform/broadcom/saibcm-modules/sdklt/linux/include/lkm/ngknet_ioctl.h b/platform/broadcom/saibcm-modules/sdklt/linux/include/lkm/ngknet_ioctl.h index 615dcd3fbc5..ae3604bb514 100644 --- a/platform/broadcom/saibcm-modules/sdklt/linux/include/lkm/ngknet_ioctl.h +++ b/platform/broadcom/saibcm-modules/sdklt/linux/include/lkm/ngknet_ioctl.h @@ -34,7 +34,7 @@ #define NGKNET_MODULE_MAJOR 121 /*! Must be updated if backward compatibility is broken */ -#define NGKNET_IOC_VERSION 4 +#define NGKNET_IOC_VERSION 5 /*! Max number of input arguments */ #define NGKNET_IOC_IARG_MAX 2 diff --git a/platform/broadcom/saibcm-modules/sdklt/linux/knet/ngknet_main.c b/platform/broadcom/saibcm-modules/sdklt/linux/knet/ngknet_main.c index de84965487e..9b51efe1d50 100644 --- a/platform/broadcom/saibcm-modules/sdklt/linux/knet/ngknet_main.c +++ b/platform/broadcom/saibcm-modules/sdklt/linux/knet/ngknet_main.c @@ -1813,6 +1813,7 @@ ngknet_ndev_init(ngknet_netif_t *netif, struct net_device **nd) #endif #endif + dev_net_set(ndev, current->nsproxy->net_ns); /* Register the kernel network device */ rv = register_netdev(ndev); if (rv < 0) { @@ -2558,13 +2559,16 @@ ngknet_ioctl(struct file *file, unsigned int cmd, unsigned long arg) sizeof(*dev_cfg), ioc.op.data.len)) { return -EFAULT; } - if (!dev_cfg->name[0] || !dev_cfg->bm_grp || - dev_cfg->bm_grp >= (1 << NUM_GRP_MAX)) { + if (!dev_cfg->bm_grp || dev_cfg->bm_grp >= (1 << NUM_GRP_MAX)) { DBG_WARN(("Invalid parameter: name=%s, bm_grp=0x%x\n", dev_cfg->name, dev_cfg->bm_grp)); ioc.rc = SHR_E_PARAM; break; } + if (dev_cfg->name[0] == '\0') { + snprintf(dev_cfg->name, sizeof(dev_cfg->name), "%s%d", + base_dev_name, ioc.unit); + } memset(pdev, 0, sizeof(*pdev)); strscpy(pdev->name, dev_cfg->name, sizeof(pdev->name)); pdev->dev_id = dev_cfg->dev_id; diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista index e1c1c47481d..90971a883d5 160000 --- a/platform/broadcom/sonic-platform-modules-arista +++ b/platform/broadcom/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit e1c1c47481df04340bec9fdac1f3438e78c9d2a0 +Subproject commit 90971a883d5da50a1eec22e2ca0dbd03ace60c08 diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/pmon.service.d/override.conf b/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/pmon.service.d/override.conf index 619b41243ca..a73be51d64e 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/pmon.service.d/override.conf +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/pmon.service.d/override.conf @@ -1,2 +1,4 @@ [Unit] After=pddf-platform-init.service +StartLimitIntervalSec=0 +StartLimitBurst=0 diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/watchdog-control.service.d/override.conf b/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/watchdog-control.service.d/override.conf new file mode 100644 index 00000000000..44d31901a2f --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/etc/systemd/system/watchdog-control.service.d/override.conf @@ -0,0 +1,6 @@ +# watchdog-control.service is disabled and is replaced with +# platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.service +# to support permanently armed watchdog +[Service] +ExecStart= +ExecStart=/bin/true diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/nexthop/eeprom_utils.py b/platform/broadcom/sonic-platform-modules-nexthop/common/nexthop/eeprom_utils.py index 68523385dbf..a746982c910 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/common/nexthop/eeprom_utils.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/nexthop/eeprom_utils.py @@ -389,6 +389,16 @@ def complete_available_eeproms(ctx, args, incomplete): return [eeprom for eeprom in eeproms if eeprom.startswith(incomplete)] +def click_argument_eeprom_path(): + "Returns a click.argument with shell autocomplete to hint available EEPROM paths on the system." + # click version 8.0 renamed `autocompletion` to `shell_complete`. + # This is to support both old versions and new versions. + if hasattr(click.Parameter, "shell_complete"): + return click.argument("eeprom_path", shell_complete=complete_available_eeproms) + else: + return click.argument("eeprom_path", autocompletion=complete_available_eeproms) + + def decode_eeprom(eeprom_path: str): eeprom_class = Eeprom(eeprom_path, start=0, status="", ro=True) eeprom = eeprom_class.read_eeprom() @@ -477,7 +487,7 @@ def cli_list(): @cli.command("decode") -@click.argument("eeprom_path", autocompletion=complete_available_eeproms) +@click_argument_eeprom_path() def decode(eeprom_path): check_root_privileges() decode_eeprom(eeprom_path) @@ -492,7 +502,7 @@ def decode_all(): @cli.command("program") -@click.argument("eeprom_path", autocompletion=complete_available_eeproms) +@click_argument_eeprom_path() @click.option("--product-name", default=None) @click.option("--part-num", default=None) @click.option("--serial-num", default=None) @@ -547,7 +557,7 @@ def program( @cli.command("clear") -@click.argument("eeprom_path", autocompletion=complete_available_eeproms) +@click_argument_eeprom_path() def clear(eeprom_path): check_root_privileges() clear_eeprom(eeprom_path) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.service b/platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.service new file mode 100644 index 00000000000..7eb5f099b3d --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.service @@ -0,0 +1,16 @@ +[Unit] +Description=Arm watchdog for 6 minutes +After=pddf-platform-init.service +Requires=pddf-platform-init.service + +[Service] +Type=oneshot +ExecStart=bash -c '\ + PAUSE_FILE=/var/lock/pddf-locks/watchdog.pause ; \ + if [[ ! -f "$PAUSE_FILE" ]]; then \ + python -c "import sonic_platform; sonic_platform.platform.Platform().get_chassis().get_watchdog().arm_from_daemon()"; \ + fi \ +' + +[Install] +WantedBy=multi-user.target diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.timer b/platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.timer new file mode 100644 index 00000000000..52996c55869 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/service/watchdog.timer @@ -0,0 +1,14 @@ +[Unit] +Description=Arm watchdog immediately on boot and every minute + +[Timer] +Unit=watchdog.service + +# Run every 1 minute +OnUnitActiveSec=1min + +# Run immediately after system boot +OnBootSec=0 + +[Install] +WantedBy=timers.target diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-nexthop/common/sonic_platform/watchdog.py index ae0cb181af9..10c03aede1a 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/common/sonic_platform/watchdog.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/sonic_platform/watchdog.py @@ -3,12 +3,37 @@ # Copyright 2025 Nexthop Systems Inc. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +import datetime +import time +from pathlib import Path from sonic_platform_base.watchdog_base import WatchdogBase from nexthop import fpga_lib from sonic_py_common import syslogger _SYSLOG_IDENTIFIER = "sonic_platform.watchdog" _logger = syslogger.SysLogger(_SYSLOG_IDENTIFIER) +# Watchdog punching is paused if file is present +_WATCHDOG_PAUSE_FILE_PATH = Path("/var/lock/pddf-locks/watchdog.pause") +# How long the watchdog is armed for by the watchdog.timer +_WATCHDOG_PUNCH_DAEMON_ARM_SECONDS = 360 + + +def _pause_watchdog_punching(duration: datetime.timedelta) -> None: + """Creates the pause file.""" + try: + pause_until_ts: int = int(time.time() + duration.total_seconds()) + with open(_WATCHDOG_PAUSE_FILE_PATH, "w") as f: + f.write(str(pause_until_ts)) + except OSError as e: + _logger.log_error( + "Failed to write watchdog pause file. Continue without pausing " + f"watchdog punching: {e}" + ) + + +def _unpause_watchdog_punching() -> None: + # Remove the watchdog pause file to unpause + _WATCHDOG_PAUSE_FILE_PATH.unlink(missing_ok=True) class Watchdog(WatchdogBase): @@ -90,6 +115,29 @@ def _toggle_watchdog_reboot(self, enable: bool) -> None: val=new_reg_val, ) + def _do_real_arm(self, seconds: int) -> int: + """Arm the hardware watchdog. + + Returns: + An integer specifying the *actual* number of seconds the watchdog + was armed with. On failure returns -1. + """ + try: + self._toggle_watchdog_counter_enable(True) + self._toggle_watchdog_reboot(True) + self._update_watchdog_countdown_value(milliseconds=seconds*1_000) + except Exception as e: + _logger.log_error(f"cannot arm watchdog: {e}") + return -1 + else: + return seconds + + def arm_from_daemon(self) -> int: + """Arm the watchdog with a predefined timeout. + Meant to be called by watchdog punching. + """ + return self._do_real_arm(_WATCHDOG_PUNCH_DAEMON_ARM_SECONDS) + def arm(self, seconds: int) -> int: """ Arm the hardware watchdog with a timeout of seconds. @@ -99,27 +147,29 @@ def arm(self, seconds: int) -> int: method should arm the watchdog with the *next greater* available value. + Assumes an active punching timer that arms the watchdog for 6 + minutes (360 seconds), which is paused when `arm` is called and + successfully arms the watchdog. The punching is paused until + `disarm` is called. + Returns: An integer specifying the *actual* number of seconds the watchdog was armed with. On failure returns -1. """ milliseconds = seconds * 1_000 - if milliseconds < 0 or milliseconds > self._MAX_WATCHDOG_COUNTER_MILLISECONDS: + if milliseconds <= 0 or milliseconds > self._MAX_WATCHDOG_COUNTER_MILLISECONDS: _logger.log_error( - f"cannot arm watchdog with {milliseconds} ms. should be within 0 and {self._MAX_WATCHDOG_COUNTER_MILLISECONDS} ms" + f"cannot arm watchdog with {milliseconds} ms. should be within " + f"0 and {self._MAX_WATCHDOG_COUNTER_MILLISECONDS} ms" ) return -1 - try: - self._toggle_watchdog_counter_enable(True) - self._toggle_watchdog_reboot(True) - self._update_watchdog_countdown_value(milliseconds=milliseconds) - except Exception as e: - _logger.log_error(f"cannot arm watchdog: {e}") - return -1 - else: - return seconds + _pause_watchdog_punching(datetime.timedelta(seconds=seconds)) + ret = self._do_real_arm(seconds=seconds) + if ret == -1: + _unpause_watchdog_punching() + return ret def disarm(self) -> bool: """ @@ -131,6 +181,8 @@ def disarm(self) -> bool: try: self._toggle_watchdog_counter_enable(False) self._toggle_watchdog_reboot(False) + # If any step above fails, do not attempt to resume watchdog punching + _unpause_watchdog_punching() except Exception as e: _logger.log_error(f"cannot disarm watchdog: {e}") return False diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/utils/platform_reboot b/platform/broadcom/sonic-platform-modules-nexthop/common/utils/platform_reboot new file mode 100755 index 00000000000..c7331d0d38b --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/utils/platform_reboot @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Platform reboot script for Nexthop platforms, +# usually called by the SONiC reboot script. + +VMCORE_FILE="/proc/vmcore" + +in_capture_kernel() { + [ -e "$VMCORE_FILE" ] && [ -s "$VMCORE_FILE" ] +} + +# No-op if we are not in the "capture kernel". +if ! in_capture_kernel; then + echo "Nexthop platform_reboot: skipping and deferring to systemd shutdown for power cycle ..." + exit 0 +fi + +# We are in the capture kernel for kdump, which is a different kernel from the normal one. +# Systemd shutdown will not be triggered, so power cycle the system here. +# We can call nh_powercycle directly since kdump-tools config has added /usr/local/bin +# to the PATH, and it seems like python modules are also available in the capture kernel. +nh_powercycle || /sbin/reboot diff --git a/platform/broadcom/sonic-platform-modules-nexthop/common/utils/pre_pddf_init.sh b/platform/broadcom/sonic-platform-modules-nexthop/common/utils/pre_pddf_init.sh index 967158ed838..ddfed6bb1fe 100755 --- a/platform/broadcom/sonic-platform-modules-nexthop/common/utils/pre_pddf_init.sh +++ b/platform/broadcom/sonic-platform-modules-nexthop/common/utils/pre_pddf_init.sh @@ -10,9 +10,6 @@ log() { logger -t "pre_pddf_init" "$@" } -nh_gen pddf_device_json -nh_gen pcie_yaml - ASIC_INIT_PATH="/usr/local/bin/asic_init.sh" if [ -f "$ASIC_INIT_PATH" ]; then log "$ASIC_INIT_PATH found. Executing..." @@ -27,6 +24,11 @@ else log -p warning "$ASIC_INIT_PATH not found." fi +# Run nh_gen after asic_init.sh because some template lookup commands +# require the ASIC to be out of reset. +nh_gen pddf_device_json +nh_gen pcie_yaml + echo "blacklist adm1266" > /etc/modprobe.d/blacklist-adm1266.conf exit 0 diff --git a/platform/broadcom/sonic-platform-modules-nexthop/debian/rules b/platform/broadcom/sonic-platform-modules-nexthop/debian/rules index f2db268d4b8..416cab97b0d 100755 --- a/platform/broadcom/sonic-platform-modules-nexthop/debian/rules +++ b/platform/broadcom/sonic-platform-modules-nexthop/debian/rules @@ -78,6 +78,8 @@ override_dh_auto_install: if [ -d $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR) ]; then \ cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service \ debian/$${pkg_name}/lib/systemd/system; \ + cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.timer \ + debian/$${pkg_name}/lib/systemd/system; \ fi; \ if [ -d $(MOD_SRC_DIR)/$${mod}/$(SYSTEM_DIR) ]; then \ mkdir -p debian/$${pkg_name}/$(SYSTEM_DIR)/; \ @@ -127,6 +129,10 @@ override_dh_install: dh_install -p$${pkg_name} common/utils/nh_powercycle \ usr/lib/systemd/system-shutdown/; \ fi; \ + if [ -f common/utils/platform_reboot ]; then \ + dh_install -p$${pkg_name} common/utils/platform_reboot \ + usr/share/sonic/device/$${device_name}/; \ + fi; \ ;; \ esac; \ done) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-4010-r0.postinst b/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-4010-r0.postinst index b953150c82b..a0dd61282b5 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-4010-r0.postinst +++ b/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-4010-r0.postinst @@ -9,3 +9,5 @@ systemctl enable system-ledd.service systemctl start --no-block system-ledd.service systemctl enable transceiver-init.service systemctl start transceiver-init.service +systemctl enable watchdog.timer +systemctl start watchdog.timer diff --git a/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-5010-r0.postinst b/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-5010-r0.postinst index b953150c82b..a0dd61282b5 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-5010-r0.postinst +++ b/platform/broadcom/sonic-platform-modules-nexthop/debian/sonic-platform-nexthop-5010-r0.postinst @@ -9,3 +9,5 @@ systemctl enable system-ledd.service systemctl start --no-block system-ledd.service systemctl enable transceiver-init.service systemctl start transceiver-init.service +systemctl enable watchdog.timer +systemctl start watchdog.timer diff --git a/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh b/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh index ee3beacdf56..ea355d0e84f 100755 --- a/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh +++ b/platform/broadcom/sonic-platform-modules-nexthop/nh-5010/utils/asic_init.sh @@ -181,12 +181,20 @@ clear_sticky_bits # Switchcard revision is in Komodo FPGA register 0x44 bottom 4 bits switchcard_revision=$(($(komodo_fpga_read 0x44) & 0xF)) -# Take the asic out of reset -fpga_write 0x8 0x112 +# Q3D_RESET_RELEASE=0 +fpga write32 "$FPGA_BDF" 0x8 0x0 --bits "10:10" +sleep 0.001 + +# DP_PWR_ON_DRV=0 +fpga write32 "$FPGA_BDF" 0x90 0x0 --bits "4:4" sleep 2 -fpga_write 0x8 0x102 + +# DP_PWR_ON_DRV=1 +fpga write32 "$FPGA_BDF" 0x90 0x1 --bits "4:4" sleep 0.2 -fpga_write 0x8 0x502 + +# Q3D_RESET_RELEASE=1 +fpga write32 "$FPGA_BDF" 0x8 0x1 --bits "10:10" enable_phy diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/README.md b/platform/broadcom/sonic-platform-modules-nexthop/test/README.md index 74b5968515e..cab1dd9e528 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/README.md +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/README.md @@ -9,35 +9,47 @@ test/ ├── README.md # This file ├── conftest.py # Global test configuration ├── fixtures/ # Test fixtures and mocking utilities -│ ├── mock_imports_common.py # Common import mocks for all test types │ ├── mock_imports_unit_tests.py # Unit test specific import mocks -│ ├── fixtures_unit_test.py # Unit test fixtures +│ ├── adm1266_test_spec.json # Input & expected output for ADM1266 testings +│ ├── fake_swsscommon.py # Fake implementations of swsscommon DB. +│ └── test_helpers_adm1266.py # ADM1266 testing utilities +│ └── test_helpers_chassis.py # Chassis testing utilities +│ └── test_helpers_common.py # Common testing utilities │ └── test_helpers_eeprom.py # EEPROM testing utilities ├── unit/ # Unit tests (isolated, mocked environment) │ ├── conftest.py # Unit test configuration │ ├── nexthop/ # Tests for nexthop modules │ │ ├── test_eeprom_utils_unit.py # EEPROM utilities unit tests -│ │ ├── test_fpga_utils.py # FPGA utilities tests +│ │ ├── test_fpga_cli.py # fpga_cli unit tests +│ │ ├── test_fpga_lib.py # FPGA library unit tests +│ │ ├── test_gen_cli.py # gen_cli unit tests │ │ └── test_led_control.py # LED control tests +│ │ └── test_pddf_config_parser.py # PDDF config extraction utilities tests │ └── sonic_platform/ # Tests for sonic_platform modules +│ ├── test_adm1266.py # ADM1266 functionality tests │ ├── test_chassis.py # Chassis functionality tests -│ └── test_pid.py # PID controller tests +│ ├── test_fan.py # Fan functionality tests +│ └── test_thermal.py # Thermal & PID controller tests +│ └── test_watchdog.py # Watchdog functionality tests └── integration/ # Integration tests (real environment) ├── conftest.py # Integration test configuration - └── nexthop/ # Integration tests for nexthop - └── test_eeprom_utils_integration.py # EEPROM integration tests + ├── nexthop/ # Integration tests for nexthop + │ ├── test_adm1266_chassis_integration.py # ADM1266 <-> Chassis integration tests + │ └── test_eeprom_utils_integration.py # EEPROM integration tests + └── sonic_platform/ # Integration tests for sonic_platform + └── test_chassis_sfp_integration.py # Chassis <-> SFP integration tests ``` ## Test Types ### Unit Tests (`test/unit/`) -**Purpose**: Test individual components in isolation using mocks. These tests +**Purpose**: Test individual components in isolation using mocks and fakes. These tests can be directly run from the development environment. **Characteristics**: - No external dependencies -- All modules outside of the platform code are mocked +- All modules outside of the platform code are mocked/faked - Test business logic and component behavior - Run in any environment @@ -48,22 +60,8 @@ can be directly run from the development environment. **Characteristics**: - Require SONiC build environment - Use real SONiC modules when available +- Use no mocks or as minimal mocks as possible -## Mock Isolation Strategy - -The test suite uses a mock isolation strategy to ensure unit and integration tests don't interfere with each other: - -### How It Works - -1. **Unit Test Mocks**: Applied only when running unit tests via pytest fixture in `test/unit/conftest.py` -2. **Common Mocks**: Basic mocks applied to all test types via `mock_imports_common.py` -3. **No Global Mocks**: Unit test mocks are NOT applied globally, preventing interference - -### Mock Files - -- `mock_imports_common.py`: Safe mocks for all test types (e.g., click compatibility) -- `mock_imports_unit_tests.py`: Comprehensive SONiC mocks for unit tests only -- `fixtures_unit_test.py`: Pytest fixtures for unit test setup ## Running Tests @@ -92,7 +90,125 @@ pytest test/unit/nexthop/test_led_control.py pytest test/unit/nexthop/test_led_control.py::TestLedControl::test_led_control ``` -### Configuration +## Mock Isolation Strategy + +The test suite uses a mock isolation strategy to ensure unit and integration tests don't interfere with each other: + +### How It Works + +1. **Common Configuration**: Applied to all test types via `test/conftest.py` +2. **Unit Test Mocked/Faked Dependencies**: Applied only when running unit tests via pytest fixture in `test/unit/conftest.py` +3. **Integration Test Real Dependencies**: Applied only when running integration tests via pytest fixture in `test/integration/conftest.py` +4. **Testcase Overrides**: Individual tests can override dependencies if needed via pytest fixtures in their respective test files. + +### Unit Test Mock Example + +**Goal**: Ensure all dependencies are mocked/faked before importing any platform modules. + +**Implementation**: It relies on the correct order of pytest fixtures. +- `test/conftest.py` runs first, which exposes `'../common'` directory to the Python path, so all tests can see `sonic_platform`, `nexthop`, and etc. +- `test/unit/conftest.py` runs next and patches required dependencies as mocks or fakes. We need all SONiC dependencies here because `../common/sonic_platform/__init__.py` loads every module, even if the test wants to import just some modules from sonic_platform. This fixture yields so the patch stays in the context of the test run and tears down after each test run. +- Individual test files may override the dependencies if needed, using pytest fixtures. Then, they can import platform modules after all dependencies are patched. + +All pytest fixtures are done in a `function` scope, so each testcase will load the modules freshly with the correct mocks/fakes for their usecase. + +Below is an example of how `test/unit/sonic_platform/test_fan.py` tests the `sonic_platform.fan` module, which needs a mock of PddfFan. Execution order follows top to bottom: + +```python +# test/conftest.py +common_path = os.path.join(os.path.dirname(__file__), "../common") +sys.path.insert(0, common_path) + + +# test/unit/conftest.py +@pytest.fixture(scope="function", autouse=True) +def patch_dependencies(): + swsscommon = Mock() + swsscommon.swsscommon.DBConnector = FakeDBConnector + swsscommon.swsscommon.FieldValuePairs = FakeFieldValuePairs + swsscommon.swsscommon.Table = FakeTable + swsscommon.swsscommon.SonicV2Connector = FakeSonicV2Connector + + with patch.dict(sys.modules, { # <---- All dependencies are patched here. + "sonic_platform_pddf_base": Mock(), + "sonic_platform_pddf_base.pddf_fan": Mock(), + ... + "swsscommon": swsscommon, + ... + }): + yield # <---- Help keep the patch active while the test runs. + + +# test/unit/sonic_platform/test_fan.py +class MockPddfFan: + """Mock implementation of PddfFan for testing.""" + + # Mock methods + get_presence = Mock() + + def __init__(self, *args, **kwargs): + self.is_psu_fan = kwargs.get("is_psu_fan", False) + pass + +@pytest.fixture +def mock_pddf_fan(): + pddf_fan = Mock() + pddf_fan.PddfFan = MockPddfFan + with patch.dict(sys.modules, {"sonic_platform_pddf_base.pddf_fan": pddf_fan}): # <---- pddf_fan module is overridden here. + yield pddf_fan.PddfFan # <---- Help keep the patch active while the test runs. It also returns MockPddfFan, so the test can use it if needed. + +@pytest.fixture +def fan_module(mock_pddf_fan): # <---- pass mock_pddf_fan as a parameter here, so fan_module runs after it. + from sonic_platform import fan + + yield fan + +def test_fan_get_presence(mock_pddf_fan, fan_module): + fan = fan_module.Fan(tray_idx=0) + + mock_pddf_fan.get_presence.return_value = True + assert fan.get_presence() == True +``` + +### Integration Test Dependency Example + +**Goal**: Ensure all dependencies are imported before importing any platform modules. + +**Implementation**: +- `test/conftest.py` runs first, which exposes `'../common'` directory to the Python path, so all tests can see `sonic_platform`, `nexthop`, and etc. +- `test/integration/conftest.py` runs next and exposes more SONiC dependencies to the Python path. We use `patch` here under a `module` scope fixture, so it doesn't interfere with unit tests. +- Individual test files may define minimal mocks if needed, using pytest fixtures. Then, they can import platform modules after all dependencies are patched. + +```python +# test/conftest.py +common_path = os.path.join(os.path.dirname(__file__), "../common") +sys.path.insert(0, common_path) + + +# test/integration/conftest.py +@pytest.fixture(scope="module", autouse=True) +def patch_dependencies(): + TEST_DIR = os.path.dirname(os.path.realpath(__file__)) + sonic_platform_common = os.path.join( + TEST_DIR, "../../../../../src/sonic-platform-common/" + ) + pddf_base = os.path.join( + TEST_DIR, "../../../../../platform/pddf/platform-api-pddf-base" + ) + + with patch.object(sys, "path", [sonic_platform_common, pddf_base] + sys.path): # <---- Patch real dependencies. + yield # <---- Help keep the patch active while the test runs. + +# Individual test file - can be similar to the unit test example above. +``` + +## Helper Files + +- `fixtures/mock_imports_unit_tests.py`: Comprehensive SONiC mocks/fakes for unit tests only +- `fixtures/fake_swsscommon.py`: Fake implementation of swsscommon DBs +- `fixtures/test_helpers_common.py`: Common test helpers for all tests + +## Configuration Test behavior is configured in `pytest.ini`: diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/conftest.py b/platform/broadcom/sonic-platform-modules-nexthop/test/conftest.py index 006d1431fa5..1c013f79365 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/conftest.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/conftest.py @@ -13,8 +13,7 @@ import os import sys -# Add the paths for nexthop modules imports by tests (relative imports) -common_path = os.path.join(os.path.dirname(__file__), '../common') -sys.path.insert(0, common_path) -common_path = os.path.join(os.path.dirname(__file__), '../common/sonic_platform') +# Adds the '../common' directory to the Python path, to allow tests to import +# python modules from the common directory, such as nexthop and sonic_platform. +common_path = os.path.join(os.path.dirname(__file__), "../common") sys.path.insert(0, common_path) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fake_swsscommon.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fake_swsscommon.py index af96e3cb766..7e914fa2299 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fake_swsscommon.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fake_swsscommon.py @@ -15,8 +15,6 @@ the fake swsscommon module. """ -import sys - from unittest.mock import Mock @@ -70,14 +68,57 @@ def get(self, key: str) -> tuple[bool, dict]: else: return False, {} + def getKeys(self) -> list[str]: + return list(self._global_db[self.db_name][self.table_name].keys()) + + +class FakeSonicV2Connector: + APPL_DB = "APPL_DB" + CONFIG_DB = "CONFIG_DB" + STATE_DB = "STATE_DB" + + def __init__(self, *args, **kwargs): + pass + + def connect(self, db): + pass + + def get_redis_client(self, db): + return FakeDBConnector(db, 0) -def setup_fake_swsscommon(): + def get(self, db, table_name, key, field): + client = self.get_redis_client(db) + table = FakeTable(client, table_name) + return table.get(key)[1].get(field, None) + + def get_all(self, db, key): + parts = key.split("|") + if len(parts) != 2: + parts = key.split(":") + assert ( + len(parts) == 2 + ), f"Expected key to be formatted as 'TABLE_NAME|KEY_NAME' or 'TABLE_NAME:KEY_NAME', got '{key}'" + + table_name, real_key = parts + db_connector = self.get_redis_client(db) + table = FakeTable(db_connector, table_name) + return table.get(real_key)[1] + + def close(self, db): + pass + + +def fake_swsscommon_modules(): """ Sets up mock swsscommon module that contains a fake, simpliflied - implementation of the database using an in-memory dictionary. + implementation of the database using an in-memory dictionary. """ swsscommon = Mock() swsscommon.swsscommon.DBConnector = FakeDBConnector swsscommon.swsscommon.FieldValuePairs = FakeFieldValuePairs swsscommon.swsscommon.Table = FakeTable - sys.modules["swsscommon"] = swsscommon + swsscommon.swsscommon.SonicV2Connector = FakeSonicV2Connector + + # Table names + swsscommon.swsscommon.CFG_PORT_TABLE_NAME = "PORT" + return {"swsscommon": swsscommon, "swsscommon.swsscommon": swsscommon.swsscommon} diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fixtures_unit_test.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fixtures_unit_test.py deleted file mode 100644 index 5ff371747f3..00000000000 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/fixtures_unit_test.py +++ /dev/null @@ -1,503 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2025 Nexthop Systems Inc. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -""" -Shared test fixtures for sonic_platform tests. -This file provides common fixtures that can be used across all test modules. -""" - -import os -import sys -import importlib.util -from unittest.mock import Mock -import pytest -import tempfile - -class PddfChassisMock: - """Mock implementation of PddfChassis for testing.""" - platform_inventory = {} - platform_inventory['num_components'] = 0 - - def __init__(self, pddf_data=None, pddf_plugin_data=None): - # Initialize required attributes that the Chassis class expects - self._thermal_list = [] - self._sfp_list = [] - self._watchdog = None - self._eeprom = Mock() - self._eeprom.modelstr = Mock(return_value="Test Model") - self.plugin_data = pddf_plugin_data or {'REBOOT_CAUSE': {'reboot_cause_file': '/tmp/test_reboot_cause'}} - - def get_all_sfps(self): - return self._sfp_list - - def set_system_led(self, led_name, color): - return True - - def get_system_led(self, led_name): - return "green" - -def process_input(json_file): - """Load a JSON test spec and return (blackbox_data, expected_records, expected_causes). - - The JSON must contain: - - hexdump_lines: array of hexdump lines (strings) - Optionally: - - expected_records: list[dict] of raw numeric expectations - - expected_causes: list[dict] of rendered string expectations - """ - import json - - def parse_hexdump_lines(lines): - bb = bytearray() - hexchars = set("0123456789abcdefABCDEF") - for line in lines: - for tok in line.split(): - if len(tok) == 2 and all(c in hexchars for c in tok): - bb.append(int(tok, 16)) - return bytes(bb) - - with open(json_file, 'r') as f: - spec = json.load(f) - - if 'hexdump_lines' not in spec: - raise ValueError('JSON must include hexdump_lines') - blackbox_data = parse_hexdump_lines(spec['hexdump_lines']) - expected_records = spec.get('expected_blackbox_records') - expected_causes = spec.get('expected_reboot_causes') - - return blackbox_data, expected_records, expected_causes - -class Adm1266PlatformSpecMock: - pddf_plugin_data = { - "DPM": { - "dpm-mock": { - "dpm_signal_to_fault_cause": [ - { - "pdio_mask": "0x0001", - "gpio_mask": "0x0000", - "pdio_value": "0x0001", - "gpio_value": "0x0000", - "hw_cause": "PSU_VIN_LOSS", - "hw_desc": "Both PSUs lost input power", - "summary": "PSU input power lost", - "reboot_cause": "REBOOT_CAUSE_POWER_LOSS" - }, - { - "pdio_mask": "0x0002", - "gpio_mask": "0x0000", - "pdio_value": "0x0002", - "gpio_value": "0x0000", - "hw_cause": "OVER_TEMP", - "hw_desc": "Switch card temp sensor OT", - "summary": "Temperature exceeded threshold", - "reboot_cause": "REBOOT_CAUSE_THERMAL_OVERLOAD_OTHER" - }, - { - "pdio_mask": "0x0004", - "gpio_mask": "0x0000", - "pdio_value": "0x0004", - "gpio_value": "0x0000", - "hw_cause": "CPU_PWR_BAD", - "hw_desc": "CPU card power bad", - "summary": "CPU power failure", - "reboot_cause": "REBOOT_CAUSE_HARDWARE_OTHER" - }, - { - "pdio_mask": "0x0008", - "gpio_mask": "0x0000", - "pdio_value": "0x0008", - "gpio_value": "0x0000", - "hw_cause": "WATCHDOG", - "hw_desc": "FPGA watchdog expired", - "summary": "Watchdog timeout", - "reboot_cause": "REBOOT_CAUSE_WATCHDOG" - }, - { - "pdio_mask": "0x0010", - "gpio_mask": "0x0000", - "pdio_value": "0x0010", - "gpio_value": "0x0000", - "hw_cause": "ASIC_OT", - "hw_desc": "ASIC MAX_TEMP exceeded OT threshold", - "summary": "ASIC overtemperature", - "reboot_cause": "REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC" - }, - { - "pdio_mask": "0x0020", - "gpio_mask": "0x0000", - "pdio_value": "0x0020", - "gpio_value": "0x0000", - "hw_cause": "NO_FAN_PRSNT", - "hw_desc": "All 4 fans have same ID=0xf", - "summary": "No fans present", - "reboot_cause": "REBOOT_CAUSE_HARDWARE_OTHER" - }, - { - "pdio_mask": "0x0040", - "gpio_mask": "0x0000", - "pdio_value": "0x0040", - "gpio_value": "0x0000", - "hw_cause": "CMD_PWR_CYC", - "hw_desc": "Software commanded power cycle", - "summary": "Software power cycle", - "reboot_cause": "REBOOT_CAUSE_POWER_LOSS" - }, - { - "pdio_mask": "0x0080", - "gpio_mask": "0x0000", - "pdio_value": "0x0080", - "gpio_value": "0x0000", - "hw_cause": "DP_PWR_ON", - "hw_desc": "P2 only: from shift chain; not used on P1", - "summary": "DP power on", - "reboot_cause": "REBOOT_CAUSE_POWER_LOSS" - }, - { - "pdio_mask": "0x0100", - "gpio_mask": "0x0000", - "pdio_value": "0x0100", - "gpio_value": "0x0000", - "hw_cause": "FPGA_CMD_PCYC", - "hw_desc": "FPGA commanded power cycle", - "summary": "FPGA power cycle", - "reboot_cause": "REBOOT_CAUSE_POWER_LOSS" - }, - { - "pdio_mask": "0x0200", - "gpio_mask": "0x0000", - "pdio_value": "0x0200", - "gpio_value": "0x0000", - "hw_cause": "CMD_ASIC_PWR_OFF", - "hw_desc": "FPGA command ASIC power off", - "summary": "ASIC power off", - "reboot_cause": "REBOOT_CAUSE_POWER_LOSS" - } - ], - "vpx_to_rail_desc": { - "6": "POS0V75_S5", - "7": "POS1V8_S5", - "8": "POS3V3_S5", - "9": "POS1V1_S0", - "10": "POS0V78_S0", - "11": "POS0V75_S0", - "12": "POS1V8_S0", - "13": "POS3V3_S0", - }, - "vhx_to_rail_desc": { - "5": "POS5V0_S0" - } - } - } - } - - def __init__(self): - # Create temporary nvmem file - nvmem_file = tempfile.NamedTemporaryFile(delete=False) - nvmem_file.close() - nvmem_path = nvmem_file.name - Adm1266PlatformSpecMock.pddf_plugin_data["DPM"]["dpm-mock"]["nvmem_path"] = nvmem_path - self.nvmem_path = nvmem_path - - """ - Create a Adm1266PlatformSpec instance using mock data for testing. - """ - test_dir = os.path.dirname(os.path.realpath(__file__)) - adm1266_platform_spec_path = os.path.join(test_dir, "../../common/sonic_platform/adm1266_platform_spec.py") - spec = importlib.util.spec_from_file_location("adm1266_platform_spec", adm1266_platform_spec_path) - adm1266_platform_spec_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(adm1266_platform_spec_module) - adm1266_platform_spec = adm1266_platform_spec_module.Adm1266PlatformSpec("dpm-mock", Adm1266PlatformSpecMock.pddf_plugin_data) - - # Store cleanup info for later - self.adm1266_platform_spec = adm1266_platform_spec - - def __del__(self): - """Clean up temporary file""" - if os.path.exists(self.nvmem_path): - os.unlink(self.nvmem_path) - - -class Adm1266Mock: - """ - Mock implementation of ADM1266 for unit testing. - Reads test data from provided file paths. - """ - def __init__(self): - test_dir = os.path.dirname(__file__) - - json_file = os.path.join(test_dir, "adm1266_test_spec.json") - data, records, causes = process_input(json_file) - self.blackbox_input = data - self.expected_records = records - self.expected_causes = causes - - self.adm1266_platform_spec_mock = Adm1266PlatformSpecMock() - - # SET UP MOCKS BEFORE LOADING adm1266.py - # Mock sonic_platform_base.chassis_base that adm1266.py imports - chassis_base_mock = Mock() - chassis_base_mock.ChassisBase = Mock() - sys.modules["sonic_platform_base.chassis_base"] = chassis_base_mock - - # Mock sonic_platform.adm1266_platform_spec so the import works - adm1266_platform_spec_mock = Mock() - adm1266_platform_spec_mock.Adm1266PlatformSpec = lambda name, pddf_data: self.adm1266_platform_spec_mock.adm1266_platform_spec - sys.modules["sonic_platform.adm1266_platform_spec"] = adm1266_platform_spec_mock - - # Mock SystemDPMLogHistory to avoid file system operations - dpm_history = Mock() - dpm_history.save = Mock() - sys.modules["sonic_platform.dpm"] = dpm_history - - # NOW load the adm1266 module directly from file path - adm1266_path = os.path.join(test_dir, "../../common/sonic_platform/adm1266.py") - spec = importlib.util.spec_from_file_location("adm1266", adm1266_path) - adm1266_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(adm1266_module) - - self.adm = adm1266_module.Adm1266(self.adm1266_platform_spec_mock.adm1266_platform_spec) - self.adm_get_reboot_cause = adm1266_module.get_reboot_cause - - # Set up path to test PDDF plugin file - # Use absolute path in the container - self.test_pddf_path = "/sonic/device/nexthop/x86_64-nexthop_5010-r0/pddf/pd-plugin.json" - - # Write the test blackbox data to the nvmem file - self._setup_nvmem_file(data) - - def _setup_nvmem_file(self, binary_data): - """Populate nvmem file with binary data""" - with open(self.adm1266_platform_spec_mock.nvmem_path, 'wb') as nvmem_file: - nvmem_file.write(binary_data) - - def get_blackbox_input(self): - return self.blackbox_input - - def get_expected_records(self): - return self.expected_records - - def get_expected_causes(self): - return self.expected_causes - - def read_blackbox(self): - return self.adm.read_blackbox() - - def get_blackbox_records(self): - return self.adm.get_blackbox_records() - - def parse_blackbox(self, data): - return self.adm._parse_blackbox(data) - - def get_reboot_cause(self): - return self.adm_get_reboot_cause(self.test_pddf_path) - - def clear_blackbox(self): - self.adm.clear_blackbox() - self.blackbox_cleared = True - - -class WatchdogBaseMock: - """Mock of WatchdogBase for testing.""" - - def arm(self, seconds): - raise NotImplementedError - - def disarm(self): - raise NotImplementedError - - def is_armed(self): - raise NotImplementedError - - def get_remaining_time(self): - raise NotImplementedError - - -class WatchdogMock(WatchdogBaseMock): - def __init__( - self, - fpga_pci_addr: str, - event_driven_power_cycle_control_reg_offset: int, - watchdog_counter_reg_offset: int, - ): - self.fpga_pci_addr: str = fpga_pci_addr - self.event_driven_power_cycle_control_reg_offset: int = event_driven_power_cycle_control_reg_offset - self.watchdog_counter_reg_offset: int = watchdog_counter_reg_offset - - -@pytest.fixture -def mock_pddf_data(): - """Fixture providing mock PDDF data for tests.""" - data_mock = Mock() - data_mock.data = { - "PLATFORM": {"num_nexthop_fpga_asic_temp_sensors": 0}, - "WATCHDOG": { - "dev_info": {"device_parent": "FAKE_MULTIFPGAPCIE1"}, - "dev_attr": { - "event_driven_power_cycle_control_reg_offset": "0x28", - "watchdog_counter_reg_offset": "0x1E0", - }, - }, - "FAKE_MULTIFPGAPCIE1": { - "dev_info": {"device_bdf": "FAKE_ADDR"}, - }, - } - return data_mock - - -@pytest.fixture -def chassis(mock_pddf_data): - """ - Fixture providing a Chassis instance for testing. - This fixture loads the chassis module directly to avoid package import issues. - """ - # Set up the specific PddfChassis mock with our test implementation - pddf_chassis_mock = Mock() - pddf_chassis_mock.PddfChassis = PddfChassisMock - sys.modules["sonic_platform_pddf_base.pddf_chassis"] = pddf_chassis_mock - - watchdog_mock = Mock() - watchdog_mock.Watchdog = WatchdogMock - sys.modules["sonic_platform.watchdog"] = watchdog_mock - - # Load the chassis module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - chassis_path = os.path.join(test_dir, "../../common/sonic_platform/chassis.py") - - spec = importlib.util.spec_from_file_location("chassis", chassis_path) - chassis_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(chassis_module) - - return chassis_module.Chassis(pddf_data=mock_pddf_data) - -@pytest.fixture -def watchdog(mock_pddf_data): - """ - Fixture providing a Watchdog instance for testing. - """ - # Set up the specific WatchdogBase mock with our test implementation - watchdog_base_mock = Mock() - watchdog_base_mock.WatchdogBase = WatchdogBaseMock - sys.modules["sonic_platform_base.watchdog_base"] = watchdog_base_mock - - # Load the module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - watchdog_path = os.path.join(test_dir, "../../common/sonic_platform/watchdog.py") - - spec = importlib.util.spec_from_file_location("watchdog", watchdog_path) - watchdog_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(watchdog_module) - - return watchdog_module.Watchdog( - fpga_pci_addr="FAKE_FPGA_PCI_ADDR", - event_driven_power_cycle_control_reg_offset=0x28, - watchdog_counter_reg_offset=0x1E0, - ) - - -@pytest.fixture -def mock_sfps(chassis): - """ - Fixture providing mock SFP objects for testing. - Creates a list of mock SFPs and attaches them to the chassis. - """ - NUM_TEST_SFPS = 32 - mock_sfps = [] - - for i in range(1, NUM_TEST_SFPS + 1): - sfp_mock = Mock() - sfp_mock.get_name = Mock(return_value=f"Ethernet{i}") - sfp_mock.get_position_in_parent = Mock(return_value=str(i)) - mock_sfps.append(sfp_mock) - - chassis.get_all_sfps = Mock(return_value=mock_sfps) - return mock_sfps - - -@pytest.fixture -def pid_params(): - """Fixture providing default PID controller parameters for testing.""" - return { - "dt": 5, - "setpoint": 85, - "Kp": 1.0, - "Ki": 1.0, - "Kd": 1.0, - "min_speed": 30, - "max_speed": 100, - } - - -@pytest.fixture -def pid_controller(pid_params): - """ - Fixture providing a FanPIDController instance for testing. - This fixture loads the thermal_actions module directly to avoid package import issues. - """ - # Load the thermal_actions module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - thermal_actions_path = os.path.join(test_dir, "../../common/sonic_platform/thermal_actions.py") - - spec = importlib.util.spec_from_file_location("thermal_actions", thermal_actions_path) - thermal_actions_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(thermal_actions_module) - - return thermal_actions_module.FanPIDController(**pid_params) - - -@pytest.fixture -def nexthop_eeprom_utils(): - """ - Fixture providing nexthop.eeprom_utils module for testing. - This fixture loads the module directly to avoid package import issues. - """ - # Load the eeprom_utils module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - eeprom_utils_path = os.path.join(test_dir, "../../common/nexthop/eeprom_utils.py") - - spec = importlib.util.spec_from_file_location("eeprom_utils", eeprom_utils_path) - eeprom_utils_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(eeprom_utils_module) - - return eeprom_utils_module - - -@pytest.fixture -def nexthop_fpga_lib(): - """ - Fixture providing nexthop.fpga_lib module for testing. - This fixture loads the module directly to avoid package import issues. - """ - # Load the fpga_lib module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - fpga_lib_path = os.path.join(test_dir, "../../common/nexthop/fpga_lib.py") - - spec = importlib.util.spec_from_file_location("fpga_lib", fpga_lib_path) - fpga_lib_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(fpga_lib_module) - - return fpga_lib_module - - -@pytest.fixture -def nexthop_led_control(): - """ - Fixture providing nexthop.led_control module for testing. - This fixture loads the module directly to avoid package import issues. - """ - # Import the mock setup function - from .mock_imports_unit_tests import setup_sonic_platform_mocks - - # Set up mocks before loading the module - setup_sonic_platform_mocks() - - # Load the led_control module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - led_control_path = os.path.join(test_dir, "../../common/nexthop/led_control.py") - - spec = importlib.util.spec_from_file_location("led_control", led_control_path) - led_control_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(led_control_module) - - return led_control_module diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_common.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_common.py deleted file mode 100644 index decc1536065..00000000000 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_common.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2025 Nexthop Systems Inc. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - - -def setup_click_mocks(): - """ - Set up click mocks to handle unsupported arguments in older click versions. - - This function creates wrapper functions for click decorators that automatically - filter out known unsupported keyword arguments, allowing code written for newer - click versions to run in environments with older click installations. - - The mock filters out predefined unsupported parameters like 'autocompletion' - from click decorators. - - Example usage: - # This would fail in older click versions: - @click.argument("file", autocompletion=complete_files) - def process_file(file): - pass - - # With setup_click_mocks() called, the autocompletion parameter - # is automatically filtered out in older click versions, allowing - # the decorator to work without errors. - """ - import click - - # Store original click functions - original_argument = click.argument - original_option = click.option - original_command = click.command - original_group = click.group - - # Predefined list of unsupported parameters to filter out - UNSUPPORTED_PARAMS = {'autocompletion'} - - def filter_unsupported_kwargs(**kwargs): - """Remove predefined unsupported kwargs from click decorator calls.""" - filtered_kwargs = {k: v for k, v in kwargs.items() if k not in UNSUPPORTED_PARAMS} - return filtered_kwargs - - def safe_argument(*args, **kwargs): - """Wrapper for click.argument that filters unsupported kwargs.""" - filtered_kwargs = filter_unsupported_kwargs(**kwargs) - return original_argument(*args, **filtered_kwargs) - - def safe_option(*args, **kwargs): - """Wrapper for click.option that filters unsupported kwargs.""" - filtered_kwargs = filter_unsupported_kwargs(**kwargs) - return original_option(*args, **filtered_kwargs) - - def safe_command(*args, **kwargs): - """Wrapper for click.command that filters unsupported kwargs.""" - filtered_kwargs = filter_unsupported_kwargs(**kwargs) - return original_command(*args, **filtered_kwargs) - - def safe_group(*args, **kwargs): - """Wrapper for click.group that filters unsupported kwargs.""" - filtered_kwargs = filter_unsupported_kwargs(**kwargs) - return original_group(*args, **filtered_kwargs) - - # Replace click functions with safe versions - click.argument = safe_argument - click.option = safe_option - click.command = safe_command - click.group = safe_group - - -setup_click_mocks() diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_unit_tests.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_unit_tests.py index 7453e081854..86feef938a0 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_unit_tests.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/mock_imports_unit_tests.py @@ -10,79 +10,134 @@ that are not available in test environments. """ -import sys +import types + from unittest.mock import Mock -import functools +from fixtures.fake_swsscommon import fake_swsscommon_modules MOCK_MODULES = [ # PDDF - 'sonic_platform_pddf_base', - 'sonic_platform_pddf_base.pddf_chassis', - 'sonic_platform_pddf_base.pddf_platform', - 'sonic_platform_pddf_base.pddf_component', - 'sonic_platform_pddf_base.pddf_sfp', - 'sonic_platform_pddf_base.pddf_psu', - 'sonic_platform_pddf_base.pddf_thermal', - 'sonic_platform_pddf_base.pddf_fan', - 'sonic_platform_pddf_base.pddf_fan_drawer', - - # Sonic platform - 'sonic_platform', - 'sonic_platform.platform', - + "sonic_platform_pddf_base", + "sonic_platform_pddf_base.pddf_chassis", + "sonic_platform_pddf_base.pddf_platform", + "sonic_platform_pddf_base.pddf_component", + "sonic_platform_pddf_base.pddf_sfp", + "sonic_platform_pddf_base.pddf_psu", + "sonic_platform_pddf_base.pddf_fan", + "sonic_platform_pddf_base.pddf_fan_drawer", + # Platform base - 'sonic_platform_base', - 'sonic_platform_base.thermal_base', - 'sonic_platform_base.chassis_base', - 'sonic_platform_base.component_base', - 'sonic_platform_base.sfp_base', - 'sonic_platform_base.psu_base', - 'sonic_platform_base.fan_base', - 'sonic_platform_base.fan_drawer_base', - 'sonic_platform_base.watchdog_base', - + "sonic_platform_base", + "sonic_platform_base.chassis_base", + "sonic_platform_base.component_base", + "sonic_platform_base.sfp_base", + "sonic_platform_base.psu_base", + "sonic_platform_base.fan_base", + "sonic_platform_base.fan_drawer_base", + # Thermal control - 'sonic_platform_base.sonic_thermal_control', - 'sonic_platform_base.sonic_thermal_control.thermal_manager_base', - 'sonic_platform_base.sonic_thermal_control.thermal_action_base', - 'sonic_platform_base.sonic_thermal_control.thermal_json_object', - + "sonic_platform_base.sonic_thermal_control", + "sonic_platform_base.sonic_thermal_control.thermal_condition_base", + "sonic_platform_base.sonic_thermal_control.thermal_manager_base", + # SONiC common - 'sonic_py_common', - 'sonic_py_common.logger', - - # EEPROM - 'sonic_eeprom', - 'sonic_eeprom.eeprom_tlvinfo', - - # swsscommon - 'swsscommon', - 'swsscommon.swsscommon', + "sonic_py_common", + "sonic_py_common.logger", - # LED control - 'sonic_led', - 'sonic_led.led_control_base', + # EEPROM + "sonic_eeprom", + "sonic_eeprom.eeprom_tlvinfo", # Other - 'portconfig', + "portconfig", ] -def setup_sonic_platform_mocks(): - """ - Set up mock modules for all SONiC platform dependencies. - This should be called before importing any sonic_platform modules in tests. + +def mock_syslog_modules(): + """Set up mocks for syslogger.""" + + class MockSysLogger: + # Methods as mocks so tests can assert calls + log_info = Mock() + log_error = Mock() + log_warning = Mock() + log_debug = Mock() + log = Mock() + + def __init__(self, *args, **kwargs): + pass + + syslogger = Mock() + syslogger.SysLogger = MockSysLogger + + syslog = Mock() + syslog.SYSLOG_IDENTIFIER_THERMAL = "nh_thermal" + syslog.NhLoggerMixin = MockSysLogger + + return { + "sonic_py_common.syslogger": syslogger, + "sonic_platform.syslog": syslog, + } + + +def fake_some_base_modules(): + """Returns fake bases for some modules that their derived classes are required to be real. + + Otherwise, classes will be `Mock` when they extend from the mocked base class. + And it may cause "metaclass conflict" error. """ - for module in MOCK_MODULES: - sys.modules[module] = Mock() + # Mock the thermal_json_object decorator + def mock_thermal_json_object(name): + def decorator(cls): + return cls + return decorator + + thermal_json_object = Mock() + thermal_json_object.thermal_json_object = mock_thermal_json_object + + thermal_info_base = Mock() + thermal_info_base.ThermalPolicyInfoBase = type("ThermalPolicyInfoBase", (object,), {}) + + thermal_action_base = Mock() + thermal_action_base.ThermalPolicyActionBase = type("ThermalPolicyActionBase", (object,), {}) + + thermal_base = Mock() + thermal_base.ThermalBase = type("ThermalBase", (object,), {}) - # Mock the thermal module specifically to avoid import chains - thermal_mock = Mock() - thermal_mock.NexthopFpgaAsicThermal = Mock() - sys.modules['sonic_platform.thermal'] = thermal_mock + watchdog_base = Mock() + watchdog_base.WatchdogBase = type("WatchdogBase", (object,), {}) - # Mock LedControlBase as a proper base class that can be inherited from - led_control_base_mock = Mock() - led_control_base_mock.LedControlBase = type('LedControlBase', (object,), {}) - sys.modules['sonic_led.led_control_base'] = led_control_base_mock + pddf_thermal = Mock() + pddf_thermal.PddfThermal = type("PddfThermal", (object,), {}) + + led_control_base = Mock() + led_control_base.LedControlBase = type("LedControlBase", (object,), {}) + + return { + "sonic_platform_base.sonic_thermal_control.thermal_json_object": thermal_json_object, + "sonic_platform_base.sonic_thermal_control.thermal_info_base": thermal_info_base, + "sonic_platform_base.sonic_thermal_control.thermal_action_base": thermal_action_base, + "sonic_platform_base.thermal_base": thermal_base, + "sonic_platform_base.watchdog_base": watchdog_base, + "sonic_platform_pddf_base.pddf_thermal": pddf_thermal, + "sonic_led.led_control_base": led_control_base, + } + + +def dependencies_dict() -> dict[str, types.ModuleType]: + """Returns a dictionary of mocked/faked dependencies for unit tests. + + When loading any module from sonic_platform, the __init__.py tries to import + all its submodules. This means that all dependencies must be available when + running unit tests. This function provides a complete list of all required + dependencies. + """ + results = {} + for module in MOCK_MODULES: + results[module] = Mock() + results.update(mock_syslog_modules()) + results.update(fake_some_base_modules()) + results.update(fake_swsscommon_modules()) + return results diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_adm1266.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_adm1266.py new file mode 100644 index 00000000000..bf0d9062b2f --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_adm1266.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python + +# Copyright 2025 Nexthop Systems Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +""" +Shared test helpers for ADM1266 testing. + +This module contains common utilities used by both unit and integration tests +for ADM1266 functionality. It helps avoid code duplication between test files. +""" + +import os +import tempfile + + +def process_input(json_file): + """Load a JSON test spec and return (blackbox_data, expected_records, expected_causes). + + The JSON must contain: + - hexdump_lines: array of hexdump lines (strings) + Optionally: + - expected_records: list[dict] of raw numeric expectations + - expected_causes: list[dict] of rendered string expectations + """ + import json + + def parse_hexdump_lines(lines): + bb = bytearray() + hexchars = set("0123456789abcdefABCDEF") + for line in lines: + for tok in line.split(): + if len(tok) == 2 and all(c in hexchars for c in tok): + bb.append(int(tok, 16)) + return bytes(bb) + + with open(json_file, "r") as f: + spec = json.load(f) + + if "hexdump_lines" not in spec: + raise ValueError("JSON must include hexdump_lines") + blackbox_data = parse_hexdump_lines(spec["hexdump_lines"]) + expected_records = spec.get("expected_blackbox_records") + expected_causes = spec.get("expected_reboot_causes") + + return blackbox_data, expected_records, expected_causes + + +class Adm1266TestMixin: + """ + Mixin class that provides ADM1266 test helper methods to test classes. + + Test classes can inherit from this mixin to get access to all the helper methods + as instance methods, which is convenient for test organization. + """ + + # Set up path to test PDDF plugin file + # Use absolute path in the container + TEST_PDDF_PATH = "/sonic/device/nexthop/x86_64-nexthop_5010-r0/pddf/pd-plugin.json" + + EXCERPT_PDDF_PLUGIN_DATA = { + "DPM": { + "dpm-mock": { + "dpm_signal_to_fault_cause": [ + { + "pdio_mask": "0x0001", + "gpio_mask": "0x0000", + "pdio_value": "0x0001", + "gpio_value": "0x0000", + "hw_cause": "PSU_VIN_LOSS", + "hw_desc": "Both PSUs lost input power", + "summary": "PSU input power lost", + "reboot_cause": "REBOOT_CAUSE_POWER_LOSS", + }, + { + "pdio_mask": "0x0002", + "gpio_mask": "0x0000", + "pdio_value": "0x0002", + "gpio_value": "0x0000", + "hw_cause": "OVER_TEMP", + "hw_desc": "Switch card temp sensor OT", + "summary": "Temperature exceeded threshold", + "reboot_cause": "REBOOT_CAUSE_THERMAL_OVERLOAD_OTHER", + }, + { + "pdio_mask": "0x0004", + "gpio_mask": "0x0000", + "pdio_value": "0x0004", + "gpio_value": "0x0000", + "hw_cause": "CPU_PWR_BAD", + "hw_desc": "CPU card power bad", + "summary": "CPU power failure", + "reboot_cause": "REBOOT_CAUSE_HARDWARE_OTHER", + }, + { + "pdio_mask": "0x0008", + "gpio_mask": "0x0000", + "pdio_value": "0x0008", + "gpio_value": "0x0000", + "hw_cause": "WATCHDOG", + "hw_desc": "FPGA watchdog expired", + "summary": "Watchdog timeout", + "reboot_cause": "REBOOT_CAUSE_WATCHDOG", + }, + { + "pdio_mask": "0x0010", + "gpio_mask": "0x0000", + "pdio_value": "0x0010", + "gpio_value": "0x0000", + "hw_cause": "ASIC_OT", + "hw_desc": "ASIC MAX_TEMP exceeded OT threshold", + "summary": "ASIC overtemperature", + "reboot_cause": "REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC", + }, + { + "pdio_mask": "0x0020", + "gpio_mask": "0x0000", + "pdio_value": "0x0020", + "gpio_value": "0x0000", + "hw_cause": "NO_FAN_PRSNT", + "hw_desc": "All 4 fans have same ID=0xf", + "summary": "No fans present", + "reboot_cause": "REBOOT_CAUSE_HARDWARE_OTHER", + }, + { + "pdio_mask": "0x0040", + "gpio_mask": "0x0000", + "pdio_value": "0x0040", + "gpio_value": "0x0000", + "hw_cause": "CMD_PWR_CYC", + "hw_desc": "Software commanded power cycle", + "summary": "Software power cycle", + "reboot_cause": "REBOOT_CAUSE_POWER_LOSS", + }, + { + "pdio_mask": "0x0080", + "gpio_mask": "0x0000", + "pdio_value": "0x0080", + "gpio_value": "0x0000", + "hw_cause": "DP_PWR_ON", + "hw_desc": "P2 only: from shift chain; not used on P1", + "summary": "DP power on", + "reboot_cause": "REBOOT_CAUSE_POWER_LOSS", + }, + { + "pdio_mask": "0x0100", + "gpio_mask": "0x0000", + "pdio_value": "0x0100", + "gpio_value": "0x0000", + "hw_cause": "FPGA_CMD_PCYC", + "hw_desc": "FPGA commanded power cycle", + "summary": "FPGA power cycle", + "reboot_cause": "REBOOT_CAUSE_POWER_LOSS", + }, + { + "pdio_mask": "0x0200", + "gpio_mask": "0x0000", + "pdio_value": "0x0200", + "gpio_value": "0x0000", + "hw_cause": "CMD_ASIC_PWR_OFF", + "hw_desc": "FPGA command ASIC power off", + "summary": "ASIC power off", + "reboot_cause": "REBOOT_CAUSE_POWER_LOSS", + }, + ], + "vpx_to_rail_desc": { + "6": "POS0V75_S5", + "7": "POS1V8_S5", + "8": "POS3V3_S5", + "9": "POS1V1_S0", + "10": "POS0V78_S0", + "11": "POS0V75_S0", + "12": "POS1V8_S0", + "13": "POS3V3_S0", + }, + "vhx_to_rail_desc": {"5": "POS5V0_S0"}, + } + } + } + adm1266_platform_spec = None + + def setup_class(self): + # Load test data from JSON spec. + TEST_DIR = os.path.dirname(os.path.realpath(__file__)) + json_file = os.path.join(TEST_DIR, "adm1266_test_spec.json") + data, records, causes = process_input(json_file) + self.blackbox_input = data + self.expected_records = records + self.expected_causes = causes + + def setup_method(self): + # Prepare nvmem_path and pddf_plugin_data + nvmem_file = tempfile.NamedTemporaryFile(delete=False) + nvmem_file.write(self.blackbox_input) + nvmem_file.close() + self.nvmem_path = nvmem_file.name + self.pddf_plugin_data = self.EXCERPT_PDDF_PLUGIN_DATA + self.pddf_plugin_data["DPM"]["dpm-mock"]["nvmem_path"] = self.nvmem_path + + # Delayed initialization until runtime, when all dependencies are properly patched. + self.adm1266_platform_spec = None + + def teardown_method(self): + """Clean up temporary file""" + if self.nvmem_path and os.path.exists(self.nvmem_path): + os.unlink(self.nvmem_path) + + def get_nvmem_path(self): + return self.nvmem_path + + def get_blackbox_input(self): + return self.blackbox_input + + def get_expected_records(self): + return self.expected_records + + def get_expected_causes(self): + return self.expected_causes + + def get_pddf_plugin_data(self): + return self.pddf_plugin_data + + def get_fake_adm1266_platform_spec(self): + if self.adm1266_platform_spec is None: + # Do the import here, as all dependencies should already be patched at this point. + from sonic_platform.adm1266_platform_spec import Adm1266PlatformSpec + + self.adm1266_platform_spec = Adm1266PlatformSpec("dpm-mock", self.pddf_plugin_data) + return self.adm1266_platform_spec + + def get_test_pddf_path(self): + return self.TEST_PDDF_PATH diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_chassis.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_chassis.py new file mode 100644 index 00000000000..ddfe380078a --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_chassis.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python + +# Copyright 2025 Nexthop Systems Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +""" +Shared test helpers for chassis testing. + +This module contains common utilities used by both unit and integration tests +for chassis functionality. It helps avoid code duplication between test files. +""" + +import json +import os + +from contextlib import contextmanager +from unittest.mock import patch, mock_open + + +def dirs_of_led_ctrl_lock_path(): + """Returns a list of directories that lead to LED_CTRL_LOCK_PATH. + + FOR USED BY INTEGRATION TEST ONLY. + """ + from sonic_platform_pddf_base.pddfapi import LED_CTRL_LOCK_PATH + + res = [] + dir = os.path.split(LED_CTRL_LOCK_PATH)[0] + while dir != "/": + res.append(dir) + dir = os.path.split(dir)[0] + return res + + +@contextmanager +def setup_patch_for_chassis_init(pddf_plugin_data: dict): + """A context manager helper to patch open() and os.path.exists() for Chassis.__init__(). + + FOR USED BY INTEGRATION TEST ONLY. + """ + original_open = open + original_exists = os.path.exists + + DIRS_OF_LED_CTRL_LOCK_PATH = dirs_of_led_ctrl_lock_path() + + # Prepare side effects to satisfy Chassis.__init__(). + def open_side_effect(file, *args, **kwargs): + if file == "/usr/share/sonic/platform/pddf/pd-plugin.json": # For PddfChassis.__init__() + return mock_open(read_data=json.dumps(pddf_plugin_data))() + elif file == "/usr/share/sonic/platform/pddf/pddf-device.json": # For PddfApi.__init__(). + return mock_open( + read_data=json.dumps({"PLATFORM": {}}) # For PddfApi.get_platform(). + )() + + # Fallback to the real open() for other files + return original_open(file, *args, **kwargs) + + def exists_side_effect(path): + if path == "/usr/share/sonic/platform": # For PddfChassis.__init__(). + return True + elif path in DIRS_OF_LED_CTRL_LOCK_PATH: # For PddfApi.__init__(). + return True + + # Fallback to the real exists() for other paths + return original_exists(path) + + with patch("builtins.open", side_effect=open_side_effect), patch( + "os.path.exists", side_effect=exists_side_effect + ): + yield diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_common.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_common.py new file mode 100644 index 00000000000..197be2baf98 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_common.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +# Copyright 2025 Nexthop Systems Inc. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +""" +Shared test helpers for sonic_platform tests. +This file provides common helpers that can be used across all test modules. +""" + +import sys + +from unittest.mock import Mock +from fixtures.fake_swsscommon import FakeDBConnector, FakeFieldValuePairs, FakeTable + + +def mock_pddf_data(data: dict[str, dict]): + """Returns a mock PDDF data object. + + This can be passed to init() of many components in sonic_platform. + """ + data_mock = Mock() + data_mock.data = data + return data_mock + + +def mock_data_in_swsscommon( + db_name: str, table_name: str, key_to_fvs: dict[str, dict[str, str]] +): + """Helper function to add data into the fake swsscommon database. + + For example, calling + + mock_data_in_swsscommon("STATE_DB", "FAN_INFO", { + "Fantray1_1": {"max_speed": 75, "mock_key": "mock_value"}, + "Fantray1_2": {"max_speed": 75} + }) + + will mock the following data in the database: + + STATE_DB|FAN_INFO|Fantray1_1|max_speed = 75 + STATE_DB|FAN_INFO|Fantray1_1|mock_key = "mock_value" + STATE_DB|FAN_INFO|Fantray1_2|max_speed = 75 + """ + assert ( + sys.modules["swsscommon"].swsscommon.DBConnector == FakeDBConnector + ), "fake swsscommon is not patched. Make sure to patch them for mock_data_in_swsscommon() to take effect." + + db_connector = FakeDBConnector(db_name, 0) + table = FakeTable(db_connector, table_name) + for key, fvs in key_to_fvs.items(): + fvs = [(k, v) for k, v in fvs.items()] + table.set(key, FakeFieldValuePairs(fvs)) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_eeprom.py b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_eeprom.py index aa71046fb4d..57c30cf34c9 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_eeprom.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/fixtures/test_helpers_eeprom.py @@ -11,8 +11,6 @@ """ import os -import tempfile -from typing import Dict # Constants @@ -37,7 +35,7 @@ def create_fake_eeprom(path_to_file: str, size: int = EEPROM_SIZE) -> None: f.write(bytearray([0xFF] * size)) @staticmethod - def create_fake_i2c_device(device_name: str, file_to_content: Dict[str, str], root: str) -> None: + def create_fake_i2c_device(device_name: str, file_to_content: dict[str, str], root: str) -> None: """ Create a fake I2C device directory structure for testing. @@ -162,7 +160,7 @@ def create_fake_eeprom(self, path_to_file: str, size: int = EEPROM_SIZE) -> None """Create a fake EEPROM file for testing.""" return EepromTestHelpers.create_fake_eeprom(path_to_file, size) - def create_fake_i2c_device(self, device_name: str, file_to_content: Dict[str, str], root: str) -> None: + def create_fake_i2c_device(self, device_name: str, file_to_content: dict[str, str], root: str) -> None: """Create a fake I2C device directory structure for testing.""" return EepromTestHelpers.create_fake_i2c_device(device_name, file_to_content, root) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/conftest.py b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/conftest.py index 2b4f85534a8..5214ad8a3e7 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/conftest.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/conftest.py @@ -4,22 +4,33 @@ # SPDX-License-Identifier: Apache-2.0 """ -Configuration for integration tests. +Test configuration for integration tests. Integration tests require a SONiC build environment and require not/minimal mocks. """ import os -import sys import pytest +import sys + +from unittest.mock import patch + -# Add the test directory to Python path for imports -test_root = os.path.join(os.path.dirname(__file__), '..') -sys.path.insert(0, test_root) +@pytest.fixture(scope="module", autouse=True) +def patch_dependencies(): + """Sets up real dependencies for all integration tests. -# Add the common directory to path for nexthop modules imports by tests -common_path = os.path.join(test_root, '../common') -sys.path.insert(0, common_path) + This fixture is automatically applied to all tests in the integration/ directory. + It uses module scope, so it won't interfere with unit tests. + """ + TEST_DIR = os.path.dirname(os.path.realpath(__file__)) + sonic_platform_common = os.path.join( + TEST_DIR, "../../../../../src/sonic-platform-common/" + ) + pddf_base = os.path.join( + TEST_DIR, "../../../../../platform/pddf/platform-api-pddf-base" + ) -# Mock out common imports. This is done by importing the following module -import fixtures.mock_imports_common \ No newline at end of file + with patch.object(sys, "path", [sonic_platform_common, pddf_base] + sys.path): + # Keep the patch active while integration tests are running + yield diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_adm1266_chassis_integration.py b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_adm1266_chassis_integration.py index 2a9b17a1291..79e1aa0cce8 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_adm1266_chassis_integration.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_adm1266_chassis_integration.py @@ -2,46 +2,47 @@ import pytest import sys -from unittest.mock import Mock, patch, mock_open -import os -# Import test fixtures -sys.path.insert(0, '../../fixtures') -from fixtures_unit_test import Adm1266Mock +from fixtures.fake_swsscommon import fake_swsscommon_modules +from fixtures.mock_imports_unit_tests import mock_syslog_modules +from fixtures.test_helpers_adm1266 import Adm1266TestMixin +from fixtures.test_helpers_chassis import setup_patch_for_chassis_init +from unittest.mock import Mock, patch -@pytest.fixture -def chassis(): - """Create a mock chassis for integration testing.""" - from unittest.mock import Mock +@pytest.fixture(scope="module") +def mock_unimportant_modules(): + """Mock modules that aren't important for integration testing.""" + modules = {} + modules["sonic_py_common"] = Mock() + modules["sonic_platform.dpm"] = Mock() + modules["sonic_platform.dpm"].SystemDPMLogHistory = Mock() + modules.update(mock_syslog_modules()) + modules.update(fake_swsscommon_modules()) - chassis_mock = Mock() - chassis_mock._blackbox = None # Will be set by individual tests + with patch.dict(sys.modules, modules): + yield - def mock_get_reboot_cause(): - if chassis_mock._blackbox is None: - return ('REBOOT_CAUSE_NON_HARDWARE', 'Unknown') - # Delegate to the ADM1266 mock - return chassis_mock._blackbox.get_reboot_cause() +@pytest.fixture(scope="module") +def chassis_module(mock_unimportant_modules): + """Loads the module before all tests. This is to let conftest.py inject deps first.""" + from sonic_platform import chassis - chassis_mock.get_reboot_cause = mock_get_reboot_cause - return chassis_mock + yield chassis -class TestAdm1266ChassisIntegration: +class TestAdm1266ChassisIntegration(Adm1266TestMixin): """Integration tests for ADM1266 with chassis - reboot cause only.""" - def test_clear_blackbox_integration(self, chassis): - """Test blackbox clearing through chassis interface.""" - chassis._blackbox = Adm1266Mock() + def test_chassis_get_reboot_cause(self, chassis_module): + # Given + with setup_patch_for_chassis_init(self.get_pddf_plugin_data()): + chassis = chassis_module.Chassis() - # Initially has faults - fault_data = chassis.get_reboot_cause() - assert len(fault_data), "no fault data" + # When + reboot_cause = chassis.get_reboot_cause() - # Clear blackbox - chassis._blackbox.clear_blackbox() - - # Should now show cleared state - assert chassis._blackbox.blackbox_cleared == True + # Then + assert reboot_cause[0] == "Hardware - Other" + assert reboot_cause[1] == "" diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_eeprom_utils_integration.py b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_eeprom_utils_integration.py index 5a0050d1317..dad079b21fe 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_eeprom_utils_integration.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/nexthop/test_eeprom_utils_integration.py @@ -16,37 +16,24 @@ """ import os -import sys -import tempfile -from typing import Counter import pytest - -# Add the test directory to Python path for imports -test_root = os.path.join(os.path.dirname(__file__), '../..') -sys.path.insert(0, test_root) - -# Add the common directory to path for nexthop modules -common_path = os.path.join(test_root, '../common') -sys.path.insert(0, common_path) +import tempfile # Import shared test helpers -from fixtures.test_helpers_eeprom import EepromTestMixin, EEPROM_SIZE +from fixtures.test_helpers_eeprom import EepromTestMixin + +@pytest.fixture(scope="module") +def eeprom_utils_module(): + """Loads the module before all tests. This is to let conftest.py inject deps first.""" + from nexthop import eeprom_utils -CWD = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(os.path.join(CWD, "../../../../../../src/sonic-platform-common/")) -from nexthop.eeprom_utils import ( - clear_eeprom, - decode_eeprom, - get_at24_eeprom_paths, - program_eeprom, - Eeprom, -) + yield eeprom_utils class TestEepromUtilsIntegration(EepromTestMixin): """Integration test class for EEPROM utilities with full SONiC environment.""" - def test_program_and_decode(self, capsys): + def test_program_and_decode(self, eeprom_utils_module, capsys): """Test programming and decoding EEPROM data with full SONiC environment.""" # Given root = tempfile.mktemp() @@ -56,16 +43,16 @@ def test_program_and_decode(self, capsys): # When program_data = self.get_standard_eeprom_program_data() - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) expected = self.get_expected_tlv_output() # Then - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out - def test_decode_known_buggy_custom_serial_number(self, capsys): + def test_decode_known_buggy_custom_serial_number(self, eeprom_utils_module, capsys): """ Under full SONiC environment, Test decoding and reprogramming EEPROM data when "Custom Serial Number" @@ -82,7 +69,7 @@ def test_decode_known_buggy_custom_serial_number(self, capsys): for k in program_data: program_data[k] = None program_data["custom_serial_number"] = "123" - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) # Then expected = """\ @@ -95,7 +82,7 @@ def test_decode_known_buggy_custom_serial_number(self, capsys): Custom Serial Number 0xFD 8 123 CRC-32 0xFE 4 0x8F92A23C """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out @@ -103,7 +90,7 @@ def test_decode_known_buggy_custom_serial_number(self, capsys): # Byte 2 of the "Custom Serial Number" TLV contains a garbage value with open(eeprom_path, "rb") as f: e = bytearray(f.read()) - csn_tlv_start = Eeprom._TLV_INFO_HDR_LEN + csn_tlv_start = eeprom_utils_module.Eeprom._TLV_INFO_HDR_LEN e = e[:csn_tlv_start + 2] + bytearray([0xff]) + e[csn_tlv_start + 2:] # Increment payload length by 1 e[csn_tlv_start + 1] += 1 @@ -127,12 +114,12 @@ def test_decode_known_buggy_custom_serial_number(self, capsys): Custom Serial Number 0xFD 9 123 CRC-32 0xFE 4 0x8F92A23C """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out # And When programming EEPROM again - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) # Then the good format is restored expected = """\ @@ -145,11 +132,11 @@ def test_decode_known_buggy_custom_serial_number(self, capsys): Custom Serial Number 0xFD 8 123 CRC-32 0xFE 4 0x8F92A23C """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out - def test_decode_buggy_regulatory_model_number(self, capsys): + def test_decode_buggy_regulatory_model_number(self, eeprom_utils_module, capsys): """ Under full SONiC environment, Test decoding EEPROM data gives invalid output when the known bug @@ -167,7 +154,7 @@ def test_decode_buggy_regulatory_model_number(self, capsys): for k in program_data: program_data[k] = None program_data["regulatory_model_number"] = "123" - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) # Then expected = """\ @@ -180,7 +167,7 @@ def test_decode_buggy_regulatory_model_number(self, capsys): Regulatory Model Number 0xFD 8 123 CRC-32 0xFE 4 0x0906D092 """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out @@ -188,7 +175,7 @@ def test_decode_buggy_regulatory_model_number(self, capsys): # Byte 2 of the "Regulatory Model Number" TLV contains a garbage value with open(eeprom_path, "rb") as f: e = bytearray(f.read()) - csn_tlv_start = Eeprom._TLV_INFO_HDR_LEN + csn_tlv_start = eeprom_utils_module.Eeprom._TLV_INFO_HDR_LEN e = e[:csn_tlv_start + 2] + bytearray([0xff]) + e[csn_tlv_start + 2:] # Increment payload length by 1 e[csn_tlv_start + 1] += 1 @@ -212,11 +199,11 @@ def test_decode_buggy_regulatory_model_number(self, capsys): Vendor Extension 0xFD 9 Invalid IANA: 4278190326, expected 63074 CRC-32 0xFE 4 0x0906D092 """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out - def test_program_replace_nh_custom_fields(self, capsys): + def test_program_replace_nh_custom_fields(self, eeprom_utils_module, capsys): """ Under full SONiC environment, Test re-programming EEPROM data with Nexthop custom fields being replaced. @@ -234,7 +221,7 @@ def test_program_replace_nh_custom_fields(self, capsys): program_data["product_name"] = "NH-9999" program_data["custom_serial_number"] = "111" program_data["regulatory_model_number"] = "AAA" - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) expected = self.get_expected_tlv_output() @@ -251,14 +238,14 @@ def test_program_replace_nh_custom_fields(self, capsys): Regulatory Model Number 0xFD 8 AAA CRC-32 0xFE 4 0xB6CE81FB """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out # And When programming EEPROM again with different values program_data["custom_serial_number"] = "222" program_data["regulatory_model_number"] = "BBB" - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) # Then the values are replaced expected = """\ @@ -273,11 +260,11 @@ def test_program_replace_nh_custom_fields(self, capsys): Regulatory Model Number 0xFD 8 BBB CRC-32 0xFE 4 0x314BC9F0 """ - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert expected in out - def test_clear(self, capsys): + def test_clear(self, eeprom_utils_module, capsys): """Test clearing EEPROM data with full SONiC environment.""" # Given root = tempfile.mktemp() @@ -285,13 +272,13 @@ def test_clear(self, capsys): eeprom_path = os.path.join(root, "eeprom") self.create_fake_eeprom(eeprom_path) program_data = self.get_standard_eeprom_program_data() - program_eeprom(eeprom_path=eeprom_path, **program_data) + eeprom_utils_module.program_eeprom(eeprom_path=eeprom_path, **program_data) # When - clear_eeprom(eeprom_path) + eeprom_utils_module.clear_eeprom(eeprom_path) # Then - decode_eeprom(eeprom_path) + eeprom_utils_module.decode_eeprom(eeprom_path) out, _ = capsys.readouterr() assert "EEPROM does not contain data in a valid TlvInfo format" in out diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/integration/sonic_platform/test_chassis_sfp_integration.py b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/sonic_platform/test_chassis_sfp_integration.py new file mode 100644 index 00000000000..9698445f6bc --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/integration/sonic_platform/test_chassis_sfp_integration.py @@ -0,0 +1,225 @@ +#!/usr/bin/env python + +import pytest +import sys +import copy +import time + +from fixtures.fake_swsscommon import fake_swsscommon_modules +from fixtures.mock_imports_unit_tests import mock_syslog_modules +from fixtures.test_helpers_chassis import setup_patch_for_chassis_init +from unittest.mock import Mock, patch, create_autospec + + +# Test constants +NUM_TEST_SFPS = 32 + +# Xcvr presence states used by xcvrd +XCVR_INSERTED = "1" +XCVR_REMOVED = "0" + + +@pytest.fixture(scope="module") +def mock_unimportant_modules(): + """Mock modules that aren't important for integration testing.""" + modules = {} + modules.update(mock_syslog_modules()) + modules.update(fake_swsscommon_modules()) + + with patch.dict(sys.modules, modules): + yield + + +@pytest.fixture(scope="module") +def chassis_module(mock_unimportant_modules): + """Loads the module before all tests. This is to let conftest.py inject deps first.""" + from sonic_platform import chassis + + yield chassis + + +@pytest.fixture(scope="module") +def mock_sfps(mock_unimportant_modules): + """ + Fixture providing autospec'ed mock SFP objects for testing. + Creates a list of mock SFPs and attaches them to the chassis. + """ + mock_sfps = [] + from sonic_platform_base.sfp_base import SfpBase + + for i in range(1, NUM_TEST_SFPS + 1): + # autospec helps catch typos or changes in the real interface early. + sfp_mock = create_autospec(SfpBase) + sfp_mock.get_name.return_value = f"Ethernet{i}" + sfp_mock.get_position_in_parent.return_value = str(i) + mock_sfps.append(sfp_mock) + + return mock_sfps + + +class SfpTestHelper: + """ + Helper class for managing SFP state changes in tests. + Provides utilities for simulating SFP insertion/removal events. + """ + + def __init__(self): + self.sfp_state = {} + self.change_events = {} + + def update_state(self, mock_sfps, state): + """ + Update the state of mock SFPs and track change events. + + Args: + mock_sfps: List of mock SFP objects + state: New state (XCVR_INSERTED or XCVR_REMOVED) + """ + assert state in [XCVR_INSERTED, XCVR_REMOVED] + + for mock_sfp in mock_sfps: + port_num = mock_sfp.get_position_in_parent() + if self.sfp_state.get(port_num) != state: + self.change_events[port_num] = state + self.sfp_state[port_num] = state + mock_sfp.get_presence = Mock(return_value=(state == XCVR_INSERTED)) + + def get_change_events(self): + """ + Get and clear the current change events. + + Returns: + Tuple of (success, events_dict) matching chassis.get_change_event() format + """ + change_events = copy.deepcopy(self.change_events) + self.change_events.clear() + return (True, {"sfp": change_events}) + + def clear_events(self): + """Clear all tracked change events.""" + self.change_events.clear() + + def get_current_state(self, port_num): + """Get the current state of a specific port.""" + return self.sfp_state.get(port_num) + + def set_all_inserted(self, mock_sfps): + """Set all SFPs to inserted state.""" + self.update_state(mock_sfps, XCVR_INSERTED) + + def set_all_removed(self, mock_sfps): + """Set all SFPs to removed state.""" + self.update_state(mock_sfps, XCVR_REMOVED) + + +class TestChassisSfpIntegration: + """Test class for Chassis and SFP events functionality.""" + + def test_get_change_event_initial_state(self, chassis_module, mock_sfps): + """Test initial SFP change event detection.""" + sfp_test_helper = SfpTestHelper() + with setup_patch_for_chassis_init(pddf_plugin_data={}): + chassis = chassis_module.Chassis() + chassis._sfp_list = mock_sfps + + # Initial call test - expect change in all SFPs + inserted_sfps = mock_sfps[0 : NUM_TEST_SFPS // 2] + removed_sfps = mock_sfps[NUM_TEST_SFPS // 2 :] + + sfp_test_helper.update_state(inserted_sfps, XCVR_INSERTED) + sfp_test_helper.update_state(removed_sfps, XCVR_REMOVED) + + result = chassis.get_change_event() + expected = sfp_test_helper.get_change_events() + + assert result == expected + + def test_get_change_event_no_change_short_timeout(self, chassis_module, mock_sfps): + """Test change event detection with short timeout and no changes.""" + sfp_test_helper = SfpTestHelper() + with setup_patch_for_chassis_init(pddf_plugin_data={}): + chassis = chassis_module.Chassis() + chassis._sfp_list = mock_sfps + + # Set initial state + sfp_test_helper.update_state(mock_sfps, XCVR_INSERTED) + chassis.get_change_event() # Clear initial events + sfp_test_helper.get_change_events() # Clear helper events + + # Small timeout test - no change + result = chassis.get_change_event(timeout=1) + expected = sfp_test_helper.get_change_events() + + assert result == expected + + def test_get_change_event_no_change_long_timeout(self, chassis_module, mock_sfps): + """Test change event detection with long timeout and no changes.""" + sfp_test_helper = SfpTestHelper() + with setup_patch_for_chassis_init(pddf_plugin_data={}): + chassis = chassis_module.Chassis() + chassis._sfp_list = mock_sfps + + # Set initial state + sfp_test_helper.update_state(mock_sfps, XCVR_INSERTED) + chassis.get_change_event() # Clear initial events + sfp_test_helper.get_change_events() # Clear helper events + + # Large timeout test - no change (mock time to avoid actual waiting) + start_time = time.monotonic() + with patch("time.sleep") as mock_sleep, patch("time.monotonic") as mock_monotonic: + mock_monotonic.side_effect = [start_time + i for i in range(20)] + result = chassis.get_change_event(timeout=10 * 1000) + expected = sfp_test_helper.get_change_events() + + assert result == expected + + def test_get_change_event_partial_change(self, chassis_module, mock_sfps): + """Test change event detection with partial SFP state changes.""" + sfp_test_helper = SfpTestHelper() + with setup_patch_for_chassis_init(pddf_plugin_data={}): + chassis = chassis_module.Chassis() + chassis._sfp_list = mock_sfps + + # Set initial state + inserted_sfps = mock_sfps[0 : NUM_TEST_SFPS // 2] + removed_sfps = mock_sfps[NUM_TEST_SFPS // 2 :] + + sfp_test_helper.update_state(inserted_sfps, XCVR_INSERTED) + sfp_test_helper.update_state(removed_sfps, XCVR_REMOVED) + chassis.get_change_event() # Clear initial events + sfp_test_helper.get_change_events() # Clear helper events + + # Final change test - a subset of SFPs + sfp_test_helper.update_state(inserted_sfps[0 : NUM_TEST_SFPS // 4], XCVR_REMOVED) + sfp_test_helper.update_state(removed_sfps[0 : NUM_TEST_SFPS // 4], XCVR_INSERTED) + + result = chassis.get_change_event() + expected = sfp_test_helper.get_change_events() + + assert result == expected + + def test_get_change_event_all_inserted(self, chassis_module, mock_sfps): + """Test change event when all SFPs are inserted.""" + sfp_test_helper = SfpTestHelper() + with setup_patch_for_chassis_init(pddf_plugin_data={}): + chassis = chassis_module.Chassis() + chassis._sfp_list = mock_sfps + + sfp_test_helper.set_all_inserted(mock_sfps) + result = chassis.get_change_event() + expected = sfp_test_helper.get_change_events() + + assert result == expected + + def test_get_change_event_all_removed(self, chassis_module, mock_sfps): + """Test change event when all SFPs are removed.""" + sfp_test_helper = SfpTestHelper() + with setup_patch_for_chassis_init(pddf_plugin_data={}): + chassis = chassis_module.Chassis() + chassis._sfp_list = mock_sfps + + sfp_test_helper.set_all_removed(mock_sfps) + result = chassis.get_change_event() + expected = sfp_test_helper.get_change_events() + + assert result == expected diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/conftest.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/conftest.py index c734a52cd21..a595185e3d0 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/conftest.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/conftest.py @@ -11,24 +11,20 @@ import pytest import sys +from unittest.mock import patch -# Import common mocks that are safe for all test types -import fixtures.mock_imports_common -@pytest.fixture(scope="session", autouse=True) -def setup_unit_test_mocks(): - """ - Set up unit test mocks automatically for all unit tests. +@pytest.fixture(scope="function", autouse=True) +def patch_dependencies(): + """Sets up mocked/faked dependencies for all unit tests. + This fixture is automatically applied to all tests in the unit/ directory. + It uses function scope, so each testcase can override the mocked/faked modules if needed. """ - # Only import and set up unit test mocks when actually running unit tests - from fixtures.mock_imports_unit_tests import setup_sonic_platform_mocks + from fixtures.mock_imports_unit_tests import dependencies_dict - # Set up the mocks - setup_sonic_platform_mocks() - - yield + with patch.dict(sys.modules, dependencies_dict()): + # Keep the patch active while a testcase is running + yield # Cleanup is handled automatically by pytest session teardown - -from fixtures.fixtures_unit_test import * \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_eeprom_utils_unit.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_eeprom_utils_unit.py index c4d488d2040..0cb04a8d9d1 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_eeprom_utils_unit.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_eeprom_utils_unit.py @@ -9,31 +9,31 @@ python -m pytest test/unit/nexthop/test_eeprom_utils.py -v """ -import os -import sys import tempfile from typing import Counter import pytest -# Add the test directory to Python path for imports -test_root = os.path.join(os.path.dirname(__file__), '../..') -sys.path.insert(0, test_root) - # Import shared test helpers from fixtures.test_helpers_eeprom import EepromTestMixin +@pytest.fixture(scope="function", autouse=True) +def eeprom_utils_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from nexthop import eeprom_utils + return eeprom_utils + class TestEepromUtils(EepromTestMixin): """Test class for EEPROM utilities functionality.""" - def test_get_find_at24_eeprom_paths(self, nexthop_eeprom_utils): + def test_get_find_at24_eeprom_paths(self, eeprom_utils_module): """Test finding AT24 EEPROM paths.""" # Given root = tempfile.mktemp() self.setup_test_i2c_environment(root) # When - eeprom_paths = nexthop_eeprom_utils.get_at24_eeprom_paths(root) + eeprom_paths = eeprom_utils_module.get_at24_eeprom_paths(root) # Then expected_paths = self.get_expected_eeprom_paths(root) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_cli.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_cli.py index 712d84e202e..8c8bad7a486 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_cli.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_cli.py @@ -2,65 +2,62 @@ from click import BadParameter from click.testing import CliRunner -from nexthop.fpga_cli import ( - read32, - write32, - echo_available_fpgas, -) -from nexthop.fpga_lib import ( - name_to_bdf, - bdf_to_name, -) +@pytest.fixture(scope="function", autouse=True) +def fpga_cli_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from nexthop import fpga_cli + + yield fpga_cli @pytest.mark.parametrize("pci_address", ["0000:e3:00.0", "0000:00:02.0"]) @pytest.mark.parametrize("offset", ["0x0", "0x4", "0xab0bac08", "0xac", "0xa0"]) @pytest.mark.parametrize("bits", ["0:0", "3:7", "15:21", "0:31"]) -def test_read32_valid_args(pci_address, offset, bits): +def test_read32_valid_args(fpga_cli_module, pci_address, offset, bits): runner = CliRunner() - result = runner.invoke(read32, [pci_address, offset, f"--bits={bits}"]) + result = runner.invoke(fpga_cli_module.read32, [pci_address, offset, f"--bits={bits}"]) assert result.exit_code != BadParameter.exit_code @pytest.mark.parametrize("offset", ["0x1", "0x2", "0x3", "0xbeef"]) -def test_read32_unaligned_offset(offset, monkeypatch): +def test_read32_unaligned_offset(fpga_cli_module, offset, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:00:02.0"]) runner = CliRunner() - result = runner.invoke(read32, ["0000:00:02.0", offset]) + result = runner.invoke(fpga_cli_module.read32, ["0000:00:02.0", offset]) assert f"Offset ({offset}) must be 4 byte aligned" in result.output assert result.exit_code == BadParameter.exit_code @pytest.mark.parametrize("offset", ["0xg", "0x", "0xcoffee"]) -def test_read32_bad_hex_offset(offset, monkeypatch): +def test_read32_bad_hex_offset(fpga_cli_module, offset, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:00:02.0"]) runner = CliRunner() - result = runner.invoke(read32, ["0000:00:02.0", offset]) + result = runner.invoke(fpga_cli_module.read32, ["0000:00:02.0", offset]) assert f"Offset ({offset}) must be a valid hex number" in result.output assert result.exit_code == BadParameter.exit_code @pytest.mark.parametrize("bits", ["-1:31", "0:", ":0", "0:15:31", "a:b"]) -def test_read32_malformed_bits(bits): +def test_read32_malformed_bits(fpga_cli_module, bits): runner = CliRunner() - result = runner.invoke(read32, ["0000:00:02.0", "0x0", f"--bits={bits}"]) + result = runner.invoke(fpga_cli_module.read32, ["0000:00:02.0", "0x0", f"--bits={bits}"]) assert ( f"'{bits}'. Expected format: ':' (e.g., '16:31')." in result.output ) assert result.exit_code == BadParameter.exit_code -def test_read32_out_of_range_bits(): +def test_read32_out_of_range_bits(fpga_cli_module): runner = CliRunner() - result = runner.invoke(read32, ["0000:00:02.0", "0x0", "--bits=32:127"]) + result = runner.invoke(fpga_cli_module.read32, ["0000:00:02.0", "0x0", "--bits=32:127"]) assert f"Start bit (32) and end bit (127) must be within [0, 31]" in result.output assert result.exit_code == BadParameter.exit_code -def test_read32_invalid_start_bits(): +def test_read32_invalid_start_bits(fpga_cli_module): runner = CliRunner() - result = runner.invoke(read32, ["0000:00:02.0", "0x0", "--bits=5:4"]) + result = runner.invoke(fpga_cli_module.read32, ["0000:00:02.0", "0x0", "--bits=5:4"]) assert f"Start bit (5) can't be greater than end bit (4)" in result.output assert result.exit_code == BadParameter.exit_code @@ -68,35 +65,35 @@ def test_read32_invalid_start_bits(): @pytest.mark.parametrize("pci_address", ["0000:e3:00.0", "0000:00:02.0"]) @pytest.mark.parametrize("offset", ["0x0", "0x4", "0xab0bac08", "0xac", "0xa0"]) @pytest.mark.parametrize("bits", ["0:0", "3:7", "15:21", "0:31"]) -def test_write32_valid_args(pci_address, offset, bits): +def test_write32_valid_args(fpga_cli_module, pci_address, offset, bits): runner = CliRunner() - result = runner.invoke(write32, [pci_address, offset, "0x1", f"--bits={bits}"]) + result = runner.invoke(fpga_cli_module.write32, [pci_address, offset, "0x1", f"--bits={bits}"]) assert result.exit_code != BadParameter.exit_code @pytest.mark.parametrize("offset", ["0x1", "0x2", "0x3", "0xbeef"]) -def test_write32_unaligned_offset(offset, monkeypatch): +def test_write32_unaligned_offset(fpga_cli_module, offset, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:00:02.0"]) runner = CliRunner() - result = runner.invoke(write32, ["0000:00:02.0", offset, "0xdeadbeef"]) + result = runner.invoke(fpga_cli_module.write32, ["0000:00:02.0", offset, "0xdeadbeef"]) assert f"Offset ({offset}) must be 4 byte aligned" in result.output assert result.exit_code == BadParameter.exit_code @pytest.mark.parametrize("offset", ["0xg", "0x", "0xcoffee"]) -def test_write32_bad_hex_offset(offset, monkeypatch): +def test_write32_bad_hex_offset(fpga_cli_module, offset, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:00:02.0"]) runner = CliRunner() - result = runner.invoke(write32, ["0000:00:02.0", offset, "0xdeadbeef"]) + result = runner.invoke(fpga_cli_module.write32, ["0000:00:02.0", offset, "0xdeadbeef"]) assert f"Offset ({offset}) must be a valid hex number" in result.output assert result.exit_code == BadParameter.exit_code @pytest.mark.parametrize("bits", ["-1:31", "0:", ":0", "0:15:31", "a:b"]) -def test_write32_malformed_bits(bits): +def test_write32_malformed_bits(fpga_cli_module, bits): runner = CliRunner() result = runner.invoke( - write32, ["0000:00:02.0", "0x0", "0xdeadbeef", f"--bits={bits}"] + fpga_cli_module.write32, ["0000:00:02.0", "0x0", "0xdeadbeef", f"--bits={bits}"] ) assert ( f"'{bits}'. Expected format: ':' (e.g., '16:31')." in result.output @@ -104,65 +101,65 @@ def test_write32_malformed_bits(bits): assert result.exit_code == BadParameter.exit_code -def test_write32_out_of_range_bits(): +def test_write32_out_of_range_bits(fpga_cli_module): runner = CliRunner() result = runner.invoke( - write32, ["0000:00:02.0", "0x0", "0xdeadbeef", "--bits=32:127"] + fpga_cli_module.write32, ["0000:00:02.0", "0x0", "0xdeadbeef", "--bits=32:127"] ) assert f"Start bit (32) and end bit (127) must be within [0, 31]" in result.output assert result.exit_code == BadParameter.exit_code -def test_write32_invalid_start_bits(): +def test_write32_invalid_start_bits(fpga_cli_module): runner = CliRunner() - result = runner.invoke(write32, ["0000:00:02.0", "0x0", "0xdeadbeef", "--bits=5:4"]) + result = runner.invoke(fpga_cli_module.write32, ["0000:00:02.0", "0x0", "0xdeadbeef", "--bits=5:4"]) assert f"Start bit (5) can't be greater than end bit (4)" in result.output assert result.exit_code == BadParameter.exit_code -def test_write32_value_exceeds_bits(monkeypatch): +def test_write32_value_exceeds_bits(fpga_cli_module, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:00:02.0"]) runner = CliRunner() - result = runner.invoke(write32, ["0000:00:02.0", "0x0", "0x10", "--bits=1:4"]) + result = runner.invoke(fpga_cli_module.write32, ["0000:00:02.0", "0x0", "0x10", "--bits=1:4"]) assert f"value (0x10) must be smaller than or equal to 0xf" in result.output assert result.exit_code == BadParameter.exit_code -def test_read32_with_fpga_name(monkeypatch): +def test_read32_with_fpga_name(fpga_cli_module, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:e3:00.0"]) monkeypatch.setattr("nexthop.fpga_cli.name_to_bdf", lambda name: "0000:e3:00.0" if name == "CPU_CARD_FPGA" else None) runner = CliRunner() - result = runner.invoke(read32, ["CPU_CARD_FPGA", "0x0"]) + result = runner.invoke(fpga_cli_module.read32, ["CPU_CARD_FPGA", "0x0"]) assert result.exit_code != BadParameter.exit_code -def test_write32_with_fpga_name(monkeypatch): +def test_write32_with_fpga_name(fpga_cli_module, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:e3:00.0"]) monkeypatch.setattr("nexthop.fpga_cli.name_to_bdf", lambda name: "0000:e3:00.0" if name == "SWITCHCARD_FPGA" else None) runner = CliRunner() - result = runner.invoke(write32, ["SWITCHCARD_FPGA", "0x0", "0xdeadbeef"]) + result = runner.invoke(fpga_cli_module.write32, ["SWITCHCARD_FPGA", "0x0", "0xdeadbeef"]) assert result.exit_code != BadParameter.exit_code -def test_invalid_fpga_name_error_message(monkeypatch): +def test_invalid_fpga_name_error_message(fpga_cli_module, monkeypatch): monkeypatch.setattr("nexthop.fpga_cli.find_xilinx_fpgas", lambda: ["0000:e3:00.0"]) monkeypatch.setattr("nexthop.fpga_cli.name_to_bdf", lambda name: None) runner = CliRunner() - result = runner.invoke(read32, ["INVALID_FPGA", "0x0"]) + result = runner.invoke(fpga_cli_module.read32, ["INVALID_FPGA", "0x0"]) assert "FPGA 'INVALID_FPGA' not found" in result.output assert "Use 'fpga list' to see available FPGAs" in result.output assert result.exit_code == BadParameter.exit_code - result = runner.invoke(write32, ["INVALID_FPGA", "0x0", "0xdeadbeef"]) + result = runner.invoke(fpga_cli_module.write32, ["INVALID_FPGA", "0x0", "0xdeadbeef"]) assert "FPGA 'INVALID_FPGA' not found" in result.output assert "Use 'fpga list' to see available FPGAs" in result.output assert result.exit_code == BadParameter.exit_code -def test_echo_available_fpgas(monkeypatch, capsys): +def test_echo_available_fpgas(fpga_cli_module, monkeypatch, capsys): mock_pddf_config = { "MULTIFPGAPCIE0": { "dev_info": { @@ -183,12 +180,12 @@ def test_echo_available_fpgas(monkeypatch, capsys): monkeypatch.setattr("nexthop.fpga_cli.load_pddf_device_config", lambda: mock_pddf_config) monkeypatch.setattr("nexthop.fpga_lib.load_pddf_device_config", lambda: mock_pddf_config) - echo_available_fpgas() + fpga_cli_module.echo_available_fpgas() captured = capsys.readouterr() print(f"Captured output: '{captured.out}'") print(f"Captured error: '{captured.err}'") assert "Available FPGAs" in captured.out assert "NAME" in captured.out assert "PCIe ADDRESS" in captured.out - assert bdf_to_name("0000:30:00.0") == "CPUCARD_FPGA" - assert bdf_to_name("0000:e4:00.0") == "SWITCHCARD_FPGA" \ No newline at end of file + assert fpga_cli_module.bdf_to_name("0000:30:00.0") == "CPUCARD_FPGA" + assert fpga_cli_module.bdf_to_name("0000:e4:00.0") == "SWITCHCARD_FPGA" \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_lib.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_lib.py index e4d5d37899a..0ae831e8064 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_lib.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_fpga_lib.py @@ -8,20 +8,13 @@ from dataclasses import dataclass from typing import Counter -from nexthop.fpga_lib import ( - find_pci_devices, - find_xilinx_fpgas, - get_resource_0_path, - read_32, - write_32, - compute_bitmask, - get_field, - overwrite_field, -) -CWD = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(os.path.join(CWD, "../")) -sys.path.append(os.path.join(CWD, "../../")) +@pytest.fixture(scope="function", autouse=True) +def fpga_lib_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from nexthop import fpga_lib + + yield fpga_lib @dataclass @@ -80,7 +73,7 @@ def create_fake_pci_device(root: str, pci_device: PciDevice): ), ], ) -def test_find_pci_devices(target_vendor_id, target_device_id, pci_devices, expected): +def test_find_pci_devices(fpga_lib_module, target_vendor_id, target_device_id, pci_devices, expected): # Given root = tempfile.mkdtemp(prefix="test_fpga_lib.") try: @@ -89,7 +82,7 @@ def test_find_pci_devices(target_vendor_id, target_device_id, pci_devices, expec create_fake_pci_device(root, pci_device) # Then - pci_devices = find_pci_devices(target_vendor_id, target_device_id, root) + pci_devices = fpga_lib_module.find_pci_devices(target_vendor_id, target_device_id, root) assert Counter(pci_devices) == Counter(expected) finally: shutil.rmtree(root) @@ -122,7 +115,7 @@ def test_find_pci_devices(target_vendor_id, target_device_id, pci_devices, expec ), ], ) -def test_find_xilinx_fpgas(pci_devices, expected): +def test_find_xilinx_fpgas(fpga_lib_module, pci_devices, expected): # Given root = tempfile.mkdtemp(prefix="test_fpga_lib.") try: @@ -131,52 +124,52 @@ def test_find_xilinx_fpgas(pci_devices, expected): create_fake_pci_device(root, pci_device) # Then - xilinx_devices = find_xilinx_fpgas(root) + xilinx_devices = fpga_lib_module.find_xilinx_fpgas(root) assert Counter(xilinx_devices) == Counter(expected) finally: shutil.rmtree(root) # file is initialized to zero -def create_fake_resource0(pci_address: str, root: str): - resource_0_path = get_resource_0_path(pci_address, root=root) +def create_fake_resource0(fpga_lib_module, pci_address: str, root: str): + resource_0_path = fpga_lib_module.get_resource_0_path(pci_address, root=root) os.makedirs(os.path.dirname(resource_0_path), exist_ok=True) with open(resource_0_path, "wb") as f: f.write(bytearray(0x100000)) -def do_test_read_write(root: str): +def do_test_read_write(fpga_lib_module, root: str): pci_address = "0000:00:02.0" - create_fake_resource0(pci_address, root) + create_fake_resource0(fpga_lib_module, pci_address, root) # file is initially all zeroes - assert read_32(pci_address, offset=0x100000 - 4, root=root) == 0 - assert read_32(pci_address, offset=0x0, root=root) == 0 - assert read_32(pci_address, offset=0x4, root=root) == 0 - assert read_32(pci_address, offset=0x8, root=root) == 0 - assert read_32(pci_address, offset=0xC, root=root) == 0 - - write_32(pci_address, offset=0x100000 - 4, val=1, root=root) - write_32(pci_address, offset=0x0, val=2, root=root) - write_32(pci_address, offset=0x4, val=3, root=root) - write_32(pci_address, offset=0x8, val=4, root=root) + assert fpga_lib_module.read_32(pci_address, offset=0x100000 - 4, root=root) == 0 + assert fpga_lib_module.read_32(pci_address, offset=0x0, root=root) == 0 + assert fpga_lib_module.read_32(pci_address, offset=0x4, root=root) == 0 + assert fpga_lib_module.read_32(pci_address, offset=0x8, root=root) == 0 + assert fpga_lib_module.read_32(pci_address, offset=0xC, root=root) == 0 + + fpga_lib_module.write_32(pci_address, offset=0x100000 - 4, val=1, root=root) + fpga_lib_module.write_32(pci_address, offset=0x0, val=2, root=root) + fpga_lib_module.write_32(pci_address, offset=0x4, val=3, root=root) + fpga_lib_module.write_32(pci_address, offset=0x8, val=4, root=root) with pytest.raises(ValueError): # Unaligned writes not allowed. - write_32(pci_address, offset=0xC - 1, val=0xDEADBEEF, root=root) - write_32(pci_address, offset=0xC, val=0xDEADBEEF, root=root) + fpga_lib_module.write_32(pci_address, offset=0xC - 1, val=0xDEADBEEF, root=root) + fpga_lib_module.write_32(pci_address, offset=0xC, val=0xDEADBEEF, root=root) - assert read_32(pci_address, offset=0x100000 - 4, root=root) == 1 - assert read_32(pci_address, offset=0x0, root=root) == 2 - assert read_32(pci_address, offset=0x4, root=root) == 3 - assert read_32(pci_address, offset=0x8, root=root) == 4 - assert read_32(pci_address, offset=0xC, root=root) == 0xDEADBEEF + assert fpga_lib_module.read_32(pci_address, offset=0x100000 - 4, root=root) == 1 + assert fpga_lib_module.read_32(pci_address, offset=0x0, root=root) == 2 + assert fpga_lib_module.read_32(pci_address, offset=0x4, root=root) == 3 + assert fpga_lib_module.read_32(pci_address, offset=0x8, root=root) == 4 + assert fpga_lib_module.read_32(pci_address, offset=0xC, root=root) == 0xDEADBEEF -def test_read_write(): +def test_read_write(fpga_lib_module): root = tempfile.mkdtemp(prefix="test_fpga_lib.") try: - do_test_read_write(root) + do_test_read_write(fpga_lib_module, root) except AssertionError: - resource0_path = get_resource_0_path("0000:00:02.0", root=root) + resource0_path = fpga_lib_module.get_resource_0_path("0000:00:02.0", root=root) print(f"\nHexdump of {resource0_path}:") with open(resource0_path, "rb") as f: content = f.read() @@ -195,46 +188,46 @@ def test_read_write(): shutil.rmtree(root) -def test_compute_bitmask(): +def test_compute_bitmask(fpga_lib_module): # Index: 10987654321098765432109876543210 - assert 0b00000000000000000000000000000001 == compute_bitmask(0, 0) - assert 0b00000000000000000000000000000011 == compute_bitmask(0, 1) - assert 0b00000000000000000000000010000000 == compute_bitmask(7, 7) - assert 0b00000000000000000000001111111100 == compute_bitmask(2, 9) - assert 0b00000011111111111000000000000000 == compute_bitmask(15, 25) - assert 0b00000000000111111111110000000000 == compute_bitmask(10, 20) - assert 0b11000000000000000000000000000000 == compute_bitmask(30, 31) - assert 0b11111111111111111111111111111111 == compute_bitmask(0, 31) + assert 0b00000000000000000000000000000001 == fpga_lib_module.compute_bitmask(0, 0) + assert 0b00000000000000000000000000000011 == fpga_lib_module.compute_bitmask(0, 1) + assert 0b00000000000000000000000010000000 == fpga_lib_module.compute_bitmask(7, 7) + assert 0b00000000000000000000001111111100 == fpga_lib_module.compute_bitmask(2, 9) + assert 0b00000011111111111000000000000000 == fpga_lib_module.compute_bitmask(15, 25) + assert 0b00000000000111111111110000000000 == fpga_lib_module.compute_bitmask(10, 20) + assert 0b11000000000000000000000000000000 == fpga_lib_module.compute_bitmask(30, 31) + assert 0b11111111111111111111111111111111 == fpga_lib_module.compute_bitmask(0, 31) -def test_get_field(): +def test_get_field(fpga_lib_module): # Index: 10987654321098765432109876543210 - assert get_field(0b10110011100011110000111110000011, (0, 0)) == 0b1 - assert get_field(0b10110011100011110000111110000011, (1, 2)) == 0b01 - assert get_field(0b10110011100011110000111110000011, (0, 2)) == 0b011 - assert get_field(0b10110011100011110000111110000011, (10, 16)) == 0b1000011 - assert get_field(0b10110011100011110000111110000011, (25, 30)) == 0b011001 - assert get_field(0b10110011100011110000111110000011, (31, 31)) == 0b1 - assert get_field(0xDEADBEEF, (0, 31)) == 0xDEADBEEF + assert fpga_lib_module.get_field(0b10110011100011110000111110000011, (0, 0)) == 0b1 + assert fpga_lib_module.get_field(0b10110011100011110000111110000011, (1, 2)) == 0b01 + assert fpga_lib_module.get_field(0b10110011100011110000111110000011, (0, 2)) == 0b011 + assert fpga_lib_module.get_field(0b10110011100011110000111110000011, (10, 16)) == 0b1000011 + assert fpga_lib_module.get_field(0b10110011100011110000111110000011, (25, 30)) == 0b011001 + assert fpga_lib_module.get_field(0b10110011100011110000111110000011, (31, 31)) == 0b1 + assert fpga_lib_module.get_field(0xDEADBEEF, (0, 31)) == 0xDEADBEEF -def test_overwrite_field(): - assert overwrite_field(0xFFFFFFFF, (0, 31), field_val=0) == 0 - assert overwrite_field(0b11111111, (0, 5), field_val=0) == 0b11000000 - assert overwrite_field(0b11111111, (2, 4), field_val=0) == 0b11100011 - assert overwrite_field(0b11111111, (3, 7), field_val=0) == 0b00000111 +def test_overwrite_field(fpga_lib_module): + assert fpga_lib_module.overwrite_field(0xFFFFFFFF, (0, 31), field_val=0) == 0 + assert fpga_lib_module.overwrite_field(0b11111111, (0, 5), field_val=0) == 0b11000000 + assert fpga_lib_module.overwrite_field(0b11111111, (2, 4), field_val=0) == 0b11100011 + assert fpga_lib_module.overwrite_field(0b11111111, (3, 7), field_val=0) == 0b00000111 - assert overwrite_field(0b11111111, (2, 4), field_val=0b010) == 0b11101011 - assert overwrite_field(0b00000000, (2, 4), field_val=0b101) == 0b00010100 - assert overwrite_field(0b00000000, (0, 7), field_val=0b11000101) == 0b11000101 + assert fpga_lib_module.overwrite_field(0b11111111, (2, 4), field_val=0b010) == 0b11101011 + assert fpga_lib_module.overwrite_field(0b00000000, (2, 4), field_val=0b101) == 0b00010100 + assert fpga_lib_module.overwrite_field(0b00000000, (0, 7), field_val=0b11000101) == 0b11000101 - assert overwrite_field(0b0, (0, 1), field_val=0b11) == 0b11 - assert overwrite_field(0b0, (30, 31), field_val=0b11) == (0b11 << 30) + assert fpga_lib_module.overwrite_field(0b0, (0, 1), field_val=0b11) == 0b11 + assert fpga_lib_module.overwrite_field(0b0, (30, 31), field_val=0b11) == (0b11 << 30) -def test_overwrite_field_raises_when_value_exceed_bit_range(): +def test_overwrite_field_raises_when_value_exceed_bit_range(fpga_lib_module): with pytest.raises( ValueError, match=r"field_value \(0xff\) must be smaller than or equal to \(0x1f\)", ): - overwrite_field(0xFFFFFFFF, (0, 4), field_val=0xFF) + fpga_lib_module.overwrite_field(0xFFFFFFFF, (0, 4), field_val=0xFF) diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_gen_cli.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_gen_cli.py index 6f5c2152ac9..aa68a68b76f 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_gen_cli.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_gen_cli.py @@ -11,10 +11,16 @@ from click.testing import CliRunner -from nexthop import gen_cli +@pytest.fixture(scope="function", autouse=True) +def gen_cli_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from nexthop import gen_cli -def test_generate_pddf_device_json_success(): + yield gen_cli + + +def test_generate_pddf_device_json_success(gen_cli_module): INPUT_PDDF_DEVICE_TEMPLATE = textwrap.dedent( """ { @@ -99,7 +105,7 @@ def test_generate_pddf_device_json_success(): # When result = runner.invoke( - gen_cli.pddf_device_json, + gen_cli_module.pddf_device_json, [ f"--template_filepath={template_path}", f"--vars_filepath={vars_path}", @@ -116,7 +122,7 @@ def test_generate_pddf_device_json_success(): assert generated_content == EXPECTED_PDDF_DEVICE_JSON -def test_generate_pcie_yaml_success(): +def test_generate_pcie_yaml_success(gen_cli_module): INPUT_PCIE_TEMPLATE = textwrap.dedent( """ - bus: '00' @@ -281,7 +287,7 @@ def test_generate_pcie_yaml_success(): # When result = runner.invoke( - gen_cli.pddf_device_json, + gen_cli_module.pddf_device_json, [ f"--template_filepath={template_path}", f"--vars_filepath={vars_path}", @@ -298,43 +304,43 @@ def test_generate_pcie_yaml_success(): assert generated_content == EXPECTED_PCIE_YAML -def test_generate_pddf_device_json_skipped_when_default_paths_not_found(): +def test_generate_pddf_device_json_skipped_when_default_paths_not_found(gen_cli_module): if os.path.exists( - gen_cli.DEFAULT_PDDF_DEVICE_JSON_TEMPLATE_FILEPATH + gen_cli_module.DEFAULT_PDDF_DEVICE_JSON_TEMPLATE_FILEPATH ) or os.path.exists( - gen_cli.DEFAULT_PCIE_VARS_FILEPATH + gen_cli_module.DEFAULT_PCIE_VARS_FILEPATH ) or os.path.exists( - gen_cli.DEFAULT_PLATFORM_JSON_FILEPATH + gen_cli_module.DEFAULT_PLATFORM_JSON_FILEPATH ): pytest.skip("Default template, vars, or platform.json file exists. Skipping test.") runner = CliRunner() # Given - result = runner.invoke(gen_cli.pddf_device_json) + result = runner.invoke(gen_cli_module.pddf_device_json) # Then assert result.exit_code == 0 -def test_generate_pcie_yaml_skipped_when_default_files_not_found(): +def test_generate_pcie_yaml_skipped_when_default_files_not_found(gen_cli_module): if os.path.exists( - gen_cli.DEFAULT_PCIE_YAML_TEMPLATE_FILEPATH + gen_cli_module.DEFAULT_PCIE_YAML_TEMPLATE_FILEPATH ) or os.path.exists( - gen_cli.DEFAULT_PCIE_VARS_FILEPATH + gen_cli_module.DEFAULT_PCIE_VARS_FILEPATH ) or os.path.exists( - gen_cli.DEFAULT_PLATFORM_JSON_FILEPATH + gen_cli_module.DEFAULT_PLATFORM_JSON_FILEPATH ): pytest.skip("Default template, vars, or platform.json file exists. Skipping test.") runner = CliRunner() # Given - result = runner.invoke(gen_cli.pcie_yaml) + result = runner.invoke(gen_cli_module.pcie_yaml) # Then assert result.exit_code == 0 -def test_generate_pddf_device_json_raises_when_user_input_template_not_found(): +def test_generate_pddf_device_json_raises_when_user_input_template_not_found(gen_cli_module): runner = CliRunner() with tempfile.TemporaryDirectory() as temp_dir: template_path = os.path.join(temp_dir, "non-existent-pddf-device.json.j2") @@ -342,7 +348,7 @@ def test_generate_pddf_device_json_raises_when_user_input_template_not_found(): # When result = runner.invoke( - gen_cli.pddf_device_json, + gen_cli_module.pddf_device_json, [ f"--template_filepath={template_path}", f"--output_filepath={output_path}", @@ -354,7 +360,7 @@ def test_generate_pddf_device_json_raises_when_user_input_template_not_found(): assert not os.path.exists(output_path) -def test_generate_pddf_device_json_raises_when_user_input_vars_not_found(): +def test_generate_pddf_device_json_raises_when_user_input_vars_not_found(gen_cli_module): runner = CliRunner() with tempfile.TemporaryDirectory() as temp_dir: vars_path = os.path.join(temp_dir, "non-existent-pcie-variables.yaml") @@ -362,7 +368,7 @@ def test_generate_pddf_device_json_raises_when_user_input_vars_not_found(): # When result = runner.invoke( - gen_cli.pddf_device_json, + gen_cli_module.pddf_device_json, [ f"--vars_filepath={vars_path}", f"--output_filepath={output_path}", @@ -374,7 +380,7 @@ def test_generate_pddf_device_json_raises_when_user_input_vars_not_found(): assert not os.path.exists(output_path) -def test_generate_pddf_device_json_raises_when_user_input_platform_json_not_found(): +def test_generate_pddf_device_json_raises_when_user_input_platform_json_not_found(gen_cli_module): runner = CliRunner() with tempfile.TemporaryDirectory() as temp_dir: platform_json_path = os.path.join(temp_dir, "non-existent-platform.json") @@ -382,7 +388,7 @@ def test_generate_pddf_device_json_raises_when_user_input_platform_json_not_foun # When result = runner.invoke( - gen_cli.pddf_device_json, + gen_cli_module.pddf_device_json, [ f"--platform_json_filepath={platform_json_path}", f"--output_filepath={output_path}", @@ -394,7 +400,7 @@ def test_generate_pddf_device_json_raises_when_user_input_platform_json_not_foun assert not os.path.exists(output_path) -def test_generate_pcie_yaml_raises_when_user_input_template_not_found(): +def test_generate_pcie_yaml_raises_when_user_input_template_not_found(gen_cli_module): runner = CliRunner() with tempfile.TemporaryDirectory() as temp_dir: template_path = os.path.join(temp_dir, "non-existent-pcie.yaml.j2") @@ -402,7 +408,7 @@ def test_generate_pcie_yaml_raises_when_user_input_template_not_found(): # When result = runner.invoke( - gen_cli.pcie_yaml, + gen_cli_module.pcie_yaml, [ f"--template_filepath={template_path}", f"--output_filepath={output_path}", @@ -414,7 +420,7 @@ def test_generate_pcie_yaml_raises_when_user_input_template_not_found(): assert not os.path.exists(output_path) -def test_generate_pcie_yaml_raises_when_user_input_vars_not_found(): +def test_generate_pcie_yaml_raises_when_user_input_vars_not_found(gen_cli_module): runner = CliRunner() with tempfile.TemporaryDirectory() as temp_dir: vars_path = os.path.join(temp_dir, "non-existent-pcie-variables.yaml") @@ -422,7 +428,7 @@ def test_generate_pcie_yaml_raises_when_user_input_vars_not_found(): # When result = runner.invoke( - gen_cli.pcie_yaml, + gen_cli_module.pcie_yaml, [ f"--vars_filepath={vars_path}", f"--output_filepath={output_path}", diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_led_control.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_led_control.py index f6b1eb9e0a7..85eb171c244 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_led_control.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_led_control.py @@ -9,15 +9,15 @@ python -m pytest test/unit/nexthop/test_led_control.py -v """ -import os -import sys import pytest from unittest.mock import MagicMock, patch -# Add the test directory to Python path for imports -test_root = os.path.join(os.path.dirname(__file__), '../..') -sys.path.insert(0, test_root) +@pytest.fixture(scope="function", autouse=True) +def led_control_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from nexthop import led_control + yield led_control class TestLedControl: """Test class for LED control functionality.""" @@ -222,7 +222,7 @@ class TestLedControl: ) def test_led_control( self, - nexthop_led_control, + led_control_module, port_name, get_port_num_return, port_status_map, @@ -232,11 +232,11 @@ def test_led_control( ): """Test LED control functionality with various port states.""" # Get the LedControl class from the module - LedControl = nexthop_led_control.LedControl + LedControl = led_control_module.LedControl # Patch the module-level functions in the led_control module - with patch.object(nexthop_led_control, "get_port_config") as mock_get_port_config, \ - patch.object(nexthop_led_control, "get_chassis", return_value=MagicMock()) as mock_get_chassis, \ + with patch.object(led_control_module, "get_port_config") as mock_get_port_config, \ + patch.object(led_control_module, "get_chassis", return_value=MagicMock()) as mock_get_chassis, \ patch.object(LedControl, "_get_xcvr_presence") as mock_get_xcvr_presence, \ patch.object(LedControl, "_get_port_status") as mock_get_port_status, \ patch.object(LedControl, "_get_port_num") as mock_get_port_num, \ @@ -322,16 +322,16 @@ def side_effect_get_port_status(logical_port): ) def test_get_xcvr_presence( self, - nexthop_led_control, + led_control_module, port_num, xcvr_info_map, expected_xcvr_presence, ): """Test transceiver presence detection.""" # Get the LedControl class from the module - LedControl = nexthop_led_control.LedControl + LedControl = led_control_module.LedControl - with patch.object(nexthop_led_control, "get_port_config") as mock_get_port_config, \ + with patch.object(led_control_module, "get_port_config") as mock_get_port_config, \ patch.object(LedControl, "_get_interfaces_for_port") as mock_get_interfaces_for_port, \ patch.object(LedControl, "_get_xcvr_info") as mock_get_xcvr_info: @@ -522,16 +522,16 @@ def test_get_xcvr_presence( ) def test_get_port_mappings( self, - nexthop_led_control, + led_control_module, ports_dict, expected_logical_to_physical, expected_physical_to_logical, ): """Test port mapping functionality.""" # Get the LedControl class from the module - LedControl = nexthop_led_control.LedControl + LedControl = led_control_module.LedControl - with patch.object(nexthop_led_control, "get_port_config") as mock_get_port_config: + with patch.object(led_control_module, "get_port_config") as mock_get_port_config: mock_get_port_config.return_value = (ports_dict, {}, {}) led_control = LedControl() diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_pddf_config_parser.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_pddf_config_parser.py index 84cc3508a15..c51cc86dc16 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_pddf_config_parser.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_pddf_config_parser.py @@ -12,12 +12,14 @@ import json import pytest from unittest.mock import MagicMock -from nexthop.pddf_config_parser import ( - extract_xcvr_list, - extract_fpga_attrs, - FpgaDeviceName, - FpgaDevAttrs, -) + + +@pytest.fixture(scope="function", autouse=True) +def pddf_config_parser_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from nexthop import pddf_config_parser + + yield pddf_config_parser # Mock sonic_py_common if not available try: @@ -48,7 +50,7 @@ def find_pddf_device_json(platform_variant): class TestExtractXcvrList: """Test class for 'extract_xcvr_list' function.""" - def test_extract_xcvr_list(self): + def test_extract_xcvr_list(self, pddf_config_parser_module): """Test extract_xcvr_list with a sample configuration.""" # Sample PDDF config config = { @@ -95,7 +97,7 @@ def test_extract_xcvr_list(self): } # When - xcvr_list = extract_xcvr_list(config) + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) # Then expected = [ @@ -108,7 +110,7 @@ def test_extract_xcvr_list(self): for expected_xcvr in expected: assert expected_xcvr in xcvr_list - def test_extract_xcvr_list_missing_required_attrs(self): + def test_extract_xcvr_list_missing_required_attrs(self, pddf_config_parser_module): """Test that devices without both xcvr_reset and xcvr_lpmode are filtered out.""" config = { "PORT1-CTRL": { @@ -141,13 +143,13 @@ def test_extract_xcvr_list_missing_required_attrs(self): } # When - xcvr_list = extract_xcvr_list(config) + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) # Then - only PORT3-CTRL should be included assert len(xcvr_list) == 1 assert xcvr_list[0]["name"] == "PORT3-CTRL" - def test_extract_xcvr_list_non_port_ctrl_devices(self): + def test_extract_xcvr_list_non_port_ctrl_devices(self, pddf_config_parser_module): """Test that non-PORT*-CTRL devices are filtered out.""" config = { "PORT1-CTRL": { @@ -180,13 +182,13 @@ def test_extract_xcvr_list_non_port_ctrl_devices(self): } # When - xcvr_list = extract_xcvr_list(config) + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) # Then - only PORT1-CTRL should be included assert len(xcvr_list) == 1 assert xcvr_list[0]["name"] == "PORT1-CTRL" - def test_extract_xcvr_list_missing_i2c_section(self): + def test_extract_xcvr_list_missing_i2c_section(self, pddf_config_parser_module): """Test that devices without i2c section are filtered out.""" config = { "PORT1-CTRL": { @@ -205,16 +207,16 @@ def test_extract_xcvr_list_missing_i2c_section(self): } # When - xcvr_list = extract_xcvr_list(config) + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) # Then - only PORT2-CTRL should be included assert len(xcvr_list) == 1 assert xcvr_list[0]["name"] == "PORT2-CTRL" - def test_extract_xcvr_list_empty_config(self): + def test_extract_xcvr_list_empty_config(self, pddf_config_parser_module): """Test extract_xcvr_list with empty configuration.""" # When - xcvr_list = extract_xcvr_list({}) + xcvr_list = pddf_config_parser_module.extract_xcvr_list({}) # Then assert xcvr_list == [] @@ -223,7 +225,7 @@ def test_extract_xcvr_list_empty_config(self): "platform_variant", ["x86_64-nexthop_4010-r0", "x86_64-nexthop_4010-r1"], ) - def test_extract_xcvr_list_real_40x0_config(self, platform_variant): + def test_extract_xcvr_list_real_40x0_config(self, pddf_config_parser_module, platform_variant): """Test extract_xcvr_list with real NH-40x0 pddf-device.json configuration.""" # Path to the real pddf-device.json file config_path = find_pddf_device_json(platform_variant) @@ -233,7 +235,7 @@ def test_extract_xcvr_list_real_40x0_config(self, platform_variant): config = json.load(f) # When - xcvr_list = extract_xcvr_list(config) + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) # Then - validate the results assert isinstance(xcvr_list, list) @@ -252,7 +254,36 @@ def test_extract_xcvr_list_real_40x0_config(self, platform_variant): assert len(names) == len(set(names)), "All transceiver names should be unique" assert len(buses) == len(set(buses)), "All bus numbers should be unique" - def test_extract_xcvr_list_real_5010_config(self): + def test_extract_xcvr_list_real_4220_config(self, pddf_config_parser_module): + """Test extract_xcvr_list with real NH-4220 pddf-device.json configuration.""" + # Path to the real pddf-device.json file + config_path = find_pddf_device_json("x86_64-nexthop_4220-r0") + + # Load the real configuration + with open(config_path, "r") as f: + config = json.load(f) + + # When + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) + + # Then - validate the results + assert isinstance(xcvr_list, list) + + # NH-4220 should have 64 OSFP transceivers + assert len(xcvr_list) == 64 + + # First port starts at bus 23 + xcvr_port1 = next(xcvr for xcvr in xcvr_list if xcvr["name"] == "PORT1-CTRL") + assert xcvr_port1["bus"] == 24 + assert xcvr_port1["addr"] == "0008" + + # Verify all entries have unique names and bus numbers + names = [xcvr["name"] for xcvr in xcvr_list] + buses = [xcvr["bus"] for xcvr in xcvr_list] + assert len(names) == len(set(names)), "All transceiver names should be unique" + assert len(buses) == len(set(buses)), "All bus numbers should be unique" + + def test_extract_xcvr_list_real_5010_config(self, pddf_config_parser_module): """Test extract_xcvr_list with real NH-5010 pddf-device.json configuration.""" # Path to the real pddf-device.json file config_path = find_pddf_device_json("x86_64-nexthop_5010-r0") @@ -262,7 +293,7 @@ def test_extract_xcvr_list_real_5010_config(self): config = json.load(f) # When - xcvr_list = extract_xcvr_list(config) + xcvr_list = pddf_config_parser_module.extract_xcvr_list(config) # Then - validate the results assert isinstance(xcvr_list, list) @@ -287,9 +318,15 @@ def test_extract_xcvr_list_real_5010_config(self): class TestExtractFpgaDevAttrs: - FPGA_TYPES = (FpgaDeviceName.CPU_CARD.value, FpgaDeviceName.SWITCHCARD.value) - def test_extract_fpga_attrs_malformed_config(self): + @pytest.fixture(autouse=True) + def setup(self, pddf_config_parser_module): + self.FPGA_TYPES = ( + pddf_config_parser_module.FpgaDeviceName.CPU_CARD.value, + pddf_config_parser_module.FpgaDeviceName.SWITCHCARD.value, + ) + + def test_extract_fpga_attrs_malformed_config(self, pddf_config_parser_module): bad_configs = [] no_dev_attr_config = { "MULTIFPGAPCIE0": { @@ -316,7 +353,7 @@ def test_extract_fpga_attrs_malformed_config(self): for config in bad_configs: with pytest.raises(Exception): - extract_fpga_attrs(config, self.FPGA_TYPES) + pddf_config_parser_module.extract_fpga_attrs(config, self.FPGA_TYPES) @pytest.mark.parametrize( "platform_variant", @@ -326,7 +363,7 @@ def test_extract_fpga_attrs_malformed_config(self): "x86_64-nexthop_5010-r0", ], ) - def test_extract_fpga_attrs(self, platform_variant): + def test_extract_fpga_attrs(self, pddf_config_parser_module, platform_variant): """Test extract_fpga_attrs with real NH pddf-device.json configuration.""" # Path to the real pddf-device.json file config_path = find_pddf_device_json(platform_variant) @@ -336,15 +373,15 @@ def test_extract_fpga_attrs(self, platform_variant): config = json.load(f) # When - fpga_attrs = extract_fpga_attrs(config, self.FPGA_TYPES) + fpga_attrs = pddf_config_parser_module.extract_fpga_attrs(config, self.FPGA_TYPES) # Then assert fpga_attrs == { - FpgaDeviceName.CPU_CARD.value: FpgaDevAttrs( + pddf_config_parser_module.FpgaDeviceName.CPU_CARD.value: pddf_config_parser_module.FpgaDevAttrs( pwr_cycle_reg_offset=0x8, pwr_cycle_enable_word=0xDEADBEEF, ), - FpgaDeviceName.SWITCHCARD.value: FpgaDevAttrs( + pddf_config_parser_module.FpgaDeviceName.SWITCHCARD.value: pddf_config_parser_module.FpgaDevAttrs( pwr_cycle_reg_offset=0x4, pwr_cycle_enable_word=0xDEADBEEF, ), diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_adm1266.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_adm1266.py index 0475306ba15..2770c87f4b7 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_adm1266.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_adm1266.py @@ -2,33 +2,38 @@ import pytest import sys -import tempfile -import os -from unittest.mock import Mock, patch, mock_open +from unittest.mock import Mock, patch +from fixtures.test_helpers_adm1266 import Adm1266TestMixin -# Import test fixtures -sys.path.insert(0, '../../fixtures') -from fixtures_unit_test import Adm1266Mock -@pytest.fixture(scope="module") -def decode_power_fault_cause(): - from fixtures_unit_test import Adm1266Mock - adm = Adm1266Mock() - _decode_power_fault_cause = adm.adm_get_reboot_cause.__globals__['decode_power_fault_cause'] - return _decode_power_fault_cause +@pytest.fixture +def mock_dpm(): + """Injects and returns a mock DPM module for testing.""" + dpm_mock = Mock() + dpm_mock.save = Mock() + with patch.dict(sys.modules, {"sonic_platform.dpm": dpm_mock}): + yield dpm_mock + + +@pytest.fixture +def adm1266_module(mock_dpm): + """Injects and returns a mock ADM1266 module for testing.""" + from sonic_platform import adm1266 + + yield adm1266 + PSU_VIN_LOSS_PDIO_MASK_AND_VALUE = 0x0001 OVER_TEMP_PDIO_MASK_AND_VALUE=0x0002 -class TestAdm1266Basic: +class TestAdm1266Basic(Adm1266TestMixin): """Test ADM1266 basic properties and interface.""" - def test_read_blackbox(self): + def test_read_blackbox(self, adm1266_module): """Test read_blackbox method""" - adm = Adm1266Mock() - blackbox_input = adm.get_blackbox_input() - expected_records = adm.get_expected_records() - expected_causes = adm.get_expected_causes() + blackbox_input = self.get_blackbox_input() + + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) print("\n--- Testing read_blackbox ---") blackbox_data = adm.read_blackbox() @@ -37,16 +42,15 @@ def test_read_blackbox(self): assert blackbox_data == blackbox_input, "Blackbox Data mismatch" print(" Passed") - def test_parse_blackbox(self): + def test_parse_blackbox(self, adm1266_module): """Test parse_blackbox method""" print("\n--- Testing parse_blackbox ---") - adm = Adm1266Mock() - blackbox_input = adm.get_blackbox_input() - expected_records = adm.get_expected_records() - expected_causes = adm.get_expected_causes() + expected_records = self.get_expected_records() + + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) blackbox_data = adm.read_blackbox() - faults = adm.parse_blackbox(blackbox_data) + faults = adm._parse_blackbox(blackbox_data) exp = expected_records assert exp is not None, "expected_records not provided" assert len(faults) == len(exp), f"Fault count mismatch: {len(faults)} != {len(exp)}" @@ -58,15 +62,12 @@ def test_parse_blackbox(self): assert a[ak] == v, f"[{i}] {ak} mismatch: {a[ak]} != {v}" print(" Passed") - def test_get_blackbox_records(self): + def test_get_blackbox_records(self, adm1266_module): """Integration test for Adm1266.get_blackbox_records with optional JSON expectations.""" print("\n--- Testing get_blackbox_records ---") + expected_records = self.get_expected_records() - adm = Adm1266Mock() - blackbox_input = adm.get_blackbox_input() - expected_records = adm.get_expected_records() - expected_causes = adm.get_expected_causes() - + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) records = adm.get_blackbox_records() assert len(records) == len(expected_records),\ @@ -79,17 +80,16 @@ def test_get_blackbox_records(self): assert a[k] == v, f"[{i}] {k}: {a[k]} != {v}" print(" Passed") - def test_get_reboot_causes(self): + def test_get_reboot_causes(self, adm1266_module): """Test Adm1266.get_blackbox_records by comparing with expected records. We use expected_records to validate the blackbox record parsing functionality. """ print("\n--- Testing get_blackbox_records ---") - adm = Adm1266Mock() - blackbox_input = adm.get_blackbox_input() - expected_records = adm.get_expected_records() - expected_causes = adm.get_expected_causes() + expected_records = self.get_expected_records() + + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) records = adm.get_blackbox_records() exp = expected_records @@ -103,15 +103,15 @@ def test_get_reboot_causes(self): assert a[k] == v, f"[{i}] {k}: {a[k]} != {v}" print(" Passed") - def test_get_name(self): + def test_get_name(self, adm1266_module): """Test get_name method returns DPM name.""" - adm = Adm1266Mock() - name = adm.adm.get_name() - assert name == "dpm-mock" + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) + assert adm.get_name() == "dpm-mock" - def test_clear_blackbox(self): + def test_clear_blackbox(self, adm1266_module): """Test clear_blackbox method clears data.""" - adm = Adm1266Mock() + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) + # Verify we have data initially initial_data = adm.read_blackbox() assert len(initial_data) > 0 @@ -122,10 +122,11 @@ def test_clear_blackbox(self): assert len(cleared_data) == 1 assert cleared_data == b"1" - def test_get_all_faults(self): + def test_get_all_faults(self, adm1266_module): """Test get_all_faults method returns fault list.""" - adm = Adm1266Mock() - faults = adm.adm.get_all_faults() + adm = adm1266_module.Adm1266(self.get_fake_adm1266_platform_spec()) + + faults = adm.get_all_faults() assert isinstance(faults, list) assert len(faults) > 0 # Each fault should have required fields @@ -133,52 +134,43 @@ def test_get_all_faults(self): assert 'fault_uid' in fault assert 'dpm_name' in fault - def test_module_get_reboot_cause(self): + def test_module_get_reboot_cause(self, adm1266_module): """Test module-level get_reboot_cause function.""" - adm = Adm1266Mock() - result = adm.get_reboot_cause() - assert result is not None + fake_adm1266_platform_spec = self.get_fake_adm1266_platform_spec() - reboot_cause, debug_msg = result - assert reboot_cause is not None - assert isinstance(debug_msg, str) + adm1266_platform_spec = Mock() + adm1266_platform_spec.Adm1266PlatformSpec = lambda name, pddf_data: fake_adm1266_platform_spec + with patch.dict(sys.modules, {"sonic_platform.adm1266_platform_spec": adm1266_platform_spec}): + result = adm1266_module.get_reboot_cause(self.get_test_pddf_path()) + assert result is not None - def test_get_reboot_cause_type(self): - """Test get_reboot_cause_type function.""" - from fixtures_unit_test import Adm1266Mock - adm = Adm1266Mock() - # Import the function from the loaded module - get_reboot_cause_type = adm.adm_get_reboot_cause.__globals__['get_reboot_cause_type'] + reboot_cause, debug_msg = result + assert reboot_cause is not None + assert isinstance(debug_msg, str) + def test_get_reboot_cause_type(self, adm1266_module): + """Test get_reboot_cause_type function.""" # Test with known reboot causes causes = ["REBOOT_CAUSE_POWER_LOSS", "REBOOT_CAUSE_WATCHDOG"] - result = get_reboot_cause_type(causes) + result = adm1266_module.get_reboot_cause_type(causes) assert result is not None - def test_time_since(self): + def test_time_since(self, adm1266_module): """Test time_since function converts timestamp to readable format.""" - from fixtures_unit_test import Adm1266Mock - adm = Adm1266Mock() - time_since = adm.adm_get_reboot_cause.__globals__['time_since'] - # Test with 8-byte timestamp timestamp = b'\x79\x2e\xee\x02\x00\x00\x00\x00' - result = time_since('timestamp', timestamp) + result = adm1266_module.time_since('timestamp', timestamp) assert isinstance(result, str) assert 'seconds after power-on' in result - def test_channel_names(self): + def test_channel_names(self, adm1266_module): """Test channel_names function formats GPIO/PDIO bits.""" - from fixtures_unit_test import Adm1266Mock - adm = Adm1266Mock() - channel_names = adm.adm_get_reboot_cause.__globals__['channel_names'] - # Test GPIO formatting - result = channel_names('gpio_in', 15391) # From test data + result = adm1266_module.channel_names('gpio_in', 15391) # From test data assert isinstance(result, str) assert 'GPIO' in result or '0b' in result - def test_decode_power_fault_cause_no_match(self, decode_power_fault_cause): + def test_decode_power_fault_cause_no_match(self, adm1266_module): """Test decode_power_fault_cause decoding when there is no match """ dpm_signal_to_fault_cause = [ { @@ -192,14 +184,14 @@ def test_decode_power_fault_cause_no_match(self, decode_power_fault_cause): "reboot_cause": "REBOOT_CAUSE_HARDWARE_OTHER" } ] - hw_cause, hw_desc, summary, reboot_cause = decode_power_fault_cause( + hw_cause, hw_desc, summary, reboot_cause = adm1266_module.decode_power_fault_cause( dpm_signal_to_fault_cause, 0x0000, 0x0000) assert hw_cause == "" assert hw_desc == "" assert summary == "" assert reboot_cause == "" - def test_decode_power_fault_cause_single_match(self, decode_power_fault_cause): + def test_decode_power_fault_cause_single_match(self, adm1266_module): """Test decode_power_fault_cause decoding when there is only one match """ # Test single fault match dpm_signal_to_fault_cause = [ @@ -214,14 +206,14 @@ def test_decode_power_fault_cause_single_match(self, decode_power_fault_cause): "reboot_cause": "REBOOT_CAUSE_HARDWARE_OTHER" } ] - hw_cause, hw_desc, summary, reboot_cause = decode_power_fault_cause( + hw_cause, hw_desc, summary, reboot_cause = adm1266_module.decode_power_fault_cause( dpm_signal_to_fault_cause, PSU_VIN_LOSS_PDIO_MASK_AND_VALUE, 0x0000) assert hw_cause == "TEST_FAULT" assert hw_desc == "Test fault description" assert summary == "Test summary" assert reboot_cause == "REBOOT_CAUSE_HARDWARE_OTHER" - def test_decode_power_fault_cause_multiple_match(self, decode_power_fault_cause): + def test_decode_power_fault_cause_multiple_match(self, adm1266_module): """Test decode_power_fault_cause decoding when there are multiple matches """ # Test multiple fault matches (comma-separated) dpm_signal_to_fault_cause = [ @@ -247,7 +239,7 @@ def test_decode_power_fault_cause_multiple_match(self, decode_power_fault_cause) } ] # Both bits set - should get comma-separated results - hw_cause, hw_desc, summary, reboot_cause = decode_power_fault_cause( + hw_cause, hw_desc, summary, reboot_cause = adm1266_module.decode_power_fault_cause( dpm_signal_to_fault_cause, PSU_VIN_LOSS_PDIO_MASK_AND_VALUE | OVER_TEMP_PDIO_MASK_AND_VALUE, 0x0000) @@ -262,22 +254,17 @@ def test_decode_power_fault_cause_multiple_match(self, decode_power_fault_cause) "REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC, REBOOT_CAUSE_HARDWARE_OTHER", "INVALID_CAUSE" ]) - def test_reboot_cause_str_to_type(self, reboot_cause_str): + def test_reboot_cause_str_to_type(self, adm1266_module, reboot_cause_str): """Test reboot_cause_str_to_type handles single and comma-separated causes.""" - from fixtures_unit_test import Adm1266Mock - adm = Adm1266Mock() - reboot_cause_str_to_type = adm.adm_get_reboot_cause.__globals__['reboot_cause_str_to_type'] - ChassisBase = adm.adm_get_reboot_cause.__globals__['ChassisBase'] - reboot_cause_to_type = { "REBOOT_CAUSE_POWER_LOSS": - ChassisBase.REBOOT_CAUSE_POWER_LOSS, + adm1266_module.ChassisBase.REBOOT_CAUSE_POWER_LOSS, "REBOOT_CAUSE_POWER_LOSS,REBOOT_CAUSE_WATCHDOG": - ChassisBase.REBOOT_CAUSE_POWER_LOSS, + adm1266_module.ChassisBase.REBOOT_CAUSE_POWER_LOSS, "REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC, REBOOT_CAUSE_HARDWARE_OTHER": - ChassisBase.REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC, - "INVALID_CAUSE": ChassisBase.INVALID_CAUSE + adm1266_module.ChassisBase.REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC, + "INVALID_CAUSE": adm1266_module.ChassisBase.INVALID_CAUSE } reboot_cause_type = reboot_cause_to_type.get(reboot_cause_str, "") - assert reboot_cause_str_to_type(reboot_cause_str) == reboot_cause_type + assert adm1266_module.reboot_cause_str_to_type(reboot_cause_str) == reboot_cause_type diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_chassis.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_chassis.py index 4d86648c717..65872d8bc46 100755 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_chassis.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_chassis.py @@ -9,20 +9,39 @@ python -m pytest test/unit/sonic_platform/test_chassis.py -v """ -import copy import os +import pytest import sys import tempfile -import time +from fixtures.test_helpers_common import mock_pddf_data from unittest.mock import patch, Mock -# Test constants -NUM_TEST_SFPS = 32 -# Xcvr presence states used by xcvrd -XCVR_INSERTED = "1" -XCVR_REMOVED = "0" +class MockPddfChassis: + """Mock implementation of PddfChassis for testing.""" + + def __init__(self, pddf_data=None, pddf_plugin_data=None): + self._thermal_list = [] + self.plugin_data = pddf_plugin_data + + +@pytest.fixture +def mock_pddf_chassis(): + """Injects and returns a mock PddfChassis for testing.""" + pddf_chassis = Mock() + pddf_chassis.PddfChassis = MockPddfChassis + with patch.dict(sys.modules, {"sonic_platform_pddf_base.pddf_chassis": pddf_chassis}): + yield pddf_chassis.PddfChassis + + +@pytest.fixture +def chassis_module(mock_pddf_chassis): + """Loads the module before each test. This is to let conftest.py run first.""" + from sonic_platform import chassis + + yield chassis + def _create_temp_file(content: str) -> str: """ @@ -39,185 +58,52 @@ def _create_temp_file(content: str) -> str: return filepath -class SfpTestHelper: - """ - Helper class for managing SFP state changes in tests. - Provides utilities for simulating SFP insertion/removal events. - """ - - def __init__(self): - self.sfp_state = {} - self.change_events = {} - - def update_state(self, mock_sfps, state): - """ - Update the state of mock SFPs and track change events. - - Args: - mock_sfps: List of mock SFP objects - state: New state (XCVR_INSERTED or XCVR_REMOVED) - """ - assert state in [XCVR_INSERTED, XCVR_REMOVED] - - for mock_sfp in mock_sfps: - port_num = mock_sfp.get_position_in_parent() - if self.sfp_state.get(port_num) != state: - self.change_events[port_num] = state - self.sfp_state[port_num] = state - mock_sfp.get_presence = Mock(return_value=(state == XCVR_INSERTED)) - - def get_change_events(self): - """ - Get and clear the current change events. - - Returns: - Tuple of (success, events_dict) matching chassis.get_change_event() format - """ - change_events = copy.deepcopy(self.change_events) - self.change_events.clear() - return (True, {'sfp': change_events}) - - def clear_events(self): - """Clear all tracked change events.""" - self.change_events.clear() - - def get_current_state(self, port_num): - """Get the current state of a specific port.""" - return self.sfp_state.get(port_num) - - def set_all_inserted(self, mock_sfps): - """Set all SFPs to inserted state.""" - self.update_state(mock_sfps, XCVR_INSERTED) - - def set_all_removed(self, mock_sfps): - """Set all SFPs to removed state.""" - self.update_state(mock_sfps, XCVR_REMOVED) - - class TestChassis: """Test class for Chassis functionality.""" - def test_get_change_event_initial_state(self, chassis, mock_sfps): - """Test initial SFP change event detection.""" - sfp_test_helper = SfpTestHelper() - - # Initial call test - expect change in all SFPs - inserted_sfps = mock_sfps[0:NUM_TEST_SFPS//2] - removed_sfps = mock_sfps[NUM_TEST_SFPS//2:] - - sfp_test_helper.update_state(inserted_sfps, XCVR_INSERTED) - sfp_test_helper.update_state(removed_sfps, XCVR_REMOVED) - - result = chassis.get_change_event() - expected = sfp_test_helper.get_change_events() - - assert result == expected - - def test_get_change_event_no_change_short_timeout(self, chassis, mock_sfps): - """Test change event detection with short timeout and no changes.""" - sfp_test_helper = SfpTestHelper() - - # Set initial state - sfp_test_helper.update_state(mock_sfps, XCVR_INSERTED) - chassis.get_change_event() # Clear initial events - sfp_test_helper.get_change_events() # Clear helper events - - # Small timeout test - no change - result = chassis.get_change_event(timeout=1) - expected = sfp_test_helper.get_change_events() - - assert result == expected - - def test_get_change_event_no_change_long_timeout(self, chassis, mock_sfps): - """Test change event detection with long timeout and no changes.""" - sfp_test_helper = SfpTestHelper() - - # Set initial state - sfp_test_helper.update_state(mock_sfps, XCVR_INSERTED) - chassis.get_change_event() # Clear initial events - sfp_test_helper.get_change_events() # Clear helper events - - # Large timeout test - no change (mock time to avoid actual waiting) - start_time = time.monotonic() - with patch('time.sleep') as mock_sleep, patch('time.monotonic') as mock_monotonic: - mock_monotonic.side_effect = [start_time + i for i in range(20)] - result = chassis.get_change_event(timeout=10 * 1000) - expected = sfp_test_helper.get_change_events() - - assert result == expected - - def test_get_change_event_partial_change(self, chassis, mock_sfps): - """Test change event detection with partial SFP state changes.""" - sfp_test_helper = SfpTestHelper() - - # Set initial state - inserted_sfps = mock_sfps[0:NUM_TEST_SFPS//2] - removed_sfps = mock_sfps[NUM_TEST_SFPS//2:] - - sfp_test_helper.update_state(inserted_sfps, XCVR_INSERTED) - sfp_test_helper.update_state(removed_sfps, XCVR_REMOVED) - chassis.get_change_event() # Clear initial events - sfp_test_helper.get_change_events() # Clear helper events - - # Final change test - a subset of SFPs - sfp_test_helper.update_state(inserted_sfps[0:NUM_TEST_SFPS//4], XCVR_REMOVED) - sfp_test_helper.update_state(removed_sfps[0:NUM_TEST_SFPS//4], XCVR_INSERTED) - - result = chassis.get_change_event() - expected = sfp_test_helper.get_change_events() - - assert result == expected - - def test_get_change_event_all_inserted(self, chassis, mock_sfps): - """Test change event when all SFPs are inserted.""" - sfp_test_helper = SfpTestHelper() - - sfp_test_helper.set_all_inserted(mock_sfps) - result = chassis.get_change_event() - expected = sfp_test_helper.get_change_events() - - assert result == expected - - def test_get_change_event_all_removed(self, chassis, mock_sfps): - """Test change event when all SFPs are removed.""" - sfp_test_helper = SfpTestHelper() - - sfp_test_helper.set_all_removed(mock_sfps) - result = chassis.get_change_event() - expected = sfp_test_helper.get_change_events() - - assert result == expected - - def test_chassis_basic_functionality(self, chassis): + def test_chassis_basic_functionality(self, chassis_module): """Test basic chassis functionality.""" # Test that chassis object was created successfully + chassis = chassis_module.Chassis() assert chassis is not None # Test that get_change_event method exists and is callable assert hasattr(chassis, "get_change_event") assert callable(getattr(chassis, "get_change_event")) - def test_chassis_get_watchdog(self, chassis): + def test_chassis_get_watchdog(self, chassis_module): + chassis = chassis_module.Chassis( + pddf_data=mock_pddf_data({ + "WATCHDOG": { + "dev_info": {"device_parent": "FAKE_MULTIFPGAPCIE1"}, + "dev_attr": { + "event_driven_power_cycle_control_reg_offset": "0x28", + "watchdog_counter_reg_offset": "0x1E0", + }, + }, + "FAKE_MULTIFPGAPCIE1": { + "dev_info": {"device_bdf": "FAKE_ADDR"}, + }, + }) + ) actual_watchdog = chassis.get_watchdog() assert actual_watchdog.fpga_pci_addr == "FAKE_ADDR" assert actual_watchdog.event_driven_power_cycle_control_reg_offset == 0x28 assert actual_watchdog.watchdog_counter_reg_offset == 0x1E0 - def test_chassis_get_watchdog_pddf_data_is_empty(self, chassis): - # Re-initiailize chasis with an empty pddf_data - chassis.__init__(pddf_data={}) + def test_chassis_get_watchdog_pddf_data_is_empty(self, chassis_module): + # Initiailize chasis with an empty pddf_data + chassis = chassis_module.Chassis(pddf_data=mock_pddf_data({})) assert chassis.get_watchdog() is None - def test_chassis_get_watchdog_no_watchdog_presence_in_pddf_data(self, chassis): - # Re-initiailize chasis with an empty pddf_data - mock_pddf_data = Mock() - mock_pddf_data.data = {"device": {}} - chassis.__init__(pddf_data=mock_pddf_data) + def test_chassis_get_watchdog_no_watchdog_presence_in_pddf_data(self, chassis_module): + # Initiailize chasis with an empty pddf_data + chassis = chassis_module.Chassis(pddf_data=mock_pddf_data({"device": {}})) assert chassis.get_watchdog() is None - def test_chassis_get_reboot_cause_sw_reboot(self, chassis): + def test_chassis_get_reboot_cause_sw_reboot(self, chassis_module): EXPECTED_SW_REBOOT_CAUSE = "reboot" EXPECTED_MINOR_CAUSES = "System powered off due to software disabling data plane power, System powered off due to software disabling data plane power, System powered off due to software disabling data plane power" @@ -225,39 +111,35 @@ def test_chassis_get_reboot_cause_sw_reboot(self, chassis): reboot_cause_filepath = _create_temp_file( f"User issued '{EXPECTED_SW_REBOOT_CAUSE}' command [User: admin, Time: Thu Oct 2 11:22:56 PM UTC 2025]" ) - chassis.__init__( - pddf_data={}, - pddf_plugin_data={ - "REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath} - }, + chassis_module.adm1266.get_reboot_cause = Mock( + return_value=("Power Loss", EXPECTED_MINOR_CAUSES) ) # When - mock_adm1266 = sys.modules["sonic_platform"].adm1266 - mock_adm1266.get_reboot_cause.return_value = ( - "Power Loss", - EXPECTED_MINOR_CAUSES, + chassis = chassis_module.Chassis( + pddf_plugin_data={ + "REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath} + }, ) - # Then assert chassis.get_reboot_cause() == ( EXPECTED_SW_REBOOT_CAUSE, EXPECTED_MINOR_CAUSES, ) - def test_chassis_get_reboot_cause_sw_kernel_panic(self, chassis): + def test_chassis_get_reboot_cause_sw_kernel_panic(self, chassis_module): # Given reboot_cause_filepath = _create_temp_file( f"Kernel Panic [Time: Thu Oct 2 11:22:56 PM UTC 2025]" ) - chassis.__init__( - pddf_data={}, - pddf_plugin_data={"REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath}}, - ) + chassis_module.adm1266.get_reboot_cause = Mock(return_value=None) # When - mock_adm1266 = sys.modules["sonic_platform"].adm1266 - mock_adm1266.get_reboot_cause.return_value = None + chassis = chassis_module.Chassis( + pddf_plugin_data={ + "REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath} + }, + ) # Then assert chassis.get_reboot_cause() == ( @@ -265,22 +147,24 @@ def test_chassis_get_reboot_cause_sw_kernel_panic(self, chassis): "", ) - def test_chassis_get_reboot_cause_hw(self, chassis): + def test_chassis_get_reboot_cause_hw(self, chassis_module): EXPECTED_HW_CAUSE = "Power Loss" EXPECTED_HW_MINOR_CAUSE = "System powered off due to loss of input power on both PSUs, System powered off due to software disabling data plane power" # Given reboot_cause_filepath = _create_temp_file("") - chassis.__init__( - pddf_data={}, - pddf_plugin_data={"REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath}}, + chassis_module.adm1266.get_reboot_cause = Mock( + return_value=( + EXPECTED_HW_CAUSE, + EXPECTED_HW_MINOR_CAUSE, + ) ) # When - mock_adm1266 = sys.modules["sonic_platform"].adm1266 - mock_adm1266.get_reboot_cause.return_value = ( - EXPECTED_HW_CAUSE, - EXPECTED_HW_MINOR_CAUSE, + chassis = chassis_module.Chassis( + pddf_plugin_data={ + "REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath} + }, ) # Then @@ -289,17 +173,17 @@ def test_chassis_get_reboot_cause_hw(self, chassis): EXPECTED_HW_MINOR_CAUSE, ) - def test_chassis_get_reboot_cause_unknown(self, chassis): + def test_chassis_get_reboot_cause_unknown(self, chassis_module): # Given reboot_cause_filepath = _create_temp_file("unknown") - chassis.__init__( - pddf_data={}, - pddf_plugin_data={"REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath}}, - ) + chassis_module.adm1266.get_reboot_cause = Mock(return_value=None) # When - mock_adm1266 = sys.modules["sonic_platform"].adm1266 - mock_adm1266.get_reboot_cause.return_value = None + chassis = chassis_module.Chassis( + pddf_plugin_data={ + "REBOOT_CAUSE": {"reboot_cause_file": reboot_cause_filepath} + }, + ) # Then assert chassis.get_reboot_cause() == ("Unknown", "Unknown") diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_fan.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_fan.py index 5dd352f1d44..939edba8653 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_fan.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_fan.py @@ -9,23 +9,15 @@ python -m pytest test/unit/sonic_platform/test_fan.py -v """ -import importlib.util import pytest -import os import sys -from fixtures.fake_swsscommon import FakeDBConnector, FakeTable, setup_fake_swsscommon +from fixtures.fake_swsscommon import FakeTable from unittest.mock import Mock, patch, call -@pytest.fixture(scope="session", autouse=True) -def setup_fan_unit_tests(): - setup_fake_swsscommon() - yield - - class MockPddfFan: - """Mock implemnentation of PddfFan for testing.""" + """Mock implementation of PddfFan for testing.""" # mock methods get_presence = Mock() @@ -52,88 +44,86 @@ def get_name(self): return f"Fantray{self.tray_idx}_{self.fan_index}" -@pytest.fixture(scope="session") +@pytest.fixture def mock_pddf_fan(): - """Fixture providing a mock PddfFan instance for testing.""" - return MockPddfFan - + """Injects and returns a mock PddfFan for testing.""" + pddf_fan = Mock() + pddf_fan.PddfFan = MockPddfFan + with patch.dict(sys.modules, {"sonic_platform_pddf_base.pddf_fan": pddf_fan}): + yield pddf_fan.PddfFan -@pytest.fixture(scope="session") -def fan(mock_pddf_fan): - """ - Fixture providing a Fan instance for testing. - This fixture loads the fan module directly to avoid package import issues. - """ - # Set up the PddfFan mock - pddf_fan_module = Mock() - pddf_fan_module.PddfFan = mock_pddf_fan - sys.modules["sonic_platform_pddf_base.pddf_fan"] = pddf_fan_module - # Load the fan module directly from file path - test_dir = os.path.dirname(os.path.realpath(__file__)) - fan_path = os.path.join(test_dir, "../../../common/sonic_platform/fan.py") +@pytest.fixture +def fan_module(mock_pddf_fan): + """Loads the module before each test. This is to let conftest.py run first.""" + from sonic_platform import fan - spec = importlib.util.spec_from_file_location("fan", fan_path) - fan_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(fan_module) - - return fan_module.Fan(tray_idx=0, fan_idx=0) + yield fan class TestFan: """Test class for Fan functionality.""" - def test_get_presence(self, fan, mock_pddf_fan): + def test_get_presence(self, mock_pddf_fan, fan_module): """Test get_presence.""" + fan = fan_module.Fan(tray_idx=0, fan_idx=0) + mock_pddf_fan.get_presence.return_value = True assert fan.get_presence() is True mock_pddf_fan.get_presence.return_value = False assert fan.get_presence() is False - def test_get_model_for_present_non_psu_fan(self, fan, mock_pddf_fan): + def test_get_model_for_present_non_psu_fan(self, mock_pddf_fan, fan_module): """Test get_model for present non-PSU fan.""" + fan = fan_module.Fan(tray_idx=0, fan_idx=0) + mock_pddf_fan.get_presence.return_value = True assert fan.get_model() == "FAN-80G1-F" - def test_get_model_for_non_present_fan(self, fan, mock_pddf_fan): + def test_get_model_for_non_present_fan(self, mock_pddf_fan, fan_module): """Test get_model for non-present non-PSU fan.""" + fan = fan_module.Fan(tray_idx=0, fan_idx=0) + mock_pddf_fan.get_presence.return_value = False assert fan.get_model() == "N/A" - def test_fan_init_ok_when_db_conn_fails(self, mock_pddf_fan): + def test_fan_init_ok_when_db_conn_fails(self, fan_module): """Test Fan initialization is ok when DB connection fails.""" # Given - with patch.object( - FakeDBConnector, - "__init__", - Mock(side_effect=RuntimeError) - ): + DBConnector = sys.modules["swsscommon"].swsscommon.DBConnector + with patch.object(DBConnector, "__init__", Mock(side_effect=RuntimeError)): # When - test_fan = fan.__wrapped__(mock_pddf_fan) + fan = fan_module.Fan(tray_idx=0, fan_idx=0) # Then - assert test_fan._state_fan_tbl is None + assert fan._state_fan_tbl is None - def test_get_max_speed_default(self, fan): + def test_get_max_speed_default(self, fan_module): """Test get_max_speed when it hasn't been set.""" + fan = fan_module.Fan(tray_idx=0, fan_idx=0) assert fan.get_max_speed() == fan._DEFAULT_MAX_SPEED - def test_set_max_speed(self, fan): + def test_set_max_speed(self, fan_module): """Test set_max_speed writes data to STATE_DB.""" + fan = fan_module.Fan(tray_idx=0, fan_idx=0) + fan.set_max_speed(60.99) assert ( FakeTable._global_db["STATE_DB"]["FAN_INFO"][fan.get_name()]["max_speed"] == "60.99" ) - def test_set_and_get_max_speed(self, fan): + def test_set_and_get_max_speed(self, fan_module): """Test setting and getting max speed.""" + fan = fan_module.Fan(tray_idx=0, fan_idx=0) + fan.set_max_speed(60.99) assert fan.get_max_speed() == 60.99 - def test_set_speed_is_clamped_by_max_speed(self, fan, mock_pddf_fan): + def test_set_speed_is_clamped_by_max_speed(self, mock_pddf_fan, fan_module): """Test set_speed is clamped by the previously set max_speed.""" # Given + fan = fan_module.Fan(tray_idx=0, fan_idx=0) fan.set_max_speed(60) # When @@ -155,35 +145,32 @@ def test_set_speed_is_clamped_by_max_speed(self, fan, mock_pddf_fan): any_order=False, ) - def test_set_and_get_max_speed_when_db_conn_fails(self, mock_pddf_fan): + def test_set_and_get_max_speed_when_db_conn_fails(self, fan_module): """Test set_max_speed and get_max_speed change nothing when DB connection fails.""" # Given - with patch.object( - FakeDBConnector, - "__init__", - Mock(side_effect=RuntimeError) - ): - test_fan = fan.__wrapped__(mock_pddf_fan) + DBConnector = sys.modules["swsscommon"].swsscommon.DBConnector + with patch.object(DBConnector, "__init__", Mock(side_effect=RuntimeError)): + fan = fan_module.Fan(tray_idx=0, fan_idx=0) # When/Then - assert test_fan.set_max_speed(60.99) == False - assert test_fan.get_max_speed() == test_fan._DEFAULT_MAX_SPEED + assert fan.set_max_speed(60.99) == False + assert fan.get_max_speed() == fan._DEFAULT_MAX_SPEED - def test_set_and_get_max_speed_when_db_conn_resumes(self, mock_pddf_fan): + def test_set_and_get_max_speed_when_db_conn_resumes(self, fan_module): """Test set_max_speed and get_max_speed working when DB connection resumes.""" # Given - Inject a failed DB connection - old_init = FakeDBConnector.__init__ - FakeDBConnector.__init__ = Mock(side_effect=RuntimeError) - test_fan = fan.__wrapped__(mock_pddf_fan) - assert test_fan._state_fan_tbl is None + DBConnector = sys.modules["swsscommon"].swsscommon.DBConnector + with patch.object(DBConnector, "__init__", Mock(side_effect=RuntimeError)): + fan = fan_module.Fan(tray_idx=0, fan_idx=0) + assert fan._state_fan_tbl is None # When - Revive the DB connector - FakeDBConnector.__init__ = old_init - # Then - Perform set/get max speed should work - test_fan.set_max_speed(60.99) - assert test_fan._state_fan_tbl is not None + fan.set_max_speed(60.99) + assert fan._state_fan_tbl is not None assert ( - FakeTable._global_db["STATE_DB"]["FAN_INFO"][test_fan.get_name()]["max_speed"] + FakeTable._global_db["STATE_DB"]["FAN_INFO"][fan.get_name()][ + "max_speed" + ] == "60.99" ) - assert test_fan.get_max_speed() == 60.99 + assert fan.get_max_speed() == 60.99 diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_thermal.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_thermal.py index 516ff09f3cc..6bb5f1b4323 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_thermal.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_thermal.py @@ -9,159 +9,26 @@ python -m pytest test/unit/sonic_platform/test_thermal.py -v """ -import importlib.util -import os -import sys import types from unittest.mock import Mock, call, patch +from fixtures.test_helpers_common import mock_data_in_swsscommon import pytest -@pytest.fixture(scope="session", autouse=True) -def setup_external_mocks(): - """Set up mocks for external SONiC dependencies only.""" - - # Mock the thermal_json_object decorator - def mock_thermal_json_object(name): - def decorator(cls): - return cls - return decorator - - # Mock ThermalPolicyActionBase - class MockThermalPolicyActionBase: - def __init__(self): - pass - - # Mock SysLogger - class MockSysLogger: - def __init__(self, *args, **kwargs): - # Methods as mocks so tests can assert calls - self.log_info = Mock() - self.log_error = Mock() - self.log_warning = Mock() - self.log_debug = Mock() - self.log = Mock() - - # Create mock modules for external SONiC dependencies - mock_thermal_action_base = Mock() - mock_thermal_action_base.ThermalPolicyActionBase = MockThermalPolicyActionBase - - mock_thermal_json_object_module = Mock() - mock_thermal_json_object_module.thermal_json_object = mock_thermal_json_object - - mock_syslogger = Mock() - mock_syslogger.SysLogger = MockSysLogger - - # Create mock modules for the local dependencies - mock_thermal_infos = Mock() - mock_thermal_infos.FanDrawerInfo = type('FanDrawerInfo', (), {'INFO_TYPE': 'fan_drawer_info'}) - mock_thermal_infos.ThermalInfo = type('ThermalInfo', (), {'INFO_TYPE': 'thermal_info'}) - - mock_syslog = Mock() - mock_syslog.SYSLOG_IDENTIFIER_THERMAL = "nh_thermal" - mock_syslog.NhLoggerMixin = MockSysLogger - # Build mock for swsscommon package and submodule - mock_swsscommon_pkg = types.ModuleType('swsscommon') - mock_swsscommon_sub = types.ModuleType('swsscommon.swsscommon') - - class MockSonicV2Connector: - CONFIG_DB = 4 - STATE_DB = 6 - RETURN_GET_ALL = {} - def __init__(self, *args, **kwargs): - pass - def connect(self, db): - pass - def get_redis_client(self, db): - return object() - def get_all(self, db, key): - return self.RETURN_GET_ALL - def close(self, db): - pass - - class MockTable: - MOCK_PORT_KEYS = [] - MOCK_PORT_DATA = {} - def __init__(self, db_connector, table_name): - self.table_name = table_name - def getKeys(self): - return list(self.MOCK_PORT_KEYS) - def get(self, intf_name): - data = self.MOCK_PORT_DATA.get(intf_name) - return (True, data) if data is not None else (False, []) - - setattr(mock_swsscommon_sub, 'SonicV2Connector', MockSonicV2Connector) - setattr(mock_swsscommon_sub, 'Table', MockTable) - setattr(mock_swsscommon_sub, 'CFG_PORT_TABLE_NAME', 'PORT') - setattr(mock_swsscommon_pkg, 'swsscommon', mock_swsscommon_sub) - - # Build other external dependency mocks - mock_fpga_lib = types.SimpleNamespace() - def _mock_read_32(addr, reg): - raise PermissionError("not root") - setattr(mock_fpga_lib, 'read_32', _mock_read_32) - - mock_thermal_base_module = types.ModuleType('sonic_platform_base.thermal_base') - class _ThermalBase: - def __init__(self): - pass - setattr(mock_thermal_base_module, 'ThermalBase', _ThermalBase) - - mock_pddf_thermal_module = types.ModuleType('sonic_platform_pddf_base.pddf_thermal') - class _PddfThermal: - def __init__(self, *args, **kwargs): - pass - def get_temperature(self): - return None - setattr(mock_pddf_thermal_module, 'PddfThermal', _PddfThermal) - - - # Mock all dependencies that aren't available in test environment - with patch.dict('sys.modules', { - # External SONiC dependencies for thermal_actions - 'sonic_platform_base.sonic_thermal_control.thermal_action_base': mock_thermal_action_base, - 'sonic_platform_base.sonic_thermal_control.thermal_json_object': mock_thermal_json_object_module, - 'sonic_platform_base.sonic_thermal_control.thermal_info_base': Mock(), - 'sonic_platform_base.fan_base': Mock(), - 'sonic_py_common.syslogger': mock_syslogger, - # External SONiC dependencies for thermal.py - 'swsscommon': mock_swsscommon_pkg, - 'swsscommon.swsscommon': mock_swsscommon_sub, - 'nexthop.fpga_lib': mock_fpga_lib, - 'sonic_platform_base.thermal_base': mock_thermal_base_module, - 'sonic_platform_pddf_base.pddf_thermal': mock_pddf_thermal_module, - # Local dependencies - 'sonic_platform.thermal_infos': mock_thermal_infos, - 'sonic_platform.syslog': mock_syslog, - }): - yield - - -@pytest.fixture(scope="session") +@pytest.fixture def thermal_actions_module(): - """Import the actual thermal_actions module using normal Python imports.""" - test_dir = os.path.dirname(os.path.realpath(__file__)) - thermal_actions_path = os.path.join(test_dir, "../../../common/sonic_platform/thermal_actions.py") + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from sonic_platform import thermal_actions - spec = importlib.util.spec_from_file_location("thermal_actions", thermal_actions_path) - thermal_actions = importlib.util.module_from_spec(spec) - spec.loader.exec_module(thermal_actions) + yield thermal_actions - return thermal_actions - -@pytest.fixture(scope="session") +@pytest.fixture def thermal_module(): - """Import the actual thermal module (thermal.py) using normal Python imports.""" - test_dir = os.path.dirname(os.path.realpath(__file__)) - thermal_path = os.path.join(test_dir, "../../../common/sonic_platform/thermal.py") - - spec = importlib.util.spec_from_file_location("thermal", thermal_path) - thermal = importlib.util.module_from_spec(spec) - spec.loader.exec_module(thermal) - - return thermal + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from sonic_platform import thermal + yield thermal class TestPIDController: @@ -613,11 +480,10 @@ def mock_fans(self): return fans @pytest.fixture - def mock_thermal_info_dict(self, thermal_actions_module, mock_fans): + def thermal_info_dict(self, thermal_actions_module, mock_fans): """Fixture providing mock thermal info dictionary.""" fan_drawer_info = Mock() fan_drawer_info.get_fans = Mock(return_value=mock_fans) - return { thermal_actions_module.FanDrawerInfo.INFO_TYPE: fan_drawer_info } @@ -637,13 +503,13 @@ def test_fan_set_speed_action_load_from_json_invalid(self, fan_set_speed_action) with pytest.raises(KeyError): fan_set_speed_action.load_from_json({}) # Missing speed field - def test_fan_set_speed_action_execute(self, fan_set_speed_action, mock_thermal_info_dict, mock_fans): + def test_fan_set_speed_action_execute(self, fan_set_speed_action, thermal_info_dict, mock_fans): """Test FanSetSpeedAction execution.""" # Configure action fan_set_speed_action.load_from_json({'speed': 75}) # Execute action - fan_set_speed_action.execute(mock_thermal_info_dict) + fan_set_speed_action.execute(thermal_info_dict) # Verify all fans were set to correct speed for fan in mock_fans: @@ -878,22 +744,17 @@ def mock_logger(self): logger.log_warning = Mock() return logger - @pytest.fixture - def thermal_actions_module_for_function(self, thermal_actions_module): - """Fixture providing access to the thermal_actions module for function testing.""" - return thermal_actions_module - - def test_set_all_fan_speeds_no_fans_available(self, thermal_actions_module_for_function, mock_logger): + def test_set_all_fan_speeds_no_fans_available(self, thermal_actions_module, mock_logger): """Test set_all_fan_speeds with empty fan list.""" empty_fans = [] - with pytest.raises(thermal_actions_module_for_function.FanException, match="No fans available to set speed"): - thermal_actions_module_for_function.set_all_fan_speeds(mock_logger, empty_fans, 50.0) + with pytest.raises(thermal_actions_module.FanException, match="No fans available to set speed"): + thermal_actions_module.set_all_fan_speeds(mock_logger, empty_fans, 50.0) # Verify error was logged mock_logger.log_error.assert_called_once_with("No fans available to set speed") - def test_set_all_fan_speeds_fan_set_speed_returns_false(self, thermal_actions_module_for_function, mock_logger): + def test_set_all_fan_speeds_fan_set_speed_returns_false(self, thermal_actions_module, mock_logger): """Test set_all_fan_speeds when fan.set_speed returns False.""" # Create mock fans that return False from set_speed mock_fans = [] @@ -905,7 +766,7 @@ def test_set_all_fan_speeds_fan_set_speed_returns_false(self, thermal_actions_mo speed = 75.0 # Should not raise exception, but should log warnings - thermal_actions_module_for_function.set_all_fan_speeds(mock_logger, mock_fans, speed) + thermal_actions_module.set_all_fan_speeds(mock_logger, mock_fans, speed) # Verify all fans were called for i, fan in enumerate(mock_fans): @@ -918,7 +779,7 @@ def test_set_all_fan_speeds_fan_set_speed_returns_false(self, thermal_actions_mo ] mock_logger.log_warning.assert_has_calls(expected_calls) - def test_set_all_fan_speeds_fan_set_speed_raises_exception(self, thermal_actions_module_for_function, mock_logger): + def test_set_all_fan_speeds_fan_set_speed_raises_exception(self, thermal_actions_module, mock_logger): """Test set_all_fan_speeds when fan.set_speed raises an exception.""" # Create mock fan that raises exception mock_fan = Mock() @@ -930,7 +791,7 @@ def test_set_all_fan_speeds_fan_set_speed_raises_exception(self, thermal_actions # Should re-raise the exception with pytest.raises(RuntimeError, match="Hardware failure"): - thermal_actions_module_for_function.set_all_fan_speeds(mock_logger, mock_fans, speed) + thermal_actions_module.set_all_fan_speeds(mock_logger, mock_fans, speed) # Verify fan was called mock_fan.set_speed.assert_called_once_with(speed) @@ -940,7 +801,7 @@ def test_set_all_fan_speeds_fan_set_speed_raises_exception(self, thermal_actions # Also verify traceback was logged (we can't easily test the exact traceback content) assert any("Traceback:" in str(call) for call in mock_logger.log_error.call_args_list) - def test_set_all_fan_speeds_mixed_success_and_failure(self, thermal_actions_module_for_function, mock_logger): + def test_set_all_fan_speeds_mixed_success_and_failure(self, thermal_actions_module, mock_logger): """Test set_all_fan_speeds with mix of successful and failed fan operations.""" # Create mix of fans: some succeed, some fail, some raise exceptions mock_fans = [] @@ -969,7 +830,7 @@ def test_set_all_fan_speeds_mixed_success_and_failure(self, thermal_actions_modu # Should raise exception from fan3 with pytest.raises(IOError, match="I/O error"): - thermal_actions_module_for_function.set_all_fan_speeds(mock_logger, mock_fans, speed) + thermal_actions_module.set_all_fan_speeds(mock_logger, mock_fans, speed) # Verify all fans up to the failing one were called fan0.set_speed.assert_called_once_with(speed) @@ -983,10 +844,10 @@ def test_set_all_fan_speeds_mixed_success_and_failure(self, thermal_actions_modu # Verify error was logged for fan3 (raised exception) mock_logger.log_error.assert_any_call(f"Exception setting speed {speed:.1f}% for fan 3: I/O error") - def test_set_all_fan_speeds_none_fans_list(self, thermal_actions_module_for_function, mock_logger): + def test_set_all_fan_speeds_none_fans_list(self, thermal_actions_module, mock_logger): """Test set_all_fan_speeds with None as fan list.""" - with pytest.raises(thermal_actions_module_for_function.FanException, match="No fans available to set speed"): - thermal_actions_module_for_function.set_all_fan_speeds(mock_logger, None, 50.0) + with pytest.raises(thermal_actions_module.FanException, match="No fans available to set speed"): + thermal_actions_module.set_all_fan_speeds(mock_logger, None, 50.0) # Verify error was logged mock_logger.log_error.assert_called_once_with("No fans available to set speed") @@ -1161,14 +1022,16 @@ def test_sfp_thermal_get_pid_setpoint_boundary_conditions(self, sfp_thermal): class TestPortIndexMapper: def test_get_interface_name_picks_lowest_and_ignores_invalid(self, thermal_module): """Verify PortIndexMapper builds mapping and picks lowest Ethernet name for same index.""" - sw = sys.modules['swsscommon.swsscommon'] - # Prepare mock PORT table data - sw.Table.MOCK_PORT_KEYS = ['Ethernet4', 'Ethernet0', 'NotAnEthernet'] - sw.Table.MOCK_PORT_DATA = { - 'Ethernet4': [('index', '1')], - 'Ethernet0': [('index', '1')], - 'NotAnEthernet': [('index', '1')], - } + mock_data_in_swsscommon( + "CONFIG_DB", + "PORT", + { + "Ethernet4": {"index": "1"}, + "Ethernet0": {"index": "1"}, + "NotAnEthernet": {"index": "1"}, + }, + ) + # Reset singleton to rebuild mapping thermal_module.PortIndexMapper._instance = None mapper = thermal_module.PortIndexMapper() @@ -1188,9 +1051,6 @@ def pddf_platform(self): def test_default_setpoint_when_thresholds_unavailable(self, thermal_module, pddf_platform): """When thresholds are not yet available but SFP is present, default setpoint is used.""" - sw = sys.modules['swsscommon.swsscommon'] - sw.SonicV2Connector.RETURN_GET_ALL = {} - sfp = Mock() sfp.get_name.return_value = 'sfp1' sfp.get_presence.return_value = True @@ -1203,9 +1063,14 @@ def test_default_setpoint_when_thresholds_unavailable(self, thermal_module, pddf def test_invalid_computed_setpoint_logs_once_and_uses_default(self, thermal_module, pddf_platform): """If computed setpoint < MIN_VALID_SETPOINT, fallback to default and log once.""" - sw = sys.modules['swsscommon.swsscommon'] - # temphighwarning - margin (10) => 25 < 30 -> invalid - sw.SonicV2Connector.RETURN_GET_ALL = {'temphighwarning': '35'} + mock_data_in_swsscommon( + "STATE_DB", + "TRANSCEIVER_DOM_THRESHOLD", + { + # temphighwarning - margin (10) => 25 < 30 -> invalid + "Ethernet4": {"temphighwarning": "35"}, + }, + ) sfp = Mock() sfp.get_name.return_value = 'sfp2' @@ -1228,14 +1093,19 @@ def test_invalid_computed_setpoint_logs_once_and_uses_default(self, thermal_modu def test_thresholds_parsing_and_cache(self, thermal_module, pddf_platform): """State DB threshold values are parsed to float and cached for THRESHOLDS_CACHE_INTERVAL_SEC.""" - sw = sys.modules['swsscommon.swsscommon'] - sw.SonicV2Connector.RETURN_GET_ALL = { - 'temphighwarning': '75.0', - 'templowwarning': '10.5', - 'temphighalarm': '90', - 'templowalarm': '5', - 'irrelevant': 'N/A', - } + mock_data_in_swsscommon( + "STATE_DB", + "TRANSCEIVER_DOM_THRESHOLD", + { + "Ethernet8": { + "temphighwarning": "75.0", + "templowwarning": "10.5", + "temphighalarm": "90", + "templowalarm": "5", + "irrelevant": "N/A", + }, + }, + ) sfp = Mock() sfp.get_name.return_value = 'sfp3' @@ -1252,15 +1122,18 @@ def test_thresholds_parsing_and_cache(self, thermal_module, pddf_platform): assert sfp_th.get_low_critical_threshold() == 5.0 # Change underlying DB data; cache should prevent update immediately - sw.SonicV2Connector.RETURN_GET_ALL = { - 'temphighwarning': '10', - 'templowwarning': '1', - 'temphighalarm': '20', - 'templowalarm': '0', - } + mock_data_in_swsscommon( + "STATE_DB", + "TRANSCEIVER_DOM_THRESHOLD", + { + "Ethernet8": { + "temphighwarning": "10", + "templowwarning": "1", + "temphighalarm": "20", + "templowalarm": "0", + }, + }, + ) # Values should remain cached (unchanged) assert sfp_th.get_high_threshold() == 75.0 assert sfp_th.get_low_threshold() == 10.5 - - - diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_watchdog.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_watchdog.py index 4f481207734..6d48e5e55e2 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_watchdog.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/sonic_platform/test_watchdog.py @@ -1,89 +1,161 @@ +import datetime import pytest -from nexthop import fpga_lib -from unittest.mock import patch, ANY, Mock +import os +import tempfile + +from unittest.mock import patch, ANY, create_autospec -# Should match the watchdog mock in fixtures_unit_test.py _FAKE_EVENT_DRIVEN_POWER_CYCLE_CONTROL_REG_OFFSET = 0x28 _FAKE_WATCHDOG_COUNTER_REG_OFFSET = 0x1E0 -class TestWatchdog: - @pytest.fixture(autouse=True) - def setup(self, watchdog): - self.watchdog = watchdog +@pytest.fixture +def watchdog_module(): + """Loads the module before each test. This is to let conftest.py inject deps first.""" + from sonic_platform import watchdog + + yield watchdog + + +class TestWatchdogHelpers: + + @pytest.fixture(scope="function", autouse=True) + def setup(self, watchdog_module): + self.watchdog_module = watchdog_module + + def test_pause_watchdog_punching(self): + expected_timestamp = 105 + with ( + tempfile.NamedTemporaryFile() as test_pause_file, + patch.object( + self.watchdog_module, + "_WATCHDOG_PAUSE_FILE_PATH", + test_pause_file.name, + ), + patch("time.time", return_value=100), + ): + self.watchdog_module._pause_watchdog_punching(datetime.timedelta(seconds=5)) + + actual_timestamp = int(test_pause_file.read()) + assert actual_timestamp == expected_timestamp + + +@pytest.fixture +def mock_pause_watchdog_punching(watchdog_module): + """Mock for _pause_watchdog_punching.""" + return create_autospec(watchdog_module._pause_watchdog_punching) + + +@pytest.fixture +def mock_unpause_watchdog_punching(watchdog_module): + """Mock for _unpause_watchdog_punching.""" + return create_autospec(watchdog_module._unpause_watchdog_punching) + + +class TestWatchdogAPI: + @pytest.fixture(scope="function", autouse=True) + def setup( + self, + watchdog_module, + mock_pause_watchdog_punching, + mock_unpause_watchdog_punching, + ): + watchdog_module._pause_watchdog_punching = mock_pause_watchdog_punching + watchdog_module._unpause_watchdog_punching = mock_unpause_watchdog_punching + with tempfile.NamedTemporaryFile() as test_pause_file: + watchdog_module._WATCHDOG_PAUSE_FILE_PATH = test_pause_file.name + + self.watchdog = watchdog_module.Watchdog( + fpga_pci_addr="FAKE_FPGA_PCI_ADDR", + event_driven_power_cycle_control_reg_offset=_FAKE_EVENT_DRIVEN_POWER_CYCLE_CONTROL_REG_OFFSET, + watchdog_counter_reg_offset=_FAKE_WATCHDOG_COUNTER_REG_OFFSET, + ) @pytest.fixture def mock_toggle_watchdog_reboot(self): """Mock for _toggle_watchdog_reboot.""" - return Mock() + return create_autospec(self.watchdog._toggle_watchdog_reboot) @pytest.fixture def mock_read_watchdog_counter_enable(self): """Mock for _read_watchdog_counter_enable.""" - return Mock() + return create_autospec(self.watchdog._read_watchdog_counter_enable) @pytest.fixture def mock_toggle_watchdog_counter_enable(self): """Mock for _toggle_watchdog_counter_enable.""" - return Mock() + return create_autospec(self.watchdog._toggle_watchdog_counter_enable) @pytest.fixture def mock_update_watchdog_countdown_value(self): """Mock for _update_watchdog_counter_value.""" - return Mock() + return create_autospec(self.watchdog._update_watchdog_countdown_value) @pytest.fixture def mock_read_watchdog_countdown_value_milliseconds(self): """Mock for _read_watchdog_countdown_value_milliseconds.""" - return Mock() + return create_autospec( + self.watchdog._read_watchdog_countdown_value_milliseconds + ) @pytest.fixture def mock_read_watchdog_counter_register(self): """Mock for _read_watchdog_counter_register.""" - return Mock() + return create_autospec(self.watchdog._read_watchdog_counter_register) - @patch.object(fpga_lib, "read_32", autospec=True) - def test_read_watchdog_counter_register(self, mock_read_32): - self.watchdog._read_watchdog_counter_register() + @pytest.fixture + def mock_do_real_arm(self): + """Mock for _do_real_arm.""" + return create_autospec(self.watchdog._do_real_arm) - mock_read_32.assert_called_once_with( - self.watchdog.fpga_pci_addr, _FAKE_WATCHDOG_COUNTER_REG_OFFSET - ) + def test_read_watchdog_counter_register(self, watchdog_module): + # Set up + with patch.object(watchdog_module.fpga_lib, "read_32", autospec=True) as mock_read_32: + # Act + self.watchdog._read_watchdog_counter_register() + # Assert + mock_read_32.assert_called_once_with( + self.watchdog.fpga_pci_addr, _FAKE_WATCHDOG_COUNTER_REG_OFFSET + ) - def test_read_watchdog_counter_enable(self, mock_read_watchdog_counter_register): + def test_read_watchdog_counter_enable(self, watchdog_module, mock_read_watchdog_counter_register): self.watchdog._read_watchdog_counter_register = ( mock_read_watchdog_counter_register ) - with patch.object(fpga_lib, "get_field", autospec=True) as mock_get_field: + with patch.object(watchdog_module.fpga_lib, "get_field", autospec=True) as mock_get_field: mock_get_field.return_value = 1 assert self.watchdog._read_watchdog_counter_enable() - @patch.object(fpga_lib, "read_32", autospec=True) - @patch.object(fpga_lib, "write_32", autospec=True) - @patch.object(fpga_lib, "overwrite_field", autospec=True) - def test_update_watchdog_countdown_value( - self, mock_overwrite_field, mock_write_32, mock_read_32 - ): - # Act - self.watchdog._update_watchdog_countdown_value(10) - # Assert - mock_overwrite_field.assert_called_once_with( - mock_read_32.return_value, (0, 23), 10 - ) - mock_write_32.assert_called_once_with( - self.watchdog.fpga_pci_addr, - _FAKE_WATCHDOG_COUNTER_REG_OFFSET, - mock_overwrite_field.return_value, - ) + def test_update_watchdog_countdown_value(self, watchdog_module): + # Set up + with ( + patch.object(watchdog_module.fpga_lib, "read_32", autospec=True) as mock_read_32, + patch.object(watchdog_module.fpga_lib, "write_32", autospec=True) as mock_write_32, + patch.object( + watchdog_module.fpga_lib, "overwrite_field", autospec=True + ) as mock_overwrite_field, + ): + # Act + self.watchdog._update_watchdog_countdown_value(10) + + # Assert + mock_overwrite_field.assert_called_once_with( + mock_read_32.return_value, (0, 23), 10 + ) + mock_write_32.assert_called_once_with( + self.watchdog.fpga_pci_addr, + _FAKE_WATCHDOG_COUNTER_REG_OFFSET, + mock_overwrite_field.return_value, + ) @pytest.mark.parametrize("is_enable,expected_field_val", [(True, 1), (False, 0)]) - def test_toggle_watchdog_counter_enable(self, is_enable, expected_field_val): + def test_toggle_watchdog_counter_enable(self, watchdog_module, is_enable, expected_field_val): with ( - patch.object(fpga_lib, "read_32", autospec=True), - patch.object(fpga_lib, "write_32", autospec=True) as mock_write_32, + patch.object(watchdog_module.fpga_lib, "read_32", autospec=True), + patch.object(watchdog_module.fpga_lib, "write_32", autospec=True) as mock_write_32, patch.object( - fpga_lib, "overwrite_field", autospec=True + watchdog_module.fpga_lib, "overwrite_field", autospec=True ) as mock_overwrite_field, ): self.watchdog._toggle_watchdog_counter_enable(is_enable) @@ -97,12 +169,12 @@ def test_toggle_watchdog_counter_enable(self, is_enable, expected_field_val): ) @pytest.mark.parametrize("is_enable,expected_field_val", [(True, 1), (False, 0)]) - def test_toggle_watchdog_reboot(self, is_enable, expected_field_val): + def test_toggle_watchdog_reboot(self, watchdog_module, is_enable, expected_field_val): with ( - patch.object(fpga_lib, "read_32", autospec=True), - patch.object(fpga_lib, "write_32", autospec=True) as mock_write_32, + patch.object(watchdog_module.fpga_lib, "read_32", autospec=True), + patch.object(watchdog_module.fpga_lib, "write_32", autospec=True) as mock_write_32, patch.object( - fpga_lib, "overwrite_field", autospec=True + watchdog_module.fpga_lib, "overwrite_field", autospec=True ) as mock_overwrite_field, ): self.watchdog._toggle_watchdog_reboot(is_enable) @@ -149,7 +221,7 @@ def test_arm_should_update_counter( milliseconds=timeout_seconds * 1_000 ) - def test_arm_should_enable_counter_and_reboot( + def test_arm_should_enable_counter_reboot( self, mock_update_watchdog_countdown_value, mock_toggle_watchdog_reboot, @@ -169,11 +241,73 @@ def test_arm_should_enable_counter_and_reboot( self.watchdog.arm(timeout) # Assert - mock_toggle_watchdog_reboot.assert_called_once() - mock_toggle_watchdog_counter_enable.assert_called_once() + mock_toggle_watchdog_reboot.assert_called_once_with(True) + mock_toggle_watchdog_counter_enable.assert_called_once_with(True) + + def test_arm_should_pause_punching( + self, + mock_update_watchdog_countdown_value, + mock_toggle_watchdog_reboot, + mock_toggle_watchdog_counter_enable, + mock_pause_watchdog_punching, + ): + # Set up + timeout = 1 + self.watchdog._update_watchdog_countdown_value = ( + mock_update_watchdog_countdown_value + ) + self.watchdog._toggle_watchdog_reboot = mock_toggle_watchdog_reboot + self.watchdog._toggle_watchdog_counter_enable = ( + mock_toggle_watchdog_counter_enable + ) + + # Act + self.watchdog.arm(timeout) + + # Assert + mock_pause_watchdog_punching.assert_called_once_with( + datetime.timedelta(seconds=1) + ) + + def test_arm_should_unpause_punching_on_error( + self, + mock_do_real_arm, + mock_unpause_watchdog_punching, + ): + # Set up + mock_do_real_arm.return_value = -1 + self.watchdog._do_real_arm = mock_do_real_arm + + # Act + self.watchdog.arm(1) + + # Assert + mock_unpause_watchdog_punching.assert_called_once() + + def test_disarm_stops_counter( + self, + mock_toggle_watchdog_reboot, + mock_toggle_watchdog_counter_enable, + ): + # Set up + self.watchdog._toggle_watchdog_reboot = mock_toggle_watchdog_reboot + self.watchdog._toggle_watchdog_counter_enable = ( + mock_toggle_watchdog_counter_enable + ) + + # Act + actual_return_value = self.watchdog.disarm() + + # Assert + assert actual_return_value + mock_toggle_watchdog_reboot.assert_called_once_with(False) + mock_toggle_watchdog_counter_enable.assert_called_once_with(False) - def test_disarm( - self, mock_toggle_watchdog_reboot, mock_toggle_watchdog_counter_enable + def test_disarm_unpause_punching( + self, + mock_toggle_watchdog_reboot, + mock_toggle_watchdog_counter_enable, + mock_unpause_watchdog_punching, ): # Set up self.watchdog._toggle_watchdog_reboot = mock_toggle_watchdog_reboot @@ -186,8 +320,27 @@ def test_disarm( # Assert assert actual_return_value - mock_toggle_watchdog_reboot.assert_called_once() - mock_toggle_watchdog_counter_enable.assert_called_once() + mock_unpause_watchdog_punching.assert_called_once() + + def test_disarm_fails_do_not_resume_punching( + self, + mock_toggle_watchdog_reboot, + mock_toggle_watchdog_counter_enable, + mock_unpause_watchdog_punching, + ): + # Set up + mock_toggle_watchdog_reboot.side_effect = Exception() + self.watchdog._toggle_watchdog_reboot = mock_toggle_watchdog_reboot + self.watchdog._toggle_watchdog_counter_enable = ( + mock_toggle_watchdog_counter_enable + ) + + # Act + actual_return_value = self.watchdog.disarm() + + # Assert + assert not actual_return_value + mock_unpause_watchdog_punching.assert_not_called() def test_get_remaining_time_when_not_armed(self, mock_read_watchdog_counter_enable): # Set up diff --git a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_nh_reboot_cause.py b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/utils/test_nh_reboot_cause.py similarity index 64% rename from platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_nh_reboot_cause.py rename to platform/broadcom/sonic-platform-modules-nexthop/test/unit/utils/test_nh_reboot_cause.py index 40dca34ad50..35c62ae2894 100644 --- a/platform/broadcom/sonic-platform-modules-nexthop/test/unit/nexthop/test_nh_reboot_cause.py +++ b/platform/broadcom/sonic-platform-modules-nexthop/test/unit/utils/test_nh_reboot_cause.py @@ -9,59 +9,50 @@ """ import base64 -import importlib.util +import importlib import json import os +import pytest import sys import tempfile -from unittest.mock import Mock + +from unittest.mock import Mock, patch # Prevent Python from writing .pyc files during test imports # This avoids __pycache__ directories in common/utils/ that interfere with builds sys.dont_write_bytecode = True -def setup_test_environment(): - """Set up mocks and load modules using the fixture pattern.""" - - # Mock sonic_platform_base.chassis_base that adm1266.py imports - chassis_base_mock = Mock() - chassis_base_mock.ChassisBase = Mock() - chassis_base_mock.ChassisBase.REBOOT_CAUSE_HARDWARE_OTHER = "Unknown" - chassis_base_mock.ChassisBase.REBOOT_CAUSE_POWER_LOSS = "Power Loss" - chassis_base_mock.ChassisBase.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU = "Thermal Overload" - chassis_base_mock.ChassisBase.REBOOT_CAUSE_WATCHDOG = "Watchdog" - sys.modules["sonic_platform_base"] = Mock() - sys.modules["sonic_platform_base.chassis_base"] = chassis_base_mock - - # Get the test directory (we're in test/unit/sonic_platform/) - test_dir = os.path.dirname(os.path.realpath(__file__)) - - # Load dpm module directly from file path - dpm_path = os.path.join(test_dir, "../../../common/sonic_platform/dpm.py") - spec = importlib.util.spec_from_file_location("sonic_platform.dpm", dpm_path) - dpm_module = importlib.util.module_from_spec(spec) - sys.modules["sonic_platform.dpm"] = dpm_module - spec.loader.exec_module(dpm_module) - - # Load adm1266 module directly from file path - adm1266_path = os.path.join(test_dir, "../../../common/sonic_platform/adm1266.py") - spec = importlib.util.spec_from_file_location("sonic_platform.adm1266", adm1266_path) - adm1266_module = importlib.util.module_from_spec(spec) - sys.modules["sonic_platform.adm1266"] = adm1266_module - spec.loader.exec_module(adm1266_module) - - # Now load the nh_reboot_cause utility (file has no .py extension) - nh_reboot_cause_path = os.path.join(test_dir, "../../../common/utils/nh_reboot_cause") +class MockChassisBase: + REBOOT_CAUSE_HARDWARE_OTHER = "Unknown" + REBOOT_CAUSE_POWER_LOSS = "Power Loss" + REBOOT_CAUSE_THERMAL_OVERLOAD_CPU = "Thermal Overload" + REBOOT_CAUSE_WATCHDOG = "Watchdog" + + def __init__(self, *args, **kwargs): + pass + +@pytest.fixture +def mock_chassis_base(): + """Injects and returns a mock ChassisBase for testing.""" + chassis_base = Mock() + chassis_base.ChassisBase = MockChassisBase + with patch.dict(sys.modules, {"sonic_platform_base.chassis_base": chassis_base}): + yield chassis_base.ChassisBase + + +@pytest.fixture +def nh_reboot_cause_module(mock_chassis_base): + """Loads the module before each test. This is to let conftest.py inject deps first.""" # For files without .py extension, we need to use SourceFileLoader explicitly - from importlib.machinery import SourceFileLoader - loader = SourceFileLoader("nh_reboot_cause", nh_reboot_cause_path) + TEST_DIR = os.path.dirname(os.path.realpath(__file__)) + nh_reboot_cause_path = os.path.join(TEST_DIR, "../../../common/utils/nh_reboot_cause") + loader = importlib.machinery.SourceFileLoader("nh_reboot_cause", nh_reboot_cause_path) spec = importlib.util.spec_from_loader(loader.name, loader) nh_reboot_cause_module = importlib.util.module_from_spec(spec) - sys.modules["nh_reboot_cause"] = nh_reboot_cause_module spec.loader.exec_module(nh_reboot_cause_module) - return nh_reboot_cause_module, dpm_module + yield nh_reboot_cause_module def create_test_data(): @@ -101,13 +92,11 @@ def create_test_data(): } -def test_show_current(capsys): +def test_show_current(nh_reboot_cause_module, capsys): """Test showing current reboot-cause.""" - nh_reboot_cause_module, dpm_module = setup_test_environment() - with tempfile.TemporaryDirectory() as tmpdir: - original_history_dir = dpm_module.SystemDPMLogHistory.HISTORY_DIR - dpm_module.SystemDPMLogHistory.HISTORY_DIR = tmpdir + original_history_dir = nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR + nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR = tmpdir try: # Create test data file @@ -132,16 +121,14 @@ def test_show_current(capsys): assert "Unsupported DPM type" not in captured.out, "Should not show DPM type error" finally: - dpm_module.SystemDPMLogHistory.HISTORY_DIR = original_history_dir + nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR = original_history_dir -def test_show_history(capsys): +def test_show_history(nh_reboot_cause_module, capsys): """Test showing reboot-cause history.""" - nh_reboot_cause_module, dpm_module = setup_test_environment() - with tempfile.TemporaryDirectory() as tmpdir: - original_history_dir = dpm_module.SystemDPMLogHistory.HISTORY_DIR - dpm_module.SystemDPMLogHistory.HISTORY_DIR = tmpdir + original_history_dir = nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR + nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR = tmpdir try: # Create multiple test data files @@ -167,13 +154,11 @@ def test_show_history(capsys): assert "test-dpm-1" in captured.out, "Expected DPM name in history output" finally: - dpm_module.SystemDPMLogHistory.HISTORY_DIR = original_history_dir + nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR = original_history_dir -def test_cli_help(): +def test_cli_help(nh_reboot_cause_module): """Test that the CLI command is properly configured with click.""" - nh_reboot_cause_module, _ = setup_test_environment() - cli = nh_reboot_cause_module.reboot_cause # Verify the command has help text @@ -185,13 +170,11 @@ def test_cli_help(): assert has_history_option, "CLI should have --history option" -def test_unsupported_dpm_type(capsys): +def test_unsupported_dpm_type(nh_reboot_cause_module, capsys): """Test that unsupported DPM types are rejected.""" - nh_reboot_cause_module, dpm_module = setup_test_environment() - with tempfile.TemporaryDirectory() as tmpdir: - original_history_dir = dpm_module.SystemDPMLogHistory.HISTORY_DIR - dpm_module.SystemDPMLogHistory.HISTORY_DIR = tmpdir + original_history_dir = nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR + nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR = tmpdir try: # Create test data with wrong DPM type @@ -214,5 +197,5 @@ def test_unsupported_dpm_type(capsys): assert "unknown_dpm" in captured.out, "Should mention the unsupported DPM type" finally: - dpm_module.SystemDPMLogHistory.HISTORY_DIR = original_history_dir + nh_reboot_cause_module.SystemDPMLogHistory.HISTORY_DIR = original_history_dir diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index a5ebf727676..bf8399ad8f2 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=0.master.1.2 +ref=202511.1.0.3 diff --git a/platform/clounix/docker-syncd-clounix/supervisord.conf b/platform/clounix/docker-syncd-clounix/supervisord.conf index 3437400338b..00fcc86ee4d 100644 --- a/platform/clounix/docker-syncd-clounix/supervisord.conf +++ b/platform/clounix/docker-syncd-clounix/supervisord.conf @@ -13,10 +13,11 @@ events=PROCESS_STATE buffer_size=25 [eventlistener:supervisor-proc-exit-listener] -command=python3 /usr/bin/supervisor-proc-exit-listener --container-name syncd +command=/usr/bin/supervisor-proc-exit-listener-rs --container-name syncd events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING autostart=true autorestart=unexpected +buffer_size=1024 [program:rsyslogd] command=/usr/sbin/rsyslogd -n -iNONE diff --git a/platform/clounix/rules.mk b/platform/clounix/rules.mk index 9d0ad4ebc6d..0f780716354 100644 --- a/platform/clounix/rules.mk +++ b/platform/clounix/rules.mk @@ -8,7 +8,7 @@ include $(PLATFORM_PATH)/docker-ptf-clounix.mk include $(PLATFORM_PATH)/docker-saiserver-clounix.mk DSSERVE = dsserve -$(DSSERVE)_URL = "https://packages.trafficmanager.net/public/20190307/dsserve" +$(DSSERVE)_URL = "$(BUILD_PUBLIC_URL)/20190307/dsserve" SONIC_ONLINE_FILES += $(DSSERVE) SONIC_ALL += $(SONIC_ONE_IMAGE) $(DOCKER_FPM) diff --git a/platform/components/docker-gbsyncd-agera2.mk b/platform/components/docker-gbsyncd-agera2.mk index f2e25b7b92f..8f7a5c97769 100644 --- a/platform/components/docker-gbsyncd-agera2.mk +++ b/platform/components/docker-gbsyncd-agera2.mk @@ -1,8 +1,8 @@ # Agera2 PAI Library Package - URL-based download similar to broncos -LIBSAI_AGERA2_VERSION = 3.14.0-1 +LIBSAI_AGERA2_VERSION = 3.14.0-3 LIBSAI_AGERA2_BRANCH_NAME = REL_3.14 -LIBSAI_AGERA2_URL_PREFIX = "https://packages.trafficmanager.net/public/sai/bcmpai/$(LIBSAI_AGERA2_BRANCH_NAME)/$(LIBSAI_AGERA2_VERSION)" +LIBSAI_AGERA2_URL_PREFIX = "$(BUILD_PUBLIC_URL)/sai/bcmpai/$(LIBSAI_AGERA2_BRANCH_NAME)/$(LIBSAI_AGERA2_VERSION)" # Runtime package` LIBSAI_AGERA2 = libsaiagera2_$(LIBSAI_AGERA2_VERSION)_amd64.deb diff --git a/platform/components/docker-gbsyncd-agera2/supervisord.conf b/platform/components/docker-gbsyncd-agera2/supervisord.conf index b4e441ab586..f84b90e8a1d 100644 --- a/platform/components/docker-gbsyncd-agera2/supervisord.conf +++ b/platform/components/docker-gbsyncd-agera2/supervisord.conf @@ -12,7 +12,7 @@ exitcodes=0,3 events=PROCESS_STATE [eventlistener:supervisor-proc-exit-listener] -command=/usr/local/bin/supervisor-proc-exit-listener --container-name gbsyncd +command=/usr/bin/supervisor-proc-exit-listener-rs --container-name gbsyncd events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING autostart=true autorestart=unexpected diff --git a/platform/components/docker-gbsyncd-broncos.mk b/platform/components/docker-gbsyncd-broncos.mk index 5ce094ae3c3..b4d333c50c2 100644 --- a/platform/components/docker-gbsyncd-broncos.mk +++ b/platform/components/docker-gbsyncd-broncos.mk @@ -1,6 +1,6 @@ LIBSAI_BRONCOS_VERSION = 3.12 LIBSAI_BRONCOS_BRANCH_NAME = REL_3.12 -LIBSAI_BRONCOS_URL_PREFIX = "https://packages.trafficmanager.net/public/sai/bcmpai/$(LIBSAI_BRONCOS_BRANCH_NAME)/$(LIBSAI_BRONCOS_VERSION)" +LIBSAI_BRONCOS_URL_PREFIX = "$(BUILD_PUBLIC_URL)/sai/bcmpai/$(LIBSAI_BRONCOS_BRANCH_NAME)/$(LIBSAI_BRONCOS_VERSION)" LIBSAI_BRONCOS = libsaibroncos_$(LIBSAI_BRONCOS_VERSION)_amd64.deb $(LIBSAI_BRONCOS)_URL = "$(LIBSAI_BRONCOS_URL_PREFIX)/$(LIBSAI_BRONCOS)" diff --git a/platform/components/docker-gbsyncd-credo.mk b/platform/components/docker-gbsyncd-credo.mk index 84011a00073..1d4446968cc 100644 --- a/platform/components/docker-gbsyncd-credo.mk +++ b/platform/components/docker-gbsyncd-credo.mk @@ -1,13 +1,13 @@ DOCKER_GBSYNCD_PLATFORM_CODE = credo LIBSAI_CREDO = libsaicredo_1.2.4_amd64.deb -$(LIBSAI_CREDO)_URL = "https://packages.trafficmanager.net/public/credosai/$(LIBSAI_CREDO)" +$(LIBSAI_CREDO)_URL = "$(BUILD_PUBLIC_URL)/credosai/$(LIBSAI_CREDO)" LIBSAI_CREDO_OWL = libsaicredo-owl_1.2.4_amd64.deb -$(LIBSAI_CREDO_OWL)_URL = "https://packages.trafficmanager.net/public/credosai/$(LIBSAI_CREDO_OWL)" +$(LIBSAI_CREDO_OWL)_URL = "$(BUILD_PUBLIC_URL)/credosai/$(LIBSAI_CREDO_OWL)" LIBSAI_CREDO_BLACKHAWK = libsaicredo-blackhawk_1.2.4_amd64.deb -$(LIBSAI_CREDO_BLACKHAWK)_URL = "https://packages.trafficmanager.net/public/credosai/$(LIBSAI_CREDO_BLACKHAWK)" +$(LIBSAI_CREDO_BLACKHAWK)_URL = "$(BUILD_PUBLIC_URL)/credosai/$(LIBSAI_CREDO_BLACKHAWK)" LIBSAI_CREDO_CRT88322 = libsaicredo-crt88322_1.2.4_amd64.deb -$(LIBSAI_CREDO_CRT88322)_URL = "https://packages.trafficmanager.net/public/credosai/$(LIBSAI_CREDO_CRT88322)" +$(LIBSAI_CREDO_CRT88322)_URL = "$(BUILD_PUBLIC_URL)/credosai/$(LIBSAI_CREDO_CRT88322)" ifneq ($($(LIBSAI_CREDO)_URL),) include $(PLATFORM_PATH)/../template/docker-gbsyncd-bookworm.mk diff --git a/platform/marvell-teralynx/docker-saiserver-mrvl-teralynx.mk b/platform/marvell-teralynx/docker-saiserver-mrvl-teralynx.mk index 3c01455d4c6..ba46feeff9c 100644 --- a/platform/marvell-teralynx/docker-saiserver-mrvl-teralynx.mk +++ b/platform/marvell-teralynx/docker-saiserver-mrvl-teralynx.mk @@ -5,6 +5,7 @@ $(DOCKER_SAISERVER_MRVL_TERALYNX)_PATH = $(PLATFORM_PATH)/docker-saiserver-mrvl- $(DOCKER_SAISERVER_MRVL_TERALYNX)_DEPENDS += $(SAISERVER) $(DOCKER_SAISERVER_MRVL_TERALYNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BOOKWORM) SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MRVL_TERALYNX) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_SAISERVER_MRVL_TERALYNX) $(DOCKER_SAISERVER_MRVL_TERALYNX)_CONTAINER_NAME = saiserver$(SAITHRIFT_VER) $(DOCKER_SAISERVER_MRVL_TERALYNX)_RUN_OPT += --privileged -t diff --git a/platform/mellanox/asic_table.j2 b/platform/mellanox/asic_table.j2 index 6e5a98305ee..0c9b85a0de0 100644 --- a/platform/mellanox/asic_table.j2 +++ b/platform/mellanox/asic_table.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -55,6 +55,7 @@ 'x86_64-nvidia_sn5640-r0':'MELLANOX-SPECTRUM-5', 'x86_64-nvidia_sn5640_simx-r0':'MELLANOX-SPECTRUM-5', 'x86_64-nvidia_sn6600_simx-r0':'MELLANOX-SPECTRUM-6', + 'x86_64-nvidia_sn6600_ld-r0':'MELLANOX-SPECTRUM-6', 'vs-platform':'vs' } %} diff --git a/platform/mellanox/component-versions/Makefile b/platform/mellanox/component-versions/Makefile index 095aad7902a..c2939cff3d4 100644 --- a/platform/mellanox/component-versions/Makefile +++ b/platform/mellanox/component-versions/Makefile @@ -1,5 +1,6 @@ # -# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,5 +23,5 @@ SHELL = /bin/bash MAIN_TARGET = component-versions $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : - ./create_component_versions.sh $(MLNX_SDK_VERSION) $(MLNX_SPC_FW_VERSION) $(MLNX_SAI_VERSION) $(MLNX_HW_MANAGEMENT_VERSION) $(MFT_VERSION) $(MFT_REVISION) $(KVERSION_SHORT) $(SIMX_VERSION) + ./create_component_versions.sh $(MLNX_SDK_VERSION) $(MLNX_SPC_FW_VERSION) $(MLNX_SAI_VERSION) $(MLNX_HW_MANAGEMENT_VERSION) $(MFT_VERSION) $(MFT_REVISION) $(KVERSION_SHORT) $(SIMX_VERSION) $(MLNX_RSHIM_DRIVER_VERSION) mv temp_versions_file $(DEST)/$(MAIN_TARGET) diff --git a/platform/mellanox/component-versions/create_component_versions.sh b/platform/mellanox/component-versions/create_component_versions.sh index 4502f68dc1b..12dd3461feb 100755 --- a/platform/mellanox/component-versions/create_component_versions.sh +++ b/platform/mellanox/component-versions/create_component_versions.sh @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -38,3 +38,4 @@ echo "HW_MANAGEMENT $4" >> temp_versions_file echo "MFT $5-$6" >> temp_versions_file echo "KERNEL $7" >> temp_versions_file echo "SIMX $8" >> temp_versions_file +echo "RSHIM $9" >> temp_versions_file diff --git a/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 b/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 index 7e2db7a8f57..f4ea421fda9 100644 --- a/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 @@ -1,7 +1,7 @@ ## ## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -## Copyright (c) 2016-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -## Apache-2.0 +## Copyright (c) 2016-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +## SPDX-License-Identifier: 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. diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index d9bc9da19cc..65533008f5e 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -1,7 +1,7 @@ ## ## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -## Copyright (c) 2016-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -## Apache-2.0 +## Copyright (c) 2016-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +## SPDX-License-Identifier: 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. diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index 85083ae3d6e..c62d5f83f3f 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -1,6 +1,6 @@ ## ## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -## Copyright (c) 2016-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +## Copyright (c) 2016-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. ## SPDX-License-Identifier: Apache-2.0 ## ## Licensed under the Apache License, Version 2.0 (the "License"); @@ -38,7 +38,8 @@ RUN apt-get update && \ python3-dev \ python3-jsonschema \ python-is-python3 \ - pciutils + pciutils \ + linuxptp RUN pip3 install --upgrade pip RUN apt-get purge -y python-pip @@ -67,6 +68,7 @@ RUN apt-get purge -y \ COPY ["supervisord.conf.j2", "/usr/share/sonic/templates/"] COPY ["critical_processes", "/etc/supervisor/"] COPY ["platform_syncd_dump.sh", "/usr/bin/"] +COPY ["phcsync.sh", "/usr/bin/"] COPY ["files/rdb-cli", "/usr/bin/"] RUN chmod +x /usr/bin/rdb-cli diff --git a/platform/mellanox/docker-syncd-mlnx/phcsync.sh b/platform/mellanox/docker-syncd-mlnx/phcsync.sh new file mode 100755 index 00000000000..587dbbd55bf --- /dev/null +++ b/platform/mellanox/docker-syncd-mlnx/phcsync.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +# +# Script to synchronize ASIC PTP clocks with system realtime clock. +# This script runs continuously, syncing clocks every 60 seconds. +# This script shall not be running if PTP is enabled in the system. +# + +PHC_CTL="/usr/sbin/phc_ctl" +SLEEP_INTERVAL=60 + +# Check if phc_ctl is available +if [ ! -x "$PHC_CTL" ]; then + echo "Error: phc_ctl not found. Exiting." + exit 1 +fi + +while :; do + # Refresh the list of PTP devices on each iteration + PTP_DEVICES=$(ls /dev/ptp[0-9]* 2>/dev/null) + + if [ -z "$PTP_DEVICES" ]; then + sleep $SLEEP_INTERVAL + continue + fi + + for dev in $PTP_DEVICES; do + # Extract device number from /dev/ptpXX + dev_num=${dev##*/ptp} + + clock_name_file="/sys/class/ptp/ptp${dev_num}/clock_name" + if [[ ! -f "$clock_name_file" ]]; then + echo "Error: clock_name file not found for $dev ($clock_name_file), skipping" >&2 + continue + fi + + clock_name=$(cat "$clock_name_file" 2>/dev/null) + CLOCK_NAME_EXIT_CODE=$? + if [[ $CLOCK_NAME_EXIT_CODE -ne 0 ]] || [[ -z "$clock_name" ]]; then + echo "Error: Failed to read clock_name from $clock_name_file for $dev, skipping" >&2 + continue + fi + + if [[ "$clock_name" != "mlx5_ptp" ]]; then + # set CLOCK_REALTIME + "$PHC_CTL" "$dev" set 2>/dev/null + PHC_CTL_EXIT_CODE=$? + if [[ $PHC_CTL_EXIT_CODE -ne 0 ]]; then + echo "Error: Failed to sync clock for $dev (phc_ctl exit code: $PHC_CTL_EXIT_CODE)" >&2 + fi + fi + done + sleep $SLEEP_INTERVAL +done diff --git a/platform/mellanox/docker-syncd-mlnx/supervisord.conf.j2 b/platform/mellanox/docker-syncd-mlnx/supervisord.conf.j2 index c4148d131c2..c67edd6c58a 100644 --- a/platform/mellanox/docker-syncd-mlnx/supervisord.conf.j2 +++ b/platform/mellanox/docker-syncd-mlnx/supervisord.conf.j2 @@ -45,3 +45,13 @@ dependent_startup_wait_for=rsyslogd:running {% if ENABLE_ASAN == "y" %} environment=ASAN_OPTIONS="log_path=/var/log/asan/syncd-asan.log{{ asan_extra_options }}" {% endif %} + +[program:phcsync] +command=/usr/bin/phcsync.sh +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running diff --git a/platform/mellanox/files/mlnx-fw-manager.service b/platform/mellanox/files/mlnx-fw-manager.service new file mode 100644 index 00000000000..a97d240edc3 --- /dev/null +++ b/platform/mellanox/files/mlnx-fw-manager.service @@ -0,0 +1,32 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +[Unit] +Description=Mellanox Firmware Manager Service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStartPre=/usr/bin/mst start --with_i2cdev +ExecStart=/usr/local/bin/mlnx-fw-manager --clear-semaphore --verbose +ExecStop=/usr/bin/mst stop +TimeoutSec=300 +User=root + +[Install] +WantedBy=multi-user.target diff --git a/platform/mellanox/files/sx-kernel.service b/platform/mellanox/files/sx-kernel.service new file mode 100644 index 00000000000..e2fb3519700 --- /dev/null +++ b/platform/mellanox/files/sx-kernel.service @@ -0,0 +1,32 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +[Unit] +Description=SX Kernel Driver Service +After=mlnx-fw-manager.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/sx-kernel.sh start +ExecStop=/usr/bin/sx-kernel.sh stop +TimeoutSec=300 +User=root + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/platform/mellanox/files/sx-kernel.sh b/platform/mellanox/files/sx-kernel.sh new file mode 100755 index 00000000000..34ebc4c5aaa --- /dev/null +++ b/platform/mellanox/files/sx-kernel.sh @@ -0,0 +1,113 @@ +#!/bin/bash +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +SXDKERNEL_INIT="/etc/init.d/sxdkernel" + +[ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment + +# If PLATFORM is not set in sonic-environment, try to get it from /host/machine.conf +if [ -z "$PLATFORM" ]; then + if [ -f /host/machine.conf ]; then + PLATFORM=$(grep "^onie_platform=" /host/machine.conf | cut -d'=' -f2) + else + echo "Error: Failed to get platform" + exit 1 + fi +fi + +# Parse the device specific asic conf file, if it exists +ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf +[ -f $ASIC_CONF ] && . $ASIC_CONF + +NUM_ASIC=${NUM_ASIC:-1} +if [ "$NUM_ASIC" -gt 1 ]; then + PREDEFINED_DEV_PCI_BUS="" + for i in $(seq 0 $((NUM_ASIC-1))); do + dev_id_var="DEV_ID_ASIC_$i" + dev_id="${!dev_id_var}" + if [ -n "$dev_id" ]; then + if [ -n "$PREDEFINED_DEV_PCI_BUS" ]; then + PREDEFINED_DEV_PCI_BUS="${PREDEFINED_DEV_PCI_BUS},$((i+1))@${dev_id}" + else + PREDEFINED_DEV_PCI_BUS="$((i+1))@${dev_id}" + fi + fi + done + export PREDEFINED_DEV_PCI_BUS +fi + + +# Check if the sxdkernel init script exists +if [ ! -x "$SXDKERNEL_INIT" ]; then + echo "Error: sxdkernel init script not found at $SXDKERNEL_INIT" + exit 1 +fi + +function getBootType() +{ + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=express*) + TYPE='express' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *) + TYPE='cold' + esac + echo "${TYPE}" +} + +start() { + BOOT_TYPE=`getBootType` + if [[ x"$BOOT_TYPE" == x"warm" || x"$BOOT_TYPE" == x"fastfast" || x"$BOOT_TYPE" == x"fast" ]]; then + export FAST_BOOT=1 + fi + + echo "Starting SX kernel driver PREDEFINED_DEV_PCI_BUS=${PREDEFINED_DEV_PCI_BUS} BOOT_TYPE: $BOOT_TYPE ..." + $SXDKERNEL_INIT start +} + +stop() { + echo "Stopping SX kernel driver..." + $SXDKERNEL_INIT stop +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + *) + echo "Usage: $0 {start|stop}" + echo " start - Start the SX kernel driver" + echo " stop - Stop the SX kernel driver" + exit 1 + ;; +esac + +exit 0 diff --git a/platform/mellanox/fw-manager/fw-manager.mk b/platform/mellanox/fw-manager/fw-manager.mk new file mode 100644 index 00000000000..a18b92a6ab5 --- /dev/null +++ b/platform/mellanox/fw-manager/fw-manager.mk @@ -0,0 +1,26 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +# Mellanox Firmware Manager package + +MELLANOX_FW_MANAGER = mellanox_fw_manager-1.0.0-py3-none-any.whl +$(MELLANOX_FW_MANAGER)_SRC_PATH = $(PLATFORM_PATH)/fw-manager +$(MELLANOX_FW_MANAGER)_PYTHON_VERSION = 3 +SONIC_PYTHON_WHEELS += $(MELLANOX_FW_MANAGER) + +export mellanox_fw_manager_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(MELLANOX_FW_MANAGER))" diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/__init__.py b/platform/mellanox/fw-manager/mellanox_fw_manager/__init__.py new file mode 100644 index 00000000000..ae306767ac7 --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/__init__.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Mellanox Firmware Manager Package + +This package provides firmware management capabilities for Mellanox ASICs, +supporting both single and multi-ASIC systems with unified error handling +and parallel upgrade capabilities. +""" +__version__ = "1.0.0" +__author__ = "SONiC Team" + +from .fw_manager import ( + create_firmware_manager, + FirmwareManagerError, + FirmwareUpgradeError, + FirmwareUpgradePartialError +) +from .firmware_coordinator import FirmwareCoordinator +from .firmware_base import FirmwareManagerBase +from .spectrum_manager import SpectrumFirmwareManager +from .bluefield_manager import BluefieldFirmwareManager +from .asic_manager import AsicManager +__all__ = [ + 'FirmwareManagerBase', + 'SpectrumFirmwareManager', + 'BluefieldFirmwareManager', + 'create_firmware_manager', + 'FirmwareManagerError', + 'FirmwareUpgradeError', + 'FirmwareUpgradePartialError', + 'FirmwareCoordinator', + 'AsicManager' +] diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/asic_manager.py b/platform/mellanox/fw-manager/mellanox_fw_manager/asic_manager.py new file mode 100644 index 00000000000..80ac50283e9 --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/asic_manager.py @@ -0,0 +1,201 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +ASIC Manager + +Handles ASIC detection and configuration parsing for both single and multi-ASIC systems. +""" + +import os +import logging +import subprocess +from typing import List, Optional, Tuple + + +class AsicManager: + """Manages ASIC detection and configuration.""" + + def __init__(self, platform: str): + """ + Initialize the ASIC manager. + + Args: + platform: SONiC platform name + """ + self.platform = platform + self.logger = logging.getLogger() + + self.asic_conf_file = f"/usr/share/sonic/device/{platform}/asic.conf" + + self._load_asic_data() + + self._asic_type, detected_pci_devices = self._detect_asic_type() + + if self.is_multi_asic(): + for pci_device in self._pci_ids: + if pci_device not in detected_pci_devices: + self.logger.warning(f"PCI device {pci_device} not found in detected PCI devices") + else: + self._pci_ids = [detected_pci_devices[0]] + + def _load_asic_data(self): + """Load and cache ASIC configuration data from file.""" + self.logger.info(f"Loading ASIC configuration from {self.asic_conf_file}") + + if not os.path.exists(self.asic_conf_file): + self.logger.info(f"No asic.conf file found, assuming single ASIC system ({self.asic_conf_file})") + self._asic_count = 1 + self._pci_ids = [] + return + + try: + asic_count = 1 + pci_ids = [] + + with open(self.asic_conf_file, 'r') as f: + for line in f: + line = line.strip() + if line.startswith('NUM_ASIC='): + asic_count = int(line.split('=')[1].strip()) + elif line.startswith('DEV_ID_ASIC_'): + parts = line.split('=') + if len(parts) == 2: + asic_index = int(parts[0].split('_')[-1]) + pci_id = parts[1].strip() + pci_ids.append((asic_index, pci_id)) + + pci_ids.sort(key=lambda x: x[0]) + result = [pci_id for _, pci_id in pci_ids] + + while len(result) < asic_count: + result.append("unknown") + + self._asic_count = asic_count + self._pci_ids = result[:asic_count] + + self.logger.info(f"Loaded ASIC data: {asic_count} ASICs, PCI IDs: {self._pci_ids}") + + except (ValueError, FileNotFoundError, IOError) as e: + self.logger.warning(f"Could not parse ASIC configuration from {self.asic_conf_file}: {e}") + self._asic_count = 1 + self._pci_ids = [] + + def _detect_asic_type(self) -> Tuple[str, List[str]]: + """Detect ASIC type and get list of PCI device addresses using lspci. + + Returns: + Tuple[str, List[str]]: A tuple of (asic_type, pci_device_list) where + asic_type is the detected ASIC type string and pci_device_list contains + PCI device addresses (e.g., '0000:03:00.0'). + + Raises: + RuntimeError: If no Mellanox ASIC is detected in the system. + """ + from .spectrum_manager import SpectrumFirmwareManager + from .bluefield_manager import BluefieldFirmwareManager + + try: + # Get lspci output with domain, numeric IDs + result = subprocess.run(['lspci', '-Dn'], capture_output=True, text=True, check=True) + lspci_output = result.stdout + + detected_asic_type = None + pci_device_list = [] + asic_type_maps = [ + SpectrumFirmwareManager.get_asic_type_map(), + # BlueField ASICs should be checked last (Smart Switch requirement) + BluefieldFirmwareManager.get_asic_type_map() + ] + + # Parse lspci output to find matching devices + for asic_map in asic_type_maps: + for vendor_product, asic_type in asic_map.items(): + # vendor_product format: "15b3:cf70" + for line in lspci_output.splitlines(): + if vendor_product in line: + # Extract PCI address (first field before space) + pci_addr = line.split()[0] + if detected_asic_type is None: + detected_asic_type = asic_type + if pci_addr not in pci_device_list: + pci_device_list.append(pci_addr) + self.logger.info(f"Found {asic_type} device at {pci_addr}") + + if detected_asic_type: + break + + if detected_asic_type is None or not pci_device_list: + raise RuntimeError("No Mellanox ASIC detected in the system") + + self.logger.info(f"Detected ASIC type: {detected_asic_type}, PCI devices: {pci_device_list}") + return (detected_asic_type, pci_device_list) + except subprocess.CalledProcessError as e: + raise RuntimeError(f"Failed to run lspci: {e}") from e + except Exception as e: + raise RuntimeError(f"ASIC type detection failed: {e}") from e + + def get_asic_count(self) -> int: + """ + Get the number of ASICs in the system. + + Returns: + Number of ASICs (1 for single ASIC, >1 for multi-ASIC) + """ + return self._asic_count + + def get_asic_pci_ids(self) -> List[str]: + """ + Get PCI IDs for all ASICs. + + Returns: + List of PCI IDs for each ASIC + """ + return self._pci_ids.copy() + + def get_asic_pci_id_by_index(self, asic_index: int) -> str: + """ + Get PCI ID for a specific ASIC index. + + Args: + asic_index: Index of the ASIC + + Returns: + PCI ID for the ASIC + """ + if asic_index < len(self._pci_ids): + return self._pci_ids[asic_index] + return "unknown" + + def is_multi_asic(self) -> bool: + """ + Check if this is a multi-ASIC system. + + Returns: + True if multi-ASIC, False if single ASIC + """ + return self._asic_count > 1 + + def get_asic_type(self) -> str: + """ + Get the ASIC type. + + Returns: + ASIC type + """ + return self._asic_type diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/bluefield_manager.py b/platform/mellanox/fw-manager/mellanox_fw_manager/bluefield_manager.py new file mode 100644 index 00000000000..d849ba9c2dd --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/bluefield_manager.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +BlueField ASIC firmware manager implementation. + +Handles firmware operations specific to BlueField ASICs using flint and mlxconfig. +""" + +import subprocess +from typing import Dict, Optional +from .firmware_base import FirmwareManagerBase + + +class BluefieldFirmwareManager(FirmwareManagerBase): + """Firmware manager for BlueField ASICs.""" + + ASIC_TYPE_MAP = { + '15b3:a2dc': 'BF3' + } + + @classmethod + def get_asic_type_map(cls) -> Dict[str, str]: + """ + Get the PCI ID to ASIC type mapping for BlueField devices. + + Returns: + Dictionary mapping PCI IDs to ASIC types + """ + return cls.ASIC_TYPE_MAP + + def _get_mst_device_type(self) -> str: + """Get MST device type for BlueField ASICs""" + return "BlueField3" + + def _get_available_firmware_version(self, psid: str) -> Optional[str]: + """Get available firmware version for BlueField ASICs using flint.""" + try: + cmd = ['flint', '-i', self.fw_file, '--psid', psid, 'query'] + result = self._run_command(cmd, capture_output=True, text=True) + if result.returncode != 0: + self.logger.error(f"Failed to get available firmware version for BlueField ASICs using flint: {result.returncode}") + return None + + lines = result.stdout.strip().split('\n') + for line in lines: + if 'FW Version:' in line: + return line.split('FW Version:')[1].strip() + + self.logger.error(f"No FW Version found in flint output for PSID {psid}") + return None + except Exception as e: + self.logger.error(f"Failed to get available firmware version for BlueField ASICs using flint: {e}") + return None + + def run_firmware_update(self) -> bool: + """Run the actual firmware update command for BlueField ASICs.""" + try: + env = self._get_env() + + reactivate_cmd = ['flint', '-d', self.pci_id, 'ir'] + result = self._run_command(reactivate_cmd, capture_output=True, text=True) + if result.returncode != 0: + self.logger.warning(f"FW reactivation failed with return code {result.returncode}: {result.stderr}") + + burn_cmd = ['flint', '-d', self.pci_id, '-i', self.fw_file, 'burn'] + result = self._run_command(burn_cmd, env=env, capture_output=True, text=True) + if result.returncode != 0: + self.logger.error(f"Failed to burn firmware for BlueField ASICs using flint with return code {result.returncode}: {result.stderr}") + return False + + return self.reset_firmware_config() + except Exception as e: + self.logger.error(f"Failed to run firmware update for BlueField ASICs: {e}") + return False + + def reset_firmware_config(self) -> bool: + """Reset firmware configuration (BlueField specific).""" + try: + cmd = ['mlxconfig', '-d', self.pci_id, '-y', 'r'] + result = self._run_command(cmd, capture_output=True, text=True) + if result.returncode != 0: + self.logger.error(f"Failed to reset firmware config with return code {result.returncode}: {result.stderr}") + return False + return True + except Exception as e: + self.logger.error(f"Reset firmware config failed: {e}") + return False diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/firmware_base.py b/platform/mellanox/fw-manager/mellanox_fw_manager/firmware_base.py new file mode 100644 index 00000000000..857dfa9e76a --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/firmware_base.py @@ -0,0 +1,348 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Base classes, exceptions, and enums for firmware management. + +Contains the abstract base class and common data structures used across +all firmware manager implementations. +""" +from __future__ import annotations + +import os +import logging +import subprocess +import time +import xml.etree.ElementTree as ET +from abc import ABC, abstractmethod +from enum import Enum +from typing import List, Dict, Optional, Tuple, Any +from multiprocessing import Process, Queue +from .platform_utils import run_command + +EXIT_SUCCESS = 0 +EXIT_FAILURE = 1 +FW_ALREADY_UPDATED_FAILURE = 2 +FW_UPGRADE_IS_REQUIRED = 10 + + +class FirmwareManagerError(Exception): + """Base exception for firmware manager errors.""" + pass + + +class FirmwareUpgradeError(Exception): + """Exception raised when firmware upgrade fails.""" + pass + + +class FirmwareUpgradePartialError(Exception): + """Exception raised when some ASIC upgrades fail.""" + pass + + +class UpgradeStatusType(Enum): + """Enum for firmware upgrade status types.""" + SUCCESS = "success" + FAILED = "failed" + ERROR = "error" + + +class UpgradeStatus: + """Status information for firmware upgrade operations.""" + + def __init__(self, asic_index: int, status: UpgradeStatusType, message: str = "", + current_version: str = "", available_version: str = "", pci_id: str = None): + self.asic_index = asic_index + self.status = status + self.message = message + self.current_version = current_version + self.available_version = available_version + self.pci_id = pci_id + self.timestamp = None + + def to_dict(self) -> Dict[str, Any]: + """Convert to dictionary for inter-process communication.""" + return { + 'asic_index': self.asic_index, + 'status': self.status.value, + 'message': self.message, + 'current_version': self.current_version, + 'available_version': self.available_version, + 'pci_id': self.pci_id, + 'timestamp': self.timestamp + } + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> 'UpgradeStatus': + """Create from dictionary for inter-process communication.""" + status = cls( + asic_index=data['asic_index'], + status=UpgradeStatusType(data['status']), + message=data['message'], + current_version=data['current_version'], + available_version=data['available_version'], + pci_id=data.get('pci_id') + ) + status.timestamp = data.get('timestamp') + return status + + +class FirmwareManagerBase(Process): + """Base firmware manager class for a single ASIC, running in its own process.""" + + def __init__(self, asic_index: int, pci_id: str, + fw_bin_path: str = None, verbose: bool = False, clear_semaphore: bool = False, + asic_type: str = None, status_queue: Queue = None): + """ + Initialize the firmware manager for a single ASIC. + + Args: + asic_index: Index of the ASIC this manager handles + pci_id: PCI ID of the ASIC + fw_bin_path: Path to firmware binaries + verbose: Enable verbose logging + clear_semaphore: Clear hardware semaphore before upgrade + asic_type: Type of ASIC (e.g., 'spc1', 'bf3') + status_queue: Queue for reporting status to parent process + """ + super().__init__() + self.asic_index = asic_index + self.pci_id = pci_id + self.fw_bin_path = fw_bin_path + self.verbose = verbose + self.should_clear_semaphore = clear_semaphore + self.status_queue = status_queue + + self.asic_type = asic_type + self.fw_file = None + self.current_version = None + self.available_version = None + + self.logger = logging.getLogger() + + self._initialize_asic() + + def _initialize_asic(self) -> None: + """Initialize ASIC-specific information during object creation.""" + try: + if not self.asic_type: + raise FirmwareManagerError(f"ASIC type not provided for ASIC {self.asic_index}") + + # Validate ASIC type is supported by this manager + if self.asic_type not in self.get_asic_type_map().values(): + raise FirmwareManagerError(f"Unsupported ASIC type '{self.asic_type}' for ASIC {self.asic_index}") + + self.fw_file = self._get_firmware_file_path(self.asic_type, self.fw_bin_path) + if not self.fw_file or not os.path.exists(self.fw_file): + raise FirmwareManagerError(f"Firmware file not found: {self.fw_file}") + + self.current_version, self.available_version = self._get_firmware_versions() + if not self.current_version or not self.available_version: + raise FirmwareManagerError(f"Could not retrieve firmware versions for ASIC {self.asic_index}") + + self.logger.info(f"ASIC {self.asic_index} initialized: {self.asic_type}, " + f"current: {self.current_version}, available: {self.available_version}") + + except Exception as e: + self.logger.error(f"Initialization failed: {str(e)}") + raise + + def run(self): + """Main process entry point.""" + try: + if not self.is_upgrade_required(): + self._report_status(UpgradeStatusType.SUCCESS, f"ASIC {self.asic_index} firmware is up to date") + return + + if self.should_clear_semaphore: + self.logger.info(f"Clearing semaphore before upgrade for ASIC {self.asic_index}") + if not self.clear_semaphore(): + self.logger.warning(f"Failed to clear semaphore for ASIC {self.asic_index}, continuing with upgrade") + + if self.run_firmware_update(): + self._report_status(UpgradeStatusType.SUCCESS, f"ASIC {self.asic_index} upgrade completed") + else: + self._report_status(UpgradeStatusType.FAILED, f"ASIC {self.asic_index} upgrade failed") + + except Exception as e: + self._report_status(UpgradeStatusType.ERROR, f"Unexpected error: {str(e)}") + + def is_upgrade_required(self) -> bool: + """ + Check if firmware upgrade is required for this ASIC. + + Returns: + True if upgrade is required, False otherwise + """ + return self.current_version != self.available_version + + def _report_status(self, status: UpgradeStatusType, message: str = ""): + """Report status to parent process.""" + if self.status_queue: + upgrade_status = UpgradeStatus( + asic_index=self.asic_index, + status=status, + message=message, + current_version=self.current_version or "", + available_version=self.available_version or "", + pci_id=self.pci_id + ) + self.status_queue.put(upgrade_status.to_dict()) + + def get_asic_type(self) -> Optional[str]: + """Get the ASIC type for this platform.""" + return self.asic_type + + @classmethod + @abstractmethod + def get_asic_type_map(cls) -> Dict[str, str]: + """ + Get the PCI ID to ASIC type mapping for this manager. + + Returns: + Dictionary mapping PCI IDs (format 'vendor:device') to ASIC types + """ + pass + + def get_firmware_filename(self) -> Optional[str]: + """ + Get the firmware filename for this manager's ASIC type. + + Returns: + Firmware filename or None if not found + """ + if not self.asic_type: + return None + return f'fw-{self.asic_type}.mfa' + + @abstractmethod + def _get_mst_device_type(self) -> str: + """Get MST device type based on ASIC type (matches shell script).""" + pass + + @abstractmethod + def run_firmware_update(self) -> bool: + """Run the actual firmware update command.""" + pass + + def _get_firmware_file_path(self, asic_type: str, fw_bin_path: str = None) -> Optional[str]: + """Get the firmware file path for the given ASIC type.""" + fw_filename = self.get_firmware_filename() + if not fw_filename: + return None + + if fw_bin_path: + return os.path.join(fw_bin_path, fw_filename) + else: + return os.path.join('/etc/mlnx', fw_filename) + + def _query_firmware_versions(self) -> Tuple[str, str]: + """ + Query firmware versions without retry logic. + + Returns: + Tuple of (current_version, available_version) + + Raises: + FirmwareManagerError: If query fails or versions cannot be retrieved + """ + cmd = ['mlxfwmanager', '--query-format', 'XML', '-d', self.pci_id] + result = self._run_command(cmd, capture_output=True, text=True) + if result.returncode != 0: + raise FirmwareManagerError("Query returned non-zero exit code") + + root = ET.fromstring(result.stdout) + current_version = root.find('.//Device/Versions/FW').get('current') + psid = root.find('.//Device').get('psid') + + if not current_version or not psid: + raise FirmwareManagerError("Version or PSID not found in response") + + available_version = self._get_available_firmware_version(psid) + return current_version, available_version + + def _get_firmware_versions(self) -> Tuple[Optional[str], Optional[str]]: + """Get current and available firmware versions with retry logic.""" + query_retry_count = 0 + query_retry_count_max = 10 + + while query_retry_count < query_retry_count_max: + try: + return self._query_firmware_versions() + except Exception as e: + if query_retry_count >= query_retry_count_max - 1: + self.logger.error(f"Failed to get firmware versions after {query_retry_count_max} attempts: {str(e)}") + return None, None + self.logger.info(f"Unable to get firmware versions (attempt {query_retry_count + 1}/{query_retry_count_max}): {str(e)}, retrying...") + + query_retry_count += 1 + time.sleep(1) + + return None, None + + @abstractmethod + def _get_available_firmware_version(self, psid: str) -> Optional[str]: + """Get available firmware version using platform-specific method.""" + pass + + def _get_env(self) -> dict: + """ + Get environment variables including MFT diagnosis flags if verbose mode is enabled. + + Returns: + Dictionary of environment variables + """ + env = os.environ.copy() + if self.verbose: + env['FLASH_ACCESS_DEBUG'] = '1' + env['FW_COMPS_DEBUG'] = '1' + return env + + def _run_command(self, cmd: List[str], **kwargs) -> subprocess.CompletedProcess: + """ + Execute a subprocess command with automatic logging. + + Args: + cmd: Command and arguments as a list + **kwargs: Additional arguments to pass to subprocess.run + + Returns: + CompletedProcess instance from subprocess.run + """ + return run_command(cmd, logger=self.logger, **kwargs) + + def clear_semaphore(self) -> bool: + """ + Clear hardware semaphore for this ASIC. + + Returns: + True if successful, False otherwise + """ + try: + self.logger.info(f"Clearing semaphore for device {self.pci_id}") + cmd = ['/usr/bin/flint', '-d', self.pci_id, '--clear_semaphore'] + result = self._run_command(cmd, capture_output=True, text=True, check=True) + self.logger.info(f"Successfully cleared semaphore for {self.pci_id}") + return True + except subprocess.CalledProcessError as e: + self.logger.error(f"Failed to clear semaphore for {self.pci_id}: {e.stderr}") + return False + except Exception as e: + self.logger.error(f"Failed to clear semaphore for ASIC {self.asic_index}: {e}") + return False diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/firmware_coordinator.py b/platform/mellanox/fw-manager/mellanox_fw_manager/firmware_coordinator.py new file mode 100644 index 00000000000..5fd3f5beef8 --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/firmware_coordinator.py @@ -0,0 +1,297 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Firmware coordinator for managing multiple ASIC firmware operations. + +Handles coordination of firmware upgrades across multiple ASICs, +including process management, error handling, and SONiC image integration. +""" +import os +import logging +import subprocess +from typing import List +from multiprocessing import Queue + +from .firmware_base import ( + FirmwareManagerError, FirmwareUpgradeError, FirmwareUpgradePartialError, + UpgradeStatus, UpgradeStatusType +) +from .platform_utils import _detect_platform, run_command +from .asic_manager import AsicManager +from .bluefield_manager import BluefieldFirmwareManager + + +class FirmwareCoordinator: + """Main coordinator class that manages multiple ASIC firmware processes.""" + + def __init__(self, verbose: bool = False, from_image: bool = False, clear_semaphore: bool = False): + """ + Initialize the firmware coordinator. + + Args: + verbose: Enable verbose logging + from_image: If True, upgrade from next SONiC image (matches shell script --upgrade) + clear_semaphore: Clear hardware semaphore before upgrade + """ + self.verbose = verbose + self.from_image = from_image + self.clear_semaphore = clear_semaphore + self.logger = logging.getLogger() + + try: + platform = _detect_platform() + except Exception as e: + self.logger.error(f"Failed to detect platform: {e}") + raise + + self.asic_manager = AsicManager(platform) + + from .fw_manager import create_firmware_manager + num_asics = self.get_asic_count() + pci_ids = self.get_asic_pci_ids() + asic_type = self.asic_manager.get_asic_type() + self.managers = [] + + if self.from_image: + try: + self.fw_bin_path = self._get_image_firmware_path() + except Exception as e: + self.logger.error(f"Failed to get firmware path from image: {e}") + raise + else: + self.fw_bin_path = "/etc/mlnx" + + for asic_index in range(num_asics): + pci_id = pci_ids[asic_index] if asic_index < len(pci_ids) else None + + try: + manager = create_firmware_manager( + asic_index=asic_index, + pci_id=pci_id, + asic_type=asic_type, + fw_bin_path=self.fw_bin_path, + verbose=self.verbose, + clear_semaphore=self.clear_semaphore + ) + + self.managers.append(manager) + + except FirmwareManagerError as e: + self.logger.error(f"Failed to initialize ASIC {asic_index}: {e}") + raise + + self.logger.info(f"Initialized firmware coordinator with {len(self.managers)} ASIC(s) and image from {self.fw_bin_path}") + + def upgrade_firmware(self) -> None: + """ + Upgrade firmware for all ASICs using separate processes. + + Raises: + FirmwareUpgradeError: If all ASIC upgrades fail + FirmwareUpgradePartialError: If some ASIC upgrades fail + """ + num_asics = len(self.managers) + + self.logger.info(f"Starting firmware upgrade for {num_asics} ASIC(s) from {self.fw_bin_path}") + + processes = self.managers.copy() + + status_queue = Queue() + + for manager in processes: + manager.status_queue = status_queue + manager.start() + + results = {} + success_count = 0 + failure_count = 0 + timeout_failures = set() + + # Wait for all processes with timeout (10 minutes per ASIC) + # Firmware upgrades typically take 1-3 minutes, so 10 minutes provides a safe margin + timeout_per_asic = 600 # seconds + for process in processes: + process.join(timeout=timeout_per_asic) + if process.is_alive(): + self.logger.error(f"ASIC {process.asic_index} firmware upgrade timed out after {timeout_per_asic} seconds") + process.terminate() + process.join(timeout=10) # Give it 10 seconds to terminate + if process.is_alive(): + self.logger.error(f"Force killing stuck process for ASIC {process.asic_index}") + process.kill() + process.join() + timeout_failures.add(process.asic_index) + failure_count += 1 + + while not status_queue.empty(): + try: + status_data = status_queue.get_nowait() + status = UpgradeStatus.from_dict(status_data) + results[status.asic_index] = status + + if status.status == UpgradeStatusType.SUCCESS: + success_count += 1 + elif status.status == UpgradeStatusType.FAILED or status.status == UpgradeStatusType.ERROR: + failure_count += 1 + except Exception as e: + self.logger.error(f"Error processing status queue: {e}") + break + + # If a process completed but didn't report status (not in results and not timeout), treat as failure + for process in processes: + if process.asic_index not in results and process.asic_index not in timeout_failures: + self.logger.error(f"ASIC {process.asic_index} completed but did not report status, treating as failure") + failure_count += 1 + + total_failures = failure_count + total_asics = num_asics + + self.logger.info(f"Upgrade results: {success_count} successful, {total_failures} failed") + + if total_failures == total_asics: + self.logger.error("All ASIC upgrades failed") + raise FirmwareUpgradeError("All ASIC upgrades failed") + elif total_failures > 0: + self.logger.warning(f"Some ASIC upgrades failed ({total_failures}/{total_asics})") + raise FirmwareUpgradePartialError(f"Some ASIC upgrades failed ({total_failures}/{total_asics})") + else: + self.logger.info("All ASIC upgrades completed successfully") + + def check_upgrade_required(self) -> bool: + """ + Check if firmware upgrade is required for any ASIC (dry-run functionality). + + Returns: + True if upgrade is required, False otherwise + """ + self.logger.info(f"Checking if firmware upgrade is required from {self.fw_bin_path}") + + upgrade_needed = False + for manager in self.managers: + try: + if manager.is_upgrade_required(): + self.logger.info(f"Firmware upgrade is required for ASIC {manager.asic_index}") + upgrade_needed = True + except Exception as e: + self.logger.error(f"Error checking upgrade status for ASIC {manager.asic_index}: {e}") + upgrade_needed = True + + if upgrade_needed: + self.logger.info("Firmware upgrade is required") + else: + self.logger.info("Firmware is up to date") + + return upgrade_needed + + def _get_image_firmware_path(self) -> str: + """ + Get firmware path from next SONiC image (matches shell script UpgradeFWFromImage). + + Returns: + Path to firmware binaries from the next SONiC image + """ + cmd = ['sonic-installer', 'list'] + result = run_command(cmd, logger=self.logger, capture_output=True, text=True) + if result.returncode != 0: + error_msg = f"Failed to get SONiC image list: {result.stderr if result.stderr else 'Unknown error'}" + self.logger.error(error_msg) + raise FirmwareUpgradeError(error_msg) + + next_image = None + current_image = None + for line in result.stdout.split('\n'): + if line.startswith('Next: '): + next_image = line.split('Next: ')[1].strip() + elif line.startswith('Current: '): + current_image = line.split('Current: ')[1].strip() + + if not next_image: + raise FirmwareUpgradeError("No next SONiC image found") + + platform_fw_path = f"/host/image-{next_image.replace('SONiC-OS-', '')}/platform/fw/asic/" + + if os.path.exists(platform_fw_path): + self.logger.info(f"Using FW binaries from {platform_fw_path}") + return platform_fw_path + else: + fs_path = f"/host/image-{next_image.replace('SONiC-OS-', '')}/fs.squashfs" + fs_mountpoint = f"/tmp/image-{next_image.replace('SONiC-OS-', '')}-fs" + fw_bin_path = f"{fs_mountpoint}/etc/mlnx/" + + self.logger.info(f"Using FW binaries from {fw_bin_path}") + + try: + os.makedirs(fs_mountpoint, exist_ok=True) + except Exception as e: + error_msg = f"Failed to create mount point directory {fs_mountpoint}: {e}" + self.logger.error(error_msg) + raise FirmwareUpgradeError(error_msg) + + cmd = ['mount', '-t', 'squashfs', fs_path, fs_mountpoint] + mount_result = run_command(cmd, logger=self.logger) + if mount_result.returncode != 0: + error_msg = f"Failed to mount {fs_path}: {mount_result.stderr if mount_result.stderr else 'Unknown error'}" + self.logger.error(error_msg) + raise FirmwareUpgradeError(error_msg) + + return fw_bin_path + + def get_asic_count(self) -> int: + """Get the number of ASICs in the system.""" + return self.asic_manager.get_asic_count() + + def get_asic_pci_ids(self) -> List[str]: + """Get PCI IDs for all ASICs.""" + return self.asic_manager.get_asic_pci_ids() + + def reset_firmware_config(self) -> None: + """ + Reset firmware configuration for all BlueField ASICs. + + Raises: + FirmwareManagerError: If reset fails or no BlueField ASICs found + """ + bluefield_managers = [m for m in self.managers if isinstance(m, BluefieldFirmwareManager)] + + if not bluefield_managers: + raise FirmwareManagerError("No BlueField ASICs found for reset operation") + + self.logger.info(f"Resetting firmware configuration for {len(bluefield_managers)} BlueField ASIC(s)") + + success_count = 0 + failure_count = 0 + + for manager in bluefield_managers: + try: + if manager.reset_firmware_config(): + success_count += 1 + self.logger.info(f"Reset successful for ASIC {manager.asic_index}") + else: + failure_count += 1 + self.logger.error(f"Reset failed for ASIC {manager.asic_index}") + except Exception as e: + failure_count += 1 + self.logger.error(f"Reset failed for ASIC {manager.asic_index}: {e}") + + if failure_count == len(bluefield_managers): + raise FirmwareManagerError("All BlueField ASIC resets failed") + elif failure_count > 0: + self.logger.warning(f"Some BlueField ASIC resets failed ({failure_count}/{len(bluefield_managers)})") + + self.logger.info(f"Reset completed: {success_count} successful, {failure_count} failed") diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/fw_manager.py b/platform/mellanox/fw-manager/mellanox_fw_manager/fw_manager.py new file mode 100644 index 00000000000..3511a32cd2e --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/fw_manager.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Firmware Manager + +Main entry point and factory functions for Mellanox ASIC firmware management. +""" + +from typing import Optional +from .firmware_base import FirmwareManagerBase, FirmwareManagerError +from .spectrum_manager import SpectrumFirmwareManager +from .bluefield_manager import BluefieldFirmwareManager + +from .firmware_base import ( + EXIT_SUCCESS, EXIT_FAILURE, FW_ALREADY_UPDATED_FAILURE, FW_UPGRADE_IS_REQUIRED, + FirmwareManagerError, FirmwareUpgradeError, FirmwareUpgradePartialError, + UpgradeStatusType, UpgradeStatus +) +from .firmware_coordinator import FirmwareCoordinator +from .platform_utils import _detect_platform + + +def create_firmware_manager(asic_index: int, pci_id: Optional[str], asic_type: str, + fw_bin_path: str = None, verbose: bool = False, clear_semaphore: bool = False) -> FirmwareManagerBase: + """ + Factory function to create the appropriate firmware manager. + + Args: + asic_index: Index of the ASIC + pci_id: PCI ID of the ASIC + fw_bin_path: Path to firmware binaries + verbose: Enable verbose logging + clear_semaphore: Clear hardware semaphore before upgrade + + Returns: + Appropriate firmware manager instance + """ + if asic_type == 'BF3': + manager = BluefieldFirmwareManager( + asic_index=asic_index, + pci_id=pci_id, + fw_bin_path=fw_bin_path, + verbose=verbose, + clear_semaphore=clear_semaphore, + asic_type=asic_type + ) + else: + manager = SpectrumFirmwareManager( + asic_index=asic_index, + pci_id=pci_id, + fw_bin_path=fw_bin_path, + verbose=verbose, + clear_semaphore=clear_semaphore, + asic_type=asic_type + ) + + return manager diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/main.py b/platform/mellanox/fw-manager/mellanox_fw_manager/main.py new file mode 100644 index 00000000000..75828ce34ef --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/main.py @@ -0,0 +1,343 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Command Line Interface for Mellanox Firmware Manager + +Provides a command-line interface for firmware upgrade operations. +""" + +import sys +import logging +import logging.handlers +import fcntl +import subprocess +from contextlib import contextmanager +import click +from .fw_manager import create_firmware_manager, EXIT_SUCCESS, EXIT_FAILURE, FW_UPGRADE_IS_REQUIRED, FirmwareManagerError, FirmwareUpgradeError, FirmwareUpgradePartialError +from .firmware_coordinator import FirmwareCoordinator +from .platform_utils import run_command + +logger = None + + +def setup_logging(verbose: bool = False, nosyslog: bool = False): + """Setup global logging configuration with syslog.""" + global logger + + level = logging.DEBUG if verbose else logging.INFO + + logger = logging.getLogger() + logger.setLevel(level) + + logger.handlers.clear() + + if not nosyslog: + syslog_handler = logging.handlers.SysLogHandler(address='/dev/log') + syslog_handler.setLevel(level) + + formatter = logging.Formatter('mellanox-fw-manager[%(process)d]: %(levelname)s - %(message)s') + syslog_handler.setFormatter(formatter) + + logger.addHandler(syslog_handler) + + if verbose or nosyslog: + console_handler = logging.StreamHandler() + console_handler.setLevel(level) + console_formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') + console_handler.setFormatter(console_formatter) + logger.addHandler(console_handler) + + +def _exit_if_qemu() -> None: + """ + Exit if running on QEMU/SimX platform (matches shell script ExitIfQEMU). + + Raises: + SystemExit: If QEMU platform is detected + """ + try: + cmd = ['lspci', '-vvv'] + result = run_command(cmd, logger=logger, capture_output=True, text=True) + if result.returncode == 0 and 'SimX' in result.stdout: + print("No FW upgrade for SimX platform") + sys.exit(EXIT_SUCCESS) + except Exception as e: + logger.warning(f"Failed to check for QEMU platform: {e}") + + +@contextmanager +def _lock_state_change(): + """ + Context manager for file locking (matches shell script LockStateChange/UnlockStateChange). + """ + lock_file = "/tmp/mlxfwmanager-lock" + lock_fd = None + + try: + logger.info(f"Locking {lock_file} from CLI") + lock_fd = open(lock_file, 'w') + fcntl.flock(lock_fd.fileno(), fcntl.LOCK_EX) + logger.info(f"Locked {lock_file} from CLI") + yield lock_fd + except Exception as e: + logger.error(f"Failed to acquire lock: {e}") + raise FirmwareManagerError(f"Failed to acquire lock: {e}") + finally: + if lock_fd: + try: + logger.info(f"Unlocking {lock_file} from CLI") + fcntl.flock(lock_fd.fileno(), fcntl.LOCK_UN) + lock_fd.close() + except Exception as e: + logger.warning(f"Failed to unlock: {e}") + + +def handle_status(asic_id_arg: str, verbose: bool, upgrade: bool) -> int: + """ + Handle firmware status check - reports if firmware version matches. + + Args: + asic_id_arg: ASIC ID, "all", or "__flag__" (when used as flag) + verbose: Enable verbose logging + upgrade: Use firmware from next SONiC image + + Returns: + Exit code + """ + try: + fw_coordinator = FirmwareCoordinator(verbose=verbose, from_image=upgrade) + num_asics = fw_coordinator.get_asic_count() + + # Handle flag mode for single-ASIC systems + if asic_id_arg == '__flag__': + if num_asics == 1: + asic_id_arg = '0' + else: + print(f"Error: Multi-ASIC system detected ({num_asics} ASICs).") + print("Usage: mlnx-fw-manager --status ") + print("Example: mlnx-fw-manager --status all") + return EXIT_FAILURE + + # Determine which ASICs to check + if asic_id_arg.lower() == 'all': + managers_to_check = fw_coordinator.managers + print(f"Firmware Status Report ({num_asics} ASIC(s)):") + else: + try: + asic_id = int(asic_id_arg) + if asic_id >= num_asics: + print(f"Error: ASIC {asic_id} not found. System has {num_asics} ASIC(s).") + return EXIT_FAILURE + managers_to_check = [fw_coordinator.managers[asic_id]] + print(f"Firmware Status Report (ASIC {asic_id}):") + except ValueError: + print(f"Error: Invalid ASIC ID '{asic_id_arg}'. Use a number or 'all'.") + return EXIT_FAILURE + + upgrade_needed_asics = [] + up_to_date_asics = [] + error_asics = [] + + for manager in managers_to_check: + try: + is_needed = manager.is_upgrade_required() + if is_needed: + upgrade_needed_asics.append(manager.asic_index) + print(f"ASIC {manager.asic_index}: Upgrade needed") + else: + up_to_date_asics.append(manager.asic_index) + print(f"ASIC {manager.asic_index}: Up to date") + except Exception as e: + error_asics.append(manager.asic_index) + print(f"ASIC {manager.asic_index}: Error checking status - {e}") + + print(f"Summary: {len(up_to_date_asics)} up to date, " + f"{len(upgrade_needed_asics)} need upgrade, " + f"{len(error_asics)} errors") + + if upgrade_needed_asics or error_asics: + return FW_UPGRADE_IS_REQUIRED + return EXIT_SUCCESS + + except Exception as e: + print(f"Status check failed: {e}") + return EXIT_FAILURE + + +def handle_reset(verbose: bool) -> int: + """ + Handle firmware configuration reset. + + Args: + verbose: Enable verbose logging + + Returns: + Exit code + """ + try: + fw_coordinator = FirmwareCoordinator(verbose=verbose) + fw_coordinator.reset_firmware_config() + print("Firmware configuration reset completed successfully.") + return EXIT_SUCCESS + except Exception as e: + print(f"Firmware reset failed: {e}") + return EXIT_FAILURE + + +def handle_dry_run(verbose: bool, upgrade: bool) -> int: + """ + Handle dry-run (check if firmware upgrade is required). + + Args: + verbose: Enable verbose logging + upgrade: Use firmware from next SONiC image + + Returns: + Exit code + """ + try: + fw_coordinator = FirmwareCoordinator(verbose=verbose, from_image=upgrade) + if fw_coordinator.check_upgrade_required(): + print("Firmware upgrade is required.") + logger.info(f"Dry-run check: upgrade required, exiting with {FW_UPGRADE_IS_REQUIRED}") + return FW_UPGRADE_IS_REQUIRED + else: + print("Firmware is up to date.") + logger.info(f"Dry-run check: up to date, exiting with {EXIT_SUCCESS}") + return EXIT_SUCCESS + except Exception as e: + print(f"Firmware check failed: {e}") + logger.error(f"Dry-run check failed, exiting with {EXIT_FAILURE}") + return EXIT_FAILURE + + +def handle_upgrade(verbose: bool, upgrade: bool, clear_semaphore: bool) -> int: + """ + Handle firmware upgrade operation. + + Args: + verbose: Enable verbose logging + upgrade: Use firmware from next SONiC image + clear_semaphore: Clear hardware semaphore before upgrade + + Returns: + Exit code + """ + try: + fw_coordinator = FirmwareCoordinator( + verbose=verbose, + from_image=upgrade, + clear_semaphore=clear_semaphore + ) + + if not fw_coordinator.check_upgrade_required(): + print("Firmware is up to date.") + logger.info(f"Upgrade check: up to date, exiting with {EXIT_SUCCESS}") + return EXIT_SUCCESS + else: + fw_coordinator.upgrade_firmware() + print("Firmware upgrade completed successfully.") + logger.info(f"Upgrade completed successfully, exiting with {EXIT_SUCCESS}") + return EXIT_SUCCESS + + except FirmwareUpgradeError as e: + print(f"Firmware upgrade failed: {e}") + return EXIT_FAILURE + except FirmwareUpgradePartialError as e: + print(f"Firmware upgrade partially failed: {e}") + return EXIT_SUCCESS + except Exception as e: + print(f"Firmware upgrade failed: {e}") + return EXIT_FAILURE + + +@click.command(context_settings={'help_option_names': ['-h', '--help'], 'max_content_width': 120}) +@click.option('-u', '--upgrade', is_flag=True, + help='Upgrade ASIC firmware using next boot image (useful after SONiC-To-SONiC update)') +@click.option('-v', '--verbose', is_flag=True, + help='Verbose mode (enabled when -u|--upgrade)') +@click.option('-d', '--dry-run', is_flag=True, + help='Compare the FW versions without installation. Return code "0" means the FW is up-to-date, return code "10" means an upgrade is required, otherwise an error is detected.') +@click.option('-c', '--clear-semaphore', is_flag=True, + help='Clear hw semaphore before firmware upgrade') +@click.option('-r', '--reset', is_flag=True, + help='Reset firmware configuration (NVIDIA BlueField platform only)') +@click.option('--nosyslog', is_flag=True, + help='Disable syslog and log to console only') +@click.option('--status', 'status', type=str, default=None, is_flag=False, flag_value='__flag__', metavar='[ASIC_ID|all]', + help='Show firmware version status. Single-ASIC: use as flag. Multi-ASIC: specify ASIC ID or "all".') +def main(upgrade, verbose, dry_run, clear_semaphore, reset, nosyslog, status): + """ + Mellanox Firmware Manager + + Usage: ./mlnx-fw-upgrade [OPTIONS] + + OPTIONS: + -u, --upgrade Upgrade ASIC firmware using next boot image (useful after SONiC-To-SONiC update) + -v, --verbose Verbose mode (enabled when -u|--upgrade) + -d, --dry-run Compare the FW versions without installation. Return code "0" means the FW is up-to-date, return code "10" means an upgrade is required, otherwise an error is detected. + -c, --clear-semaphore Clear hw semaphore before firmware upgrade + -r, --reset Reset firmware configuration (NVIDIA BlueField platform only) + --status [ASIC_ID|all] Show firmware version status + Single-ASIC: use as flag (no argument) + Multi-ASIC: specify ASIC ID or "all" + --nosyslog Disable syslog and log to console only + -h, --help Print help + + Examples: + ./mlnx-fw-upgrade --verbose + ./mlnx-fw-upgrade --upgrade + ./mlnx-fw-upgrade --reset + ./mlnx-fw-upgrade --clear-semaphore --upgrade + + # Single-ASIC system: + ./mlnx-fw-upgrade --status # Check firmware status + + # Multi-ASIC system: + ./mlnx-fw-upgrade --status all # Check all ASICs + ./mlnx-fw-upgrade --status 0 # Check ASIC 0 + ./mlnx-fw-upgrade --status 0 --upgrade # Check ASIC 0 against next image + + ./mlnx-fw-upgrade --help + """ + setup_logging(verbose, nosyslog) + + logger.info("Mellanox Firmware Manager started") + + _exit_if_qemu() + + if status is not None: + exit_code = handle_status(status, verbose, upgrade) + logger.info(f"Mellanox Firmware Manager finished with exit code {exit_code}") + sys.exit(exit_code) + + with _lock_state_change(): + if reset: + exit_code = handle_reset(verbose) + elif dry_run: + exit_code = handle_dry_run(verbose, upgrade) + else: + exit_code = handle_upgrade(verbose, upgrade, clear_semaphore) + + logger.info(f"Mellanox Firmware Manager finished with exit code {exit_code}") + sys.exit(exit_code) + + +if __name__ == '__main__': + main() diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/platform_utils.py b/platform/mellanox/fw-manager/mellanox_fw_manager/platform_utils.py new file mode 100644 index 00000000000..cc99d77b367 --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/platform_utils.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Platform detection utilities for firmware management. + +Contains functions to detect SONiC platform and ASIC types. +""" + +import os +import logging +import subprocess +import time +from typing import Optional, List + + +def run_command(cmd: List[str], logger: logging.Logger = None, **kwargs) -> subprocess.CompletedProcess: + """ + Execute a subprocess command with automatic logging. + + Args: + cmd: Command and arguments as a list + logger: Logger instance to use for logging. If None, uses root logger + **kwargs: Additional arguments to pass to subprocess.run + + Returns: + CompletedProcess instance from subprocess.run + """ + if logger is None: + logger = logging.getLogger() + + try: + logger.info(f"Executing: {' '.join(cmd)}") + return subprocess.run(cmd, **kwargs) + except Exception as e: + logger.error(f"Failed to execute command {' '.join(cmd)}: {e}") + raise + + +def _detect_platform() -> Optional[str]: + """Detect SONiC platform name from /host/machine.conf onie_platform variable.""" + try: + conf_file = "/host/machine.conf" + if not os.path.exists(conf_file): + logging.error(f"Platform configuration file not found: {conf_file}") + return None + + with open(conf_file, 'r') as f: + for line in f: + line = line.strip() + if line.startswith('onie_platform='): + onie_platform = line.split('=')[1].strip() + logging.info(f"Detected platform: {onie_platform}") + return onie_platform + + logging.error(f"Could not find onie_platform variable in {conf_file}") + return None + + except Exception as e: + logging.error(f"Platform detection failed: {e}") + return None + + +def _detect_platform_from_asic_conf(platform: str) -> Optional[str]: + """Detect SONiC platform name from asic.conf file.""" + try: + asic_conf_file = f"/usr/share/sonic/device/{platform}/asic.conf" + if not os.path.exists(asic_conf_file): + logging.error(f"ASIC configuration file not found: {asic_conf_file}") + return None + + return asic_conf_file + except Exception as e: + logging.error(f"Failed to detect platform from asic.conf: {e}") + return None + + +def _is_multi_asic(asic_conf_file: str) -> bool: + """Check if the platform is a multi-ASIC platform.""" + try: + with open(asic_conf_file, 'r') as f: + for line in f: + line = line.strip() + if line.startswith('NUM_ASIC='): + return int(line.split('=')[1].strip()) > 1 + logging.warning(f"NUM_ASIC not found in {asic_conf_file}, assuming single ASIC") + return False + except Exception as e: + logging.error(f"Multi-ASIC detection failed: {e}") + return False diff --git a/platform/mellanox/fw-manager/mellanox_fw_manager/spectrum_manager.py b/platform/mellanox/fw-manager/mellanox_fw_manager/spectrum_manager.py new file mode 100644 index 00000000000..0dc01948cba --- /dev/null +++ b/platform/mellanox/fw-manager/mellanox_fw_manager/spectrum_manager.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Spectrum ASIC firmware manager implementation. + +Handles firmware operations specific to Spectrum ASICs using mlxfwmanager. +""" + +import subprocess +from typing import Dict, Optional +from .firmware_base import FirmwareManagerBase, FW_ALREADY_UPDATED_FAILURE + + +class SpectrumFirmwareManager(FirmwareManagerBase): + """Firmware manager for Spectrum ASICs.""" + + # PCI ID to ASIC type mapping for Spectrum devices + ASIC_TYPE_MAP = { + '15b3:cb84': 'SPC', + '15b3:cf6c': 'SPC2', + '15b3:cf70': 'SPC3', + '15b3:cf80': 'SPC4', + '15b3:cf82': 'SPC5', + } + + @classmethod + def get_asic_type_map(cls) -> Dict[str, str]: + """ + Get the PCI ID to ASIC type mapping for Spectrum devices. + + Returns: + Dictionary mapping PCI IDs to ASIC types + """ + return cls.ASIC_TYPE_MAP + + def _get_mst_device_type(self) -> str: + """Get MST device type for Spectrum ASICs.""" + return "Spectrum" + + def _get_available_firmware_version(self, psid: str) -> Optional[str]: + """Get available firmware version for Spectrum ASICs using mlxfwmanager.""" + try: + cmd = ['mlxfwmanager', '--list-content', '-i', self.fw_file, '-d', self.pci_id] + result = self._run_command(cmd, capture_output=True, text=True) + if result.returncode != 0: + self.logger.error(f"Failed to get available firmware version for Spectrum ASICs using mlxfwmanager: {result.returncode}") + return None + + lines = result.stdout.strip().split('\n') + for line in lines: + if psid in line: + parts = line.split() + if len(parts) >= 4: + return parts[3] + + self.logger.error(f"No firmware version found for PSID {psid} in mlxfwmanager output") + return None + except Exception as e: + self.logger.error(f"Failed to get available firmware version for Spectrum ASICs using mlxfwmanager: {e}") + return None + + def run_firmware_update(self) -> bool: + """Run the actual firmware update command for Spectrum ASICs.""" + try: + cmd = ['mlxfwmanager', '-u', '-f', '-y', '-d', self.pci_id, '-i', self.fw_file] + env = self._get_env() + + result = self._run_command(cmd, env=env, capture_output=True, text=True) + + if result.returncode == FW_ALREADY_UPDATED_FAILURE: + self.logger.info("FW reactivation is required. Reactivating and updating FW ...") + reactivate_cmd = ['flint', '-d', self.pci_id, 'ir'] + reactivate_result = self._run_command(reactivate_cmd, capture_output=True, text=True) + if reactivate_result.returncode != 0: + self.logger.warning(f"FW reactivation failed with return code {reactivate_result.returncode}: {reactivate_result.stderr}") + + result = self._run_command(cmd, env=env, capture_output=True, text=True) + + if result.returncode != 0: + self.logger.error(f"Failed to update firmware for Spectrum ASICs with return code {result.returncode}: {result.stderr}") + return False + + return True + except Exception as e: + self.logger.error(f"Failed to run firmware update for Spectrum ASICs: {e}") + return False diff --git a/platform/mellanox/fw-manager/pytest.ini b/platform/mellanox/fw-manager/pytest.ini new file mode 100644 index 00000000000..cf08b294476 --- /dev/null +++ b/platform/mellanox/fw-manager/pytest.ini @@ -0,0 +1,35 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +[pytest] +testpaths = tests +python_files = test_*.py +python_classes = Test* +python_functions = test_* +addopts = + -v + --tb=short + --strict-markers + --disable-warnings + --cov=mellanox_fw_manager + --cov-report=term-missing + --cov-report=xml + --cov-report=html +markers = + unit: Unit tests + integration: Integration tests diff --git a/platform/mellanox/fw-manager/setup.py b/platform/mellanox/fw-manager/setup.py new file mode 100644 index 00000000000..72a95e55b13 --- /dev/null +++ b/platform/mellanox/fw-manager/setup.py @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Setup script for Mellanox Firmware Manager package. +""" + +from setuptools import setup, find_packages +import sys + +setup( + name="mellanox-fw-manager", + version="1.0.0", + author="Oleksandr Ivantsiv", + author_email="oivantsiv@nvidia.com", + description="Firmware management package for Mellanox ASICs", + url="https://github.com/Azure/sonic-buildimage", + packages=["mellanox_fw_manager"], + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: System :: Hardware", + "Topic :: System :: Systems Administration", + ], + python_requires=">=3.7", + install_requires=[ + "click>=7.0", + ], + extras_require={ + "testing": [ + "pytest>=6.0", + "pytest-cov>=2.10.0", + "pytest-mock>=3.3.0", + ], + }, + test_suite="tests", + entry_points={ + "console_scripts": [ + "mlnx-fw-manager=mellanox_fw_manager.main:main", + ], + }, + include_package_data=True, + zip_safe=False, +) diff --git a/platform/mellanox/fw-manager/tests/__init__.py b/platform/mellanox/fw-manager/tests/__init__.py new file mode 100644 index 00000000000..b0bace1c1d0 --- /dev/null +++ b/platform/mellanox/fw-manager/tests/__init__.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# diff --git a/platform/mellanox/fw-manager/tests/test_asic_manager.py b/platform/mellanox/fw-manager/tests/test_asic_manager.py new file mode 100644 index 00000000000..c180c0f7c1b --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_asic_manager.py @@ -0,0 +1,301 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Unit tests for AsicManager class +""" + +from mellanox_fw_manager.asic_manager import AsicManager +import os +import tempfile +import unittest +from unittest.mock import patch, mock_open, MagicMock +import sys + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestAsicManager(unittest.TestCase): + """Test cases for AsicManager class""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + self.platform = "test-platform" + + # Mock subprocess.run to return lspci output with a valid Spectrum ASIC + self.subprocess_patcher = patch('mellanox_fw_manager.asic_manager.subprocess.run') + self.mock_subprocess = self.subprocess_patcher.start() + + # Mock lspci -Dn output + mock_result = MagicMock() + mock_result.stdout = "0000:01:00.0 0200: 15b3:cb84\n" + mock_result.returncode = 0 + self.mock_subprocess.return_value = mock_result + + self.asic_manager = AsicManager(self.platform) + + def tearDown(self): + """Clean up test fixtures""" + self.subprocess_patcher.stop() + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + def test_init_sets_platform(self): + """Test that __init__ sets the platform correctly""" + self.assertEqual(self.asic_manager.platform, self.platform) + + def test_init_sets_asic_conf_file(self): + """Test that __init__ sets the asic.conf file path correctly""" + expected_path = f"/usr/share/sonic/device/{self.platform}/asic.conf" + self.assertEqual(self.asic_manager.asic_conf_file, expected_path) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_file_not_exists(self, mock_exists): + """Test loading ASIC data when asic.conf file doesn't exist""" + mock_exists.return_value = False + + asic_manager = AsicManager(self.platform) + + self.assertEqual(asic_manager._asic_count, 1) + self.assertEqual(asic_manager._pci_ids, ["0000:01:00.0"]) + + def test_load_asic_data_with_file(self): + """Test loading ASIC data from asic.conf file""" + import tempfile + import os + + with tempfile.NamedTemporaryFile(mode='w', delete=False) as f: + f.write("NUM_ASIC=3\n") + f.write("DEV_ID_ASIC_0=01:00.0\n") + f.write("DEV_ID_ASIC_1=02:00.0\n") + f.write("DEV_ID_ASIC_2=03:00.0\n") + temp_file = f.name + + try: + asic_manager = AsicManager(self.platform) + asic_manager.asic_conf_file = temp_file + asic_manager._load_asic_data() + + self.assertEqual(asic_manager._asic_count, 3) + self.assertEqual(asic_manager._pci_ids, ["01:00.0", "02:00.0", "03:00.0"]) + finally: + os.unlink(temp_file) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + @patch('builtins.open', new_callable=mock_open) + def test_load_asic_data_invalid_file(self, mock_file, mock_exists): + """Test loading ASIC data with invalid file content""" + mock_exists.return_value = True + mock_file.return_value.__enter__.return_value = mock_file.return_value + mock_file.return_value.__iter__.return_value = iter(["invalid content"]) + + asic_manager = AsicManager(self.platform) + + self.assertEqual(asic_manager._asic_count, 1) + self.assertEqual(asic_manager._pci_ids, ["0000:01:00.0"]) + + def test_get_asic_count(self): + """Test getting ASIC count""" + self.asic_manager._asic_count = 4 + result = self.asic_manager.get_asic_count() + self.assertEqual(result, 4) + + def test_get_asic_pci_ids(self): + """Test getting ASIC PCI IDs""" + test_pci_ids = ["01:00.0", "02:00.0", "03:00.0"] + self.asic_manager._pci_ids = test_pci_ids + result = self.asic_manager.get_asic_pci_ids() + self.assertEqual(result, test_pci_ids) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_partial_data(self, mock_exists): + """Test loading ASIC data with partial data (NUM_ASIC but no DEV_ID)""" + mock_exists.return_value = True + content = "NUM_ASIC=2\n# No DEV_ID lines" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 2) + self.assertEqual(manager._pci_ids, ["unknown", "unknown"]) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_missing_num_asic(self, mock_exists): + """Test loading ASIC data without NUM_ASIC line""" + mock_exists.return_value = True + content = "DEV_ID_ASIC_0=01:00.0\nDEV_ID_ASIC_1=02:00.0\n" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 1) + self.assertEqual(manager._pci_ids, ["0000:01:00.0"]) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_malformed_num_asic(self, mock_exists): + """Test loading ASIC data with malformed NUM_ASIC line""" + mock_exists.return_value = True + content = "NUM_ASIC=invalid\nDEV_ID_ASIC_0=01:00.0\n" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 1) + self.assertEqual(manager._pci_ids, ["0000:01:00.0"]) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_malformed_dev_id(self, mock_exists): + """Test loading ASIC data with malformed DEV_ID lines""" + mock_exists.return_value = True + content = "NUM_ASIC=2\nDEV_ID_ASIC_0=01:00.0\nDEV_ID_ASIC_1=invalid_format\n" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 2) + self.assertEqual(manager._pci_ids, ["01:00.0", "invalid_format"]) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_negative_asic_count(self, mock_exists): + """Test loading ASIC data with negative ASIC count""" + mock_exists.return_value = True + content = "NUM_ASIC=-1\n" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, -1) + self.assertEqual(manager._pci_ids, ["0000:01:00.0"]) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_large_asic_count(self, mock_exists): + """Test loading ASIC data with very large ASIC count""" + mock_exists.return_value = True + content = "NUM_ASIC=1000\n" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 1000) + self.assertEqual(len(manager._pci_ids), 1000) + self.assertTrue(all(pci_id == "unknown" for pci_id in manager._pci_ids)) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_file_read_error(self, mock_exists): + """Test loading ASIC data when file read fails""" + mock_exists.return_value = True + with patch('builtins.open', side_effect=IOError("Permission denied")): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 1) + self.assertEqual(manager._pci_ids, ["0000:01:00.0"]) + + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_load_asic_data_with_comments_and_whitespace(self, mock_exists): + """Test loading ASIC data with comments and whitespace""" + mock_exists.return_value = True + content = """# This is a comment +NUM_ASIC=2 +# Another comment +DEV_ID_ASIC_0=01:00.0 +DEV_ID_ASIC_1=02:00.0 +# End comment +""" + with patch('builtins.open', mock_open(read_data=content)): + from mellanox_fw_manager.asic_manager import AsicManager + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 2) + self.assertEqual(manager._pci_ids, ["01:00.0", "02:00.0"]) + + @patch('mellanox_fw_manager.asic_manager.subprocess.run') + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_multi_asic_detection_all_devices_found(self, mock_exists, mock_subprocess): + """Test multi-ASIC detection when all configured devices are found""" + # Mock asic.conf with 4 ASICs + asic_conf_content = """NUM_ASIC=4 +DEV_ID_ASIC_0=0000:01:10.0 +DEV_ID_ASIC_1=0000:02:11.0 +DEV_ID_ASIC_2=0000:03:12.0 +DEV_ID_ASIC_3=0000:04:13.0 +""" + # Mock lspci output with 4 Mellanox devices (cf82 = SPC5) + lspci_output = """0000:00:00.0 0600: 8086:1237 (rev 02) +0000:01:10.0 0200: 15b3:cf82 +0000:02:11.0 0200: 15b3:cf82 +0000:03:12.0 0200: 15b3:cf82 +0000:04:13.0 0200: 15b3:cf82 +""" + mock_exists.return_value = True + mock_result = MagicMock() + mock_result.stdout = lspci_output + mock_result.returncode = 0 + mock_subprocess.return_value = mock_result + + with patch('builtins.open', mock_open(read_data=asic_conf_content)): + manager = AsicManager("test-platform") + + self.assertEqual(manager._asic_count, 4) + self.assertEqual(manager._asic_type, 'SPC5') + self.assertEqual(manager._pci_ids, [ + "0000:01:10.0", "0000:02:11.0", "0000:03:12.0", "0000:04:13.0" + ]) + self.assertTrue(manager.is_multi_asic()) + + @patch('mellanox_fw_manager.asic_manager.subprocess.run') + @patch('mellanox_fw_manager.asic_manager.os.path.exists') + def test_multi_asic_detection_missing_device_warning(self, mock_exists, mock_subprocess): + """Test multi-ASIC detection when some configured devices are not found""" + # Mock asic.conf with 4 ASICs + asic_conf_content = """NUM_ASIC=4 +DEV_ID_ASIC_0=0000:01:10.0 +DEV_ID_ASIC_1=0000:02:11.0 +DEV_ID_ASIC_2=0000:03:12.0 +DEV_ID_ASIC_3=0000:05:14.0 +""" + # Mock lspci output with only 3 devices (missing 0000:05:14.0) + lspci_output = """0000:00:00.0 0600: 8086:1237 (rev 02) +0000:01:10.0 0200: 15b3:cf82 +0000:02:11.0 0200: 15b3:cf82 +0000:03:12.0 0200: 15b3:cf82 +""" + mock_exists.return_value = True + mock_result = MagicMock() + mock_result.stdout = lspci_output + mock_result.returncode = 0 + mock_subprocess.return_value = mock_result + + with patch('builtins.open', mock_open(read_data=asic_conf_content)): + with self.assertLogs(level='WARNING') as log: + manager = AsicManager("test-platform") + + # Should still initialize with configured count + self.assertEqual(manager._asic_count, 4) + self.assertEqual(manager._asic_type, 'SPC5') + # Should keep all configured PCI IDs + self.assertEqual(manager._pci_ids, [ + "0000:01:10.0", "0000:02:11.0", "0000:03:12.0", "0000:05:14.0" + ]) + # Verify warning was logged for missing device + self.assertTrue(any('0000:05:14.0' in msg and 'not found' in msg for msg in log.output)) + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_bluefield_manager.py b/platform/mellanox/fw-manager/tests/test_bluefield_manager.py new file mode 100644 index 00000000000..b232e84a1e9 --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_bluefield_manager.py @@ -0,0 +1,295 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Unit tests for BluefieldFirmwareManager class +""" + +from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager +import os +import sys +import unittest +from unittest.mock import patch, MagicMock, mock_open +import tempfile + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestBluefieldFirmwareManager(unittest.TestCase): + """Comprehensive test cases for BluefieldFirmwareManager class""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + def _create_bluefield_manager(self, **kwargs): + """Helper to create BluefieldFirmwareManager with default values""" + defaults = { + 'asic_index': 0, 'pci_id': "08:00.0", 'fw_bin_path': "/test/fw", + 'verbose': False, 'clear_semaphore': False, 'asic_type': "BF3" + } + defaults.update(kwargs) + manager = BluefieldFirmwareManager(**defaults) + manager.fw_file = "/test/fw/fw-BF3.mfa" + return manager + + def test_get_mst_device_type(self): + """Test _get_mst_device_type method""" + with patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic'): + manager = self._create_bluefield_manager() + device_type = manager._get_mst_device_type() + self.assertEqual(device_type, "BlueField3") + + def test_get_firmware_filename(self): + """Test get_firmware_filename method""" + with patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic'): + # Test valid ASIC type + manager = self._create_bluefield_manager(asic_type='BF3') + self.assertEqual(manager.get_firmware_filename(), 'fw-BF3.mfa') + + def test_unsupported_asic_type(self): + """Test that unsupported ASIC type raises error during initialization""" + from mellanox_fw_manager.firmware_base import FirmwareManagerError + with self.assertRaises(FirmwareManagerError) as context: + BluefieldFirmwareManager( + asic_index=0, pci_id="08:00.0", fw_bin_path="/test/fw", + verbose=False, clear_semaphore=False, asic_type='unknown' + ) + self.assertIn("Unsupported ASIC type", str(context.exception)) + + def test_get_asic_type_map(self): + """Test get_asic_type_map method""" + result = BluefieldFirmwareManager.get_asic_type_map() + expected = {'15b3:a2dc': 'BF3'} + self.assertEqual(result, expected) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_get_available_firmware_version_success(self, mock_run, mock_init_asic): + """Test _get_available_firmware_version when flint succeeds""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock( + returncode=0, + stdout="Image type: BF3\nFW Version: 32.46.0500\nFW Release Date: 10.1.2023" + ) + + manager = self._create_bluefield_manager() + version = manager._get_available_firmware_version("MT_0000001138") + + self.assertEqual(version, "32.46.0500") + mock_run.assert_called_once_with( + ['flint', '-i', '/test/fw/fw-BF3.mfa', '--psid', 'MT_0000001138', 'query'], + capture_output=True, text=True + ) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_get_available_firmware_version_command_failure(self, mock_run, mock_init_asic): + """Test _get_available_firmware_version when flint command fails (line 27)""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock(returncode=1, stdout="", stderr="Error") + + manager = self._create_bluefield_manager() + version = manager._get_available_firmware_version("MT_0000001138") + + self.assertIsNone(version) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_get_available_firmware_version_no_version_found(self, mock_run, mock_init_asic): + """Test _get_available_firmware_version when no version found in output (line 35)""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock( + returncode=0, + stdout="Image type: BF3\nSome other info\nNo version here" + ) + + manager = self._create_bluefield_manager() + version = manager._get_available_firmware_version("MT_0000001138") + + self.assertIsNone(version) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_get_available_firmware_version_exception(self, mock_run, mock_init_asic): + """Test _get_available_firmware_version when subprocess raises exception (lines 36-37)""" + mock_init_asic.return_value = None + + mock_run.side_effect = Exception("Subprocess error") + + manager = self._create_bluefield_manager() + version = manager._get_available_firmware_version("MT_0000001138") + + self.assertIsNone(version) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_run_firmware_update_success(self, mock_run, mock_init_asic): + """Test run_firmware_update when all steps succeed""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=0, stderr=""), + MagicMock(returncode=0, stderr=""), + MagicMock(returncode=0, stderr="") + ] + + manager = self._create_bluefield_manager(verbose=True) + result = manager.run_firmware_update() + + self.assertTrue(result) + self.assertEqual(mock_run.call_count, 3) + + calls = mock_run.call_args_list + self.assertIn('flint', calls[0][0][0]) + self.assertIn('ir', calls[0][0][0]) + self.assertIn('flint', calls[1][0][0]) + self.assertIn('burn', calls[1][0][0]) + self.assertIn('mlxconfig', calls[2][0][0]) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_run_firmware_update_reactivation_failure(self, mock_run, mock_init_asic): + """Test run_firmware_update when reactivation fails but continues (line 55)""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=1, stderr="Reactivation failed"), + MagicMock(returncode=0, stderr=""), + MagicMock(returncode=0, stderr="") + ] + + manager = self._create_bluefield_manager() + result = manager.run_firmware_update() + + self.assertTrue(result) + self.assertEqual(mock_run.call_count, 3) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_run_firmware_update_burn_failure(self, mock_run, mock_init_asic): + """Test run_firmware_update when burn command fails (line 62)""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=0, stderr=""), + MagicMock(returncode=1, stderr="Burn failed"), + ] + + manager = self._create_bluefield_manager() + result = manager.run_firmware_update() + + self.assertFalse(result) + self.assertEqual(mock_run.call_count, 2) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_run_firmware_update_reset_failure(self, mock_run, mock_init_asic): + """Test run_firmware_update when reset command fails""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=0, stderr=""), + MagicMock(returncode=0, stderr=""), + MagicMock(returncode=1, stderr="Reset failed") + ] + + manager = self._create_bluefield_manager() + result = manager.run_firmware_update() + + self.assertFalse(result) + self.assertEqual(mock_run.call_count, 3) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_run_firmware_update_exception(self, mock_run, mock_init_asic): + """Test run_firmware_update when exception occurs (lines 70-71)""" + mock_init_asic.return_value = None + + mock_run.side_effect = Exception("Subprocess error") + + manager = self._create_bluefield_manager() + result = manager.run_firmware_update() + + self.assertFalse(result) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_reset_firmware_config_success(self, mock_run, mock_init_asic): + """Test reset_firmware_config when command succeeds (lines 75-88)""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock(returncode=0, stdout="Reset successful") + + manager = self._create_bluefield_manager() + result = manager.reset_firmware_config() + + self.assertTrue(result) + mock_run.assert_called_once_with( + ['mlxconfig', '-d', '08:00.0', '-y', 'r'], + capture_output=True, text=True + ) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + def test_reset_firmware_config_no_mst_device(self, mock_init_asic): + """Test reset_firmware_config when no MST device available (lines 77-79)""" + mock_init_asic.return_value = None + + manager = self._create_bluefield_manager() + + result = manager.reset_firmware_config() + + self.assertFalse(result) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_reset_firmware_config_command_failure(self, mock_run, mock_init_asic): + """Test reset_firmware_config when mlxconfig command fails""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock(returncode=1, stdout="", stderr="Reset failed") + + manager = self._create_bluefield_manager() + result = manager.reset_firmware_config() + + self.assertFalse(result) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_reset_firmware_config_exception(self, mock_run, mock_init_asic): + """Test reset_firmware_config when exception occurs (lines 86-88)""" + mock_init_asic.return_value = None + + mock_run.side_effect = Exception("Subprocess error") + + manager = self._create_bluefield_manager() + result = manager.reset_firmware_config() + + self.assertFalse(result) + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_firmware_base.py b/platform/mellanox/fw-manager/tests/test_firmware_base.py new file mode 100644 index 00000000000..1df3a44c3fe --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_firmware_base.py @@ -0,0 +1,766 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Comprehensive unit tests for firmware_base.py +""" + +from mellanox_fw_manager.firmware_base import ( + FirmwareManagerBase, FirmwareManagerError, FirmwareUpgradeError, FirmwareUpgradePartialError, + UpgradeStatus, UpgradeStatusType +) +import os +import sys +import unittest +import tempfile +import xml.etree.ElementTree as ET +from unittest.mock import patch, MagicMock, mock_open +from multiprocessing import Queue + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class ConcreteFirmwareManager(FirmwareManagerBase): + """Concrete implementation of FirmwareManagerBase for testing""" + + @classmethod + def get_asic_type_map(cls): + return {'test_pci': 'test'} + + def get_firmware_filename(self): + firmware_map = {'test': 'test-fw.mfa'} + return firmware_map.get(self.asic_type) + + def _get_mst_device_type(self): + return "TestDevice" + + def run_firmware_update(self): + return True + + def _get_available_firmware_version(self, psid): + return "2.0.0" + + +class TestUpgradeStatus(unittest.TestCase): + """Test cases for UpgradeStatus class""" + + def test_upgrade_status_init(self): + """Test UpgradeStatus initialization""" + status = UpgradeStatus( + asic_index=0, + status=UpgradeStatusType.SUCCESS, + message="Test message", + current_version="1.0.0", + available_version="2.0.0", + pci_id="01:00.0" + ) + + self.assertEqual(status.asic_index, 0) + self.assertEqual(status.status, UpgradeStatusType.SUCCESS) + self.assertEqual(status.message, "Test message") + self.assertEqual(status.current_version, "1.0.0") + self.assertEqual(status.available_version, "2.0.0") + self.assertEqual(status.pci_id, "01:00.0") + self.assertIsNone(status.timestamp) + + def test_upgrade_status_to_dict(self): + """Test UpgradeStatus to_dict method (line 65-73)""" + status = UpgradeStatus( + asic_index=1, + status=UpgradeStatusType.FAILED, + message="Upgrade failed", + current_version="1.0.0", + available_version="2.0.0", + pci_id="02:00.0" + ) + status.timestamp = "2023-01-01T00:00:00" + + result = status.to_dict() + + expected = { + 'asic_index': 1, + 'status': 'failed', + 'message': 'Upgrade failed', + 'current_version': '1.0.0', + 'available_version': '2.0.0', + 'pci_id': '02:00.0', + 'timestamp': '2023-01-01T00:00:00' + } + + self.assertEqual(result, expected) + + def test_upgrade_status_from_dict(self): + """Test UpgradeStatus from_dict method (lines 78-87)""" + data = { + 'asic_index': 2, + 'status': 'error', + 'message': 'Error occurred', + 'current_version': '1.5.0', + 'available_version': '2.0.0', + 'pci_id': '03:00.0', + 'timestamp': '2023-01-01T12:00:00' + } + + status = UpgradeStatus.from_dict(data) + + self.assertEqual(status.asic_index, 2) + self.assertEqual(status.status, UpgradeStatusType.ERROR) + self.assertEqual(status.message, "Error occurred") + self.assertEqual(status.current_version, "1.5.0") + self.assertEqual(status.available_version, "2.0.0") + self.assertEqual(status.pci_id, "03:00.0") + self.assertEqual(status.timestamp, "2023-01-01T12:00:00") + + def test_upgrade_status_from_dict_missing_optional(self): + """Test UpgradeStatus from_dict with missing optional fields""" + data = { + 'asic_index': 3, + 'status': 'success', + 'message': 'Success', + 'current_version': '2.0.0', + 'available_version': '2.0.0' + } + + status = UpgradeStatus.from_dict(data) + + self.assertEqual(status.asic_index, 3) + self.assertEqual(status.status, UpgradeStatusType.SUCCESS) + self.assertIsNone(status.pci_id) + self.assertIsNone(status.timestamp) + + +class TestFirmwareManagerBase(unittest.TestCase): + """Test cases for FirmwareManagerBase class""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + def test_firmware_manager_base_init_success(self): + """Test successful FirmwareManagerBase initialization (lines 108-127)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic') as mock_init: + mock_init.return_value = None + + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + fw_bin_path="/test/fw", + verbose=True, + clear_semaphore=True, + asic_type="test" + ) + + self.assertEqual(manager.asic_index, 0) + self.assertEqual(manager.pci_id, "01:00.0") + self.assertEqual(manager.fw_bin_path, "/test/fw") + self.assertTrue(manager.verbose) + self.assertTrue(manager.should_clear_semaphore) + self.assertEqual(manager.asic_type, "test") + self.assertIsNone(manager.fw_file) + self.assertIsNone(manager.current_version) + self.assertIsNone(manager.available_version) + self.assertIsNotNone(manager.logger) + mock_init.assert_called_once() + + def test_initialize_asic_no_asic_type(self): + """Test _initialize_asic when no ASIC type provided (lines 133-134)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type=None + ) + + with self.assertRaises(FirmwareManagerError) as context: + FirmwareManagerBase._initialize_asic(manager) + + self.assertIn("ASIC type not provided", str(context.exception)) + + def test_initialize_asic_firmware_file_not_found(self): + """Test _initialize_asic when firmware file not found (lines 138-139)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, '_get_firmware_file_path', return_value="/nonexistent/file.mfa"): + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=False): + with self.assertRaises(FirmwareManagerError) as context: + manager._initialize_asic() + + self.assertIn("Firmware file not found", str(context.exception)) + + def test_initialize_asic_no_firmware_versions(self): + """Test _initialize_asic when firmware versions not found (lines 148-149)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, '_get_firmware_file_path', return_value="/test/fw.mfa"): + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + with patch.object(manager, '_get_firmware_versions', return_value=(None, None)): + with self.assertRaises(FirmwareManagerError) as context: + manager._initialize_asic() + + self.assertIn("Could not retrieve firmware versions", str(context.exception)) + + def test_initialize_asic_success_with_logging(self): + """Test successful _initialize_asic with logging (lines 151-152)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, '_get_firmware_file_path', return_value="/test/fw.mfa"): + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + with patch.object(manager, '_get_firmware_versions', return_value=("1.0.0", "2.0.0")): + manager._initialize_asic() + + self.assertEqual(manager.current_version, "1.0.0") + self.assertEqual(manager.available_version, "2.0.0") + + def test_initialize_asic_exception_handling(self): + """Test _initialize_asic exception handling (lines 154-156)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, '_get_firmware_file_path', side_effect=Exception("Test error")): + with self.assertRaises(Exception): + manager._initialize_asic() + + def test_run_method_up_to_date(self): + """Test run method when firmware is up to date (lines 162-164)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, 'is_upgrade_required', return_value=False): + with patch.object(manager, '_report_status') as mock_report: + manager.run() + + mock_report.assert_called_once_with( + UpgradeStatusType.SUCCESS, + f"ASIC {manager.asic_index} firmware is up to date" + ) + + def test_run_method_with_semaphore_clear_success(self): + """Test run method with semaphore clearing (lines 167-170)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test", + clear_semaphore=True + ) + + with patch.object(manager, 'is_upgrade_required', return_value=True): + with patch.object(manager, 'clear_semaphore', return_value=True): + with patch.object(manager, 'run_firmware_update', return_value=True): + with patch.object(manager, '_report_status') as mock_report: + manager.run() + + mock_report.assert_called_once_with( + UpgradeStatusType.SUCCESS, + f"ASIC {manager.asic_index} upgrade completed" + ) + + def test_run_method_with_semaphore_clear_failure(self): + """Test run method when semaphore clearing fails but continues (lines 169-170)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test", + clear_semaphore=True + ) + + with patch.object(manager, 'is_upgrade_required', return_value=True): + with patch.object(manager, 'clear_semaphore', return_value=False): + with patch.object(manager, 'run_firmware_update', return_value=True): + with patch.object(manager, '_report_status') as mock_report: + manager.run() + + mock_report.assert_called_once_with( + UpgradeStatusType.SUCCESS, + f"ASIC {manager.asic_index} upgrade completed" + ) + + def test_run_method_upgrade_success(self): + """Test run method with successful upgrade (lines 173-174)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, 'is_upgrade_required', return_value=True): + with patch.object(manager, 'run_firmware_update', return_value=True): + with patch.object(manager, '_report_status') as mock_report: + manager.run() + + mock_report.assert_called_once_with( + UpgradeStatusType.SUCCESS, + f"ASIC {manager.asic_index} upgrade completed" + ) + + def test_run_method_upgrade_failure(self): + """Test run method with failed upgrade (lines 175-176)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, 'is_upgrade_required', return_value=True): + with patch.object(manager, 'run_firmware_update', return_value=False): + with patch.object(manager, '_report_status') as mock_report: + manager.run() + + mock_report.assert_called_once_with( + UpgradeStatusType.FAILED, + f"ASIC {manager.asic_index} upgrade failed" + ) + + def test_run_method_exception_handling(self): + """Test run method exception handling (lines 178-179)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + with patch.object(manager, 'is_upgrade_required', side_effect=Exception("Test error")): + with patch.object(manager, '_report_status') as mock_report: + manager.run() + + mock_report.assert_called_once_with( + UpgradeStatusType.ERROR, + "Unexpected error: Test error" + ) + + def test_is_upgrade_required_true(self): + """Test is_upgrade_required when upgrade is needed (line 189)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + manager.current_version = "1.0.0" + manager.available_version = "2.0.0" + + result = manager.is_upgrade_required() + self.assertTrue(result) + + def test_is_upgrade_required_false(self): + """Test is_upgrade_required when no upgrade needed (line 189)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + manager.current_version = "2.0.0" + manager.available_version = "2.0.0" + + result = manager.is_upgrade_required() + self.assertFalse(result) + + def test_report_status_with_queue(self): + """Test _report_status with status queue (lines 193-202)""" + mock_queue = MagicMock() + + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test", + status_queue=mock_queue + ) + + manager.current_version = "1.0.0" + manager.available_version = "2.0.0" + + manager._report_status(UpgradeStatusType.SUCCESS, "Test message") + + mock_queue.put.assert_called_once() + call_args = mock_queue.put.call_args[0][0] + + self.assertEqual(call_args['asic_index'], 0) + self.assertEqual(call_args['status'], 'success') + self.assertEqual(call_args['message'], 'Test message') + self.assertEqual(call_args['current_version'], '1.0.0') + self.assertEqual(call_args['available_version'], '2.0.0') + self.assertEqual(call_args['pci_id'], '01:00.0') + + def test_report_status_without_queue(self): + """Test _report_status without status queue""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + manager._report_status(UpgradeStatusType.SUCCESS, "Test message") + + def test_get_asic_type(self): + """Test get_asic_type method (line 206)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test_type" + ) + + result = manager.get_asic_type() + self.assertEqual(result, "test_type") + + def test_get_firmware_file_path_with_fw_bin_path(self): + """Test _get_firmware_file_path with custom fw_bin_path""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + result = manager._get_firmware_file_path("test", "/custom/path") + expected = "/custom/path/test-fw.mfa" + self.assertEqual(result, expected) + + def test_get_firmware_file_path_default_path(self): + """Test _get_firmware_file_path with default path""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + result = manager._get_firmware_file_path("test", None) + expected = "/etc/mlnx/test-fw.mfa" + self.assertEqual(result, expected) + + def test_get_firmware_file_path_unknown_type(self): + """Test _get_firmware_file_path with unknown ASIC type""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="unknown" + ) + + result = manager._get_firmware_file_path("unknown", "/test/path") + self.assertIsNone(result) + + @patch('mellanox_fw_manager.firmware_base.time.sleep') + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_get_firmware_versions_success(self, mock_run, mock_sleep): + """Test _get_firmware_versions success path""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + xml_output = ''' + + + + + + + ''' + mock_run.return_value = MagicMock(returncode=0, stdout=xml_output) + + current, available = manager._get_firmware_versions() + + self.assertEqual(current, "1.0.0") + self.assertEqual(available, "2.0.0") + mock_sleep.assert_not_called() + + @patch('mellanox_fw_manager.firmware_base.time.sleep') + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_get_firmware_versions_command_failure(self, mock_run, mock_sleep): + """Test _get_firmware_versions when command fails with retry logic""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + mock_run.return_value = MagicMock(returncode=1) + + with patch.object(manager.logger, 'info') as mock_info: + with patch.object(manager.logger, 'error') as mock_error: + current, available = manager._get_firmware_versions() + + self.assertIsNone(current) + self.assertIsNone(available) + self.assertEqual(mock_run.call_count, 10) + self.assertEqual(mock_sleep.call_count, 9) + # 10 "Executing" logs from run_command + 9 "Unable to query" logs = 19 total + self.assertEqual(mock_info.call_count, 19) + mock_error.assert_called_once_with("Failed to get firmware versions after 10 attempts: Query returned non-zero exit code") + + @patch('mellanox_fw_manager.firmware_base.time.sleep') + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_get_firmware_versions_xml_parsing_error(self, mock_run, mock_sleep): + """Test _get_firmware_versions with XML parsing error and retry logic""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + mock_run.return_value = MagicMock(returncode=0, stdout="invalid xml") + + with patch.object(manager.logger, 'info') as mock_info: + with patch.object(manager.logger, 'error') as mock_error: + current, available = manager._get_firmware_versions() + + self.assertIsNone(current) + self.assertIsNone(available) + self.assertEqual(mock_run.call_count, 10) + self.assertEqual(mock_sleep.call_count, 9) + # 10 "Executing" logs from run_command + 9 "Unable to..." logs = 19 total + self.assertEqual(mock_info.call_count, 19) + mock_error.assert_called_once() + + @patch('mellanox_fw_manager.firmware_base.time.sleep') + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_get_firmware_versions_success_on_retry(self, mock_run, mock_sleep): + """Test _get_firmware_versions succeeds on third attempt""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + xml_output = ''' + + + + + + + ''' + + mock_run.side_effect = [ + MagicMock(returncode=1), + MagicMock(returncode=1), + MagicMock(returncode=0, stdout=xml_output) + ] + + with patch.object(manager.logger, 'info') as mock_info: + current, available = manager._get_firmware_versions() + + self.assertEqual(current, "1.0.0") + self.assertEqual(available, "2.0.0") + self.assertEqual(mock_run.call_count, 3) + self.assertEqual(mock_sleep.call_count, 2) + # 3 "Executing" logs from run_command + 2 "Unable to query" logs = 5 total + self.assertEqual(mock_info.call_count, 5) + + @patch('mellanox_fw_manager.firmware_base.time.sleep') + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_get_firmware_versions_missing_version_field(self, mock_run, mock_sleep): + """Test _get_firmware_versions when version field is missing""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + xml_output = ''' + + + + + + + ''' + + mock_run.return_value = MagicMock(returncode=0, stdout=xml_output) + + with patch.object(manager.logger, 'info') as mock_info: + with patch.object(manager.logger, 'error') as mock_error: + current, available = manager._get_firmware_versions() + + self.assertIsNone(current) + self.assertIsNone(available) + self.assertEqual(mock_run.call_count, 10) + self.assertEqual(mock_sleep.call_count, 9) + # 10 "Executing" logs from run_command + 9 "Unable to parse" logs = 19 total + self.assertEqual(mock_info.call_count, 19) + mock_error.assert_called_once_with("Failed to get firmware versions after 10 attempts: Version or PSID not found in response") + + @patch('mellanox_fw_manager.firmware_base.time.sleep') + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_get_firmware_versions_missing_psid_field(self, mock_run, mock_sleep): + """Test _get_firmware_versions when psid field is missing""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + xml_output = ''' + + + + + + + ''' + + mock_run.return_value = MagicMock(returncode=0, stdout=xml_output) + + with patch.object(manager.logger, 'info') as mock_info: + with patch.object(manager.logger, 'error') as mock_error: + current, available = manager._get_firmware_versions() + + self.assertIsNone(current) + self.assertIsNone(available) + self.assertEqual(mock_run.call_count, 10) + self.assertEqual(mock_sleep.call_count, 9) + # 10 "Executing" logs from run_command + 9 "Unable to parse" logs = 19 total + self.assertEqual(mock_info.call_count, 19) + mock_error.assert_called_once_with("Failed to get firmware versions after 10 attempts: Version or PSID not found in response") + + def test_get_env_verbose_mode(self): + """Test _get_env with verbose mode""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test", + verbose=True + ) + + env = manager._get_env() + + self.assertIn('FLASH_ACCESS_DEBUG', env) + self.assertIn('FW_COMPS_DEBUG', env) + self.assertEqual(env['FLASH_ACCESS_DEBUG'], '1') + self.assertEqual(env['FW_COMPS_DEBUG'], '1') + + def test_get_env_normal_mode(self): + """Test _get_env without verbose mode""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test", + verbose=False + ) + + env = manager._get_env() + + self.assertNotIn('FLASH_ACCESS_DEBUG', env) + self.assertNotIn('FW_COMPS_DEBUG', env) + + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_clear_semaphore_success(self, mock_run): + """Test clear_semaphore success (lines 356-373)""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + mock_run.return_value = MagicMock(returncode=0) + + result = manager.clear_semaphore() + + self.assertTrue(result) + mock_run.assert_called_once_with( + ['/usr/bin/flint', '-d', '01:00.0', '--clear_semaphore'], + capture_output=True, + text=True, + check=True + ) + + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_clear_semaphore_subprocess_error(self, mock_run): + """Test clear_semaphore with subprocess error""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + from subprocess import CalledProcessError + mock_run.side_effect = CalledProcessError(1, 'flint', stderr="Command failed") + + result = manager.clear_semaphore() + + self.assertFalse(result) + + @patch('mellanox_fw_manager.firmware_base.subprocess.run') + def test_clear_semaphore_general_exception(self, mock_run): + """Test clear_semaphore with general exception""" + with patch.object(ConcreteFirmwareManager, '_initialize_asic'): + manager = ConcreteFirmwareManager( + asic_index=0, + pci_id="01:00.0", + asic_type="test" + ) + + mock_run.side_effect = Exception("General error") + + result = manager.clear_semaphore() + + self.assertFalse(result) + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_firmware_coordinator.py b/platform/mellanox/fw-manager/tests/test_firmware_coordinator.py new file mode 100644 index 00000000000..bc7db1a618f --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_firmware_coordinator.py @@ -0,0 +1,698 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Unit tests for FirmwareCoordinator class +""" + +from mellanox_fw_manager.firmware_coordinator import FirmwareCoordinator +from mellanox_fw_manager.fw_manager import ( + create_firmware_manager, UpgradeStatus, UpgradeStatusType, + FirmwareUpgradeError, FirmwareUpgradePartialError, FirmwareManagerError +) +import os +import tempfile +import unittest +from unittest.mock import patch, MagicMock, mock_open +import sys +import multiprocessing + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestFirmwareCoordinator(unittest.TestCase): + """Test cases for FirmwareCoordinator class""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_init(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test FirmwareCoordinator initialization""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0", "02:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + mock_create_manager.return_value = MagicMock() + + coordinator = FirmwareCoordinator(verbose=True, from_image=False, clear_semaphore=True) + + self.assertTrue(coordinator.verbose) + self.assertFalse(coordinator.from_image) + self.assertTrue(coordinator.clear_semaphore) + self.assertEqual(coordinator.fw_bin_path, "/etc/mlnx") + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_init_from_image(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test FirmwareCoordinator initialization with from_image=True""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + mock_create_manager.return_value = MagicMock() + + with patch.object(FirmwareCoordinator, '_get_image_firmware_path', return_value="/test/fw"): + coordinator = FirmwareCoordinator(verbose=False, from_image=True, clear_semaphore=False) + + self.assertFalse(coordinator.verbose) + self.assertTrue(coordinator.from_image) + self.assertFalse(coordinator.clear_semaphore) + self.assertEqual(coordinator.fw_bin_path, "/test/fw") + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_get_asic_count(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test get_asic_count method""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 3 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + mock_create_manager.return_value = MagicMock() + + coordinator = FirmwareCoordinator() + result = coordinator.get_asic_count() + + self.assertEqual(result, 3) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_get_asic_pci_ids(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test get_asic_pci_ids method""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0", "02:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + mock_create_manager.return_value = MagicMock() + + coordinator = FirmwareCoordinator() + result = coordinator.get_asic_pci_ids() + + self.assertEqual(result, ["01:00.0", "02:00.0"]) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_reset_firmware_config_not_supported(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test reset_firmware_config when not supported""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + mock_create_manager.return_value = MagicMock() + + coordinator = FirmwareCoordinator() + + with self.assertRaises(FirmwareManagerError): + coordinator.reset_firmware_config() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_reset_firmware_config_supported(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test reset_firmware_config when supported""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "bluefield3" + + from mellanox_fw_manager.fw_manager import BluefieldFirmwareManager + mock_manager = MagicMock(spec=BluefieldFirmwareManager) + mock_manager.reset_firmware_config = MagicMock() + mock_manager.asic_type = "bluefield3" + mock_manager.asic_index = 0 + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + coordinator.managers = [mock_manager] + + coordinator.reset_firmware_config() + + mock_manager.reset_firmware_config.assert_called_once() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_check_upgrade_required_no_failures(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test check_upgrade_required when no previous failures""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_upgrade_required.return_value = True + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + result = coordinator.check_upgrade_required() + + self.assertTrue(result) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_check_upgrade_required_with_failures(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test check_upgrade_required when there are previous failures""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_upgrade_required.return_value = True + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + result = coordinator.check_upgrade_required() + + self.assertTrue(result) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_init_manager_creation_failure(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test FirmwareCoordinator initialization when manager creation fails (lines 72-75)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_create_manager.side_effect = FirmwareManagerError("Failed to create manager") + + with self.assertRaises(FirmwareManagerError): + FirmwareCoordinator() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_upgrade_firmware_queue_processing_exception(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test upgrade_firmware when queue processing raises exception (lines 140-141)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_alive.return_value = False + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue: + mock_queue_instance = MagicMock() + mock_queue.return_value = mock_queue_instance + + mock_queue_instance.empty.side_effect = [False, True] + mock_queue_instance.get_nowait.side_effect = Exception("Queue error") + + with self.assertRaises(FirmwareUpgradeError): + coordinator.upgrade_firmware() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_upgrade_firmware_all_failures(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test upgrade_firmware when all ASICs fail (lines 151-152)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_alive.return_value = False + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue: + mock_queue_instance = MagicMock() + mock_queue.return_value = mock_queue_instance + + status_data = { + 'asic_index': 0, + 'status': 'failed', + 'message': 'Upgrade failed', + 'current_version': '1.0', + 'available_version': '1.1', + 'pci_id': '01:00.0' + } + mock_queue_instance.empty.side_effect = [False, True] + mock_queue_instance.get_nowait.return_value = status_data + + with self.assertRaises(FirmwareUpgradeError) as context: + coordinator.upgrade_firmware() + + self.assertIn("All ASIC upgrades failed", str(context.exception)) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_upgrade_firmware_partial_failures(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test upgrade_firmware with partial failures (lines 154-155)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0", "02:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager1 = MagicMock() + mock_manager1.asic_index = 0 + mock_manager1.is_alive.return_value = False + mock_manager2 = MagicMock() + mock_manager2.asic_index = 1 + mock_manager2.is_alive.return_value = False + mock_create_manager.side_effect = [mock_manager1, mock_manager2] + + coordinator = FirmwareCoordinator() + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue: + mock_queue_instance = MagicMock() + mock_queue.return_value = mock_queue_instance + + status_data = [ + { + 'asic_index': 0, + 'status': 'success', + 'message': 'Upgrade completed', + 'current_version': '1.0', + 'available_version': '1.1', + 'pci_id': '01:00.0' + }, + { + 'asic_index': 1, + 'status': 'failed', + 'message': 'Upgrade failed', + 'current_version': '1.0', + 'available_version': '1.1', + 'pci_id': '02:00.0' + } + ] + mock_queue_instance.empty.side_effect = [False, False, True] + mock_queue_instance.get_nowait.side_effect = status_data + + with self.assertRaises(FirmwareUpgradePartialError) as context: + coordinator.upgrade_firmware() + + self.assertIn("Some ASIC upgrades failed", str(context.exception)) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_check_upgrade_required_error_handling(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test check_upgrade_required when manager.is_upgrade_required raises exception (lines 191-194)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_upgrade_required.side_effect = Exception("Check failed") + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + result = coordinator.check_upgrade_required() + + self.assertTrue(result) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + @patch('mellanox_fw_manager.firmware_coordinator.run_command') + def test_get_image_firmware_path_sonic_installer_failure(self, mock_run, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test _get_image_firmware_path when sonic-installer fails (lines 214-215)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 0 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_run.return_value = MagicMock(returncode=1, stdout="", stderr="Command failed") + + with self.assertRaises(FirmwareUpgradeError) as context: + FirmwareCoordinator(from_image=True) + + self.assertIn("Failed to get SONiC image list", str(context.exception)) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + @patch('mellanox_fw_manager.firmware_coordinator.run_command') + def test_get_image_firmware_path_no_next_image(self, mock_run, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test _get_image_firmware_path when no next image found (lines 225-226)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 0 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_run.return_value = MagicMock( + returncode=0, + stdout="Current: SONiC-OS-202301.01\nAvailable: SONiC-OS-202302.01" + ) + + with self.assertRaises(FirmwareUpgradeError) as context: + FirmwareCoordinator(from_image=True) + + self.assertIn("No next SONiC image found", str(context.exception)) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + @patch('mellanox_fw_manager.firmware_coordinator.run_command') + @patch('mellanox_fw_manager.firmware_coordinator.os.path.exists') + def test_get_image_firmware_path_current_equals_next(self, mock_exists, mock_run, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test _get_image_firmware_path when current equals next image - should proceed normally""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 0 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_run.return_value = MagicMock( + returncode=0, + stdout="Current: SONiC-OS-202301.01\nNext: SONiC-OS-202301.01" + ) + + mock_exists.return_value = True + + coordinator = FirmwareCoordinator(from_image=True) + + expected_path = "/host/image-202301.01/platform/fw/asic/" + self.assertEqual(coordinator.fw_bin_path, expected_path) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + @patch('mellanox_fw_manager.firmware_coordinator.run_command') + @patch('mellanox_fw_manager.firmware_coordinator.os.path.exists') + def test_get_image_firmware_path_platform_specific(self, mock_exists, mock_run, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test _get_image_firmware_path with platform-specific path (lines 234-236)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 0 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_run.return_value = MagicMock( + returncode=0, + stdout="Current: SONiC-OS-202301.01\nNext: SONiC-OS-202302.01" + ) + + mock_exists.return_value = True + + coordinator = FirmwareCoordinator(from_image=True) + + expected_path = "/host/image-202302.01/platform/fw/asic/" + self.assertEqual(coordinator.fw_bin_path, expected_path) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + @patch('mellanox_fw_manager.firmware_coordinator.run_command') + @patch('mellanox_fw_manager.firmware_coordinator.os.path.exists') + @patch('mellanox_fw_manager.firmware_coordinator.os.makedirs') + def test_get_image_firmware_path_squashfs_mount_success(self, mock_makedirs, mock_exists, mock_run, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test _get_image_firmware_path with squashfs mounting (lines 245-254)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 0 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_run.side_effect = [ + MagicMock(returncode=0, stdout="Current: SONiC-OS-202301.01\nNext: SONiC-OS-202302.01"), + MagicMock(returncode=0) + ] + + mock_exists.return_value = False + + coordinator = FirmwareCoordinator(from_image=True) + + expected_path = "/tmp/image-202302.01-fs/etc/mlnx/" + self.assertEqual(coordinator.fw_bin_path, expected_path) + + mount_call = mock_run.call_args_list[1] + self.assertIn('mount', mount_call[0][0]) + self.assertIn('squashfs', mount_call[0][0]) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + @patch('mellanox_fw_manager.firmware_coordinator.run_command') + @patch('mellanox_fw_manager.firmware_coordinator.os.path.exists') + @patch('mellanox_fw_manager.firmware_coordinator.os.makedirs') + def test_get_image_firmware_path_mount_failure(self, mock_makedirs, mock_exists, mock_run, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test _get_image_firmware_path when mount fails (lines 250-251)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 0 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_run.side_effect = [ + MagicMock(returncode=0, stdout="Current: SONiC-OS-202301.01\nNext: SONiC-OS-202302.01"), + MagicMock(returncode=1) + ] + + mock_exists.return_value = False + + with self.assertRaises(FirmwareUpgradeError) as context: + FirmwareCoordinator(from_image=True) + + self.assertIn("Failed to mount", str(context.exception)) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_reset_firmware_config_reset_failure(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test reset_firmware_config when reset fails (lines 305-306)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["08:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "bluefield3" + + from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager + mock_manager = MagicMock(spec=BluefieldFirmwareManager) + mock_manager.asic_index = 0 + mock_manager.reset_firmware_config.return_value = False + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + + with self.assertRaises(FirmwareManagerError): + coordinator.reset_firmware_config() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_reset_firmware_config_exception(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test reset_firmware_config when exception occurs (lines 307-309)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["08:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "bluefield3" + + from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager + mock_manager = MagicMock(spec=BluefieldFirmwareManager) + mock_manager.asic_index = 0 + mock_manager.reset_firmware_config.side_effect = Exception("Reset error") + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + + with self.assertRaises(FirmwareManagerError): + coordinator.reset_firmware_config() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_reset_firmware_config_all_failures(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test reset_firmware_config when all resets fail (line 312)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["08:00.0", "09:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "bluefield3" + + from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager + mock_manager1 = MagicMock(spec=BluefieldFirmwareManager) + mock_manager1.asic_index = 0 + mock_manager1.reset_firmware_config.return_value = False + mock_manager2 = MagicMock(spec=BluefieldFirmwareManager) + mock_manager2.asic_index = 1 + mock_manager2.reset_firmware_config.return_value = False + mock_create_manager.side_effect = [mock_manager1, mock_manager2] + + coordinator = FirmwareCoordinator() + + with self.assertRaises(FirmwareManagerError) as context: + coordinator.reset_firmware_config() + + self.assertIn("All BlueField ASIC resets failed", str(context.exception)) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_reset_firmware_config_partial_failures(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test reset_firmware_config with partial failures (line 314)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["08:00.0", "09:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "bluefield3" + + from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager + mock_manager1 = MagicMock(spec=BluefieldFirmwareManager) + mock_manager1.asic_index = 0 + mock_manager1.reset_firmware_config.return_value = True + mock_manager2 = MagicMock(spec=BluefieldFirmwareManager) + mock_manager2.asic_index = 1 + mock_manager2.reset_firmware_config.return_value = False + mock_create_manager.side_effect = [mock_manager1, mock_manager2] + + coordinator = FirmwareCoordinator() + coordinator.reset_firmware_config() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_upgrade_firmware_4_asics_all_success(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test upgrade_firmware with 4 ASICs all succeeding""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 4 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [ + "0000:01:10.0", "0000:02:11.0", "0000:03:12.0", "0000:04:13.0" + ] + mock_asic_manager.return_value.get_asic_type.return_value = "SPC5" + + mock_managers = [] + for i in range(4): + mock_manager = MagicMock() + mock_manager.asic_index = i + mock_manager.is_alive.return_value = False + mock_managers.append(mock_manager) + + mock_create_manager.side_effect = mock_managers + + coordinator = FirmwareCoordinator() + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue_class: + mock_queue_instance = MagicMock() + mock_queue_class.return_value = mock_queue_instance + + status_data = [ + { + 'asic_index': i, + 'status': UpgradeStatusType.SUCCESS.value, + 'message': f'ASIC {i} upgrade completed', + 'current_version': '1.0', + 'available_version': '1.1', + 'pci_id': f'0000:0{i + 1}:1{i}.0' + } + for i in range(4) + ] + mock_queue_instance.empty.side_effect = [False, False, False, False, True] + mock_queue_instance.get_nowait.side_effect = status_data + + coordinator.upgrade_firmware() + + # Verify all 4 managers were started + for i, manager in enumerate(mock_managers): + manager.start.assert_called_once() + self.assertEqual(manager.status_queue, mock_queue_instance) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_upgrade_firmware_4_asics_verify_parallel_start(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test that all 4 ASIC managers are started in parallel (before any join)""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 4 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = [ + "0000:01:10.0", "0000:02:11.0", "0000:03:12.0", "0000:04:13.0" + ] + mock_asic_manager.return_value.get_asic_type.return_value = "SPC5" + + start_order = [] + join_order = [] + + mock_managers = [] + for i in range(4): + mock_manager = MagicMock() + mock_manager.asic_index = i + mock_manager.is_alive.return_value = False + + # Track when start() and join() are called + def make_start_tracker(idx): + def track_start(): + start_order.append(idx) + return track_start + + def make_join_tracker(idx): + def track_join(timeout=None): + join_order.append(idx) + return track_join + + mock_manager.start.side_effect = make_start_tracker(i) + mock_manager.join.side_effect = make_join_tracker(i) + mock_managers.append(mock_manager) + + mock_create_manager.side_effect = mock_managers + + coordinator = FirmwareCoordinator() + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue_class: + mock_queue_instance = MagicMock() + mock_queue_class.return_value = mock_queue_instance + + status_data = [ + { + 'asic_index': i, + 'status': UpgradeStatusType.SUCCESS.value, + 'message': f'ASIC {i} upgrade completed', + 'current_version': '1.0', + 'available_version': '1.1', + 'pci_id': f'0000:0{i + 1}:1{i}.0' + } + for i in range(4) + ] + mock_queue_instance.empty.side_effect = [False, False, False, False, True] + mock_queue_instance.get_nowait.side_effect = status_data + + coordinator.upgrade_firmware() + + # Verify all managers were started BEFORE any joins + self.assertEqual(start_order, [0, 1, 2, 3], "All processes should start before joining") + self.assertEqual(join_order, [0, 1, 2, 3], "Processes should join in order") + + # Verify start() called on all before first join + for manager in mock_managers: + manager.start.assert_called_once() + manager.join.assert_called_once() + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_firmware_upgrade.py b/platform/mellanox/fw-manager/tests/test_firmware_upgrade.py new file mode 100644 index 00000000000..abc3bbda56d --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_firmware_upgrade.py @@ -0,0 +1,498 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Unit tests for firmware upgrade functionality with mocked mlxfwmanager +""" + +from mellanox_fw_manager.fw_manager import UpgradeStatusType, FirmwareUpgradeError, FirmwareUpgradePartialError +from mellanox_fw_manager.firmware_coordinator import FirmwareCoordinator +from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager +from mellanox_fw_manager.spectrum_manager import SpectrumFirmwareManager +import os +import sys +import unittest +from unittest.mock import patch, MagicMock, mock_open +import tempfile +import multiprocessing + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestFirmwareUpgrade(unittest.TestCase): + """Test firmware upgrade functionality with mocked mlxfwmanager""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + self.spectrum3_xml = ''' + + + + + + Update required + NVIDIA Spectrum-3 based 400GbE 2U Ethernet Smart-Switch with ONIE; 28 ports QSFP-DD; 4 DPUs; 2 power supplies (AC); x86 CPU - 16 Cores; Secure-boot Capable; standard depth; C2P airflow; Tool-less Rail Kit - INTERNAL USE + +''' + self.bluefield3_xml = ''' + + + + + + + Update required + NVIDIA BlueField-3 DPU based COM express; DK IPN + +''' + + self.spectrum3_no_available_xml = ''' + + + + + No matching image found + +''' + self.bluefield3_no_available_xml = ''' + + + + + No matching image found + +''' + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + def _create_spectrum_manager(self, **kwargs): + """Helper to create SpectrumFirmwareManager with default values""" + defaults = { + 'asic_index': 0, + 'pci_id': "01:00.0", + 'fw_bin_path': "/test/fw", + 'verbose': False, + 'clear_semaphore': False, + 'asic_type': "SPC3" + } + defaults.update(kwargs) + + manager = SpectrumFirmwareManager(**defaults) + manager.fw_file = "/test/fw/fw-SPC3.mfa" + return manager + + def _create_bluefield_manager(self, **kwargs): + """Helper to create BluefieldFirmwareManager with default values""" + defaults = { + 'asic_index': 0, + 'pci_id': "03:00.0", + 'fw_bin_path': "/test/fw", + 'verbose': False, + 'clear_semaphore': False, + 'asic_type': "BF3" + } + defaults.update(kwargs) + + manager = BluefieldFirmwareManager(**defaults) + manager.fw_file = "/test/fw/fw-BF3.mfa" + return manager + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_spectrum_firmware_upgrade_success(self, mock_run, mock_init_asic): + """Test successful firmware upgrade for Spectrum ASIC""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=0, stdout=self.spectrum3_xml), + MagicMock(returncode=0, stdout="MT_0000001187 field1 field2 30.2016.1040"), + MagicMock(returncode=0, stdout="Firmware update completed successfully") + ] + + manager = self._create_spectrum_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + current_version, available_version = manager._get_firmware_versions() + self.assertEqual(current_version, "30.2016.1036") + self.assertEqual(available_version, "30.2016.1040") + + mock_run.reset_mock() + mock_run.return_value = MagicMock(returncode=0, stdout="Firmware update completed successfully") + + result = manager.run_firmware_update() + self.assertTrue(result) + + self.assertEqual(mock_run.call_count, 1) + + upgrade_call = mock_run.call_args_list[0] + self.assertIn('mlxfwmanager', upgrade_call[0][0]) + self.assertIn('-u', upgrade_call[0][0]) + self.assertIn('-f', upgrade_call[0][0]) + self.assertIn('-y', upgrade_call[0][0]) + self.assertIn('-d', upgrade_call[0][0]) + self.assertIn('01:00.0', upgrade_call[0][0]) + self.assertIn('-i', upgrade_call[0][0]) + self.assertIn('/test/fw/fw-SPC3.mfa', upgrade_call[0][0]) + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.bluefield_manager.subprocess.run') + def test_bluefield_firmware_upgrade_success(self, mock_run, mock_init_asic): + """Test successful firmware upgrade for BlueField ASIC""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=0, stdout=self.bluefield3_xml), + MagicMock(returncode=0, stdout="Image type: BF3\nFW Version: 32.46.0420\nPSID: MT_0000001138"), + MagicMock(returncode=0, stdout="FW reactivation completed"), + MagicMock(returncode=0, stdout="Firmware burn completed successfully"), + MagicMock(returncode=0, stdout="Configuration reset completed") + ] + + manager = self._create_bluefield_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + current_version, available_version = manager._get_firmware_versions() + self.assertEqual(current_version, "32.46.0412") + self.assertEqual(available_version, "32.46.0420") + + manager.run_firmware_update() + + self.assertEqual(mock_run.call_count, 5) + + query_call = mock_run.call_args_list[0] + self.assertIn('mlxfwmanager', query_call[0][0]) + self.assertIn('--query-format', query_call[0][0]) + self.assertIn('XML', query_call[0][0]) + + flint_query_call = mock_run.call_args_list[1] + self.assertIn('flint', flint_query_call[0][0]) + self.assertIn('--psid', flint_query_call[0][0]) + self.assertIn('query', flint_query_call[0][0]) + + reactivate_call = mock_run.call_args_list[2] + self.assertIn('flint', reactivate_call[0][0]) + self.assertIn('-d', reactivate_call[0][0]) + self.assertIn('ir', reactivate_call[0][0]) + + burn_call = mock_run.call_args_list[3] + self.assertIn('flint', burn_call[0][0]) + self.assertIn('-d', burn_call[0][0]) + self.assertIn('burn', burn_call[0][0]) + + reset_call = mock_run.call_args_list[4] + self.assertIn('mlxconfig', reset_call[0][0]) + self.assertIn('-d', reset_call[0][0]) + self.assertIn('-y', reset_call[0][0]) + self.assertIn('r', reset_call[0][0]) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_firmware_upgrade_failure(self, mock_run, mock_init_asic): + """Test firmware upgrade failure handling""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock(returncode=1, stderr="Error: Failed to update firmware - device busy") + + manager = self._create_spectrum_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + result = manager.run_firmware_update() + self.assertFalse(result) + + self.assertEqual(mock_run.call_count, 1) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_spectrum_firmware_reactivation_scenario(self, mock_run, mock_init_asic): + """Test firmware upgrade with reactivation required (return code 2)""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=2, stdout="Firmware reactivation required"), + MagicMock(returncode=0, stdout="FW reactivation completed"), + MagicMock(returncode=0, stdout="Firmware update completed successfully") + ] + + manager = self._create_spectrum_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + result = manager.run_firmware_update() + self.assertTrue(result) + + self.assertEqual(mock_run.call_count, 3) + + reactivate_call = mock_run.call_args_list[1] + self.assertIn('flint', reactivate_call[0][0]) + self.assertIn('-d', reactivate_call[0][0]) + self.assertIn('01:00.0', reactivate_call[0][0]) + self.assertIn('ir', reactivate_call[0][0]) + + retry_call = mock_run.call_args_list[2] + self.assertIn('mlxfwmanager', retry_call[0][0]) + self.assertIn('-u', retry_call[0][0]) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_firmware_version_parsing(self, mock_run, mock_init_asic): + """Test firmware version parsing from mlxfwmanager output""" + mock_init_asic.return_value = None + + test_cases = [ + { + 'xml': self.spectrum3_no_available_xml, + 'expected': "30.2016.1036", + 'psid': "MT_0000001187" + }, + { + 'xml': self.bluefield3_no_available_xml, + 'expected': "32.46.0412", + 'psid': "MT_0000001138" + } + ] + + manager = self._create_spectrum_manager() + + for test_case in test_cases: + mock_run.side_effect = [ + MagicMock(returncode=0, stdout=test_case['xml']), + MagicMock(returncode=0, stdout=f"{test_case['psid']} field1 field2 {test_case['expected']}") + ] + + version = manager._get_firmware_versions() + self.assertEqual(version[0], test_case['expected']) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_firmware_query_failure(self, mock_run, mock_init_asic): + """Test handling of firmware query failures""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock( + returncode=1, + stderr="Error: Device not found" + ) + + manager = self._create_spectrum_manager() + + version = manager._get_firmware_versions() + self.assertEqual(version[0], None) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_clear_semaphore_functionality(self, mock_run, mock_init_asic): + """Test clear semaphore functionality""" + mock_init_asic.return_value = None + + mock_run.side_effect = [ + MagicMock(returncode=0, stdout="Semaphore cleared successfully"), + MagicMock( + returncode=0, + stdout="FW Version: 13.2000.1004\nPSID: MT_2700000123\nDetailed info..." + ), + MagicMock(returncode=0, stdout="Verbose firmware update output...") + ] + + mock_run.return_value = MagicMock(returncode=0, stdout="Firmware update completed successfully") + + manager = self._create_spectrum_manager(clear_semaphore=True) + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + result = manager.run_firmware_update() + self.assertTrue(result) + + self.assertEqual(mock_run.call_count, 1) + + upgrade_call = mock_run.call_args_list[0] + self.assertIn('mlxfwmanager', upgrade_call[0][0]) + self.assertIn('-u', upgrade_call[0][0]) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_verbose_mode_commands(self, mock_run, mock_init_asic): + """Test that verbose mode affects mlxfwmanager commands""" + mock_init_asic.return_value = None + + mock_run.return_value = MagicMock(returncode=0, stdout="Verbose firmware update output...") + + manager = self._create_spectrum_manager(verbose=True) + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + result = manager.run_firmware_update() + self.assertTrue(result) + + self.assertEqual(mock_run.call_count, 1) + + upgrade_call = mock_run.call_args_list[0] + env = upgrade_call[1].get('env', {}) + self.assertIn('FLASH_ACCESS_DEBUG', env) + self.assertIn('FW_COMPS_DEBUG', env) + self.assertEqual(env['FLASH_ACCESS_DEBUG'], '1') + self.assertEqual(env['FW_COMPS_DEBUG'], '1') + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_coordinator_firmware_upgrade_success(self, mock_create_manager, + mock_asic_manager, mock_detect_platform): + """Test firmware upgrade coordination across multiple ASICs""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0", "02:00.0"] + + mock_managers = [] + for i in range(2): + mock_manager = MagicMock() + mock_manager.asic_index = i + mock_manager.is_alive.return_value = False + mock_managers.append(mock_manager) + + mock_create_manager.side_effect = mock_managers + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue_class: + mock_queue = MagicMock() + mock_queue.empty.side_effect = [False, False, True] # Two items, then empty + mock_queue.get_nowait.side_effect = [ + { + 'asic_index': 0, + 'status': UpgradeStatusType.SUCCESS.value, + 'message': 'Firmware upgraded successfully', + 'current_version': '13.2000.1004', + 'available_version': '13.2000.1010', + 'pci_id': '01:00.0' + }, + { + 'asic_index': 1, + 'status': UpgradeStatusType.SUCCESS.value, + 'message': 'Firmware upgraded successfully', + 'current_version': '13.2000.1004', + 'available_version': '13.2000.1010', + 'pci_id': '02:00.0' + } + ] + mock_queue_class.return_value = mock_queue + + coordinator = FirmwareCoordinator(verbose=False) + + coordinator.upgrade_firmware() + + for manager in mock_managers: + manager.start.assert_called_once() + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_coordinator_partial_failure(self, mock_create_manager, + mock_asic_manager, mock_detect_platform): + """Test firmware upgrade coordination with partial failures""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0", "02:00.0"] + + mock_managers = [] + for i in range(2): + mock_manager = MagicMock() + mock_manager.asic_index = i + mock_manager.is_alive.return_value = False + mock_managers.append(mock_manager) + + mock_create_manager.side_effect = mock_managers + + with patch('mellanox_fw_manager.firmware_coordinator.Queue') as mock_queue_class: + mock_queue = MagicMock() + mock_queue.empty.side_effect = [False, False, True] # Two items, then empty + mock_queue.get_nowait.side_effect = [ + { + 'asic_index': 0, + 'status': UpgradeStatusType.SUCCESS.value, + 'message': 'Firmware upgraded successfully', + 'current_version': '13.2000.1004', + 'available_version': '13.2000.1010', + 'pci_id': '01:00.0' + }, + { + 'asic_index': 1, + 'status': UpgradeStatusType.FAILED.value, + 'message': 'Firmware upgrade failed - device busy', + 'current_version': '13.2000.1004', + 'available_version': '13.2000.1010', + 'pci_id': '02:00.0' + } + ] + mock_queue_class.return_value = mock_queue + + coordinator = FirmwareCoordinator(verbose=False) + + try: + coordinator.upgrade_firmware() + self.assertTrue(True) + except FirmwareUpgradePartialError: + self.assertTrue(True) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_firmware_file_not_found(self, mock_run, mock_init_asic): + """Test handling when firmware file doesn't exist""" + mock_init_asic.return_value = None + + manager = self._create_spectrum_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=False): + result = manager.run_firmware_update() + self.assertFalse(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_spectrum_firmware_upgrade_exception(self, mock_run, mock_init_asic): + """Test firmware upgrade exception handling""" + mock_init_asic.return_value = None + + mock_run.side_effect = Exception("Subprocess execution failed") + + manager = self._create_spectrum_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + result = manager.run_firmware_update() + self.assertFalse(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + @patch('mellanox_fw_manager.spectrum_manager.subprocess.run') + def test_mst_device_detection(self, mock_run, mock_init_asic): + """Test MST device detection and retry logic""" + mock_init_asic.return_value = None + + lspci_output = "01:00.0 Ethernet controller [0200]: Mellanox Technologies MT53104 Family [Spectrum-3]" + + mock_run.side_effect = [ + MagicMock(returncode=0, stdout=lspci_output), + MagicMock(returncode=0, stdout=self.spectrum3_no_available_xml), + MagicMock(returncode=0, stdout="/dev/mst/mt53104_pci_cr0 - PCI direct access.\n domain:bus:dev.fn=0000:06:00.0 bar=0xe8000000 size=0x4000000"), + ] + + manager = self._create_spectrum_manager() + + with patch('mellanox_fw_manager.firmware_base.os.path.exists', return_value=True): + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_init.py b/platform/mellanox/fw-manager/tests/test_init.py new file mode 100644 index 00000000000..a47d15e1d66 --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_init.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Unit tests for __init__.py module +""" + +from mellanox_fw_manager import * +import os +import sys +import unittest +from unittest.mock import patch, MagicMock + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestInitModule(unittest.TestCase): + """Test cases for __init__.py module""" + + def test_imports(self): + """Test that all expected imports are available""" + from mellanox_fw_manager.fw_manager import ( + FirmwareManagerBase, + SpectrumFirmwareManager, + BluefieldFirmwareManager, + FirmwareCoordinator, + FirmwareManagerError, + FirmwareUpgradeError, + FirmwareUpgradePartialError + ) + + from mellanox_fw_manager.main import main + + from mellanox_fw_manager.asic_manager import AsicManager + + self.assertTrue(hasattr(FirmwareManagerBase, '__init__')) + self.assertTrue(hasattr(SpectrumFirmwareManager, '__init__')) + self.assertTrue(hasattr(BluefieldFirmwareManager, '__init__')) + self.assertTrue(hasattr(FirmwareCoordinator, '__init__')) + self.assertTrue(hasattr(AsicManager, '__init__')) + + self.assertTrue(issubclass(FirmwareManagerError, Exception)) + self.assertTrue(issubclass(FirmwareUpgradeError, Exception)) + self.assertTrue(issubclass(FirmwareUpgradePartialError, Exception)) + + self.assertTrue(callable(main)) + + def test_module_attributes(self): + """Test that module has expected attributes""" + import mellanox_fw_manager + + self.assertTrue(hasattr(mellanox_fw_manager, '__version__')) + self.assertEqual(mellanox_fw_manager.__version__, "1.0.0") + + self.assertTrue(hasattr(mellanox_fw_manager, '__author__')) + self.assertEqual(mellanox_fw_manager.__author__, "SONiC Team") + + def test_import_error_handling(self): + """Test that import errors are handled gracefully""" + try: + import mellanox_fw_manager + self.assertTrue(True) + except ImportError as e: + self.fail(f"Import failed: {e}") + + def test_all_imports_available(self): + """Test that all expected symbols are available in the module""" + import mellanox_fw_manager + + expected_symbols = [ + 'FirmwareManagerBase', + 'SpectrumFirmwareManager', + 'BluefieldFirmwareManager', + 'FirmwareManagerError', + 'FirmwareUpgradeError', + 'FirmwareUpgradePartialError', + 'AsicManager', + '__version__', + '__author__' + ] + + for symbol in expected_symbols: + self.assertTrue(hasattr(mellanox_fw_manager, symbol), f"Symbol {symbol} not found in __init__.py") + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_integration.py b/platform/mellanox/fw-manager/tests/test_integration.py new file mode 100644 index 00000000000..f68de53f2df --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_integration.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Integration tests for the complete firmware manager system +""" + +from mellanox_fw_manager.asic_manager import AsicManager +from mellanox_fw_manager.fw_manager import create_firmware_manager +from mellanox_fw_manager.firmware_coordinator import FirmwareCoordinator +import os +import tempfile +import unittest +from unittest.mock import patch, MagicMock, mock_open +import sys +import multiprocessing + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestIntegration(unittest.TestCase): + """Integration tests for the complete system""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_error_handling_integration(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test error handling integration across components""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 2 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0", "02:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager1 = MagicMock() + mock_manager1.asic_index = 0 + mock_manager1.is_upgrade_required.return_value = True + + mock_manager2 = MagicMock() + mock_manager2.asic_index = 1 + mock_manager2.is_upgrade_required.return_value = False + + mock_create_manager.side_effect = [mock_manager1, mock_manager2] + + coordinator = FirmwareCoordinator(verbose=True) + + coordinator.managers = [mock_manager1, mock_manager2] + + result = coordinator.check_upgrade_required() + self.assertTrue(result) + + mock_manager1.is_upgrade_required.assert_called_once() + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_asic_detection_integration(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test ASIC detection integration""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_upgrade_required.return_value = False + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator() + + asic_count = coordinator.get_asic_count() + self.assertEqual(asic_count, 1) + + pci_ids = coordinator.get_asic_pci_ids() + self.assertEqual(pci_ids, ["01:00.0"]) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._initialize_asic') + def test_firmware_manager_creation_integration(self, mock_init_asic): + """Test firmware manager creation integration for Spectrum""" + mock_init_asic.return_value = None + + manager = create_firmware_manager(0, "01:00.0", asic_type="SPC3", fw_bin_path="/test/fw") + + from mellanox_fw_manager.spectrum_manager import SpectrumFirmwareManager + self.assertIsInstance(manager, SpectrumFirmwareManager) + self.assertEqual(manager.asic_index, 0) + self.assertEqual(manager.pci_id, "01:00.0") + self.assertEqual(manager.fw_bin_path, "/test/fw") + self.assertEqual(manager.asic_type, "SPC3") + + @patch('mellanox_fw_manager.bluefield_manager.BluefieldFirmwareManager._initialize_asic') + def test_firmware_manager_creation_bluefield(self, mock_init_asic): + """Test firmware manager creation for BlueField""" + mock_init_asic.return_value = None + + manager = create_firmware_manager(0, "08:00.0", asic_type="BF3", fw_bin_path="/test/fw") + + from mellanox_fw_manager.bluefield_manager import BluefieldFirmwareManager + self.assertIsInstance(manager, BluefieldFirmwareManager) + self.assertEqual(manager.asic_index, 0) + self.assertEqual(manager.pci_id, "08:00.0") + self.assertEqual(manager.fw_bin_path, "/test/fw") + self.assertEqual(manager.asic_type, "BF3") + + @patch('mellanox_fw_manager.firmware_coordinator._detect_platform') + @patch('mellanox_fw_manager.firmware_coordinator.AsicManager') + @patch('mellanox_fw_manager.fw_manager.create_firmware_manager') + def test_coordinator_lifecycle(self, mock_create_manager, mock_asic_manager, mock_detect_platform): + """Test complete coordinator lifecycle""" + mock_detect_platform.return_value = "test-platform" + mock_asic_manager.return_value.get_asic_count.return_value = 1 + mock_asic_manager.return_value.get_asic_pci_ids.return_value = ["01:00.0"] + mock_asic_manager.return_value.get_asic_type.return_value = "spectrum" + + mock_manager = MagicMock() + mock_manager.asic_index = 0 + mock_manager.is_upgrade_required.return_value = False + mock_create_manager.return_value = mock_manager + + coordinator = FirmwareCoordinator(verbose=True, from_image=False, clear_semaphore=True) + + self.assertEqual(coordinator.get_asic_count(), 1) + self.assertEqual(coordinator.get_asic_pci_ids(), ["01:00.0"]) + self.assertFalse(coordinator.check_upgrade_required()) + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_main.py b/platform/mellanox/fw-manager/tests/test_main.py new file mode 100644 index 00000000000..e2291b65f6d --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_main.py @@ -0,0 +1,405 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Comprehensive unit tests for main.py CLI module + +This file tests both the CLI command functionality and module-level helper functions. +""" + +from click.testing import CliRunner +from mellanox_fw_manager.fw_manager import FirmwareManagerError, FirmwareUpgradeError, FirmwareUpgradePartialError +from mellanox_fw_manager.main import ( + setup_logging, _exit_if_qemu, _lock_state_change, + handle_reset, handle_dry_run, handle_upgrade, main, + EXIT_SUCCESS, EXIT_FAILURE, FW_UPGRADE_IS_REQUIRED +) +import os +import sys +import unittest +from unittest.mock import patch, MagicMock, mock_open +import tempfile + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestMainModule(unittest.TestCase): + """Test cases for main module helper functions""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + @patch('mellanox_fw_manager.main.logging.getLogger') + @patch('mellanox_fw_manager.main.logging.handlers.SysLogHandler') + @patch('mellanox_fw_manager.main.logging.StreamHandler') + def test_setup_logging_verbose(self, mock_stream_handler, mock_syslog_handler, mock_get_logger): + """Test setup_logging with verbose=True""" + mock_logger = MagicMock() + mock_get_logger.return_value = mock_logger + + setup_logging(verbose=True) + + self.assertEqual(mock_logger.addHandler.call_count, 2) + mock_syslog_handler.assert_called_once() + mock_stream_handler.assert_called_once() + + @patch('mellanox_fw_manager.main.logging.getLogger') + @patch('mellanox_fw_manager.main.logging.handlers.SysLogHandler') + def test_setup_logging_not_verbose(self, mock_syslog_handler, mock_get_logger): + """Test setup_logging with verbose=False""" + mock_logger = MagicMock() + mock_get_logger.return_value = mock_logger + + setup_logging(verbose=False) + + mock_logger.addHandler.assert_called_once() + mock_syslog_handler.assert_called_once() + + @patch('mellanox_fw_manager.main.subprocess.run') + @patch('mellanox_fw_manager.main.logger') + def test_exit_if_qemu_not_qemu(self, mock_logger, mock_run): + """Test _exit_if_qemu when not running on QEMU""" + mock_run.return_value.stdout = "Some other device" + mock_run.return_value.returncode = 0 + + try: + _exit_if_qemu() + except SystemExit: + self.fail("_exit_if_qemu() raised SystemExit unexpectedly") + + @patch('mellanox_fw_manager.main.subprocess.run') + @patch('mellanox_fw_manager.main.logger') + def test_exit_if_qemu_is_qemu(self, mock_logger, mock_run): + """Test _exit_if_qemu when running on QEMU""" + mock_run.return_value.stdout = "SimX device detected" + mock_run.return_value.returncode = 0 + + with self.assertRaises(SystemExit) as cm: + _exit_if_qemu() + + self.assertEqual(cm.exception.code, 0) + + @patch('mellanox_fw_manager.main.subprocess.run') + @patch('mellanox_fw_manager.main.logger') + def test_exit_if_qemu_command_fails(self, mock_logger, mock_run): + """Test _exit_if_qemu when lspci command fails""" + mock_run.return_value.returncode = 1 + + try: + _exit_if_qemu() + except SystemExit: + self.fail("_exit_if_qemu() raised SystemExit when command failed") + + @patch('mellanox_fw_manager.main.subprocess.run') + @patch('mellanox_fw_manager.main.logger') + def test_exit_if_qemu_exception_handling(self, mock_logger, mock_run): + """Test _exit_if_qemu exception handling (line 69)""" + mock_run.side_effect = Exception("Command failed") + + try: + _exit_if_qemu() + mock_logger.warning.assert_called_once() + except SystemExit: + self.fail("_exit_if_qemu() raised SystemExit when exception occurred") + + @patch('mellanox_fw_manager.main.logger') + def test_lock_state_change_context_manager(self, mock_logger): + """Test _lock_state_change as context manager""" + with patch('mellanox_fw_manager.main.fcntl.flock') as mock_flock: + with patch('builtins.open', mock_open()) as mock_file: + with _lock_state_change(): + pass + + self.assertEqual(mock_flock.call_count, 2) + + @patch('mellanox_fw_manager.main.logger') + def test_lock_state_change_exception_handling(self, mock_logger): + """Test _lock_state_change exception handling""" + with patch('mellanox_fw_manager.main.fcntl.flock', side_effect=OSError("Permission denied")): + with patch('builtins.open', mock_open()): + with self.assertRaises(FirmwareManagerError): + with _lock_state_change(): + pass + + def test_main_function_exists(self, ): + """Test that main function exists and is callable""" + self.assertTrue(callable(main)) + + +class TestHandlerFunctions(unittest.TestCase): + """Test cases for individual handler functions""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + def test_handle_reset_success(self, mock_coordinator_class): + """Test handle_reset successful operation""" + mock_coordinator = MagicMock() + mock_coordinator.reset_firmware_config.return_value = None + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_reset(verbose=False) + + self.assertEqual(result, EXIT_SUCCESS) + mock_coordinator.reset_firmware_config.assert_called_once() + mock_print.assert_called_with("Firmware configuration reset completed successfully.") + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + def test_handle_reset_failure(self, mock_coordinator_class): + """Test handle_reset failure""" + mock_coordinator = MagicMock() + mock_coordinator.reset_firmware_config.side_effect = Exception("Reset failed") + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_reset(verbose=False) + + self.assertEqual(result, EXIT_FAILURE) + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_dry_run_upgrade_required(self, mock_logger, mock_coordinator_class): + """Test handle_dry_run when upgrade is required""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = True + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_dry_run(verbose=False, upgrade=False) + + self.assertEqual(result, FW_UPGRADE_IS_REQUIRED) + mock_print.assert_called_with("Firmware upgrade is required.") + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_dry_run_up_to_date(self, mock_logger, mock_coordinator_class): + """Test handle_dry_run when firmware is up to date""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = False + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_dry_run(verbose=False, upgrade=False) + + self.assertEqual(result, EXIT_SUCCESS) + mock_print.assert_called_with("Firmware is up to date.") + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_dry_run_exception(self, mock_logger, mock_coordinator_class): + """Test handle_dry_run exception handling""" + mock_coordinator_class.side_effect = Exception("Check failed") + + with patch('builtins.print') as mock_print: + result = handle_dry_run(verbose=False, upgrade=False) + + self.assertEqual(result, EXIT_FAILURE) + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_upgrade_success(self, mock_logger, mock_coordinator_class): + """Test handle_upgrade successful operation""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = True + mock_coordinator.upgrade_firmware.return_value = None + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_upgrade(verbose=False, upgrade=False, clear_semaphore=False) + + self.assertEqual(result, EXIT_SUCCESS) + mock_coordinator.upgrade_firmware.assert_called_once() + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_upgrade_up_to_date(self, mock_logger, mock_coordinator_class): + """Test handle_upgrade when firmware is already up to date""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = False + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_upgrade(verbose=False, upgrade=False, clear_semaphore=False) + + self.assertEqual(result, EXIT_SUCCESS) + mock_coordinator.upgrade_firmware.assert_not_called() + mock_print.assert_called_with("Firmware is up to date.") + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_upgrade_failure(self, mock_logger, mock_coordinator_class): + """Test handle_upgrade with FirmwareUpgradeError""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = True + mock_coordinator.upgrade_firmware.side_effect = FirmwareUpgradeError("Upgrade failed") + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_upgrade(verbose=False, upgrade=False, clear_semaphore=False) + + self.assertEqual(result, EXIT_FAILURE) + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_upgrade_partial_failure(self, mock_logger, mock_coordinator_class): + """Test handle_upgrade with FirmwareUpgradePartialError""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = True + mock_coordinator.upgrade_firmware.side_effect = FirmwareUpgradePartialError("Partial failure") + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_upgrade(verbose=False, upgrade=False, clear_semaphore=False) + + self.assertEqual(result, EXIT_SUCCESS) + + @patch('mellanox_fw_manager.main.FirmwareCoordinator') + @patch('mellanox_fw_manager.main.logger') + def test_handle_upgrade_generic_exception(self, mock_logger, mock_coordinator_class): + """Test handle_upgrade with generic exception""" + mock_coordinator = MagicMock() + mock_coordinator.check_upgrade_required.return_value = True + mock_coordinator.upgrade_firmware.side_effect = Exception("Unexpected error") + mock_coordinator_class.return_value = mock_coordinator + + with patch('builtins.print') as mock_print: + result = handle_upgrade(verbose=False, upgrade=False, clear_semaphore=False) + + self.assertEqual(result, EXIT_FAILURE) + + +class TestMainCLI(unittest.TestCase): + """Test main CLI function directly with proper mocking""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + @patch('mellanox_fw_manager.main.logger') + @patch('mellanox_fw_manager.main.setup_logging') + @patch('mellanox_fw_manager.main._exit_if_qemu') + @patch('mellanox_fw_manager.main._lock_state_change') + @patch('mellanox_fw_manager.main.handle_upgrade') + def test_verbose_mode_flag(self, mock_handle_upgrade, mock_lock, mock_exit_qemu, mock_setup_logging, mock_logger): + """Test that verbose flag is passed correctly""" + mock_lock.return_value.__enter__ = MagicMock() + mock_lock.return_value.__exit__ = MagicMock() + mock_handle_upgrade.return_value = EXIT_SUCCESS + + runner = CliRunner() + + result = runner.invoke(main, ['--verbose']) + + mock_setup_logging.assert_called_once_with(True, False) + + @patch('mellanox_fw_manager.main.logger') + @patch('mellanox_fw_manager.main.setup_logging') + @patch('mellanox_fw_manager.main._exit_if_qemu') + @patch('mellanox_fw_manager.main._lock_state_change') + @patch('mellanox_fw_manager.main.handle_upgrade') + def test_nosyslog_flag(self, mock_handle_upgrade, mock_lock, mock_exit_qemu, mock_setup_logging, mock_logger): + """Test that nosyslog flag is passed correctly""" + mock_lock.return_value.__enter__ = MagicMock() + mock_lock.return_value.__exit__ = MagicMock() + mock_handle_upgrade.return_value = EXIT_SUCCESS + + runner = CliRunner() + + result = runner.invoke(main, ['--nosyslog']) + + mock_setup_logging.assert_called_once_with(False, True) + + @patch('mellanox_fw_manager.main.logger') + @patch('mellanox_fw_manager.main.setup_logging') + @patch('mellanox_fw_manager.main._exit_if_qemu') + @patch('mellanox_fw_manager.main._lock_state_change') + @patch('mellanox_fw_manager.main.handle_reset') + def test_reset_operation_cli(self, mock_handle_reset, mock_lock, mock_exit_qemu, mock_setup_logging, mock_logger): + """Test main CLI with --reset""" + mock_lock.return_value.__enter__ = MagicMock() + mock_lock.return_value.__exit__ = MagicMock() + mock_handle_reset.return_value = EXIT_SUCCESS + + runner = CliRunner() + result = runner.invoke(main, ['--reset']) + + mock_handle_reset.assert_called_once_with(False) + + @patch('mellanox_fw_manager.main.logger') + @patch('mellanox_fw_manager.main.setup_logging') + @patch('mellanox_fw_manager.main._exit_if_qemu') + @patch('mellanox_fw_manager.main._lock_state_change') + @patch('mellanox_fw_manager.main.handle_dry_run') + def test_dry_run_operation_cli(self, mock_handle_dry_run, mock_lock, mock_exit_qemu, mock_setup_logging, mock_logger): + """Test main CLI with --dry-run""" + mock_lock.return_value.__enter__ = MagicMock() + mock_lock.return_value.__exit__ = MagicMock() + mock_handle_dry_run.return_value = EXIT_SUCCESS + + runner = CliRunner() + result = runner.invoke(main, ['--dry-run']) + + mock_handle_dry_run.assert_called_once_with(False, False) + + @patch('mellanox_fw_manager.main.logger') + @patch('mellanox_fw_manager.main.setup_logging') + @patch('mellanox_fw_manager.main._exit_if_qemu') + @patch('mellanox_fw_manager.main._lock_state_change') + @patch('mellanox_fw_manager.main.handle_upgrade') + def test_upgrade_with_flags_cli(self, mock_handle_upgrade, mock_lock, mock_exit_qemu, mock_setup_logging, mock_logger): + """Test main CLI with --upgrade and --clear-semaphore""" + mock_lock.return_value.__enter__ = MagicMock() + mock_lock.return_value.__exit__ = MagicMock() + mock_handle_upgrade.return_value = EXIT_SUCCESS + + runner = CliRunner() + + result = runner.invoke(main, ['--upgrade', '--clear-semaphore']) + + mock_handle_upgrade.assert_called_once_with(False, True, True) + + +def mock_open(): + """Helper function to create mock file object""" + mock_file = MagicMock() + mock_file.__enter__ = MagicMock(return_value=mock_file) + mock_file.__exit__ = MagicMock(return_value=None) + return mock_file + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_platform_detection.py b/platform/mellanox/fw-manager/tests/test_platform_detection.py new file mode 100644 index 00000000000..1fe5385d257 --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_platform_detection.py @@ -0,0 +1,252 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Unit tests for platform detection and ASIC detection functions +""" + +from mellanox_fw_manager.platform_utils import ( + _detect_platform, + _detect_platform_from_asic_conf, _is_multi_asic, + run_command +) +import os +import sys +import unittest +from unittest.mock import patch, MagicMock, mock_open +import tempfile + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestPlatformDetection(unittest.TestCase): + """Test cases for platform detection functions""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + @patch('mellanox_fw_manager.platform_utils.logging') + def test_detect_platform_success(self, mock_logging, mock_exists): + """Test _detect_platform when platform file exists and contains onie_platform""" + mock_exists.return_value = True + + mock_file_content = """# SONiC platform configuration +onie_platform=x86_64-nvidia_sn4280-r0 +onie_machine=x86_64-nvidia_sn4280-r0 +""" + + with patch('builtins.open', mock_open(read_data=mock_file_content)): + result = _detect_platform() + + self.assertEqual(result, "x86_64-nvidia_sn4280-r0") + mock_logging.info.assert_called_with("Detected platform: x86_64-nvidia_sn4280-r0") + + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + @patch('mellanox_fw_manager.platform_utils.logging') + def test_detect_platform_file_not_exists(self, mock_logging, mock_exists): + """Test _detect_platform when platform file doesn't exist""" + mock_exists.return_value = False + + result = _detect_platform() + + self.assertIsNone(result) + mock_logging.error.assert_called_with("Platform configuration file not found: /host/machine.conf") + + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + @patch('mellanox_fw_manager.platform_utils.logging') + def test_detect_platform_no_onie_platform(self, mock_logging, mock_exists): + """Test _detect_platform when file exists but no onie_platform variable""" + mock_exists.return_value = True + + mock_file_content = """# SONiC platform configuration +onie_machine=x86_64-nvidia_sn4280-r0 +other_variable=value +""" + + with patch('builtins.open', mock_open(read_data=mock_file_content)): + result = _detect_platform() + + self.assertIsNone(result) + mock_logging.error.assert_called_with("Could not find onie_platform variable in /host/machine.conf") + + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + @patch('mellanox_fw_manager.platform_utils.logging') + def test_detect_platform_file_read_error(self, mock_logging, mock_exists): + """Test _detect_platform when file read fails""" + mock_exists.return_value = True + + with patch('builtins.open', side_effect=IOError("Permission denied")): + result = _detect_platform() + + self.assertIsNone(result) + mock_logging.error.assert_called_with("Platform detection failed: Permission denied") + + +class TestRunCommand(unittest.TestCase): + """Test cases for run_command utility function""" + + @patch('mellanox_fw_manager.platform_utils.subprocess.run') + @patch('mellanox_fw_manager.platform_utils.logging.getLogger') + def test_run_command_with_no_logger(self, mock_get_logger, mock_run): + """Test run_command when no logger is provided (uses root logger)""" + mock_logger = MagicMock() + mock_get_logger.return_value = mock_logger + mock_run.return_value = MagicMock(returncode=0, stdout="output") + + cmd = ['echo', 'test'] + result = run_command(cmd) + + mock_get_logger.assert_called_once_with() + mock_logger.info.assert_called_once_with("Executing: echo test") + mock_run.assert_called_once_with(cmd) + self.assertEqual(result.returncode, 0) + + @patch('mellanox_fw_manager.platform_utils.subprocess.run') + def test_run_command_with_logger(self, mock_run): + """Test run_command when logger is provided""" + mock_logger = MagicMock() + mock_run.return_value = MagicMock(returncode=0, stdout="output") + + cmd = ['echo', 'test'] + result = run_command(cmd, logger=mock_logger) + + mock_logger.info.assert_called_once_with("Executing: echo test") + mock_run.assert_called_once_with(cmd) + self.assertEqual(result.returncode, 0) + + @patch('mellanox_fw_manager.platform_utils.subprocess.run') + def test_run_command_with_kwargs(self, mock_run): + """Test run_command passes through kwargs to subprocess.run""" + mock_logger = MagicMock() + mock_run.return_value = MagicMock(returncode=0, stdout="output", stderr="") + + cmd = ['ls', '-la'] + result = run_command(cmd, logger=mock_logger, capture_output=True, text=True, check=True) + + mock_logger.info.assert_called_once_with("Executing: ls -la") + mock_run.assert_called_once_with(cmd, capture_output=True, text=True, check=True) + + +class TestDetectPlatformFromAsicConf(unittest.TestCase): + """Test cases for _detect_platform_from_asic_conf function""" + + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + @patch('mellanox_fw_manager.platform_utils.logging') + def test_detect_platform_from_asic_conf_success(self, mock_logging, mock_exists): + """Test _detect_platform_from_asic_conf when file exists""" + mock_exists.return_value = True + platform = "x86_64-nvidia_sn4280-r0" + + result = _detect_platform_from_asic_conf(platform) + + expected_path = f"/usr/share/sonic/device/{platform}/asic.conf" + self.assertEqual(result, expected_path) + mock_exists.assert_called_once_with(expected_path) + + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + @patch('mellanox_fw_manager.platform_utils.logging') + def test_detect_platform_from_asic_conf_file_not_exists(self, mock_logging, mock_exists): + """Test _detect_platform_from_asic_conf when file doesn't exist""" + mock_exists.return_value = False + platform = "x86_64-unknown-platform" + + result = _detect_platform_from_asic_conf(platform) + + self.assertIsNone(result) + expected_path = f"/usr/share/sonic/device/{platform}/asic.conf" + mock_logging.error.assert_called_once_with(f"ASIC configuration file not found: {expected_path}") + + @patch('mellanox_fw_manager.platform_utils.logging') + @patch('mellanox_fw_manager.platform_utils.os.path.exists') + def test_detect_platform_from_asic_conf_exception(self, mock_exists, mock_logging): + """Test _detect_platform_from_asic_conf when an exception occurs""" + mock_exists.side_effect = Exception("Unexpected error") + platform = "x86_64-test-platform" + + result = _detect_platform_from_asic_conf(platform) + + self.assertIsNone(result) + mock_logging.error.assert_called_once_with("Failed to detect platform from asic.conf: Unexpected error") + + +class TestIsMultiAsic(unittest.TestCase): + """Test cases for _is_multi_asic function""" + + def test_is_multi_asic_single_asic(self): + """Test _is_multi_asic with single ASIC configuration""" + mock_file_content = """# ASIC configuration +NUM_ASIC=1 +DEV_ID_ASIC_0=0x1234 +""" + with patch('builtins.open', mock_open(read_data=mock_file_content)): + result = _is_multi_asic("/path/to/asic.conf") + self.assertFalse(result) + + def test_is_multi_asic_multi_asic(self): + """Test _is_multi_asic with multi-ASIC configuration""" + mock_file_content = """# ASIC configuration +NUM_ASIC=2 +DEV_ID_ASIC_0=0x1234 +DEV_ID_ASIC_1=0x5678 +""" + with patch('builtins.open', mock_open(read_data=mock_file_content)): + result = _is_multi_asic("/path/to/asic.conf") + self.assertTrue(result) + + def test_is_multi_asic_no_num_asic_line(self): + """Test _is_multi_asic when NUM_ASIC line is missing""" + mock_file_content = """# ASIC configuration +DEV_ID_ASIC_0=0x1234 +OTHER_CONFIG=value +""" + with patch('builtins.open', mock_open(read_data=mock_file_content)): + result = _is_multi_asic("/path/to/asic.conf") + self.assertFalse(result) + + @patch('mellanox_fw_manager.platform_utils.logging') + def test_is_multi_asic_file_read_error(self, mock_logging): + """Test _is_multi_asic when file read fails""" + with patch('builtins.open', side_effect=IOError("Permission denied")): + result = _is_multi_asic("/path/to/asic.conf") + + self.assertFalse(result) + mock_logging.error.assert_called_once_with("Multi-ASIC detection failed: Permission denied") + + @patch('mellanox_fw_manager.platform_utils.logging') + def test_is_multi_asic_invalid_num_asic_value(self, mock_logging): + """Test _is_multi_asic with invalid NUM_ASIC value""" + mock_file_content = """# ASIC configuration +NUM_ASIC=invalid +DEV_ID_ASIC_0=0x1234 +""" + with patch('builtins.open', mock_open(read_data=mock_file_content)): + result = _is_multi_asic("/path/to/asic.conf") + + self.assertFalse(result) + self.assertTrue(mock_logging.error.called) + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw-manager/tests/test_spectrum_manager.py b/platform/mellanox/fw-manager/tests/test_spectrum_manager.py new file mode 100644 index 00000000000..511a01282b3 --- /dev/null +++ b/platform/mellanox/fw-manager/tests/test_spectrum_manager.py @@ -0,0 +1,312 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + +""" +Comprehensive unit tests for SpectrumFirmwareManager +""" + +from mellanox_fw_manager.firmware_base import FW_ALREADY_UPDATED_FAILURE +from mellanox_fw_manager.spectrum_manager import SpectrumFirmwareManager +import os +import sys +import unittest +from unittest.mock import patch, MagicMock +import tempfile + +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) + + +class TestSpectrumFirmwareManager(unittest.TestCase): + """Test cases for SpectrumFirmwareManager methods""" + + def setUp(self): + """Set up test fixtures""" + self.temp_dir = tempfile.mkdtemp() + + def tearDown(self): + """Clean up test fixtures""" + import shutil + shutil.rmtree(self.temp_dir, ignore_errors=True) + + def _create_manager(self, **kwargs): + """Helper to create SpectrumFirmwareManager with mocked initialization""" + defaults = { + 'asic_index': 0, + 'pci_id': "01:00.0", + 'fw_bin_path': self.temp_dir, + 'verbose': False, + 'clear_semaphore': False, + 'asic_type': 'SPC3', + 'status_queue': None + } + defaults.update(kwargs) + + with patch.object(SpectrumFirmwareManager, '_initialize_asic'): + manager = SpectrumFirmwareManager(**defaults) + manager.fw_file = f"{self.temp_dir}/fw-SPC3.mfa" + manager.current_version = "30.2016.1036" + manager.available_version = "30.2016.1040" + return manager + + def test_get_mst_device_type(self): + """Test _get_mst_device_type returns correct device type""" + manager = self._create_manager() + result = manager._get_mst_device_type() + self.assertEqual(result, "Spectrum") + + def test_get_firmware_filename(self): + """Test get_firmware_filename returns correct Spectrum firmware filename""" + # Test SPC3 + manager = self._create_manager(asic_type='SPC3') + self.assertEqual(manager.get_firmware_filename(), 'fw-SPC3.mfa') + + # Test SPC + manager = self._create_manager(asic_type='SPC') + self.assertEqual(manager.get_firmware_filename(), 'fw-SPC.mfa') + + # Test SPC5 + manager = self._create_manager(asic_type='SPC5') + self.assertEqual(manager.get_firmware_filename(), 'fw-SPC5.mfa') + + def test_unsupported_asic_type(self): + """Test that unsupported ASIC type raises error during initialization""" + from mellanox_fw_manager.firmware_base import FirmwareManagerError + with self.assertRaises(FirmwareManagerError) as context: + SpectrumFirmwareManager( + asic_index=0, pci_id="01:00.0", fw_bin_path=self.temp_dir, + verbose=False, clear_semaphore=False, asic_type='unknown' + ) + self.assertIn("Unsupported ASIC type", str(context.exception)) + + def test_get_asic_type_map(self): + """Test get_asic_type_map returns correct mapping""" + result = SpectrumFirmwareManager.get_asic_type_map() + + expected = { + '15b3:cb84': 'SPC', + '15b3:cf6c': 'SPC2', + '15b3:cf70': 'SPC3', + '15b3:cf80': 'SPC4', + '15b3:cf82': 'SPC5', + } + + self.assertEqual(result, expected) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_get_available_firmware_version_success(self, mock_run_cmd): + """Test _get_available_firmware_version when successful""" + manager = self._create_manager() + psid = "MT_0000001187" + + mock_output = f""" +Device Info: +{psid} field1 field2 30.2016.1040 field4 +MT_0000001188 field1 field2 30.2016.1050 field4 +""" + mock_run_cmd.return_value = MagicMock(returncode=0, stdout=mock_output) + + result = manager._get_available_firmware_version(psid) + + self.assertEqual(result, "30.2016.1040") + mock_run_cmd.assert_called_once() + call_args = mock_run_cmd.call_args[0][0] + self.assertIn('mlxfwmanager', call_args) + self.assertIn('--list-content', call_args) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_get_available_firmware_version_command_failure(self, mock_run_cmd): + """Test _get_available_firmware_version when mlxfwmanager command fails""" + manager = self._create_manager() + psid = "MT_0000001187" + + mock_run_cmd.return_value = MagicMock( + returncode=1, + stdout="", + stderr="Error: Device not found" + ) + + result = manager._get_available_firmware_version(psid) + + self.assertIsNone(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_get_available_firmware_version_psid_not_found(self, mock_run_cmd): + """Test _get_available_firmware_version when PSID not found in output""" + manager = self._create_manager() + psid = "MT_0000001187" + + mock_output = """ +Device Info: +MT_0000001188 field1 field2 30.2016.1050 field4 +MT_0000001189 field1 field2 30.2016.1060 field4 +""" + mock_run_cmd.return_value = MagicMock(returncode=0, stdout=mock_output) + + result = manager._get_available_firmware_version(psid) + + self.assertIsNone(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_get_available_firmware_version_insufficient_fields(self, mock_run_cmd): + """Test _get_available_firmware_version when line has insufficient fields""" + manager = self._create_manager() + psid = "MT_0000001187" + + mock_output = f""" +Device Info: +{psid} field1 field2 +""" + mock_run_cmd.return_value = MagicMock(returncode=0, stdout=mock_output) + + result = manager._get_available_firmware_version(psid) + + self.assertIsNone(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_get_available_firmware_version_exception(self, mock_run_cmd): + """Test _get_available_firmware_version when exception occurs""" + manager = self._create_manager() + psid = "MT_0000001187" + + mock_run_cmd.side_effect = Exception("Subprocess execution failed") + + result = manager._get_available_firmware_version(psid) + + self.assertIsNone(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_success(self, mock_run_cmd): + """Test run_firmware_update when successful""" + manager = self._create_manager() + + mock_run_cmd.return_value = MagicMock( + returncode=0, + stdout="Firmware update completed successfully", + stderr="" + ) + + result = manager.run_firmware_update() + + self.assertTrue(result) + mock_run_cmd.assert_called_once() + call_args = mock_run_cmd.call_args[0][0] + self.assertIn('mlxfwmanager', call_args) + self.assertIn('-u', call_args) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_failure(self, mock_run_cmd): + """Test run_firmware_update when firmware update fails""" + manager = self._create_manager() + + mock_run_cmd.return_value = MagicMock( + returncode=1, + stdout="", + stderr="Error: Failed to update firmware - device busy" + ) + + result = manager.run_firmware_update() + + self.assertFalse(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_reactivation_required(self, mock_run_cmd): + """Test run_firmware_update when reactivation is required""" + manager = self._create_manager() + + mock_run_cmd.side_effect = [ + MagicMock(returncode=FW_ALREADY_UPDATED_FAILURE, stdout="", stderr=""), + MagicMock(returncode=0, stdout="Reactivation successful", stderr=""), + MagicMock(returncode=0, stdout="Firmware update completed", stderr="") + ] + + result = manager.run_firmware_update() + + self.assertTrue(result) + self.assertEqual(mock_run_cmd.call_count, 3) + + reactivate_call = mock_run_cmd.call_args_list[1][0][0] + self.assertIn('flint', reactivate_call) + self.assertIn('ir', reactivate_call) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_reactivation_fails_but_continues(self, mock_run_cmd): + """Test run_firmware_update when reactivation fails but continues with retry""" + manager = self._create_manager() + + mock_run_cmd.side_effect = [ + MagicMock(returncode=FW_ALREADY_UPDATED_FAILURE, stdout="", stderr=""), + MagicMock(returncode=1, stdout="", stderr="Reactivation failed"), + MagicMock(returncode=0, stdout="Firmware update completed", stderr="") + ] + + result = manager.run_firmware_update() + + self.assertTrue(result) + self.assertEqual(mock_run_cmd.call_count, 3) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_reactivation_required_retry_fails(self, mock_run_cmd): + """Test run_firmware_update when reactivation required but retry fails""" + manager = self._create_manager() + + mock_run_cmd.side_effect = [ + MagicMock(returncode=FW_ALREADY_UPDATED_FAILURE, stdout="", stderr=""), + MagicMock(returncode=0, stdout="Reactivation successful", stderr=""), + MagicMock(returncode=1, stdout="", stderr="Retry failed") + ] + + result = manager.run_firmware_update() + + self.assertFalse(result) + self.assertEqual(mock_run_cmd.call_count, 3) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_exception(self, mock_run_cmd): + """Test run_firmware_update when exception occurs""" + manager = self._create_manager() + + mock_run_cmd.side_effect = Exception("Subprocess execution failed") + + result = manager.run_firmware_update() + + self.assertFalse(result) + + @patch('mellanox_fw_manager.spectrum_manager.SpectrumFirmwareManager._run_command') + def test_run_firmware_update_with_verbose_mode(self, mock_run_cmd): + """Test run_firmware_update passes correct environment in verbose mode""" + manager = self._create_manager(verbose=True) + + mock_run_cmd.return_value = MagicMock( + returncode=0, + stdout="Firmware update completed", + stderr="" + ) + + result = manager.run_firmware_update() + + self.assertTrue(result) + + call_kwargs = mock_run_cmd.call_args[1] + self.assertIn('env', call_kwargs) + env = call_kwargs['env'] + self.assertIn('FLASH_ACCESS_DEBUG', env) + self.assertIn('FW_COMPS_DEBUG', env) + + +if __name__ == '__main__': + unittest.main() diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 47890fb2a72..58dcf0da8a3 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -21,38 +21,38 @@ MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH) # Place an URL here to FW if you want to download FW instead MLNX_FW_BASE_URL = -SIMX_VERSION = 25.10-1137 +SIMX_VERSION = 25.10-1153 FW_FROM_URL = y -MLNX_FW_ASSETS_RELEASE_TAG = fw-2016.2122 +MLNX_FW_ASSETS_RELEASE_TAG = fw-2016.3404 MLNX_FW_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_FW_ASSETS_RELEASE_TAG) ifeq ($(MLNX_FW_BASE_URL), ) MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL) endif -MLNX_SPC_FW_VERSION = 13.2016.2122 +MLNX_SPC_FW_VERSION = 13.2016.3404 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2016.2122 +MLNX_SPC2_FW_VERSION = 29.2016.3404 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2016.2122 +MLNX_SPC3_FW_VERSION = 30.2016.3404 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) -MLNX_SPC4_FW_VERSION = 34.2016.2122 +MLNX_SPC4_FW_VERSION = 34.2016.3404 MLNX_SPC4_FW_FILE = fw-SPC4-rel-$(subst .,_,$(MLNX_SPC4_FW_VERSION))-EVB.mfa $(MLNX_SPC4_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC4_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC4_FW_FILE) -MLNX_SPC5_FW_VERSION = 37.2016.2122 +MLNX_SPC5_FW_VERSION = 37.2016.3404 MLNX_SPC5_FW_FILE = fw-SPC5-rel-$(subst .,_,$(MLNX_SPC5_FW_VERSION))-EVB.mfa $(MLNX_SPC5_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC5_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC5_FW_FILE) diff --git a/platform/mellanox/get_component_versions/get_component_versions.j2 b/platform/mellanox/get_component_versions/get_component_versions.j2 index f2917a09398..8f99324d823 100644 --- a/platform/mellanox/get_component_versions/get_component_versions.j2 +++ b/platform/mellanox/get_component_versions/get_component_versions.j2 @@ -1,6 +1,6 @@ {# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES - Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -43,7 +43,8 @@ COMMANDS_FOR_ACTUAL = { "SAI": [["docker", "exec", "-it", "syncd", "bash", "-c", 'dpkg -l | grep mlnx-sai'], ".*1\\.mlnx\\.([A-Za-z0-9.]*)"], "SAI_API_HEADERS": [["docker", "exec", "syncd", "dpkg", "-s", "mlnx-sai"], "X-Sai-Headers-Version: ([0-9.]+)"], "FW": [["mlxfwmanager", "--query"], "FW * [0-9]{2}\\.([0-9.]*)"], - "KERNEL": [["uname", "-r"], "(.*)-[a-z0-9]+$"] + "KERNEL": [["uname", "-r"], "(.*)-[a-z0-9]+$"], + "RSHIM": [["dpkg", "-l"], ["grep", "rshim "], "rshim *([0-9.-]*)"] } UNAVAILABLE_COMPILED_VERSIONS = { @@ -54,7 +55,8 @@ UNAVAILABLE_COMPILED_VERSIONS = { "HW_MANAGEMENT": "N/A", "MFT": "N/A", "KERNEL": "N/A", - "SIMX": "N/A" + "SIMX": "N/A", + "RSHIM": "N/A" } {% elif sonic_asic_platform == "nvidia-bluefield" %} diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index 64e41428db3..9458a0bf5f6 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -17,7 +17,7 @@ # # Mellanox HW Management -MLNX_HW_MANAGEMENT_VERSION = 7.0050.2930 +MLNX_HW_MANAGEMENT_VERSION = 7.0050.3001 export MLNX_HW_MANAGEMENT_VERSION diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt index 166f823fcca..cad3563da0e 160000 --- a/platform/mellanox/hw-management/hw-mgmt +++ b/platform/mellanox/hw-management/hw-mgmt @@ -1 +1 @@ -Subproject commit 166f823fcca0e8528d94c8757ed43df155c471b9 +Subproject commit cad3563da0ea695fc74098fe483a052175858248 diff --git a/platform/mellanox/install-pending-fw.py b/platform/mellanox/install-pending-fw.py index c5b61341be9..dc5abc54998 100755 --- a/platform/mellanox/install-pending-fw.py +++ b/platform/mellanox/install-pending-fw.py @@ -19,7 +19,7 @@ import os from fwutil.lib import ComponentStatusProvider, PlatformComponentsParser -from sonic_platform.component import ComponentCPLD, MPFAManager +from sonic_platform.component import ComponentCPLD, MPFAManager, ComponentBMC # Globals FW_STATUS_SCHEDULED = "scheduled" @@ -92,6 +92,8 @@ try: if type(c) == ComponentCPLD: c.install_firmware(files[i]) + elif type(c) == ComponentBMC: + c.install_firmware(files[i]) else: c.install_firmware(files[i], allow_reboot=False) except Exception as e: diff --git a/platform/mellanox/mlnx-fw-upgrade.j2 b/platform/mellanox/mlnx-fw-upgrade.j2 deleted file mode 100755 index 46d9c42c7cc..00000000000 --- a/platform/mellanox/mlnx-fw-upgrade.j2 +++ /dev/null @@ -1,519 +0,0 @@ -{#- - Copyright (c) 2020-2024 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. --#} -#!/bin/bash - -declare -r SCRIPT_NAME="$(basename "$0")" -declare -r SCRIPT_PATH="$(readlink -f "$0")" -declare -r SCRIPT_DIR="$(dirname "$SCRIPT_PATH")" - -declare -r LOCKFILE="/tmp/mlxfwmanager-lock" - -declare -r YES_PARAM="yes" -declare -r NO_PARAM="no" - -declare -r VERBOSE_ERROR="1" -declare -r VERBOSE_WARNING="2" -declare -r VERBOSE_NOTICE="3" -declare -r VERBOSE_INFO="4" - -declare -r VERBOSE_MAX="${VERBOSE_INFO}" -declare -r VERBOSE_MIN="${VERBOSE_ERROR}" - -declare -r EXIT_SUCCESS="0" -declare -r EXIT_FAILURE="1" -declare -r FW_ALREADY_UPDATED_FAILURE="2" -declare -r FW_UPGRADE_IS_REQUIRED="10" - -declare -r QUERY_XML="mlxfwmanager --query-format XML" -declare -r QUERY_CMD="mlxfwmanager --query" -declare -r LIST_CONTENT_CMD="mlxfwmanager --list-content" -declare -r BURN_CMD="mlxfwmanager -u -f -y" - -declare -r QUERY_FILE="/tmp/mlxfwmanager-query.log" -declare -r LIST_CONTENT_FILE="/tmp/mlxfwmanager-list-content.log" - -declare -r SPC1_ASIC="spc1" -declare -r SPC2_ASIC="spc2" -declare -r SPC3_ASIC="spc3" -declare -r SPC4_ASIC="spc4" -declare -r SPC5_ASIC="spc5" -declare -r SPC6_ASIC="spc6" -declare -r BF3_NIC="bf3" -declare -r UNKN_ASIC="unknown" -declare -r UNKN_MST="unknown" - -declare -rA FW_FILE_MAP=( \ - [$SPC1_ASIC]="fw-SPC.mfa" \ - [$SPC2_ASIC]="fw-SPC2.mfa" \ - [$SPC3_ASIC]="fw-SPC3.mfa" \ - [$SPC4_ASIC]="fw-SPC4.mfa" \ - [$SPC5_ASIC]="fw-SPC5.mfa" \ - [$BF3_NIC]="fw-BF3.mfa" \ -) - -DRY_RUN="${NO_PARAM}" -IMAGE_UPGRADE="${NO_PARAM}" -SYSLOG_LOGGER="${NO_PARAM}" -VERBOSE_LEVEL="${VERBOSE_MIN}" -MFT_DIAGNOSIS_FLAGS="" -RESET_CONFIG="${NO_PARAM}" - -function PrintHelp() { - echo - echo "Usage: ./${SCRIPT_NAME} [OPTIONS]" - echo - echo "OPTIONS:" - echo " -u, --upgrade Upgrade ASIC firmware using next boot image (useful after SONiC-To-SONiC update)" - echo " -s, --syslog Use syslog logger (enabled when -u|--upgrade)" - echo " -v, --verbose Verbose mode (enabled when -u|--upgrade)" - echo " -d, --dry-run Compare the FW versions without installation. Return code "0" means the FW is up-to-date, return code "10" means an upgrade is required, otherwise an error is detected." - echo " -c, --clear-semaphore Clear hw resources before updating firmware" -{% if sonic_asic_platform == "nvidia-bluefield" %} - echo " -r, --reset Reset firmware configuration (NVIDIA BlueField platform only)" - echo " -n, --no-mst Do not start MST drivers (NVIDIA BlueField platform only)" -{% endif %} - echo " -h, --help Print help" - echo - echo "Examples:" - echo " ./${SCRIPT_NAME} --verbose" - echo " ./${SCRIPT_NAME} --upgrade" -{% if sonic_asic_platform == "nvidia-bluefield" %} - echo " ./${SCRIPT_NAME} --reset" - echo " ./${SCRIPT_NAME} --no-mst" -{% endif %} - echo " ./${SCRIPT_NAME} --help" - echo -} - -function ParseArguments() { - while [ "$#" -ge "1" ]; do - case "$1" in - -u|--upgrade) - IMAGE_UPGRADE="${YES_PARAM}" - SYSLOG_LOGGER="${YES_PARAM}" - ;; - -v|--verbose) - VERBOSE_LEVEL="${VERBOSE_MAX}" - MFT_DIAGNOSIS_FLAGS="FLASH_ACCESS_DEBUG=1 FW_COMPS_DEBUG=1" - ;; - -s|--syslog) - SYSLOG_LOGGER="${YES_PARAM}" - ;; - -d|--dry-run) - DRY_RUN="${YES_PARAM}" - ;; - -c|--clear-semaphore) - CLEAR_SEMAPHORE="${YES_PARAM}" - ;; - -n|--no-mst) - NO_MST="${YES_PARAM}" - ;; -{% if sonic_asic_platform == "nvidia-bluefield" %} - -r|--reset) - RESET_CONFIG="${YES_PARAM}" - ;; -{% endif %} - -h|--help) - PrintHelp - exit "${EXIT_SUCCESS}" - ;; - esac - shift - done -} - -function LogError() { - if [[ "${VERBOSE_LEVEL}" -ge "${VERBOSE_ERROR}" ]]; then - echo "ERROR: $*" - logger -p "ERROR" -t "${SCRIPT_NAME}" "$*" - fi - - if [[ "${SYSLOG_LOGGER}" = "${YES_PARAM}" ]]; then - logger -p "ERROR" -t "${SCRIPT_NAME}" "$*" - fi -} - -function LogWarning() { - if [[ "${VERBOSE_LEVEL}" -ge "${VERBOSE_WARNING}" ]]; then - echo "WARNING: $*" - fi - - if [[ "${SYSLOG_LOGGER}" = "${YES_PARAM}" ]]; then - logger -p "WARNING" -t "${SCRIPT_NAME}" "$*" - fi -} - -function LogNotice() { - if [[ "${VERBOSE_LEVEL}" -ge "${VERBOSE_NOTICE}" ]]; then - echo "NOTICE: $*" - fi - - if [[ "${SYSLOG_LOGGER}" = "${YES_PARAM}" ]]; then - logger -p "NOTICE" -t "${SCRIPT_NAME}" "$*" - fi -} - -function LogInfo() { - if [[ "${VERBOSE_LEVEL}" -ge "${VERBOSE_INFO}" ]]; then - echo "INFO: $*" - fi - - if [[ "${SYSLOG_LOGGER}" = "${YES_PARAM}" ]]; then - logger -p "INFO" -t "${SCRIPT_NAME}" "$*" - fi -} - -function ExitFailure() { - if [[ "${VERBOSE_LEVEL}" -ge "${VERBOSE_ERROR}" ]]; then - echo - LogError "$@" - echo - fi - - exit "${EXIT_FAILURE}" -} - -function ExitSuccess() { - if [[ "${VERBOSE_LEVEL}" -ge "${VERBOSE_INFO}" ]]; then - echo - LogInfo "$@" - echo - fi - - exit "${EXIT_SUCCESS}" -} - -function LockStateChange() { - LogInfo "Locking ${LOCKFILE} from ${SCRIPT_NAME}" - - exec {LOCKFD}>${LOCKFILE} - /usr/bin/flock -x ${LOCKFD} - - LogInfo "Locked ${LOCKFILE} (${LOCKFD}) from ${SCRIPT_NAME}" -} - -function UnlockStateChange() { - LogInfo "Unlocking ${LOCKFILE} (${LOCKFD}) from ${SCRIPT_NAME}" - /usr/bin/flock -u ${LOCKFD} -} - -function GetMstDeviceType() { - local -r asic_type=$(/usr/bin/asic_detect/asic_detect.sh) - - case $asic_type in - ${SPC1_ASIC}|${SPC2_ASIC}|${SPC3_ASIC}|${SPC4_ASIC}|${SPC5_ASIC}|${SPC6_ASIC}) - echo "Spectrum" - return ${EXIT_SUCCESS} - ;; - ${BF3_NIC}) - echo "BlueField3" - return ${EXIT_SUCCESS} - ;; - *) - echo "Unknown" - return ${EXIT_FAILURE} - ;; - esac -} - -function WaitForDevice() { - local -i QUERY_RETRY_COUNT_MAX="10" - local -i QUERY_RETRY_COUNT="0" - local -r DEVICE_TYPE=$(GetMstDeviceType) - local SPC_MST_DEV - local QUERY_RC="" - - if [[ "${NO_MST}" != "${YES_PARAM}" ]]; then - LogInfo "Restarting MST device" - /usr/bin/mst restart --with_i2cdev - fi - - while : ; do - SPC_MST_DEV=$(GetSPCMstDevice) - ${QUERY_XML} -d ${SPC_MST_DEV} -o ${QUERY_FILE} - QUERY_RC="$?" - [[ ("${QUERY_RETRY_COUNT}" -lt "${QUERY_RETRY_COUNT_MAX}") && ("${QUERY_RC}" != "${EXIT_SUCCESS}") ]] || break - sleep 1s - ((QUERY_RETRY_COUNT++)) - LogInfo "Retrying MST device query ${QUERY_RETRY_COUNT}" - done - - if [[ "${QUERY_RC}" != "${EXIT_SUCCESS}" ]]; then - # Couldn't Detect the Spectrum ASIC. Exit failure and print the detailed information - output=$(${QUERY_CMD}) - failure_msg="${output#*Fail : }" - ExitFailure "FW Query command: ${QUERY_CMD} failed to detect spectrum device with error: ${failure_msg}" - fi - - LogInfo "${DEVICE_TYPE} ASIC successfully detected at ${SPC_MST_DEV}" -} - -function GetSPCMstDevice() { - local -r _ASIC_PCI_ID="$(/usr/bin/asic_detect/asic_detect.sh -p)" - if [[ "${_ASIC_PCI_ID}" = "${UNKN_PCI_ID}" ]]; then - ExitFailure "failed to detect ASIC PCI ID" - fi - echo "${_ASIC_PCI_ID}" - exit "${EXIT_SUCCESS}" -} - -function GetXPathXML() { - local xpath=$1 - local xml_file=$2 - - val=$(xmlstarlet sel -t -v "${xpath}" ${xml_file}) - ERROR_CODE="$?" - if [[ "${ERROR_CODE}" != "${EXIT_SUCCESS}" ]]; then - ExitFailure "XML Fetch failed for path: ${xpath}, file: $(cat ${xml_file})" - fi - - echo ${val} -} - -function RunCmd() { - local ERROR_CODE="${EXIT_SUCCESS}" - - if [[ "${VERBOSE_LEVEL}" -eq "${VERBOSE_MAX}" ]]; then - eval "$@" - else - eval "$@" &>/dev/null - fi - - ERROR_CODE="$?" - if [[ "${ERROR_CODE}" != "${EXIT_SUCCESS}" ]]; then - ExitFailure "command failed: $@" - fi -} - -{% if sonic_asic_platform == "mellanox" %} - -function RunFwUpdateCmd() { - local ERROR_CODE="${EXIT_SUCCESS}" - local COMMAND="${MFT_DIAGNOSIS_FLAGS} ${BURN_CMD} $@" - - if [[ "${VERBOSE_LEVEL}" -eq "${VERBOSE_MAX}" ]]; then - output=$(eval "${COMMAND}") - else - output=$(eval "${COMMAND}") >/dev/null 2>&1 - fi - - ERROR_CODE="$?" - - if [[ "${ERROR_CODE}" == "${FW_ALREADY_UPDATED_FAILURE}" ]]; then - LogInfo "FW reactivation is required. Reactivating and updating FW ..." - local -r _MST_DEVICE="$(GetSPCMstDevice)" - local -r _CMD="flint -d ${_MST_DEVICE} ir" - output=$(eval "${_CMD}") - - if [[ "${VERBOSE_LEVEL}" -eq "${VERBOSE_MAX}" ]]; then - output=$(eval "${COMMAND}") - else - output=$(eval "${COMMAND}") >/dev/null 2>&1 - fi - fi - - ERROR_CODE="$?" - - if [[ "${ERROR_CODE}" != "${EXIT_SUCCESS}" ]]; then - echo "${output}" - failure_msg="${output#*Fail : }" - ExitFailure "FW Update command: ${COMMAND} failed with error: ${failure_msg}" - fi -} - -function GetAvailableFwVersion() { - local -r _FW_FILE="$1" - local -r _MST_DEVICE="$2" - local -r _PSID="$3" - - RunCmd "${LIST_CONTENT_CMD} -i ${_FW_FILE} -d ${_MST_DEVICE} -o ${LIST_CONTENT_FILE}" - - local -r _FW_AVAILABLE_INFO="$(grep ${_PSID} ${LIST_CONTENT_FILE})" - local -r _FW_AVAILABLE="$(echo ${_FW_AVAILABLE_INFO} | awk '{print $4}')" - - echo ${_FW_AVAILABLE} -} - -{% elif sonic_asic_platform == "nvidia-bluefield" %} - -function RunFwUpdateCmd() { - local ERROR_CODE="${EXIT_SUCCESS}" - local -r _MST_DEVICE="$(GetSPCMstDevice)" - - # Reactivate FW prior to burning... - eval "flint -d ${_MST_DEVICE} ir" 2>&1 >/dev/null - - RunCmd "${MFT_DIAGNOSIS_FLAGS} flint $@ burn" - RunCmd "mlxconfig -d ${_MST_DEVICE} -y r" -} - -function GetAvailableFwVersion() { - local -r _FW_FILE="$1" - local -r _MST_DEVICE="$2" - local -r _PSID="$3" - - RunCmd "flint -i ${_FW_FILE} --psid ${_PSID} query 2>&1 > ${LIST_CONTENT_FILE}" - - local -r _FW_AVAILABLE_INFO="$(grep 'FW Version:' ${LIST_CONTENT_FILE})" - local -r _FW_AVAILABLE="$(echo ${_FW_AVAILABLE_INFO} | awk '{print $3}')" - - echo ${_FW_AVAILABLE} -} - -{% endif %} - -function UpgradeFW() { - local -r _FW_BIN_PATH="$1" - - local -r _ASIC_TYPE="$(/usr/bin/asic_detect/asic_detect.sh)" - if [[ "${_ASIC_TYPE}" = "${UNKN_ASIC}" ]]; then - ExitFailure "failed to detect ASIC type" - fi - - if [ ! -z "${_FW_BIN_PATH}" ]; then - local -r _FW_FILE="${_FW_BIN_PATH}/${FW_FILE_MAP[$_ASIC_TYPE]}" - else - local -r _FW_FILE="/etc/mlnx/${FW_FILE_MAP[$_ASIC_TYPE]}" - fi - - if [ ! -f "${_FW_FILE}" ]; then - ExitFailure "no such file: ${_FW_FILE}" - fi - - local -r _MST_DEVICE=$(GetSPCMstDevice) - RunCmd "${QUERY_XML} -d ${_MST_DEVICE} -o ${QUERY_FILE}" - local -r _FW_CURRENT=$(GetXPathXML "//Device/Versions/FW/@current" ${QUERY_FILE}) - local -r _PSID=$(GetXPathXML "//Device/@psid" ${QUERY_FILE}) - local -r _FW_AVAILABLE="$(GetAvailableFwVersion ${_FW_FILE} ${_MST_DEVICE} ${_PSID})" - - if [[ -z "${_FW_CURRENT}" ]]; then - ExitFailure "could not retreive current FW version" - fi - - if [[ -z "${_FW_AVAILABLE}" ]]; then - ExitFailure "could not retreive available FW version" - fi - - if [[ "${_FW_CURRENT}" == "${_FW_AVAILABLE}" ]]; then - ExitSuccess "firmware is up to date" - else - if [[ "${DRY_RUN}" == "${YES_PARAM}" ]]; then - LogNotice "firmware upgrade is required" - exit ${FW_UPGRADE_IS_REQUIRED} - fi - - LogNotice "firmware upgrade is required. Installing compatible version..." - - if [[ "${_MST_DEVICE}" = "${UNKN_MST}" ]]; then - LogWarning "could not find fastest mst device, using default device" - RunFwUpdateCmd "-i ${_FW_FILE}" - else - RunFwUpdateCmd "-d ${_MST_DEVICE} -i ${_FW_FILE}" - fi - fi -} - -function UpgradeFWFromImage() { - local -r _NEXT_SONIC_IMAGE="$(sonic-installer list | grep "Next: " | cut -f2 -d' ')" - local -r _CURRENT_SONIC_IMAGE="$(sonic-installer list | grep "Current: " | cut -f2 -d' ')" - - if [[ "${_CURRENT_SONIC_IMAGE}" == "${_NEXT_SONIC_IMAGE}" ]]; then - ExitSuccess "firmware is up to date" - fi - - # /host/image-/platform/fw/asic is now the new location for FW binaries. - # Prefere this path and if it does not exist use squashfs as a fallback. - local -r _PLATFORM_FW_BIN_PATH="/host/image-${_NEXT_SONIC_IMAGE#SONiC-OS-}/platform/fw/asic/" - - if [[ -d "${_PLATFORM_FW_BIN_PATH}" ]]; then - LogInfo "Using FW binaries from ${_PLATFORM_FW_BIN_PATH}" - - UpgradeFW "${_PLATFORM_FW_BIN_PATH}" - else - local -r _FS_PATH="/host/image-${_NEXT_SONIC_IMAGE#SONiC-OS-}/fs.squashfs" - local -r _FS_MOUNTPOINT="/tmp/image-${_NEXT_SONIC_IMAGE#SONiC-OS-}-fs" - local -r _FW_BIN_PATH="${_FS_MOUNTPOINT}/etc/mlnx/" - - LogInfo "Using FW binaries from ${_FW_BIN_PATH}" - - mkdir -p "${_FS_MOUNTPOINT}" - mount -t squashfs "${_FS_PATH}" "${_FS_MOUNTPOINT}" - - UpgradeFW "${_FW_BIN_PATH}" - - umount -rf "${_FS_MOUNTPOINT}" - rm -rf "${_FS_MOUNTPOINT}" - fi -} - -function ExitIfQEMU() { - if [ -n "$(lspci -vvv | grep SimX)" ]; then - ExitSuccess "No FW upgrade for SimX platform" - fi -} - -function Cleanup() { - if [[ -n "${LOCKFD}" ]]; then - UnlockStateChange - fi -} - -function ClearSemaphore() { - if [[ "${CLEAR_SEMAPHORE}" == "${YES_PARAM}" ]]; then - local -r _MST_DEVICE="$(GetSPCMstDevice)" - if [[ "${_MST_DEVICE}" != "${UNKN_MST}" ]]; then - /usr/bin/flint -d $_MST_DEVICE --clear_semaphore - fi - fi -} - -function ResetFirmwareConfig() { - local -r _MST_DEVICE="$(GetSPCMstDevice)" - - if [[ "${_MST_DEVICE}" = "${UNKN_MST}" ]]; then - ExitFailure "Could not find MST device for firmware reset" - fi - - LogInfo "Resetting firmware configuration for device ${_MST_DEVICE}" - RunCmd "mlxconfig -d ${_MST_DEVICE} -y r" - LogInfo "Firmware configuration reset completed successfully" -} - -trap Cleanup EXIT - -ParseArguments "$@" - -ExitIfQEMU - -LockStateChange - -WaitForDevice - -ClearSemaphore - -if [[ "${RESET_CONFIG}" = "${YES_PARAM}" ]]; then - ResetFirmwareConfig - ExitSuccess "firmware configuration reset completed" -fi - -if [ "${IMAGE_UPGRADE}" != "${YES_PARAM}" ]; then - UpgradeFW -else - UpgradeFWFromImage -fi - -ExitSuccess "firmware upgrade is completed" diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/bmc.py b/platform/mellanox/mlnx-platform-api/sonic_platform/bmc.py new file mode 100644 index 00000000000..b7079f6bf53 --- /dev/null +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/bmc.py @@ -0,0 +1,128 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# 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. +# +############################################################################# +# Mellanox +# +# Module contains an implementation of new platform api +# +############################################################################# + + +try: + import sys + import importlib.util + import os + from sonic_platform_base.bmc_base import BMCBase + from sonic_py_common.logger import Logger +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + + +logger = Logger('bmc') + + +HW_MGMT_REDFISH_CLIENT_PATH = '/usr/bin/hw_management_redfish_client.py' +HW_MGMT_REDFISH_CLIENT_NAME = 'hw_management_redfish_client' + + +def _get_hw_mgmt_redfish_client(): + """ Get hw_management_redfish_client module. """ + if HW_MGMT_REDFISH_CLIENT_NAME in sys.modules: + return sys.modules[HW_MGMT_REDFISH_CLIENT_NAME] + if not os.path.exists(HW_MGMT_REDFISH_CLIENT_PATH): + raise ImportError(f"{HW_MGMT_REDFISH_CLIENT_NAME} not found at {HW_MGMT_REDFISH_CLIENT_PATH}") + spec = importlib.util.spec_from_file_location(HW_MGMT_REDFISH_CLIENT_NAME, HW_MGMT_REDFISH_CLIENT_PATH) + hw_mgmt_redfish_client = importlib.util.module_from_spec(spec) + sys.modules[HW_MGMT_REDFISH_CLIENT_NAME] = hw_mgmt_redfish_client + spec.loader.exec_module(hw_mgmt_redfish_client) + return hw_mgmt_redfish_client + + +def _get_bmc_values(): + none_values = None, None, None + from sonic_py_common import device_info + bmc_data = device_info.get_bmc_data() + if not bmc_data: + # BMC is not present on this platform - missing bmc.json + return none_values + bmc_addr = bmc_data.get('bmc_addr') + if not bmc_addr: + logger.log_error("BMC address not found in bmc_data") + return none_values + bmc_config = device_info.get_bmc_build_config() + if not bmc_config: + logger.log_error("BMC build configuration not found") + return none_values + bmc_nos_account_username = bmc_config.get('bmc_nos_account_username') + if not bmc_nos_account_username: + logger.log_error("BMC NOS account username not found in build configuration") + return none_values + bmc_root_account_default_password = bmc_config.get('bmc_root_account_default_password') + return bmc_addr, bmc_nos_account_username, bmc_root_account_default_password + + +class BMC(BMCBase): + + """ + BMC encapsulates BMC device functionality. + It also acts as wrapper of RedfishClient. + """ + + BMC_FIRMWARE_ID = 'MGX_FW_BMC_0' + BMC_EEPROM_ID = 'BMC_eeprom' + _instance = None + + def __init__(self, addr, bmc_nos_account_username, bmc_root_account_default_password): + super().__init__(addr) + self._bmc_nos_account_username = bmc_nos_account_username + self._bmc_root_account_default_password = bmc_root_account_default_password + + @staticmethod + def get_instance(): + if BMC._instance is None: + bmc_addr, bmc_nos_account_username, bmc_root_account_default_password = _get_bmc_values() + if not bmc_addr or not bmc_nos_account_username: + return None + BMC._instance = BMC(bmc_addr, bmc_nos_account_username, bmc_root_account_default_password) + return BMC._instance + + def _get_login_user_callback(self): + return self._bmc_nos_account_username + + def _get_login_password_callback(self): + return self._get_tpm_password() + + def _get_default_root_password(self): + return self._bmc_root_account_default_password + + def get_firmware_id(self): + return BMC.BMC_FIRMWARE_ID + + def _get_eeprom_id(self): + return BMC.BMC_EEPROM_ID + + def _get_tpm_password(self): + try: + return _get_hw_mgmt_redfish_client().BMCAccessor().get_login_password() + except Exception as e: + logger.log_error(f"Error getting TPM password from hw_management_redfish_client.py: {str(e)}") + raise + + def _get_component_list(self): + from .component import ComponentBMC + return [ComponentBMC()] diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py index 7c3e0aea24f..e28323bbcf1 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2019-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,6 +23,7 @@ # ############################################################################# + try: from sonic_platform_base.chassis_base import ChassisBase from sonic_py_common.logger import Logger @@ -31,13 +32,16 @@ from functools import reduce from .utils import extract_RJ45_ports_index from .utils import extract_cpo_ports_index + from .utils import extract_asic_id_map from . import module_host_mgmt_initializer from . import utils from .device_data import DeviceDataManager + from .bmc import BMC import re import select import threading import time + from pathlib import Path except ImportError as e: raise ImportError (str(e) + "- required module not found") @@ -125,6 +129,10 @@ def __init__(self): # Build the CPO port list from platform.json and hwsku.json self._cpo_port_inited = False self._cpo_port_list = None + # Mapping from SFP index to ASIC ID + self._asic_id_map = None + + self._num_npus = device_info.get_num_npus() self.liquid_cooling = None @@ -134,6 +142,10 @@ def __init__(self): self.poll_obj = None self.registered_fds = None + self._bmc = None + self._bmc_data = None + self._bmc_initialized = False + logger.log_info("Chassis loaded successfully") def __del__(self): @@ -143,14 +155,14 @@ def __del__(self): @property def RJ45_port_list(self): if not self._RJ45_port_inited: - self._RJ45_port_list = extract_RJ45_ports_index() + self._RJ45_port_list = extract_RJ45_ports_index(self._num_npus) self._RJ45_port_inited = True return self._RJ45_port_list @property def cpo_port_list(self): if not self._cpo_port_inited: - self._cpo_port_list = extract_cpo_ports_index() + self._cpo_port_list = extract_cpo_ports_index(self._num_npus) self._cpo_port_inited = True return self._cpo_port_list @@ -277,6 +289,13 @@ def get_fan_drawer(self, index): # SFP methods ############################################## + def _get_asic_id_by_sfp_index(self, sfp_index): + if not DeviceDataManager.is_multi_asic_platform(): + return 'asic0' + if not self._asic_id_map: + self._asic_id_map = extract_asic_id_map(DeviceDataManager.get_asic_count()) + return f'asic{self._asic_id_map.get(sfp_index)}' + def _import_sfp_module(self): if not self.sfp_module: from . import sfp as sfp_module @@ -296,12 +315,13 @@ def initialize_single_sfp(self, index): if not self._sfp_list[index]: sfp_module = self._import_sfp_module() + asic_id = self._get_asic_id_by_sfp_index(index) if self.RJ45_port_list and index in self.RJ45_port_list: - self._sfp_list[index] = sfp_module.RJ45Port(index) + self._sfp_list[index] = sfp_module.RJ45Port(index, asic_id=asic_id) elif self.cpo_port_list and index in self.cpo_port_list: - self._sfp_list[index] = sfp_module.CpoPort(index) + self._sfp_list[index] = sfp_module.CpoPort(index, asic_id=asic_id) else: - self._sfp_list[index] = sfp_module.SFP(index) + self._sfp_list[index] = sfp_module.SFP(index, asic_id=asic_id) self.sfp_initialized_count += 1 def initialize_sfp(self): @@ -315,24 +335,26 @@ def initialize_sfp(self): if not self._sfp_list: sfp_module = self._import_sfp_module() for index in range(sfp_count): + asic_id = self._get_asic_id_by_sfp_index(index) if self.RJ45_port_list and index in self.RJ45_port_list: - sfp_object = sfp_module.RJ45Port(index) + sfp_object = sfp_module.RJ45Port(index, asic_id=asic_id) elif self.cpo_port_list and index in self.cpo_port_list: - sfp_object = sfp_module.CpoPort(index) + sfp_object = sfp_module.CpoPort(index, asic_id=asic_id) else: - sfp_object = sfp_module.SFP(index) + sfp_object = sfp_module.SFP(index, asic_id=asic_id) self._sfp_list.append(sfp_object) self.sfp_initialized_count = sfp_count elif self.sfp_initialized_count != len(self._sfp_list): sfp_module = self._import_sfp_module() for index in range(len(self._sfp_list)): if self._sfp_list[index] is None: + asic_id = self._get_asic_id_by_sfp_index(index) if self.RJ45_port_list and index in self.RJ45_port_list: - self._sfp_list[index] = sfp_module.RJ45Port(index) + self._sfp_list[index] = sfp_module.RJ45Port(index, asic_id=asic_id) elif self.cpo_port_list and index in self.cpo_port_list: - self._sfp_list[index] = sfp_module.CpoPort(index) + self._sfp_list[index] = sfp_module.CpoPort(index, asic_id=asic_id) else: - self._sfp_list[index] = sfp_module.SFP(index) + self._sfp_list[index] = sfp_module.SFP(index, asic_id=asic_id) self.sfp_initialized_count = len(self._sfp_list) def get_num_sfps(self): @@ -344,11 +366,11 @@ def get_num_sfps(self): """ num_sfps = 0 if not self._RJ45_port_inited: - self._RJ45_port_list = extract_RJ45_ports_index() + self._RJ45_port_list = extract_RJ45_ports_index(self._num_npus) self._RJ45_port_inited = True - + if not self._cpo_port_inited: - self._cpo_port_list = extract_cpo_ports_index() + self._cpo_port_list = extract_cpo_ports_index(self._num_npus) self._cpo_port_inited = True num_sfps = DeviceDataManager.get_sfp_count() @@ -359,6 +381,54 @@ def get_num_sfps(self): return num_sfps + def get_sfp_ready_file(self): + SFP_READY_HOST_FILE = '/tmp/nv-syncd-shared/sfp_ready' + SFP_READY_CONTAINER_FILE = '/tmp/sfp_ready' + return SFP_READY_HOST_FILE if utils.is_host() else SFP_READY_CONTAINER_FILE + + def wait_sfp_eeprom_ready(self): + if DeviceDataManager.is_simx_platform(): + return True + + eeprom_checks = [] + for sfp in self._sfp_list: + if not sfp: + continue + sfp_idx = sfp.sdk_index + if self.RJ45_port_list and sfp_idx in self.RJ45_port_list or self.cpo_port_list and sfp_idx in self.cpo_port_list: + continue + eeprom_checks.append(lambda sfp=sfp: sfp.check_eeprom_ready_if_present()) + + return utils.wait_until_conditions(eeprom_checks, 10, interval=1) + + def wait_sfp_ready_for_use(self): + sfp_ready_file = self.get_sfp_ready_file() + if os.path.exists(sfp_ready_file): + return True + + if not DeviceDataManager.wait_sysfs_ready(self.get_num_sfps()): + logger.log_error('SFPs are not ready for usage') + return False + + if not self.wait_sfp_eeprom_ready(): + logger.log_error('SFPs are not ready for usage due to eeprom not ready') + return False + + Path(sfp_ready_file).touch(exist_ok=True) + + logger.log_notice('SFPs are ready for usage') + return True + + def sfp_wait_ready_and_initialize_legacy(self): + self.initialize_sfp() + self.wait_sfp_ready_for_use() + + def sfp_wait_ready_and_initialize(self): + if DeviceDataManager.is_module_host_management_mode(): + self.module_host_mgmt_initializer.initialize(self) + else: + self.sfp_wait_ready_and_initialize_legacy() + def get_all_sfps(self): """ Retrieves all sfps available on this chassis @@ -367,10 +437,7 @@ def get_all_sfps(self): A list of objects derived from SfpBase representing all sfps available on this chassis """ - if DeviceDataManager.is_module_host_management_mode(): - self.module_host_mgmt_initializer.initialize(self) - else: - self.initialize_sfp() + self.sfp_wait_ready_and_initialize() return self._sfp_list def get_sfp(self, index): @@ -387,10 +454,7 @@ def get_sfp(self, index): An object dervied from SfpBase representing the specified sfp """ index = index - 1 - if DeviceDataManager.is_module_host_management_mode(): - self.module_host_mgmt_initializer.initialize(self) - else: - self.initialize_single_sfp(index) + self.sfp_wait_ready_and_initialize() return super(Chassis, self).get_sfp(index) def get_port_or_cage_type(self, index): @@ -440,11 +504,10 @@ def get_change_event(self, timeout=0): indicates that fan 0 has been removed, fan 2 has been inserted and sfp 11 has been removed. """ + self.sfp_wait_ready_and_initialize() if DeviceDataManager.is_module_host_management_mode(): - self.module_host_mgmt_initializer.initialize(self) return self.get_change_event_for_module_host_management_mode(timeout) else: - self.initialize_sfp() return self.get_change_event_legacy(timeout) def get_change_event_for_module_host_management_mode(self, timeout): @@ -474,6 +537,11 @@ def get_change_event_for_module_host_management_mode(self, timeout): for s in self._sfp_list: fds = s.get_fds_for_poling() for fd_type, fd in fds.items(): + if fd is None: + self.poll_obj = None + self.registered_fds = {} + logger.log_warning('SFPs are not initialized, too early to get change event') + return True, {'sfp': {}} self.poll_obj.register(fd, select.POLLERR | select.POLLPRI) self.registered_fds[fd.fileno()] = (s.sdk_index, fd, fd_type) @@ -499,7 +567,11 @@ def get_change_event_for_module_host_management_mode(self, timeout): sfp_index, fd, fd_type = self.registered_fds[fileno] s = self._sfp_list[sfp_index] fd.seek(0) - fd_value = int(fd.read().strip()) + try: + fd_value = int(fd.read().strip()) + except Exception as e: + logger.log_warning(f'Failed to read value from file {fd_type} for SFP {sfp_index}: {e}') + continue # Detecting dummy event if s.is_dummy_event(fd_type, fd_value): @@ -595,6 +667,13 @@ def get_change_event_legacy(self, timeout): self.sfp_states_before_first_poll = {} for s in self._sfp_list: fd = s.get_fd_for_polling_legacy() + if fd is None: + self.poll_obj = None + self.registered_fds = {} + self.sfp_states_before_first_poll = {} + logger.log_warning('SFPs are not initialized, too early to get change event') + return True, {'sfp': {}} + self.poll_obj.register(fd, select.POLLERR | select.POLLPRI) self.registered_fds[fd.fileno()] = (s.sdk_index, fd) self.sfp_states_before_first_poll[s.sdk_index] = s.get_module_status() @@ -619,7 +698,12 @@ def get_change_event_legacy(self, timeout): sfp_index, fd = self.registered_fds[fileno] fd.seek(0) - fd.read() + try: + fd.read() + except Exception as e: + logger.log_warning(f'Failed to read module sysfs fd for SFP {sfp_index}: {e}') + continue + s = self._sfp_list[sfp_index] sfp_status = s.get_module_status() @@ -839,6 +923,9 @@ def initialize_components(self): self._component_list.append(DeviceDataManager.get_bios_component()) self._component_list.extend(DeviceDataManager.get_cpld_component_list()) + # Initialize BMC and its components + self.initialize_bmc() + def get_num_components(self): """ Retrieves the number of components available on this chassis @@ -1016,9 +1103,13 @@ def initialize_reboot_cause(self): self.reboot_major_cause_dict = { 'reset_main_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS, 'reset_aux_pwr_or_ref' : self.REBOOT_CAUSE_POWER_LOSS, + 'reset_aux_pwr_or_reload' : self.REBOOT_CAUSE_POWER_LOSS, 'reset_aux_pwr_or_fu' : self.REBOOT_CAUSE_POWER_LOSS, 'reset_comex_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS, + 'reset_main_51v' : self.REBOOT_CAUSE_POWER_LOSS, + 'reset_mgmt_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS, 'reset_asic_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC, + 'reset_cpu_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, 'reset_comex_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, 'reset_hotswap_or_wd' : self.REBOOT_CAUSE_WATCHDOG, 'reset_comex_wd' : self.REBOOT_CAUSE_WATCHDOG, @@ -1026,6 +1117,8 @@ def initialize_reboot_cause(self): 'reset_sff_wd' : self.REBOOT_CAUSE_WATCHDOG, 'reset_hotswap_or_halt' : self.REBOOT_CAUSE_HARDWARE_OTHER, 'reset_voltmon_upgrade_fail': self.REBOOT_CAUSE_HARDWARE_OTHER, + 'reset_pwr_converter_fail' : self.REBOOT_CAUSE_HARDWARE_OTHER, + 'reset_swb_dc_dc_pwr_fail' : self.REBOOT_CAUSE_HARDWARE_OTHER, 'reset_reload_bios' : self.REBOOT_CAUSE_HARDWARE_BIOS, 'reset_fw_reset' : self.REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC, 'reset_from_asic' : self.REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC, @@ -1087,6 +1180,7 @@ def get_reboot_cause(self): for reset_file, reset_cause in self.reboot_major_cause_dict.items(): if self._verify_reboot_cause(reset_file): + logger.log_info("Hardware reboot cause: {}".format(reset_file)) return reset_cause, '' for reset_file, reset_cause in self.reboot_minor_cause_dict.items(): @@ -1121,7 +1215,27 @@ def is_replaceable(self): """ return False - + def initialize_bmc(self): + if self._bmc_initialized: + return + self._bmc = BMC.get_instance() + if self._bmc is not None: + try: + bmc_comp_list = self._bmc._get_component_list() + self._component_list.extend(bmc_comp_list) + except Exception as e: + logger.log_error("Fail to get BMC component list") + self._bmc_initialized = True + + def _initialize_bmc(self): + self.initialize_components() + self.initialize_bmc() + + def get_bmc(self): + self._initialize_bmc() + return self._bmc + + ############################################## # LiquidCooling methods ############################################## diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/component.py b/platform/mellanox/mlnx-platform-api/sonic_platform/component.py index 1fc9a4d3156..0874497efdf 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/component.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/component.py @@ -30,6 +30,7 @@ import glob import tempfile import subprocess + import traceback from sonic_py_common import device_info from sonic_py_common.logger import Logger from sonic_py_common.general import check_output_pipe @@ -912,6 +913,92 @@ def _install_firmware(self, image_path): return True + +class ComponentBMC(Component): + COMPONENT_NAME = 'BMC' + COMPONENT_DESCRIPTION = 'BMC - Baseboard Management Controller' + COMPONENT_FIRMWARE_EXTENSION = ['.fwpkg'] + BMC_FW_UPDATE_CMD = ["/usr/bin/bmc_fw_update.py", ""] + + def __init__(self): + super(ComponentBMC, self).__init__() + from .bmc import BMC + self.bmc = BMC.get_instance() + self.name = self.COMPONENT_NAME + self.description = self.COMPONENT_DESCRIPTION + self.image_ext_name = self.COMPONENT_FIRMWARE_EXTENSION + + def get_firmware_version(self): + """ + Retrieves the BMC firmware version + + Returns: + A string containing the BMC firmware version. + Returns 'N/A' if the BMC firmware version cannot be retrieved. + """ + if self.bmc is None: + return 'N/A' + return self.bmc.get_version() + + def get_available_firmware_version(self, image_path): + raise NotImplementedError("BMC component doesn't support available firmware version query") + + def get_firmware_update_notification(self, image_path): + return "BMC will be automatically restarted to complete BMC firmware update" + + def auto_update_firmware(self, image_path, boot_action): + """ + Default handling of attempted automatic update for a component of a Mellanox switch. + """ + # Verify image path exists + if not os.path.exists(image_path): + # Invalid image path + return FW_AUTO_ERR_IMAGE + # Actually we perform a BMC restart, so the switch boot_action is not relevant + # boot_type did not match (skip) + if boot_action != "cold": + return FW_AUTO_ERR_BOOT_TYPE + # Install firmware and restart BMC + if not self.install_firmware(image_path): + return FW_AUTO_ERR_UNKNOWN + return FW_AUTO_INSTALLED + + def install_firmware(self, image_path): + """ + Installs the BMC firmware + + Args: + image_path: A string, path to firmware image + + Returns: + A boolean, True if the BMC firmware is installed successfully, False otherwise. + """ + if not self._check_file_validity(image_path): + print(f"Invalid firmware image path: {image_path}") + return False + print('Starting BMC firmware update, path={}'.format(image_path)) + try: + self.BMC_FW_UPDATE_CMD[1] = image_path + cmd = self.BMC_FW_UPDATE_CMD + subprocess.check_call( + cmd, + universal_newlines=True, + start_new_session=True + ) + print("Successfully updated BMC firmware, and restarted BMC") + return True + except subprocess.CalledProcessError: + print("Failed to update BMC firmware") + return False + except Exception as e: + logger.log_error(f'Exception occurred during BMC firmware update: {str(e)}') + print(f'Exception occurred during BMC firmware update: {str(e)}') + return False + + def update_firmware(self, image_path): + return self.install_firmware(image_path) + + class ComponentCPLDSN4280(ComponentCPLD): CPLD_FIRMWARE_UPDATE_COMMAND = ['cpldupdate', '--gpio', '--print-progress', ''] diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py b/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py index 2b09713a626..ecb2b1c2bd9 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +20,7 @@ import os import time import re +from pathlib import Path from enum import Enum from . import utils @@ -199,6 +200,15 @@ class DpuInterfaceEnum(Enum): } } }, + 'x86_64-nvidia_sn6600_ld-r0': { + 'thermal': { + "capability": { + "port_amb": False, + "fan_amb": False, + "comex_amb": False, + } + } + }, 'x86_64-nvidia_sn4280_simx-r0': { 'thermal': { "capability": { @@ -374,8 +384,8 @@ def get_cpld_component_list(cls): def is_module_host_management_mode(cls): sai_profile_file = '/tmp/sai.profile' if not os.path.exists(sai_profile_file): - from sonic_py_common import device_info - _, hwsku_dir = device_info.get_paths_to_platform_and_hwsku_dirs() + asic_id = 0 if cls.is_multi_asic_platform() else None + hwsku_dir = utils.get_path_to_hwsku_directory(asic_id=asic_id) sai_profile_file = os.path.join(hwsku_dir, 'sai.profile') data = utils.read_key_value_file(sai_profile_file, delimeter='=') return data.get('SAI_INDEPENDENT_MODULE_MODE') == '1' @@ -383,22 +393,41 @@ def is_module_host_management_mode(cls): @classmethod def wait_platform_ready(cls): """ - Wait for Nvidia platform related services(SDK, hw-management) ready + Legacy function for backward compatibility + """ + return True + + @classmethod + def check_sysfs_access(cls, path): + try: + p = Path(path) + if not p.exists(): + return False + if p.is_dir(): + return True + with open(path, "rb", buffering=0) as f: + f.read(1) + return True + except: + return False + + @classmethod + def wait_sysfs_ready(cls, modules_count, timeout=300, interval=1): + """ + Wait for sysfs nodes of modules to be ready before proceeding. Returns: bool: True if wait success else timeout """ - conditions = [] - sysfs_nodes = ['power_mode', 'power_mode_policy', 'present', 'reset', 'status', 'statuserror'] + + sysfs_nodes = ['present', 'status', 'statuserror'] if cls.is_module_host_management_mode(): - sysfs_nodes.extend(['control', 'frequency', 'frequency_support', 'hw_present', 'hw_reset', - 'power_good', 'power_limit', 'power_on', 'temperature/input']) - else: - conditions.append(lambda: utils.read_int_from_file('/var/run/hw-management/config/asics_init_done') == 1) - sfp_count = cls.get_sfp_count() - for sfp_index in range(sfp_count): + sysfs_nodes.extend(['control', 'power_on']) + + conditions = [] + for sfp_index in range(modules_count): for sysfs_node in sysfs_nodes: - conditions.append(lambda: os.path.exists(f'/sys/module/sx_core/asic0/module{sfp_index}/{sysfs_node}')) - return utils.wait_until_conditions(conditions, 300, 1) + conditions.append(lambda idx=sfp_index, node=sysfs_node: cls.check_sysfs_access(f'/sys/module/sx_core/asic0/module{idx}/{node}')) + return utils.wait_until_conditions(conditions, timeout, interval) @classmethod @utils.read_only_cache() @@ -425,3 +454,14 @@ def get_always_fw_control_ports(cls): return None return sfp_data.get('fw_control_ports') + + @classmethod + @utils.read_only_cache() + def get_asic_count(cls): + from sonic_py_common import device_info + return device_info.get_num_npus() + + @classmethod + @utils.read_only_cache() + def is_multi_asic_platform(cls): + return cls.get_asic_count() > 1 diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/module.py b/platform/mellanox/mlnx-platform-api/sonic_platform/module.py index 48b193c6707..bec1fcef301 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/module.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/module.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,8 +21,9 @@ from sonic_platform_base.module_base import ModuleBase from sonic_platform_base.chassis_base import ChassisBase from sonic_py_common.syslogger import SysLogger -from .dpuctlplat import DpuCtlPlat, BootProgEnum +from .dpuctlplat import DpuCtlPlat, BootProgEnum, PCI_DEV_BASE import subprocess +import os from . import utils from .device_data import DeviceDataManager, DpuInterfaceEnum @@ -340,8 +341,14 @@ def reboot(self, reboot_type=ModuleBase.MODULE_REBOOT_DPU): bool: True if the request has been issued successfully, False if not """ logger.log_notice(f"Rebooting {self._name} with type {reboot_type}") - # no_wait=True is not supported at this point, because of race conditions with other drivers - return_value = self.dpuctl_obj.dpu_reboot(skip_pre_post=True) + # Skip pre shutdown and Post startup, handled by pci_detach and pci_reattach + if reboot_type == ModuleBase.MODULE_REBOOT_DPU: + return_value = self.dpuctl_obj.dpu_reboot(skip_pre_post=True) + elif reboot_type == ModuleBase.MODULE_REBOOT_SMARTSWITCH: + # Do not wait for result if we are rebooting NPU + DPUs + return_value = self.dpuctl_obj.dpu_reboot(no_wait=True, skip_pre_post=True) + else: + raise RuntimeError(f"Reboot called with unsupported reboot_type = {reboot_type}") logger.log_notice(f"Rebooted {self._name} with type {reboot_type} and return value {return_value}") return return_value @@ -438,22 +445,24 @@ def get_reboot_cause(self): REBOOT_CAUSE_DPU_SELF_REBOOT """ # Check for Watchdog reboot first - pcie_path = DeviceDataManager.get_dpu_interface(self._name.lower(), DpuInterfaceEnum.PCIE_INT.value) - # mlxreg -d 0000:08:00.0 --reg_name MRSI -g -indexes "device=1" - try: - op = subprocess.check_output(['mlxreg', '-d', pcie_path, '--reg_name', 'MRSI', '-g', '-indexes', 'device=1']) - except subprocess.CalledProcessError as e: - logger.log_error(f"Failed to check watchdog reason for {self._name}! {e}") - op = b'' - reset_reason_value = None - for line in op.decode().split('\n'): - if 'reset_reason' in line: - # Extract the value after the '|' - reset_reason_value = line.split('|')[1].strip() - break - if reset_reason_value and int(reset_reason_value,16) == self.MLX_DPU_REBOOT_CAUSE_WATCHDOG: - logger.log_notice(f"Reset reason for {self._name} is {ChassisBase.REBOOT_CAUSE_WATCHDOG}") - return ChassisBase.REBOOT_CAUSE_WATCHDOG, 'Watchdog reboot' + pcie_dev_id = DeviceDataManager.get_dpu_interface(self._name.lower(), DpuInterfaceEnum.PCIE_INT.value) + pcie_path = os.path.join(PCI_DEV_BASE, pcie_dev_id) + if os.path.exists(pcie_path): + try: + # mlxreg -d 0000:08:00.0 --reg_name MRSI -g -indexes "device=1" + op = subprocess.check_output(['mlxreg', '-d', pcie_dev_id, '--reg_name', 'MRSI', '-g', '-indexes', 'device=1']) + except subprocess.CalledProcessError as e: + logger.log_error(f"Failed to check watchdog reason for {self._name}! {e}") + op = b'' + reset_reason_value = None + for line in op.decode().split('\n'): + if 'reset_reason' in line: + # Extract the value after the '|' + reset_reason_value = line.split('|')[1].strip() + break + if reset_reason_value and int(reset_reason_value,16) == self.MLX_DPU_REBOOT_CAUSE_WATCHDOG: + logger.log_notice(f"Reset reason for {self._name} is {ChassisBase.REBOOT_CAUSE_WATCHDOG}") + return ChassisBase.REBOOT_CAUSE_WATCHDOG, 'Watchdog reboot' # Check for other reboot causes for f, rd in self.reboot_cause_map.items(): if utils.read_int_from_file(f) == 1: diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/module_host_mgmt_initializer.py b/platform/mellanox/mlnx-platform-api/sonic_platform/module_host_mgmt_initializer.py index d9bec65987e..bc527853d88 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/module_host_mgmt_initializer.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/module_host_mgmt_initializer.py @@ -1,5 +1,6 @@ # -# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -60,6 +61,14 @@ def initialize(self, chassis): if not self.initialized: with self.lock: if not self.initialized: + from sonic_platform.device_data import DeviceDataManager + logger.log_notice('Waiting for modules to be ready...') + sfp_count = chassis.get_num_sfps() + if not DeviceDataManager.wait_sysfs_ready(sfp_count): + logger.log_error('Modules are not ready') + else: + logger.log_notice('Modules are ready') + logger.log_notice('Starting module initialization for module host management...') initialization_owner = True self.remove_module_ready_file() diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/pcie.py b/platform/mellanox/mlnx-platform-api/sonic_platform/pcie.py index 68223303895..b61af6e3495 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/pcie.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/pcie.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,6 +40,27 @@ class Pcie(PcieUtil): + + def pcie_check_dpu(self, bus, dev, fn): + # Special handling for Bluefield Devices + # Ideally even with BIOS updates, the PCI ID for bluefield devices should not change. + try: + # Connect to STATE_DB to check for detached devices + if not self.state_db: + import swsscommon + self.state_db = swsscommon.swsscommon.DBConnector("STATE_DB", 0) + key_dict = f"{PCIE_DETACH_INFO_TABLE}|0000:{bus}:{dev}.{fn}" + detach_info_dict = dict(self.state_db.hgetall(key_dict)) + if detach_info_dict and detach_info_dict.get("dpu_state") == PCIE_OPERATION_DETACHING: + # Do not add this device to confInfo list + return None + elif self.check_pcie_sysfs(bus=int(bus, base=16), device=int(dev, base=16), func=int(fn, base=16)): + return "Passed" + return "Failed" + except Exception as e: + self.logger.log_error(f"Error: {e}") + return None + # check the current PCIe device with config file and return the result # use bus from _device_id_to_bus_map instead of from yaml file def get_pcie_check(self): @@ -52,29 +73,13 @@ def get_pcie_check(self): bus_conf = item_conf["bus"] pcie_device_id = f"0000:{bus_conf}:{dev_conf}.{fn_conf}" if pcie_device_id in self.dpu_pcie_devices: - # Special handling for Bluefield Devices - # Ideally even with BIOS updates, the PCI ID for bluefield devices should not change. - try: - # Connect to STATE_DB to check for detached devices - if not os.environ.get('UNITTEST'): - import swsscommon - self.state_db = swsscommon.swsscommon.DBConnector("STATE_DB", 0) - key_dict = f"{PCIE_DETACH_INFO_TABLE}|0000:{bus_conf}:{dev_conf}.{fn_conf}" - detach_info_dict = dict(self.state_db.hgetall(key_dict)) - if detach_info_dict and detach_info_dict.get("dpu_state") == PCIE_OPERATION_DETACHING: - # Do not add this device to confInfo list - continue - elif self.check_pcie_sysfs(bus=int(bus_conf, base=16), device=int(dev_conf, base=16), func=int(fn_conf, base=16)): - # Add device to confInfo list if not present in state_db - item_conf["result"] = "Passed" - else: - item_conf["result"] = "Failed" + status = self.pcie_check_dpu(bus_conf, dev_conf, fn_conf) + if status: + item_conf["result"] = status return_confInfo.append(item_conf) - continue - except Exception as e: - self.logger.log_error(f"Error: {e}") - pass - bus_conf = self._device_id_to_bus_map.get(str(id_conf)) + continue + + bus_conf = self._device_id_to_bus_map.get(f"{id_conf}:{dev_conf}") if bus_conf and self.check_pcie_sysfs(bus=int(bus_conf, base=16), device=int(dev_conf, base=16), func=int(fn_conf, base=16)): item_conf["result"] = "Passed" @@ -118,16 +123,17 @@ def _create_device_id_to_bus_map(self): # 2 hex digit of id # dot '.' # 1 digit of fn - pattern_for_device_folder = re.search(r'....:(..):..\..', folder) + pattern_for_device_folder = re.search(r'....:(..):(..)\..', folder) if pattern_for_device_folder: bus = pattern_for_device_folder.group(1) + dev = pattern_for_device_folder.group(2) with open(os.path.join('/sys/bus/pci/devices', folder, 'device'), 'r') as device_file: # The 'device' file contain an hex repesantaion of the id key in the yaml file. # Example of the file contact: # 0x6fe2 # We will strip the new line character, and remove the 0x prefix that is not needed. device_id = device_file.read().strip().replace('0x', '') - self._device_id_to_bus_map[device_id] = bus + self._device_id_to_bus_map[f"{device_id}:{dev}"] = bus def __init__(self, platform_path): PcieUtil.__init__(self, platform_path) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index 34fb729b6df..1f8fe1ed45f 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2019-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -45,6 +45,19 @@ except ImportError as e: raise ImportError (str(e) + "- required module not found") +try: + import sys + sys.path.append('/run/hw-management/bin') + import hw_management_independent_mode_update +except ImportError: + # Only mock if running under pytest (check if pytest is imported) + if 'pytest' in sys.modules: + from unittest import mock + hw_management_independent_mode_update = mock.MagicMock() + hw_management_independent_mode_update.vendor_data_set_module = mock.MagicMock() + else: + raise + # Define the sdk constants SX_PORT_MODULE_STATUS_INITIALIZING = 0 SX_PORT_MODULE_STATUS_PLUGGED = 1 @@ -310,10 +323,11 @@ class NvidiaSFPCommon(SfpOptoeBase): 0xc: SFP_MLNX_ERROR_BIT_PCIE_POWER_SLOT_EXCEEDED } - def __init__(self, sfp_index): + def __init__(self, sfp_index, asic_id='asic0'): super(NvidiaSFPCommon, self).__init__() self.index = sfp_index + 1 self.sdk_index = sfp_index + self.asic_id = asic_id @classmethod def _get_module_info(self, sdk_index): @@ -332,7 +346,11 @@ def _get_module_info(self, sdk_index): return oper_state, error_type def get_fd(self, fd_type): - return open(f'/sys/module/sx_core/asic0/module{self.sdk_index}/{fd_type}') + try: + return open(f'/sys/module/sx_core/asic0/module{self.sdk_index}/{fd_type}') + except FileNotFoundError as e: + logger.log_warning(f'Trying to access /sys/module/sx_core/asic0/module{self.sdk_index}/{fd_type} file which does not exist') + return None def get_fd_for_polling_legacy(self): """Get polling fds for when module host management is disabled @@ -381,6 +399,8 @@ def get_error_info_from_sdk_error_type(self): sfp_state = str(sfp_state_bits) return sfp_state, error_description + def get_asic_id(self): + return self.asic_id class SFP(NvidiaSFPCommon): """Platform-specific SFP class""" @@ -397,8 +417,8 @@ class SFP(NvidiaSFPCommon): # only applicable for module host management action_table = None - def __init__(self, sfp_index, sfp_type=None, slot_id=0, linecard_port_count=0, lc_name=None): - super(SFP, self).__init__(sfp_index) + def __init__(self, sfp_index, sfp_type=None, slot_id=0, linecard_port_count=0, lc_name=None, asic_id='asic0'): + super(SFP, self).__init__(sfp_index, asic_id=asic_id) self._sfp_type = sfp_type if slot_id == 0: # For non-modular chassis @@ -426,6 +446,10 @@ def __init__(self, sfp_index, sfp_type=None, slot_id=0, linecard_port_count=0, l self.sn = None self.temp_high_threshold = None self.temp_critical_threshold = None + self.retry_read_threshold = 5 + self.retry_read_vendor = 5 + self.manufacturer = None + self.part_number = None def __str__(self): return f'SFP {self.sdk_index}' @@ -445,12 +469,17 @@ def get_presence(self): Returns: bool: True if device is present, False if not """ - presence_sysfs = f'/sys/module/sx_core/asic0/module{self.sdk_index}/hw_present' if self.is_sw_control() else f'/sys/module/sx_core/asic0/module{self.sdk_index}/present' - if utils.read_int_from_file(presence_sysfs) != 1: + + try: + presence_file = 'hw_present' if self.is_sw_control() else 'present' + if utils.read_int_from_file(f'/sys/module/sx_core/asic0/module{self.sdk_index}/{presence_file}', log_func=None) != 1: + return False + eeprom_raw = self._read_eeprom(0, 1, log_on_error=False) + return eeprom_raw is not None + except Exception as e: + logger.log_warning(f'Failed to check presence of SFP {self.sdk_index}: {e}') return False - eeprom_raw = self._read_eeprom(0, 1, log_on_error=False) - return eeprom_raw is not None - + @classmethod def wait_sfp_eeprom_ready(cls, sfp_list, wait_time): not_ready_list = sfp_list @@ -466,6 +495,18 @@ def wait_sfp_eeprom_ready(cls, sfp_list, wait_time): for s in not_ready_list: logger.log_error(f'SFP {s.sdk_index} eeprom is not ready') + def check_eeprom_ready_if_present(self): + """ + Check if the eeprom is ready for a present SFP + + Returns: + bool: False if the SFP is present and the eeprom is not ready, True otherwise + """ + presence_file = 'hw_present' if self.is_sw_control() else 'present' + if utils.read_int_from_file(f'/sys/module/sx_core/asic0/module{self.sdk_index}/{presence_file}', log_func=None) != 1: + return True + return self._read_eeprom(0, 1, log_on_error=False) is not None + # read eeprom specfic bytes beginning from offset with size as num_bytes def read_eeprom(self, offset, num_bytes): """ @@ -867,12 +908,55 @@ def reinit_if_sn_changed(self): sn = self._get_serial() if sn != self.sn: self.reinit() - self.sn = self._get_serial() + # Clear cached vendor info so a new module will be re-read + self.manufacturer = None + self.part_number = None self.temp_high_threshold = None self.temp_critical_threshold = None + self.sn = self._get_serial() + if self.sn is not None: + self.retry_read_threshold = 5 + self.retry_read_vendor = 5 + else: + self.retry_read_threshold = 0 + self.retry_read_vendor = 0 return True return False - + + def get_vendor_info(self): + """Get SFP vendor info (manufacturer and part number). + Reads fields via xcvr_eeprom to avoid manual offset logic. + Uses cache to avoid redundant reads. + Returns: + tuple: (manufacturer, part_number) or (None, None) if read fails + """ + try: + display_idx = self.sdk_index + 1 + if self.manufacturer is not None and self.part_number is not None: + return self.manufacturer, self.part_number + + api = self.get_xcvr_api() + if not api or api.xcvr_eeprom is None: + return None, None + + try: + manufacturer = api.xcvr_eeprom.read(consts.VENDOR_NAME_FIELD) + part_number = api.xcvr_eeprom.read(consts.VENDOR_PART_NO_FIELD) + logger.log_info(f"SFP {display_idx} vendor info read: manufacturer='{manufacturer}', part_number='{part_number}'") + except Exception as e: + logger.log_error(f"SFP {display_idx} vendor info read failed: {e}") + manufacturer = None + part_number = None + + if manufacturer and part_number: + self.manufacturer = manufacturer + self.part_number = part_number + return manufacturer, part_number + + return None, None + except Exception: + return None, None + def get_temperature_info(self): """Get SFP temperature info in a fast way. This function is faster than calling following functions one by one: get_temperature, get_temperature_warning_threshold, get_temperature_critical_threshold. @@ -880,11 +964,35 @@ def get_temperature_info(self): tuple: (temperature, warning_threshold, critical_threshold) """ try: + sn_changed = self.reinit_if_sn_changed() + if self.retry_read_vendor > 0: + try: + manufacturer, part_number = self.get_vendor_info() + if manufacturer and part_number: + vendor_info = {'manufacturer': manufacturer, 'part_number': part_number} + hw_management_independent_mode_update.vendor_data_set_module( + 0, # ASIC index always 0 for now + self.sdk_index + 1, + vendor_info + ) + logger.log_notice(f'Module {self.sdk_index + 1} vendor info updated - ' + f'manufacturer: {manufacturer} part_number: {part_number}') + self.retry_read_vendor = 0 + else: + self.retry_read_vendor -= 1 + if self.retry_read_vendor == 0: + logger.log_notice(f"SFP {self.sdk_index + 1}: vendor info unavailable after retries") + except Exception as e: + logger.log_warning(f'Failed to publish vendor info for SFP {self.sdk_index + 1} - {e}') + self.retry_read_vendor -= 1 + if self.retry_read_vendor == 0: + logger.log_notice(f"SFP {self.sdk_index + 1}: vendor info unavailable after retries") + sw_control = self.is_sw_control() if not sw_control: return sw_control, None, None, None - sn_changed = self.reinit_if_sn_changed() + self.reinit_if_sn_changed() # software control, read from EEPROM temperature = super().get_temperature() if temperature is None: @@ -894,27 +1002,44 @@ def get_temperature_info(self): # Temperature is not supported, no need read threshold return sw_control, 0.0, 0.0, 0.0 else: - if not sn_changed and self.temp_high_threshold is not None and self.temp_critical_threshold is not None: - return sw_control, temperature, self.temp_high_threshold, self.temp_critical_threshold - else: - # Read threshold from EEPROM - api = self.get_xcvr_api() - thresh_support = api.get_transceiver_thresholds_support() - if thresh_support is None: - # Failed to read threshold support field, no need read threshold - return sw_control, temperature, None, None - if thresh_support: - # Read threshold from EEPROM - self.temp_high_threshold = api.xcvr_eeprom.read(consts.TEMP_HIGH_WARNING_FIELD) - self.temp_critical_threshold = api.xcvr_eeprom.read(consts.TEMP_HIGH_ALARM_FIELD) - return sw_control, temperature, self.temp_high_threshold, self.temp_critical_threshold - else: - # No threshold support, use default threshold - return sw_control, temperature, 0.0, 0.0 + self._update_temperature_threshold(sw_control) + return sw_control, temperature, self.temp_high_threshold, self.temp_critical_threshold except: # module under initialization, return as temperature not supported return False, None, None, None + def _update_temperature_threshold(self, sw_control): + """Update temperature threshold + + Args: + sw_control (bool): True if software control, False if firmware control + """ + if self.retry_read_threshold <= 0: + return + self.temp_high_threshold = None + self.temp_critical_threshold = None + if sw_control: + api = self.get_xcvr_api() + if api: + thresh_support = api.get_transceiver_thresholds_support() + if thresh_support: + self.temp_high_threshold = api.xcvr_eeprom.read(consts.TEMP_HIGH_WARNING_FIELD) + self.temp_critical_threshold = api.xcvr_eeprom.read(consts.TEMP_HIGH_ALARM_FIELD) + else: + threshold_hi_file = f'/sys/module/sx_core/asic0/module{self.sdk_index}/temperature/threshold_hi' + threshold_critical_file = f'/sys/module/sx_core/asic0/module{self.sdk_index}/temperature/threshold_critical_hi' + + self.temp_high_threshold = utils.read_int_from_file(threshold_hi_file, log_func=None) + self.temp_high_threshold = self.temp_high_threshold / SFP_TEMPERATURE_SCALE + + self.temp_critical_threshold = utils.read_int_from_file(threshold_critical_file, log_func=None) + self.temp_critical_threshold = self.temp_critical_threshold / SFP_TEMPERATURE_SCALE + + if not self.temp_high_threshold or not self.temp_critical_threshold: + self.retry_read_threshold -= 1 + else: + self.retry_read_threshold = 0 + def get_temperature(self): """Get SFP temperature @@ -947,11 +1072,12 @@ def get_temperature_warning_threshold(self): other float value if warning threshold is available """ try: - self.is_sw_control() + sw_control = self.is_sw_control() except: return 0.0 - self.temp_high_threshold = self._get_temperature_threshold(consts.TEMP_HIGH_WARNING_FIELD) + self.reinit_if_sn_changed() + self._update_temperature_threshold(sw_control) return self.temp_high_threshold def get_temperature_critical_threshold(self): @@ -963,37 +1089,14 @@ def get_temperature_critical_threshold(self): other float value if critical threshold is available """ try: - self.is_sw_control() + sw_control = self.is_sw_control() except: return 0.0 - self.temp_critical_threshold = self._get_temperature_threshold(consts.TEMP_HIGH_ALARM_FIELD) + self.reinit_if_sn_changed() + self._update_temperature_threshold(sw_control) return self.temp_critical_threshold - def _get_temperature_threshold(self, thresh_field): - """Get temperature thresholds data from EEPROM - - Args: - thresh_field (str): threshold field name - - Returns: - float: temperature threshold - """ - sn_changed = self.reinit_if_sn_changed() - if not sn_changed: - if thresh_field == consts.TEMP_HIGH_WARNING_FIELD and self.temp_high_threshold is not None: - return self.temp_high_threshold - elif thresh_field == consts.TEMP_HIGH_ALARM_FIELD and self.temp_critical_threshold is not None: - return self.temp_critical_threshold - api = self.get_xcvr_api() - if not api: - return None - - thresh_support = api.get_transceiver_thresholds_support() - if thresh_support is None: - return None - return api.xcvr_eeprom.read(thresh_field) if thresh_support else 0.0 - def get_xcvr_api(self): """ Retrieves the XcvrApi associated with this SFP @@ -1581,8 +1684,8 @@ def initialize_sfp_modules(cls, sfp_list): class RJ45Port(NvidiaSFPCommon): """class derived from SFP, representing RJ45 ports""" - def __init__(self, sfp_index): - super(RJ45Port, self).__init__(sfp_index) + def __init__(self, sfp_index, asic_id='asic0'): + super(RJ45Port, self).__init__(sfp_index, asic_id=asic_id) self.sfp_type = RJ45_TYPE def get_presence(self): @@ -1835,13 +1938,15 @@ def get_module_status(self): class CpoPort(SFP): """class derived from SFP, representing CPO ports""" - def __init__(self, sfp_index): - super(CpoPort, self).__init__(sfp_index) + def __init__(self, sfp_index, asic_id='asic0'): + super(CpoPort, self).__init__(sfp_index, asic_id=asic_id) self._sfp_type_str = None self.sfp_type = CPO_TYPE def get_transceiver_info(self): transceiver_info_dict = super().get_transceiver_info() + if transceiver_info_dict is None: + return None transceiver_info_dict['type'] = self.sfp_type return transceiver_info_dict diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py index 613de8ef7ef..a6f347d7978 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2019-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -76,12 +76,14 @@ }, "chassis thermals": [ { - "name": "ASIC", + "name": "ASIC{}", "temperature": "input", "high_threshold_default": 105, "high_critical_threshold_default": 120, - "sysfs_folder": "/sys/module/sx_core/asic0/temperature", - "scale": 8 + "sysfs_folder": "/sys/module/sx_core/asic{}/temperature", + "scale": 8, + "type": "asic_indexable", + "start_index": 0 }, { "name": "Ambient Port Side Temp", @@ -141,15 +143,6 @@ "search_pattern": '/run/hw-management/thermal/sodimm*_temp_input', 'index_pattern': r'sodimm(\d+)_temp_input', "type": "discrete", - }, - { - "name": "PMIC {} Temp", - "temperature": "voltmon{}_temp1_input", - "high_threshold": "voltmon{}_temp1_max", - "high_critical_threshold": "voltmon{}_temp1_crit", - "search_pattern": '/run/hw-management/thermal/voltmon*_temp1_input', - 'index_pattern': r'voltmon(\d+)_temp1_input', - "type": "discrete", } ], 'linecard thermals': { @@ -188,6 +181,12 @@ def initialize_chassis_thermals(): if discrete_thermals: position += len(discrete_thermals) thermal_list.extend(discrete_thermals) + elif thermal_type == 'asic_indexable': + is_multi_asic = DeviceDataManager.is_multi_asic_platform() + asic_count = DeviceDataManager.get_asic_count() + for asic_index in range(asic_count): + thermal_list.append(create_asic_thermal(rule, asic_index, position, is_multi_asic)) + position += 1 else: thermal_object = create_single_thermal(rule, CHASSIS_THERMAL_SYSFS_FOLDER, position) if thermal_object: @@ -196,6 +195,25 @@ def initialize_chassis_thermals(): return thermal_list +def create_asic_thermal(rule, asic_index, position, is_multi_asic): + """Create thermal object for a specific ASIC + + Args: + rule (dict): Thermal rule + asic_index (int): ASIC index (0-based) + position (int): Position in thermal list + is_multi_asic (bool): Whether the platform is multi ASIC + + Returns: + Thermal: ASIC thermal object + """ + rule = copy.deepcopy(rule) + name_format = asic_index if is_multi_asic else '' + rule['name'] = rule['name'].format(name_format) + rule['sysfs_folder'] = rule['sysfs_folder'].format(asic_index) + return create_single_thermal(rule, rule['sysfs_folder'], position, check_presence=False) + + def initialize_psu_thermal(psu_index, presence_cb): """Initialize PSU thermal object @@ -260,7 +278,7 @@ def create_indexable_thermal(rule, index, sysfs_folder, position, presence_cb=No return RemovableThermal(name, temp_file, high_th_file, high_crit_th_file, high_th_default, high_crit_th_default, scale, position, presence_cb) -def create_single_thermal(rule, sysfs_folder, position, presence_cb=None): +def create_single_thermal(rule, sysfs_folder, position, presence_cb=None, check_presence=True): temp_file = rule['temperature'] default_present = rule.get('default_present', True) thermal_capability = DeviceDataManager.get_thermal_capability() @@ -273,15 +291,18 @@ def create_single_thermal(rule, sysfs_folder, position, presence_cb=None): sysfs_folder = rule.get('sysfs_folder', sysfs_folder) temp_file = os.path.join(sysfs_folder, temp_file) - _check_thermal_sysfs_existence(temp_file, presence_cb) + if check_presence: + _check_thermal_sysfs_existence(temp_file, presence_cb) if 'high_threshold' in rule: high_th_file = os.path.join(sysfs_folder, rule['high_threshold']) - _check_thermal_sysfs_existence(high_th_file, presence_cb) + if check_presence: + _check_thermal_sysfs_existence(high_th_file, presence_cb) else: high_th_file = None if 'high_critical_threshold' in rule: high_crit_th_file = os.path.join(sysfs_folder, rule['high_critical_threshold']) - _check_thermal_sysfs_existence(high_crit_th_file, presence_cb) + if check_presence: + _check_thermal_sysfs_existence(high_crit_th_file, presence_cb) else: high_crit_th_file = None high_th_default = rule.get('high_threshold_default') diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal_updater.py b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal_updater.py index 48ad612590e..3701ac1035a 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal_updater.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal_updater.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,25 +16,33 @@ # limitations under the License. # +from .device_data import DeviceDataManager from . import utils from sonic_py_common import logger +import atexit +import functools +import re import sys import time +import os sys.path.append('/run/hw-management/bin') try: import hw_management_independent_mode_update except ImportError: - # For unit test only - from unittest import mock - hw_management_independent_mode_update = mock.MagicMock() - hw_management_independent_mode_update.module_data_set_module_counter = mock.MagicMock() - hw_management_independent_mode_update.thermal_data_set_asic = mock.MagicMock() - hw_management_independent_mode_update.thermal_data_set_module = mock.MagicMock() - hw_management_independent_mode_update.thermal_data_clean_asic = mock.MagicMock() - hw_management_independent_mode_update.thermal_data_clean_module = mock.MagicMock() + # Only mock if running under pytest (check if pytest is imported) + if 'pytest' in sys.modules: + from unittest import mock + hw_management_independent_mode_update = mock.MagicMock() + hw_management_independent_mode_update.module_data_set_module_counter = mock.MagicMock() + hw_management_independent_mode_update.thermal_data_set_asic = mock.MagicMock() + hw_management_independent_mode_update.thermal_data_set_module = mock.MagicMock() + hw_management_independent_mode_update.thermal_data_clean_asic = mock.MagicMock() + hw_management_independent_mode_update.thermal_data_clean_module = mock.MagicMock() + else: + raise SFP_TEMPERATURE_SCALE = 1000 @@ -47,6 +55,23 @@ TC_CONFIG_FILE = '/run/hw-management/config/tc_config.json' logger = logger.Logger('thermal-updater') +# Register a clean-up routine that will run when the process exits +def clean_thermal_data(sfp_list): + if not sfp_list: + return + hw_management_independent_mode_update.module_data_set_module_counter(len(sfp_list)) + for sfp in sfp_list: + try: + sw_control = sfp.is_sw_control() + if not sw_control: + continue + + hw_management_independent_mode_update.thermal_data_clean_module( + 0, + sfp.sdk_index + 1 + ) + except Exception as e: + logger.log_warning(f'Cleanup skipped for module {sfp.sdk_index + 1}: {e}') class ThermalUpdater: def __init__(self, sfp_list, update_asic=True): @@ -55,26 +80,80 @@ def __init__(self, sfp_list, update_asic=True): self._timer = utils.Timer() self._update_asic = update_asic + atexit.register(functools.partial(clean_thermal_data, self._sfp_list)) + + def wait_for_sysfs_nodes(self): + """ + Wait for temperature sysfs nodes to be present before proceeding. + Returns: + bool: True if wait success else timeout + """ + start_time = time.time() + logger.log_notice('Waiting for temperature sysfs nodes to be present...') + conditions = [] + + # ASIC temperature sysfs node + asic_count = DeviceDataManager.get_asic_count() + for asic_index in range(asic_count): + conditions.append(lambda idx=asic_index: os.path.exists(f'/sys/module/sx_core/asic{idx}/temperature/input')) + + # Module temperature sysfs nodes + sfp_count = len(self._sfp_list) if self._sfp_list else 0 + result = DeviceDataManager.wait_sysfs_ready(sfp_count) + end_time = time.time() + elapsed_time = end_time - start_time + + if result: + logger.log_notice(f'Temperature sysfs nodes are ready. Wait time: {elapsed_time:.4f} seconds') + else: + logger.log_error(f'Timeout waiting for temperature sysfs nodes. Wait time: {elapsed_time:.4f} seconds') + + return result + + def _find_matching_key(self, dev_parameters, pattern): + """ + Find the first key in dev_parameters that matches the given regex pattern. + Returns the matching key and its value, or (None, None) if no match found. + """ + for key in dev_parameters.keys(): + if re.match(pattern, key): + return key, dev_parameters[key] + return None, None + def load_tc_config(self): asic_poll_interval = 1 sfp_poll_interval = 10 data = utils.load_json_file(TC_CONFIG_FILE, log_func=None) if not data: - logger.log_notice(f'{TC_CONFIG_FILE} does not exist, use default polling interval') + logger.log_error(f'{TC_CONFIG_FILE} does not exist, use default polling interval') if data: dev_parameters = data.get('dev_parameters') - if dev_parameters is not None: - asic_parameter = dev_parameters.get('asic') + if not dev_parameters: + logger.log_error('dev_parameters not configured or empty, using default intervals') + else: + # Find ASIC parameter using regex pattern + asic_key, asic_parameter = self._find_matching_key(dev_parameters, r'asic\\d*') if asic_parameter is not None: asic_poll_interval_config = asic_parameter.get('poll_time') if asic_poll_interval_config: - asic_poll_interval = int(asic_poll_interval_config) / 2 - module_parameter = dev_parameters.get('module\\d+') + asic_poll_interval = int(asic_poll_interval_config) + logger.log_notice(f'ASIC parameter found with key "{asic_key}", poll_time: {asic_poll_interval_config}, interval: {asic_poll_interval}') + else: + logger.log_error(f'ASIC poll_time not configured in "{asic_key}", using default interval: {asic_poll_interval}') + else: + logger.log_error(f'ASIC parameter not found (pattern: asic\\d*), using default interval: {asic_poll_interval}') + # Find Module parameter using regex pattern + module_key, module_parameter = self._find_matching_key(dev_parameters, r'module\\d+') if module_parameter is not None: sfp_poll_interval_config = module_parameter.get('poll_time') if sfp_poll_interval_config: - sfp_poll_interval = int(sfp_poll_interval_config) / 2 + sfp_poll_interval = int(sfp_poll_interval_config) + logger.log_notice(f'Module parameter found with key "{module_key}", poll_time: {sfp_poll_interval_config}, interval: {sfp_poll_interval}') + else: + logger.log_error(f'Module poll_time not configured in "{module_key}", using default interval: {sfp_poll_interval}') + else: + logger.log_error(f'Module parameter not found (pattern: module\\d+), using default interval: {sfp_poll_interval}') if self._update_asic: logger.log_notice(f'ASIC polling interval: {asic_poll_interval}') @@ -83,9 +162,15 @@ def load_tc_config(self): self._timer.schedule(sfp_poll_interval, self.update_module) def start(self): - self.clean_thermal_data() self.control_tc(False) self.load_tc_config() + + # Wait for temperature sysfs nodes to be ready before starting the timer + if not self.wait_for_sysfs_nodes(): + logger.log_error('Failed to start thermal updater: temperature sysfs nodes not available') + self.control_tc(True) # Suspend TC to protect the system + return False + self._timer.start() def stop(self): @@ -96,25 +181,16 @@ def control_tc(self, suspend): logger.log_notice(f'Set hw-management-tc to {"suspend" if suspend else "resume"}') utils.write_file('/run/hw-management/config/suspend', 1 if suspend else 0) - def clean_thermal_data(self): - hw_management_independent_mode_update.module_data_set_module_counter(len(self._sfp_list)) - hw_management_independent_mode_update.thermal_data_clean_asic(0) - for sfp in self._sfp_list: - hw_management_independent_mode_update.thermal_data_clean_module( - 0, - sfp.sdk_index + 1 - ) - - def get_asic_temp(self): - temperature = utils.read_int_from_file('/sys/module/sx_core/asic0/temperature/input', default=None) + def get_asic_temp(self, asic_index=0): + temperature = utils.read_int_from_file(f'/sys/module/sx_core/asic{asic_index}/temperature/input', default=None) return temperature * ASIC_TEMPERATURE_SCALE if temperature is not None else None - def get_asic_temp_warning_threshold(self): - emergency = utils.read_int_from_file('/sys/module/sx_core/asic0/temperature/emergency', default=None, log_func=None) + def get_asic_temp_warning_threshold(self, asic_index=0): + emergency = utils.read_int_from_file(f'/sys/module/sx_core/asic{asic_index}/temperature/emergency', default=None, log_func=None) return emergency * ASIC_TEMPERATURE_SCALE if emergency is not None else ASIC_DEFAULT_TEMP_WARNNING_THRESHOLD - def get_asic_temp_critical_threshold(self): - critical = utils.read_int_from_file('/sys/module/sx_core/asic0/temperature/critical', default=None, log_func=None) + def get_asic_temp_critical_threshold(self, asic_index=0): + critical = utils.read_int_from_file(f'/sys/module/sx_core/asic{asic_index}/temperature/critical', default=None, log_func=None) return critical * ASIC_TEMPERATURE_SCALE if critical is not None else ASIC_DEFAULT_TEMP_CRITICAL_THRESHOLD def update_single_module(self, sfp): @@ -170,26 +246,27 @@ def update_module(self): def update_asic(self): try: - asic_temp = self.get_asic_temp() - warn_threshold = self.get_asic_temp_warning_threshold() - critical_threshold = self.get_asic_temp_critical_threshold() - fault = 0 - if asic_temp is None: - logger.log_error('Failed to read ASIC temperature, send fault to hw-management-tc') - asic_temp = warn_threshold - fault = ERROR_READ_THERMAL_DATA + for asic_index in range(DeviceDataManager.get_asic_count()): + asic_temp = self.get_asic_temp(asic_index) + warn_threshold = self.get_asic_temp_warning_threshold(asic_index) + critical_threshold = self.get_asic_temp_critical_threshold(asic_index) + fault = 0 + if asic_temp is None: + logger.log_error(f'Failed to read ASIC {asic_index} temperature, send fault to hw-management-tc') + asic_temp = warn_threshold + fault = ERROR_READ_THERMAL_DATA - hw_management_independent_mode_update.thermal_data_set_asic( - 0, # ASIC index always 0 for now - asic_temp, - critical_threshold, - warn_threshold, - fault - ) + hw_management_independent_mode_update.thermal_data_set_asic( + asic_index, + asic_temp, + critical_threshold, + warn_threshold, + fault + ) except Exception as e: logger.log_error(f'Failed to update ASIC thermal data - {e}') hw_management_independent_mode_update.thermal_data_set_asic( - 0, # ASIC index always 0 for now + asic_index, 0, 0, 0, diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py b/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py index ead1cdd03eb..83dba151cdb 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -299,6 +299,42 @@ def extract_cpo_ports_index(num_of_asics=1): return _extract_ports_index_by_type(CPO_PORT_TYPE, num_of_asics) +def extract_asic_id_map(num_of_asics=1): + asic_id_map = {} + + hwsku_jsons = get_path_list_to_asic_hwsku_dir(num_of_asics) + interface2asic = {} + for asic_id, hwsku_json in enumerate(hwsku_jsons): + interface2asic.update({interface: asic_id for interface in load_json_file(hwsku_json)['interfaces'].keys()}) + + platform_file = os.path.join(device_info.get_path_to_platform_dir(), device_info.PLATFORM_JSON_FILE) + platform_dict = load_json_file(platform_file)['interfaces'] + + for inteface, value in platform_dict.items(): + if PORT_INDEX_KEY in value: + index_raw = value[PORT_INDEX_KEY] + # The index could be "1" or "1, 1, 1, 1" + index = index_raw.split(',')[0] + asic_id_map[int(index)-1] = interface2asic[inteface] + return asic_id_map + + +def get_path_to_hwsku_directory(asic_id=None): + platform_path = device_info.get_path_to_platform_dir() + hwsku = device_info.get_hwsku() + if asic_id is not None: + return os.path.join(platform_path, hwsku, str(asic_id)) + else: + return os.path.join(platform_path, hwsku) + + +def get_path_list_to_asic_hwsku_dir(num_of_asics): + if num_of_asics == 1: + return [os.path.join(get_path_to_hwsku_directory(), HWSKU_JSON)] + else: + return [os.path.join(get_path_to_hwsku_directory(asic_id), HWSKU_JSON) for asic_id in range(num_of_asics)] + + def wait_until(predict, timeout, interval=1, *args, **kwargs): """Wait until a condition become true diff --git a/platform/mellanox/mlnx-platform-api/tests/mock_parsed_bmc_eeprom_dict b/platform/mellanox/mlnx-platform-api/tests/mock_parsed_bmc_eeprom_dict new file mode 100644 index 00000000000..651f904d584 --- /dev/null +++ b/platform/mellanox/mlnx-platform-api/tests/mock_parsed_bmc_eeprom_dict @@ -0,0 +1,14 @@ +{ + "ChassisType": "Module", + "Health": "OK", + "HealthRollup": "OK", + "Id": "BMC_eeprom", + "Location": "{'PartLocation': {'LocationType': 'Embedded'}}", + "Manufacturer": "NVIDIA", + "Model": "P3809", + "Name": "BMC_eeprom", + "PartNumber": "692-13809-3404-000", + "PowerState": "On", + "SerialNumber": "1320725102601", + "State": "Enabled" +} \ No newline at end of file diff --git a/platform/mellanox/mlnx-platform-api/tests/test_bmc.py b/platform/mellanox/mlnx-platform-api/tests/test_bmc.py new file mode 100644 index 00000000000..0190de073ce --- /dev/null +++ b/platform/mellanox/mlnx-platform-api/tests/test_bmc.py @@ -0,0 +1,139 @@ +# +# Copyright (c) 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 os +import pytest +import sys +import json +if sys.version_info.major == 3: + from unittest import mock +else: + import mock + +test_path = os.path.dirname(os.path.abspath(__file__)) +modules_path = os.path.dirname(test_path) +sys.path.insert(0, modules_path) + +from sonic_platform.bmc import BMC +from sonic_platform_base.bmc_base import BMCBase +from sonic_platform_base.redfish_client import RedfishClient + + +class MockBMCComponent: + def get_firmware_id(self): + return 'MGX_FW_BMC_0' + + def get_name(self): + return 'BMC' + + +class TestBMC: + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', \ + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser', 'bmc_root_account_default_password': 'testpass'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', \ + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform.bmc.BMC._get_eeprom_info') + def test_bmc_get_eeprom(self, mock_get_eeprom_info): + """Test get_eeprom method with successful EEPROM retrieval""" + eeprom_dict_file_path = os.path.join(test_path, 'mock_parsed_bmc_eeprom_dict') + with open(eeprom_dict_file_path, 'r') as f: + data = f.read() + expected_eeprom_data = json.loads(data) + mock_get_eeprom_info.return_value = (RedfishClient.ERR_CODE_OK, expected_eeprom_data) + bmc = BMC.get_instance() + result = bmc.get_eeprom() + assert result == expected_eeprom_data + mock_get_eeprom_info.assert_called_once_with(BMC.BMC_EEPROM_ID) + + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', \ + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser', 'bmc_root_account_default_password': 'testpass'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', \ + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform.bmc.BMC._get_firmware_version') + def test_bmc_get_version(self, mock_get_firmware_version): + """Test get_version method with successful version retrieval""" + expected_version = '88.0002.1252' + mock_get_firmware_version.return_value = (RedfishClient.ERR_CODE_OK, expected_version) + bmc = BMC.get_instance() + result = bmc.get_version() + assert result == expected_version + mock_get_firmware_version.assert_called_once_with(BMC.BMC_FIRMWARE_ID) + + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', \ + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser', 'bmc_root_account_default_password': 'testpass'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', \ + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform_base.redfish_client.RedfishClient.redfish_api_change_login_password') + def test_bmc_reset_password(self, mock_change_password): + """Test reset_password method with successful password reset""" + mock_change_password.return_value = (RedfishClient.ERR_CODE_OK, 'Password changed successfully') + bmc = BMC.get_instance() + ret, msg = bmc.reset_root_password() + assert ret == RedfishClient.ERR_CODE_OK + assert msg == 'Password changed successfully' + mock_change_password.assert_called_once_with('testpass', BMCBase.ROOT_ACCOUNT) + + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', \ + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser', 'bmc_root_account_default_password': 'testpass'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', \ + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform_base.redfish_client.RedfishClient.redfish_api_trigger_bmc_debug_log_dump') + def test_bmc_trigger_bmc_debug_log_dump(self, mock_trigger_debug_log_dump): + """Test trigger_bmc_debug_log_dump method with successful debug log dump""" + expected_msg = 'Success' + task_id = '0' + mock_trigger_debug_log_dump.return_value = (RedfishClient.ERR_CODE_OK, (task_id, expected_msg)) + bmc = BMC.get_instance() + (ret, (ret_task_id, msg)) = bmc.trigger_bmc_debug_log_dump() + assert ret == RedfishClient.ERR_CODE_OK + assert msg == expected_msg + assert task_id == ret_task_id + + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', \ + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser', 'bmc_root_account_default_password': 'testpass'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', \ + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform_base.redfish_client.RedfishClient.redfish_api_get_bmc_debug_log_dump') + def test_bmc_get_bmc_debug_log_dump(self, mock_get_debug_log_dump): + """Test get_bmc_debug_log_dump method with successful debug log dump""" + expected_msg = 'Success' + mock_get_debug_log_dump.return_value = (RedfishClient.ERR_CODE_OK, expected_msg) + bmc = BMC.get_instance() + (ret, msg) = bmc.get_bmc_debug_log_dump('0', '/tmp', 'file.txt') + assert ret == RedfishClient.ERR_CODE_OK + assert msg == expected_msg + + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', \ + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser', 'bmc_root_account_default_password': 'testpass'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', \ + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform_base.redfish_client.RedfishClient.redfish_api_update_firmware') + def test_bmc_update_firmware(self, mock_update_fw): + """Test update_firmware method with successful update""" + mock_update_fw.return_value = (RedfishClient.ERR_CODE_OK, 'Update successful', [BMC.BMC_FIRMWARE_ID]) + bmc = BMC.get_instance() + ret, (msg, updated_components) = bmc.update_firmware('fake_image.fwpkg') + assert ret == RedfishClient.ERR_CODE_OK + assert msg == 'Update successful' + assert updated_components == [BMC.BMC_FIRMWARE_ID] + mock_update_fw.assert_called_once_with('fake_image.fwpkg', fw_ids=[BMC.BMC_FIRMWARE_ID]) diff --git a/platform/mellanox/mlnx-platform-api/tests/test_change_event.py b/platform/mellanox/mlnx-platform-api/tests/test_change_event.py index e253bb34ec1..1b5e844fe0c 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_change_event.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_change_event.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -41,6 +41,7 @@ class TestChangeEvent: @mock.patch('sonic_platform.chassis.extract_RJ45_ports_index', mock.MagicMock(return_value=[])) @mock.patch('sonic_platform.chassis.extract_cpo_ports_index', mock.MagicMock(return_value=[])) @mock.patch('sonic_platform.sfp.SFP.get_module_status') + @mock.patch('sonic_platform.chassis.Chassis.wait_sfp_ready_for_use', mock.MagicMock(return_value=True)) def test_get_change_event_legacy(self, mock_status, mock_time, mock_create_poll, mock_get_fd): c = chassis.Chassis() s = c.get_sfp(1) diff --git a/platform/mellanox/mlnx-platform-api/tests/test_chassis.py b/platform/mellanox/mlnx-platform-api/tests/test_chassis.py index 63e06d49a0f..002f932a7ee 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_chassis.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_chassis.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -130,6 +130,7 @@ def test_fan(self, mock_sysfs_count): assert chassis.get_num_fan_drawers() == 2 @mock.patch('sonic_platform.device_data.DeviceDataManager.is_module_host_management_mode', mock.MagicMock(return_value=False)) + @mock.patch('sonic_platform.chassis.Chassis.wait_sfp_ready_for_use', mock.MagicMock(return_value=True)) def test_sfp(self): # Test get_num_sfps, it should not create any SFP objects DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=3) @@ -137,36 +138,12 @@ def test_sfp(self): assert chassis.get_num_sfps() == 3 assert len(chassis._sfp_list) == 0 - # Index out of bound, return None - sfp = chassis.get_sfp(4) - assert sfp is None - assert len(chassis._sfp_list) == 0 - - # Get one SFP, other SFP list should be initialized to None - sfp = chassis.get_sfp(1) - assert sfp is not None - assert len(chassis._sfp_list) == 3 - assert chassis._sfp_list[1] is None - assert chassis._sfp_list[2] is None - assert chassis.sfp_initialized_count == 1 - - # Get the SFP again, no new SFP created - sfp1 = chassis.get_sfp(1) - assert id(sfp) == id(sfp1) - - # Get another SFP, sfp_initialized_count increase - sfp2 = chassis.get_sfp(2) - assert sfp2 is not None - assert chassis._sfp_list[2] is None - assert chassis.sfp_initialized_count == 2 # Get all SFPs, but there are SFP already created, only None SFP created sfp_list = chassis.get_all_sfps() assert len(sfp_list) == 3 assert chassis.sfp_initialized_count == 3 assert list(filter(lambda x: x is not None, sfp_list)) - assert id(sfp1) == id(sfp_list[0]) - assert id(sfp2) == id(sfp_list[1]) # Get all SFPs, no SFP yet, all SFP created chassis._sfp_list = [] @@ -190,6 +167,7 @@ def test_sfp(self): sonic_platform.chassis.extract_cpo_ports_index = mock.MagicMock(return_value=[]) @mock.patch('sonic_platform.device_data.DeviceDataManager.is_module_host_management_mode', mock.MagicMock(return_value=False)) + @mock.patch('sonic_platform.chassis.Chassis.wait_sfp_ready_for_use', mock.MagicMock(return_value=True)) def test_create_sfp_in_multi_thread(self): DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=3) diff --git a/platform/mellanox/mlnx-platform-api/tests/test_component.py b/platform/mellanox/mlnx-platform-api/tests/test_component.py index d3f4543fd81..9c0649374da 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_component.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_component.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. +# Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,7 +39,9 @@ ComponenetFPGADPU, \ MPFAManager, \ ONIEUpdater, \ + ComponentBMC, \ Component + from sonic_platform_base.component_base import FW_AUTO_INSTALLED, \ FW_AUTO_UPDATED, \ FW_AUTO_SCHEDULED, \ @@ -564,3 +566,22 @@ def test_check_file_validity(self): assert c._check_file_validity(os.path.abspath(__file__)) c.image_ext_name = '.txt' assert not c._check_file_validity(os.path.abspath(__file__)) + + @mock.patch('sonic_py_common.device_info.get_bmc_build_config', + mock.MagicMock(return_value={'bmc_nos_account_username': 'testuser'})) + @mock.patch('sonic_py_common.device_info.get_bmc_data', + mock.MagicMock(return_value={'bmc_addr': '169.254.0.1'})) + @mock.patch('sonic_platform.bmc.BMC._get_tpm_password', mock.MagicMock(return_value='')) + @mock.patch('sonic_platform.component.subprocess.check_call') + @mock.patch('sonic_platform.component.ComponentBMC._check_file_validity', + mock.MagicMock(return_value=True)) + def test_bmc_update_firmware(self, mock_check_call): + mock_check_call.return_value = None + component = ComponentBMC() + ret = component.install_firmware('fake_image.fwpkg') + mock_check_call.assert_called_once_with( + ["/usr/bin/bmc_fw_update.py", 'fake_image.fwpkg'], + universal_newlines=True, + start_new_session=True + ) + assert ret == True diff --git a/platform/mellanox/mlnx-platform-api/tests/test_device_data.py b/platform/mellanox/mlnx-platform-api/tests/test_device_data.py index 76c370d0dd0..2badc885154 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_device_data.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_device_data.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -53,7 +53,7 @@ def test_get_linecard_max_port_count(self): def test_get_bios_component(self): assert DeviceDataManager.get_bios_component() is not None - @mock.patch('sonic_py_common.device_info.get_paths_to_platform_and_hwsku_dirs', mock.MagicMock(return_value=('', '/tmp'))) + @mock.patch('sonic_platform.utils.get_path_to_hwsku_directory', mock.MagicMock(return_value='/tmp')) @mock.patch('sonic_platform.device_data.utils.read_key_value_file') def test_is_module_host_management_mode(self, mock_read): mock_read.return_value = {} @@ -71,20 +71,6 @@ def test_get_sfp_count(self, mock_load_json): } assert DeviceDataManager.get_sfp_count() == 3 - @mock.patch('sonic_platform.device_data.time.sleep', mock.MagicMock()) - @mock.patch('sonic_platform.device_data.DeviceDataManager.get_sfp_count', mock.MagicMock(return_value=3)) - @mock.patch('sonic_platform.device_data.utils.read_int_from_file', mock.MagicMock(return_value=1)) - @mock.patch('sonic_platform.device_data.os.path.exists') - @mock.patch('sonic_platform.device_data.DeviceDataManager.is_module_host_management_mode') - def test_wait_platform_ready(self, mock_is_indep, mock_exists): - mock_exists.return_value = True - mock_is_indep.return_value = True - assert DeviceDataManager.wait_platform_ready() - mock_is_indep.return_value = False - assert DeviceDataManager.wait_platform_ready() - mock_exists.return_value = False - assert not DeviceDataManager.wait_platform_ready() - @mock.patch('sonic_py_common.device_info.get_path_to_platform_dir', mock.MagicMock(return_value='/tmp')) @mock.patch('sonic_platform.device_data.utils.load_json_file') def test_dpu_count(self, mock_load_json): diff --git a/platform/mellanox/mlnx-platform-api/tests/test_module.py b/platform/mellanox/mlnx-platform-api/tests/test_module.py index 697285bf2d7..743c2990e12 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_module.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_module.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -36,6 +36,7 @@ from sonic_platform.chassis import ModularChassis, SmartSwitchChassis from sonic_platform.device_data import DeviceDataManager from sonic_platform.module import Module +from sonic_platform.dpuctlplat import PCI_DEV_BASE from sonic_platform_base.module_base import ModuleBase from sonic_platform_base.chassis_base import ChassisBase @@ -253,7 +254,9 @@ def test_dpu_module(self, mock_call, mock_get): mock_obj.assert_called_once_with(skip_pre_post=True) mock_obj.reset_mock() m.reboot(reboot_type=ModuleBase.MODULE_REBOOT_SMARTSWITCH) - mock_obj.assert_called_once_with(skip_pre_post=True) + mock_obj.assert_called_once_with(no_wait=True, skip_pre_post=True) + with pytest.raises(RuntimeError): + m.reboot("None") with patch('sonic_py_common.syslogger.SysLogger.log_error') as mock_method: m.dpuctl_obj.dpu_power_on = mock.MagicMock(return_value=True) assert m.set_admin_state(True) @@ -316,13 +319,23 @@ def mock_read_int_from_file(file_path, default=0, raise_exception=False, log_fun return 0 # Test watchdog reboot cause with patch("sonic_platform.device_data.DeviceDataManager.get_dpu_interface", return_value="0000:0a:00.0"), \ - patch("subprocess.check_output") as mock_check_output: + patch("subprocess.check_output") as mock_check_output, \ + patch("os.path.exists") as mock_path_exists: + # Mock PCI path exists for watchdog check + mock_path_exists.return_value = True + # Test watchdog reboot (reset_reason = 0x2) mock_check_output.return_value = b"reset_reason | 0x00000002" assert m.get_reboot_cause() == (ChassisBase.REBOOT_CAUSE_WATCHDOG, 'Watchdog reboot') # Test non-watchdog case (reset_reason != 0x2) + mock_check_output.reset_mock() + mock_path_exists.reset_mock() mock_check_output.return_value = b"reset_reason | 0x00000001" + mock_path_exists.return_value = False + m.get_reboot_cause() + mock_check_output.assert_not_called() + mock_path_exists.assert_called_once_with(os.path.join(PCI_DEV_BASE, "0000:0a:00.0")) file_name_list = ['reset_aux_pwr_or_reload', 'reset_comex_pwr_fail', 'reset_from_main_board', 'reset_dpu_thermal', 'reset_pwr_off', 'None'] reboot_cause_list = [ (ChassisBase.REBOOT_CAUSE_POWER_LOSS, 'power auxiliary outage or reload'), diff --git a/platform/mellanox/mlnx-platform-api/tests/test_module_initializer.py b/platform/mellanox/mlnx-platform-api/tests/test_module_initializer.py index 05612654e9b..e93db284f4f 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_module_initializer.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_module_initializer.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -61,6 +61,7 @@ def test_wait_module_ready(self, mock_is_host, mock_wait, mock_exists): initializer.wait_module_ready() assert not initializer.initialized + @mock.patch('sonic_platform.device_data.DeviceDataManager.wait_sysfs_ready', mock.MagicMock(return_value=True)) @mock.patch('sonic_platform.chassis.extract_RJ45_ports_index', mock.MagicMock(return_value=[])) @mock.patch('sonic_platform.chassis.extract_cpo_ports_index', mock.MagicMock(return_value=[])) @mock.patch('sonic_platform.device_data.DeviceDataManager.get_sfp_count', mock.MagicMock(return_value=1)) diff --git a/platform/mellanox/mlnx-platform-api/tests/test_pcie.py b/platform/mellanox/mlnx-platform-api/tests/test_pcie.py index 050166705cd..a4aa74056aa 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_pcie.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_pcie.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -57,7 +57,7 @@ def test_get_pcie_check(self): assert info[0]['result'] == 'Failed' p.check_pcie_sysfs = mock.MagicMock(return_value=False) - p._device_id_to_bus_map = {'1f0b': '00'} + p._device_id_to_bus_map = {'1f0b:00': '00'} info = p.get_pcie_check() assert info[0]['result'] == 'Failed' @@ -147,7 +147,7 @@ def test_get_pcie_check_non_dpu_device(self): 'fn': '00' } ] - p._device_id_to_bus_map = {'1f0b': '01'} + p._device_id_to_bus_map = {'1f0b:00': '01'} p.check_pcie_sysfs = mock.MagicMock(return_value=True) info = p.get_pcie_check() assert len(info) == 1 @@ -178,12 +178,12 @@ def test_get_pcie_check_device_not_in_map(self): def test_create_device_id_to_bus_map(self, mock_dir): p = Pcie('') assert not p._device_id_to_bus_map - mock_dir.return_value = ['0000:01:00.0'] + mock_dir.return_value = ['0000:01:22.0'] mock_os_open = mock.mock_open(read_data='0x23') with mock.patch('sonic_platform.pcie.open', mock_os_open): p._create_device_id_to_bus_map() - assert p._device_id_to_bus_map == {'23':'01'} + assert p._device_id_to_bus_map == {'23:22':'01'} @mock.patch('sonic_platform.pcie.Pcie.load_config_file', mock.MagicMock()) @mock.patch('sonic_platform.pcie.DeviceDataManager.get_dpu_count') @@ -217,4 +217,39 @@ def test_get_dpu_pcie_devices_missing_interface(self, mock_get_interface, mock_g mock_get_interface.side_effect = ['0000:01:00.0', None] # Second interface is None result = p.get_dpu_pcie_devices() assert result == [] - assert mock_get_interface.call_count == 2 \ No newline at end of file + assert mock_get_interface.call_count == 2 + + + @mock.patch('sonic_platform.pcie.Pcie._create_device_id_to_bus_map', mock.MagicMock()) + @mock.patch('sonic_platform.pcie.Pcie.load_config_file', mock.MagicMock()) + @mock.patch('sonic_platform.pcie.Pcie.get_dpu_pcie_devices', mock.MagicMock(return_value=[])) + def test_check_multiple_bus(self): + p = Pcie('') + p.check_pcie_sysfs = mock.MagicMock(return_value=True) + + p._device_id_to_bus_map = {'1f0b:00': '00', '1f0b:11': '01'} + p.confInfo = [ + { + 'bus': '00', + 'id': '1f0b', + 'dev': '00', + 'fn': '00' + }, + { + 'bus': '01', + 'id': '1f0b', + 'dev': '11', + 'fn': '00' + }, + { + 'bus': '02', + 'id': '1f0b', + 'dev': '22', + 'fn': '00' + } + ] + + info = p.get_pcie_check() + assert info[0]['result'] == 'Passed' + assert info[1]['result'] == 'Passed' + assert info[2]['result'] == 'Failed' diff --git a/platform/mellanox/mlnx-platform-api/tests/test_sfp.py b/platform/mellanox/mlnx-platform-api/tests/test_sfp.py index d0a8b31532e..09f2f6cd96f 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_sfp.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_sfp.py @@ -361,38 +361,71 @@ def test_get_temperature(self, mock_read, mock_exists): mock_read.return_value = 448 assert sfp.get_temperature() == 56.0 - def test_get_temperature_threshold(self): + @mock.patch('sonic_platform.utils.read_int_from_file') + def test_get_temperature_threshold(self, mock_read_int): sfp = SFP(0) - sfp.reinit_if_sn_changed = mock.MagicMock(return_value=True) sfp.is_sw_control = mock.MagicMock(return_value=True) - + mock_serial = 'some serial' mock_api = mock.MagicMock() - mock_api.get_transceiver_thresholds_support = mock.MagicMock(return_value=False) - sfp.get_xcvr_api = mock.MagicMock(return_value=None) - assert sfp.get_temperature_warning_threshold() is None - assert sfp.get_temperature_critical_threshold() is None - - sfp.get_xcvr_api.return_value = mock_api - assert sfp.get_temperature_warning_threshold() == 0.0 - assert sfp.get_temperature_critical_threshold() == 0.0 - - from sonic_platform_base.sonic_xcvr.fields import consts - mock_api.get_transceiver_thresholds_support.return_value = True mock_api.xcvr_eeprom = mock.MagicMock() - + from sonic_platform_base.sonic_xcvr.fields import consts def mock_read(field): if field == consts.TEMP_HIGH_ALARM_FIELD: return 85.0 elif field == consts.TEMP_HIGH_WARNING_FIELD: return 75.0 - + elif field == consts.VENDOR_SERIAL_NO_FIELD: + return mock_serial mock_api.xcvr_eeprom.read = mock.MagicMock(side_effect=mock_read) - assert sfp.get_temperature_warning_threshold() == 75.0 - assert sfp.get_temperature_critical_threshold() == 85.0 + + # No api object, means no access to EEPROM, expect None and retry_read_threshold - 1 + sfp.get_xcvr_api = mock.MagicMock(return_value=None) + retry = sfp.retry_read_threshold + assert sfp.get_temperature_warning_threshold() == None + assert sfp.retry_read_threshold == retry - 1 + retry = sfp.retry_read_threshold + assert sfp.get_temperature_critical_threshold() == None + assert sfp.retry_read_threshold == retry - 1 + + # No threshold support, expect None + mock_serial = 'some other serial' + mock_api.get_transceiver_thresholds_support = mock.MagicMock(return_value=False) + sfp.get_xcvr_api.return_value = mock_api + assert sfp.get_temperature_warning_threshold() == None + assert sfp.get_temperature_critical_threshold() == None + + # Threshold support, expect threshold values + mock_api.get_transceiver_thresholds_support.return_value = True - sfp.reinit_if_sn_changed.return_value = False assert sfp.get_temperature_warning_threshold() == 75.0 assert sfp.get_temperature_critical_threshold() == 85.0 + assert sfp.retry_read_threshold == 0 + + # No serial number, expect None and retry_read_threshold = 0 + mock_serial = None + assert sfp.get_temperature_warning_threshold() == None + assert sfp.get_temperature_critical_threshold() == None + assert sfp.retry_read_threshold == 0 + + # Firmware control, expect threshold values from sysfs + sfp.is_sw_control.return_value = False + mock_serial = "some serial" + def mock_read_int_side_effect(file_path, *args, **kwargs): + if 'threshold_hi' in file_path: + return 448 # 56.0 * 8.0 + elif 'threshold_critical_hi' in file_path: + return 480 # 60.0 * 8.0 + return None + + mock_read_int.side_effect = mock_read_int_side_effect + assert sfp.get_temperature_warning_threshold() == 56.0 + assert sfp.get_temperature_critical_threshold() == 60.0 + assert sfp.retry_read_threshold == 0 + + # Exception in is_sw_control, expect 0.0 + sfp.is_sw_control.side_effect = Exception('') + assert sfp.get_temperature_warning_threshold() == 0.0 + assert sfp.get_temperature_critical_threshold() == 0.0 @mock.patch('sonic_platform.utils.read_int_from_file') @mock.patch('sonic_platform.device_data.DeviceDataManager.is_module_host_management_mode') @@ -573,49 +606,153 @@ def test_set_lpmode(self, mock_read_int, mock_write): mock_write.assert_called_with('/sys/module/sx_core/asic0/module0/power_mode_policy', '3') @mock.patch('sonic_platform.sfp.SfpOptoeBase.get_temperature') - @mock.patch('sonic_platform.utils.read_int_from_file') - def test_get_temperature_info(self, mock_read_int, mock_super_get_temperature): + def test_get_temperature_info(self, mock_super_get_temperature): sfp = SFP(0) - sfp.reinit_if_sn_changed = mock.MagicMock(return_value=True) - sfp.is_sw_control = mock.MagicMock(return_value=False) - mock_api = mock.MagicMock() - mock_api.get_transceiver_thresholds_support = mock.MagicMock(return_value=True) - mock_api.xcvr_eeprom = mock.MagicMock() - from sonic_platform_base.sonic_xcvr.fields import consts - def mock_read(field): - if field == consts.TEMP_HIGH_ALARM_FIELD: - return 85.0 - elif field == consts.TEMP_HIGH_WARNING_FIELD: - return 75.0 - - mock_api.xcvr_eeprom.read = mock.MagicMock(side_effect=mock_read) - sfp.get_xcvr_api = mock.MagicMock(return_value=mock_api) + sfp.is_sw_control = mock.MagicMock(return_value=False) assert sfp.get_temperature_info() == (False, None, None, None) sfp.is_sw_control.return_value = True + sfp._update_temperature_threshold = mock.MagicMock() + sfp.temp_high_threshold = 75.0 + sfp.temp_critical_threshold = 85.0 mock_super_get_temperature.return_value = 58.0 assert sfp.get_temperature_info() == (True, 58.0, 75.0, 85.0) - mock_api.get_transceiver_thresholds_support.return_value = None - assert sfp.get_temperature_info() == (True, 58.0, None, None) - - mock_api.get_transceiver_thresholds_support.return_value = False - assert sfp.get_temperature_info() == (True, 58.0, 0.0, 0.0) + mock_super_get_temperature.return_value = None + assert sfp.get_temperature_info() == (True, None, None, None) - sfp.reinit_if_sn_changed.return_value = False - assert sfp.get_temperature_info() == (True, 58.0, 75.0, 85.0) - sfp.is_sw_control.side_effect = Exception('') - assert sfp.get_temperature_info() == (False, None, None, None) + mock_super_get_temperature.return_value = 0.0 + assert sfp.get_temperature_info() == (True, 0.0, 0.0, 0.0) + + @mock.patch('time.sleep', mock.MagicMock()) + def test_get_temperature_info_vendor_retry_loop(self): + sfp = SFP(0) + sfp.reinit_if_sn_changed = mock.MagicMock(side_effect=[True, False, False]) + sfp.is_sw_control = mock.MagicMock(return_value=False) + sfp.retry_read_vendor = 5 + # First two attempts fail, third succeeds + sfp.get_vendor_info = mock.MagicMock(side_effect=[(None, None), (None, None), ('Mellanox', 'PN-9999')]) + + # Attempt 1: reinit sets retry counter, first vendor read fails (counter -> 4) + sfp.get_temperature_info() + # Attempt 2: retry counter >0, second vendor read fails (counter -> 3) + sfp.get_temperature_info() + # Attempt 3: retry counter >0, vendor read succeeds, counter cleared + sfp.get_temperature_info() + + assert sfp.get_vendor_info.call_count == 3 + assert sfp.retry_read_vendor == 0 def test_reinit_if_sn_changed(self): sfp = SFP(0) sfp.get_xcvr_api = mock.MagicMock(return_value=None) assert not sfp.reinit_if_sn_changed() - + sfp.get_xcvr_api.return_value = mock.MagicMock() sfp.get_xcvr_api.return_value.xcvr_eeprom.read = mock.MagicMock(return_value='1234567890') assert sfp.reinit_if_sn_changed() - + assert sfp.retry_read_vendor == 5 + sfp.get_xcvr_api.return_value.xcvr_eeprom.read.return_value = '1234567891' assert sfp.reinit_if_sn_changed() + assert sfp.retry_read_vendor == 5 + + # Vendor cache should reset on reinit to allow new modules to be read + sfp.sn = 'old_sn' + sfp.manufacturer = 'OldVendor' + sfp.part_number = 'OldPart' + sfp._get_serial = mock.MagicMock(return_value='new_sn') + assert sfp.reinit_if_sn_changed() + assert sfp.manufacturer is None + assert sfp.part_number is None + assert sfp.retry_read_vendor == 5 + + @mock.patch('time.sleep', mock.MagicMock()) + def test_get_vendor_info_success_and_cache(self): + sfp = SFP(0) + mock_api = mock.MagicMock() + mock_eeprom = mock.MagicMock() + mock_api.xcvr_eeprom = mock_eeprom + sfp.get_xcvr_api = mock.MagicMock(return_value=mock_api) + + from sonic_platform_base.sonic_xcvr.fields import consts + def mock_read(field): + if field == consts.VENDOR_NAME_FIELD: + return 'Mellanox' + if field == consts.VENDOR_PART_NO_FIELD: + return 'PN-1234' + return None + mock_eeprom.read.side_effect = mock_read + + # First call reads from eeprom + manufacturer, part_number = sfp.get_vendor_info() + assert manufacturer == 'Mellanox' + assert part_number == 'PN-1234' + assert mock_eeprom.read.call_count == 2 + + # Second call should return cached values without additional reads + manufacturer, part_number = sfp.get_vendor_info() + assert manufacturer == 'Mellanox' + assert part_number == 'PN-1234' + assert mock_eeprom.read.call_count == 2 + + @mock.patch('time.sleep', mock.MagicMock()) + def test_get_vendor_info_retry_then_success(self): + sfp = SFP(0) + mock_api = mock.MagicMock() + mock_eeprom = mock.MagicMock() + mock_api.xcvr_eeprom = mock_eeprom + sfp.get_xcvr_api = mock.MagicMock(return_value=mock_api) + + from sonic_platform_base.sonic_xcvr.fields import consts + state = {'fail_reads': 2} + def flaky_read(field): + if state['fail_reads'] > 0: + state['fail_reads'] -= 1 + raise Exception('EEPROM not ready') + if field == consts.VENDOR_NAME_FIELD: + return 'Mellanox' + if field == consts.VENDOR_PART_NO_FIELD: + return 'PN-5678' + return None + mock_eeprom.read.side_effect = flaky_read + + # First call fails (counter decremented) + manufacturer, part_number = sfp.get_vendor_info() + assert (manufacturer, part_number) == (None, None) + # Second call fails (counter decremented) + manufacturer, part_number = sfp.get_vendor_info() + assert (manufacturer, part_number) == (None, None) + # Third call succeeds (reads both fields) + manufacturer, part_number = sfp.get_vendor_info() + assert (manufacturer, part_number) == ('Mellanox', 'PN-5678') + # Total read invocations: first two calls each raise on first field (2), + # third call reads both fields (2) → 4 total + assert mock_eeprom.read.call_count == 4 + + @mock.patch('time.sleep', mock.MagicMock()) + def test_get_vendor_info_all_fail(self): + sfp = SFP(0) + mock_api = mock.MagicMock() + mock_eeprom = mock.MagicMock() + mock_api.xcvr_eeprom = mock_eeprom + sfp.get_xcvr_api = mock.MagicMock(return_value=mock_api) + mock_eeprom.read.side_effect = Exception('EEPROM error') + + manufacturer, part_number = sfp.get_vendor_info() + assert manufacturer is None + assert part_number is None + + def test_get_vendor_info_no_api_or_missing_attr(self): + sfp = SFP(0) + # No API + sfp.get_xcvr_api = mock.MagicMock(return_value=None) + assert sfp.get_vendor_info() == (None, None) + + # API without xcvr_eeprom attribute + class DummyApi(object): + pass + sfp.get_xcvr_api.return_value = DummyApi() + assert sfp.get_vendor_info() == (None, None) + diff --git a/platform/mellanox/mlnx-platform-api/tests/test_smartswsitch_thermal_updater.py b/platform/mellanox/mlnx-platform-api/tests/test_smartswsitch_thermal_updater.py index ce87afa6ddd..e3c52defbad 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_smartswsitch_thermal_updater.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_smartswsitch_thermal_updater.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -52,6 +52,7 @@ class TestSmartSwitchThermalUpdater: @mock.patch('sonic_platform.utils.write_file') + @mock.patch('sonic_platform.smartswitch_thermal_updater.SmartswitchThermalUpdater.wait_for_sysfs_nodes', mock.MagicMock(return_value=True)) def test_configuration(self, mock_write): dpu = mock.MagicMock() mock_sfp = mock.MagicMock() @@ -68,8 +69,6 @@ def test_configuration(self, mock_write): hw_management_dpu_thermal_update.thermal_data_dpu_cpu_core_clear.assert_called_once_with(dpu.get_hw_mgmt_id()) hw_management_dpu_thermal_update.thermal_data_dpu_ddr_clear.assert_called_once_with(dpu.get_hw_mgmt_id()) hw_management_dpu_thermal_update.thermal_data_dpu_drive_clear.assert_called_once_with(dpu.get_hw_mgmt_id()) - hw_management_independent_mode_update.thermal_data_clean_asic.assert_called_once() - hw_management_independent_mode_update.thermal_data_clean_module.assert_called_once() mock_write.assert_called_once_with('/run/hw-management/config/suspend', 0) assert updater._timer.schedule.call_count == 3 # Called for DPU with time 24/2 = 12 diff --git a/platform/mellanox/mlnx-platform-api/tests/test_thermal.py b/platform/mellanox/mlnx-platform-api/tests/test_thermal.py index 95ffc556fae..6168b94f363 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_thermal.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_thermal.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,9 +49,6 @@ def mocked_glob(pattern): if 'sodimm' in pattern: return ['/run/hw-management/thermal/sodimm1_temp_input', '/run/hw-management/thermal/sodimm2_temp_input'] - elif 'voltmon' in pattern: - return ['/run/hw-management/thermal/voltmon1_temp1_input', - '/run/hw-management/thermal/voltmon2_temp1_input'] mock_glob.side_effect = mocked_glob chassis = Chassis() thermal_list = chassis.get_all_thermals() diff --git a/platform/mellanox/mlnx-platform-api/tests/test_thermal_updater.py b/platform/mellanox/mlnx-platform-api/tests/test_thermal_updater.py index 2b77f5db1ec..9f8d4790ed8 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_thermal_updater.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_thermal_updater.py @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,7 +20,7 @@ from unittest import mock from sonic_platform import utils -from sonic_platform.thermal_updater import ThermalUpdater, hw_management_independent_mode_update +from sonic_platform.thermal_updater import ThermalUpdater, clean_thermal_data, hw_management_independent_mode_update from sonic_platform.thermal_updater import ASIC_DEFAULT_TEMP_WARNNING_THRESHOLD, \ ASIC_DEFAULT_TEMP_CRITICAL_THRESHOLD @@ -28,7 +28,7 @@ mock_tc_config = """ { "dev_parameters": { - "asic": { + "asic\\\\d*": { "pwm_min": 20, "pwm_max": 100, "val_min": "!70000", @@ -48,22 +48,59 @@ class TestThermalUpdater: - def test_load_tc_config_non_exists(self): + @mock.patch('sonic_platform.thermal_updater.logger') + def test_load_tc_config_non_exists(self, mock_logger): updater = ThermalUpdater(None) updater.load_tc_config() assert updater._timer._timestamp_queue.qsize() == 2 - def test_load_tc_config_mocked(self): + @mock.patch('sonic_platform.thermal_updater.logger') + def test_load_tc_config_mocked(self, mock_logger): updater = ThermalUpdater(None) mock_os_open = mock.mock_open(read_data=mock_tc_config) with mock.patch('sonic_platform.utils.open', mock_os_open): updater.load_tc_config() assert updater._timer._timestamp_queue.qsize() == 2 + # Verify that debug logs were called with the correct parameters + assert mock_logger.log_notice.call_count >= 2 # At least ASIC and Module parameter logs + def test_find_matching_key(self): + """Test _find_matching_key method for regex pattern matching""" + updater = ThermalUpdater(None) + + # Test with asic pattern - should match 'asic\d*' keys + dev_parameters = { + 'asic\\d*': {'poll_time': 3}, + 'module\\d+': {'poll_time': 20}, + 'sensor_amb': {'poll_time': 30} + } + + # Test matching asic pattern + key, value = updater._find_matching_key(dev_parameters, r'asic\\d*') + assert key == 'asic\\d*' + assert value == {'poll_time': 3} + + # Test matching module pattern + key, value = updater._find_matching_key(dev_parameters, r'module\\d+') + assert key == 'module\\d+' + assert value == {'poll_time': 20} + + # Test non-matching pattern + key, value = updater._find_matching_key(dev_parameters, r'nonexistent') + assert key is None + assert value is None + + # Test with empty dict + key, value = updater._find_matching_key({}, r'asic\\d*') + assert key is None + assert value is None + + @mock.patch('sonic_platform.thermal_updater.logger') @mock.patch('sonic_platform.thermal_updater.ThermalUpdater.update_asic', mock.MagicMock()) @mock.patch('sonic_platform.thermal_updater.ThermalUpdater.update_module', mock.MagicMock()) + @mock.patch('sonic_platform.thermal_updater.ThermalUpdater.wait_for_sysfs_nodes', mock.MagicMock(return_value=True)) @mock.patch('sonic_platform.utils.write_file') - def test_start_stop(self, mock_write): + def test_start_stop(self, mock_write, mock_logger): mock_sfp = mock.MagicMock() mock_sfp.sdk_index = 1 updater = ThermalUpdater([mock_sfp]) @@ -78,6 +115,7 @@ def test_start_stop(self, mock_write): @mock.patch('sonic_platform.utils.read_int_from_file') def test_update_asic(self, mock_read): + hw_management_independent_mode_update.reset_mock() mock_read.return_value = 8 updater = ThermalUpdater(None) assert updater.get_asic_temp() == 1000 @@ -92,6 +130,7 @@ def test_update_asic(self, mock_read): assert updater.get_asic_temp_critical_threshold() == ASIC_DEFAULT_TEMP_CRITICAL_THRESHOLD def test_update_module(self): + hw_management_independent_mode_update.reset_mock() mock_sfp = mock.MagicMock() mock_sfp.sdk_index = 10 mock_sfp.get_presence = mock.MagicMock(return_value=True) @@ -109,3 +148,81 @@ def test_update_module(self): hw_management_independent_mode_update.reset_mock() updater.update_module() hw_management_independent_mode_update.thermal_data_set_module.assert_called_once_with(0, 11, 0, 0, 0, 0) + + # ---- SFP.get_temperature_info publishes vendor info on module change ---- + def _make_sfp_for_publish(self, sn_changed=True, vendor=('Innolight', 'TR-iQ13L-NVS')): + # Import locally to avoid any potential name resolution issues in test scope + from sonic_platform.sfp import SFP as _SFP + sfp = object.__new__(_SFP) + sfp.sdk_index = 10 + sfp.retry_read_vendor = 5 if sn_changed else 0 + sfp.is_sw_control = mock.MagicMock(return_value=True) + sfp.reinit_if_sn_changed = mock.MagicMock(return_value=sn_changed) + if vendor is None: + sfp.get_vendor_info = mock.MagicMock(return_value=(None, None)) + else: + sfp.get_vendor_info = mock.MagicMock(return_value=vendor) + api = mock.MagicMock() + api.get_transceiver_thresholds_support = mock.MagicMock(return_value=False) + sfp.get_xcvr_api = mock.MagicMock(return_value=api) + return sfp + + def test_sfp_get_temperature_info_publishes_vendor_on_sn_change(self): + from sonic_platform.sfp import hw_management_independent_mode_update as sfp_hw_management_independent_mode_update + sfp = self._make_sfp_for_publish(sn_changed=True, vendor=('Innolight', 'TR-iQ13L-NVS')) + with mock.patch('sonic_platform.sfp.SfpOptoeBase.get_temperature', return_value=55.0): + sfp_hw_management_independent_mode_update.reset_mock() + sfp.get_temperature_info() + sfp_hw_management_independent_mode_update.vendor_data_set_module.assert_called_once_with( + 0, 11, {'manufacturer': 'Innolight', 'part_number': 'TR-iQ13L-NVS'} + ) + + def test_sfp_get_temperature_info_no_publish_when_no_change(self): + from sonic_platform.sfp import hw_management_independent_mode_update as sfp_hw_management_independent_mode_update + sfp = self._make_sfp_for_publish(sn_changed=False, vendor=('Innolight', 'TR-iQ13L-NVS')) + with mock.patch('sonic_platform.sfp.SfpOptoeBase.get_temperature', return_value=55.0): + sfp_hw_management_independent_mode_update.reset_mock() + sfp.get_temperature_info() + sfp_hw_management_independent_mode_update.vendor_data_set_module.assert_not_called() + + def test_sfp_get_temperature_info_no_publish_when_vendor_missing(self): + from sonic_platform.sfp import hw_management_independent_mode_update as sfp_hw_management_independent_mode_update + sfp = self._make_sfp_for_publish(sn_changed=True, vendor=None) + with mock.patch('sonic_platform.sfp.SfpOptoeBase.get_temperature', return_value=55.0): + sfp_hw_management_independent_mode_update.reset_mock() + sfp.get_temperature_info() + sfp_hw_management_independent_mode_update.vendor_data_set_module.assert_not_called() + + @mock.patch('sonic_platform.thermal_updater.clean_thermal_data') + @mock.patch('sonic_platform.thermal_updater.atexit.register') + def test_registers_exit_cleanup(self, mock_register, mock_clean): + hw_management_independent_mode_update.reset_mock() + sfp = mock.MagicMock() + updater = ThermalUpdater([sfp]) + + mock_register.assert_called_once() + exit_callback = mock_register.call_args[0][0] + + # Ensure clean routine is not run during construction/start + mock_clean.assert_not_called() + + # Simulate process exit and confirm cleanup uses the bound SFP list + exit_callback() + mock_clean.assert_called_once_with([sfp]) + + def test_clean_thermal_data_only_sw_control_modules(self): + hw_management_independent_mode_update.reset_mock() + + sfp_sw = mock.MagicMock() + sfp_sw.sdk_index = 3 + sfp_sw.is_sw_control = mock.MagicMock(return_value=True) + + sfp_no_sw = mock.MagicMock() + sfp_no_sw.sdk_index = 4 + sfp_no_sw.is_sw_control = mock.MagicMock(return_value=False) + + clean_thermal_data([sfp_sw, sfp_no_sw]) + + hw_management_independent_mode_update.module_data_set_module_counter.assert_called_once_with(2) + hw_management_independent_mode_update.thermal_data_clean_module.assert_called_once_with(0, sfp_sw.sdk_index + 1) + diff --git a/platform/mellanox/mlnx-sai.mk b/platform/mellanox/mlnx-sai.mk index 2322e605b17..b1bd87bf898 100644 --- a/platform/mellanox/mlnx-sai.mk +++ b/platform/mellanox/mlnx-sai.mk @@ -1,6 +1,6 @@ # Mellanox SAI -MLNX_SAI_VERSION = SAIBuild2505.34.0.15 +MLNX_SAI_VERSION = SAIBuild2511.35.3400.0 MLNX_SAI_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins MLNX_SAI_ASSETS_RELEASE_TAG = sai-$(MLNX_SAI_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH) MLNX_SAI_ASSETS_URL = $(MLNX_SAI_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SAI_ASSETS_RELEASE_TAG) diff --git a/platform/mellanox/non-upstream-patches/external-changes.patch b/platform/mellanox/non-upstream-patches/external-changes.patch index e5ad6297617..db9202669f0 100644 --- a/platform/mellanox/non-upstream-patches/external-changes.patch +++ b/platform/mellanox/non-upstream-patches/external-changes.patch @@ -19,7 +19,7 @@ CONFIG_GPIO_SYSFS=y CONFIG_IIO_SYSFS_TRIGGER=m CONFIG_NVME_HWMON=y -@@ -130,6 +130,12 @@ +@@ -132,6 +132,12 @@ CONFIG_EDAC_AMD64=m CONFIG_AMD_XGBE_DCB=y CONFIG_SENSORS_ISL68137=m diff --git a/platform/mellanox/nv-syncd-shared/nv-syncd-shared.service b/platform/mellanox/nv-syncd-shared/nv-syncd-shared.service index e39506f58f6..60b27aeb83e 100644 --- a/platform/mellanox/nv-syncd-shared/nv-syncd-shared.service +++ b/platform/mellanox/nv-syncd-shared/nv-syncd-shared.service @@ -1,15 +1,33 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. +# + [Unit] Description=Manage Nvidia specific syncd shared volume Requires=docker.service After=docker.service BindsTo=sonic.target After=sonic.target -PartOf=syncd.service +Before=pmon.service [Service] Type=oneshot RemainAfterExit=yes -ExecStart=rm -rf /tmp/nv-syncd-shared/ +ExecStart=rm -rf /tmp/nv-syncd-shared/* ExecStart=mkdir -m 777 -p /tmp/nv-syncd-shared/ [Install] diff --git a/platform/mellanox/one-image.mk b/platform/mellanox/one-image.mk index aeda2e18730..880da6c61a4 100644 --- a/platform/mellanox/one-image.mk +++ b/platform/mellanox/one-image.mk @@ -1,6 +1,7 @@ # -# Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. -# Apache-2.0 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2017-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -21,6 +22,7 @@ $(SONIC_ONE_IMAGE)_MACHINE = mellanox $(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie $(SONIC_ONE_IMAGE)_INSTALLS += $(SX_KERNEL) $(KERNEL_MFT) $(MFT_OEM) $(MFT) $(MFT_FWTRACE_CFG) $(MLNX_HW_MANAGEMENT) $(MLNX_RSHIM) $(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR) +$(SONIC_ONE_IMAGE)_PYTHON_WHEELS += $(MELLANOX_FW_MANAGER) ifeq ($(INSTALL_DEBUG_TOOLS),y) $(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_DBG_IMAGES) $(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES)) diff --git a/platform/mellanox/rshim.mk b/platform/mellanox/rshim.mk index 15d124e7ea6..f956cdf79e0 100644 --- a/platform/mellanox/rshim.mk +++ b/platform/mellanox/rshim.mk @@ -15,7 +15,7 @@ # limitations under the License. # -MLNX_RSHIM_DRIVER_VERSION = 2.5.7 +MLNX_RSHIM_DRIVER_VERSION = 2.6.4 MLNX_RSHIM_ASSETS_GITHUB_URL = https://github.com/Mellanox/sonic-bluefield-packages MLNX_RSHIM_ASSETS_RELEASE_TAG = rshim-$(MLNX_RSHIM_DRIVER_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH) MLNX_RSHIM_ASSETS_URL = $(MLNX_RSHIM_ASSETS_GITHUB_URL)/releases/download/$(MLNX_RSHIM_ASSETS_RELEASE_TAG) diff --git a/platform/mellanox/rules.mk b/platform/mellanox/rules.mk index 5e679c30ea2..a7b7bb75ade 100644 --- a/platform/mellanox/rules.mk +++ b/platform/mellanox/rules.mk @@ -1,6 +1,6 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2016-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2016-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -36,9 +36,10 @@ include $(PLATFORM_PATH)/mlnx-ssd-fw-update.mk include $(PLATFORM_PATH)/iproute2.mk include $(PLATFORM_PATH)/install-pending-fw.mk include $(PLATFORM_PATH)/integration-scripts.mk -include $(PLATFORM_PATH)/component-versions.mk include $(PLATFORM_PATH)/rshim.mk +include $(PLATFORM_PATH)/component-versions.mk include $(PLATFORM_PATH)/mlnx-sonic-bfb-installer.mk +include $(PLATFORM_PATH)/fw-manager/fw-manager.mk SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_FPM) diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index 7039dc0d86f..9c811d5fd26 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -MLNX_SDK_VERSION = 4.8.2122 +MLNX_SDK_VERSION = 4.8.3404 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DRIVERS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers diff --git a/platform/mellanox/sonic-bfb-installer.sh b/platform/mellanox/sonic-bfb-installer.sh index a076f847624..916c8ee7fd6 100755 --- a/platform/mellanox/sonic-bfb-installer.sh +++ b/platform/mellanox/sonic-bfb-installer.sh @@ -78,6 +78,10 @@ PLATFORM_JSON=/usr/share/sonic/device/$PLATFORM/platform.json declare -A rshim2dpu declare -r bfsoc_dev_id="15b3:c2d5" declare -r cx7_dev_id="15b3:a2dc" +declare -r REBOOT_HELPER_SCRIPT="/usr/local/bin/reboot_smartswitch_helper" + +# Source reboot helper script at initialization if available +[[ -f "$REBOOT_HELPER_SCRIPT" ]] && source "$REBOOT_HELPER_SCRIPT" EXTRACTED_BFB_PATH="" EXTRACTED_CHECKSUM_PATH="" @@ -203,6 +207,47 @@ remove_cx_pci_device() { fi } +# Function to check if CHASSIS_MODULE_TABLE entry exists for a specific DPU +is_chassis_module_table_present() { + local dpu_name=$1 + local output + output=$(sonic-db-cli STATE_DB KEYS "CHASSIS_MODULE_TABLE|${dpu_name}" 2>/dev/null) + if [[ -z "$output" ]]; then + return 1 + fi + return 0 +} + +# Function to execute dpuctl dpu-reset command +run_dpuctl_reset() { + local dpu=$1 + local use_verbose=$2 + local reset_cmd="dpuctl dpu-reset --force $dpu" + if [[ "$use_verbose" == true ]]; then + reset_cmd="$reset_cmd -v" + fi + eval $reset_cmd +} + +# Function to reset DPU using reboot helper or fallback to dpuctl +reset_dpu() { + local dpu=$1 + local use_verbose=$2 + local dpu_upper="${dpu^^}" # Convert to uppercase (e.g., dpu0 -> DPU0) + + # Check if reboot helper is available and CHASSIS_MODULE_TABLE entry exists for this DPU + if [[ -f "$REBOOT_HELPER_SCRIPT" ]] && is_chassis_module_table_present "$dpu_upper"; then + log_info "Using reboot helper pre/post shutdown methods while resetting $dpu_upper" + module_pre_shutdown "$dpu_upper" + run_dpuctl_reset "$dpu" "$use_verbose" + module_post_startup "$dpu_upper" + else + # Fallback to dpuctl + log_info "Using dpuctl to reset $dpu" + run_dpuctl_reset "$dpu" "$use_verbose" + fi +} + monitor_installation() { local -r rid=$1 local -r pid=$2 @@ -315,11 +360,7 @@ bfb_install_call() { stop_rshim_daemon "$rid" log_info "$rid: Resetting DPU $dpu" - local reset_cmd="dpuctl dpu-reset --force $dpu" - if [[ $verbose == true ]]; then - reset_cmd="$reset_cmd -v" - fi - eval $reset_cmd + reset_dpu "$dpu" "$verbose" } file_cleanup(){ diff --git a/platform/nephos/rules.mk b/platform/nephos/rules.mk index c4394fe13d5..d2d1a67075f 100644 --- a/platform/nephos/rules.mk +++ b/platform/nephos/rules.mk @@ -15,7 +15,7 @@ WARM_VERIFIER = warm-verifier $(WARM_VERIFIER)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/warm-verifier" DSSERVE = dsserve -$(DSSERVE)_URL = "https://packages.trafficmanager.net/public/20190307/dsserve" +$(DSSERVE)_URL = "$(BUILD_PUBLIC_URL)/20190307/dsserve" SONIC_ONLINE_FILES += $(NPX_DIAG) $(WARM_VERIFIER) $(DSSERVE) diff --git a/platform/nvidia-bluefield/files/bfnet.sh b/platform/nvidia-bluefield/files/bfnet.sh index aa3638a8b2b..ff19f82ff61 100755 --- a/platform/nvidia-bluefield/files/bfnet.sh +++ b/platform/nvidia-bluefield/files/bfnet.sh @@ -1,7 +1,8 @@ #!/bin/bash # -# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. -# Apache-2.0 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -22,8 +23,9 @@ start() { /usr/bin/mst start - /usr/bin/mlnx-fw-upgrade.sh --dry-run -v + /usr/local/bin/mlnx-fw-manager --status if [[ $? != "0" ]]; then + echo "BF3 DPU firmware upgrade status check failed. Please check the firmware upgrade status manually." exit 1 fi } diff --git a/platform/nvidia-bluefield/fw-manager b/platform/nvidia-bluefield/fw-manager new file mode 120000 index 00000000000..f29c4d65b6b --- /dev/null +++ b/platform/nvidia-bluefield/fw-manager @@ -0,0 +1 @@ +../mellanox/fw-manager/ \ No newline at end of file diff --git a/platform/nvidia-bluefield/installer/install.sh.j2 b/platform/nvidia-bluefield/installer/install.sh.j2 index 34732d13a2e..bd7bb773ac9 100755 --- a/platform/nvidia-bluefield/installer/install.sh.j2 +++ b/platform/nvidia-bluefield/installer/install.sh.j2 @@ -1,6 +1,7 @@ # -# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. -# Apache-2.0 +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -229,40 +230,36 @@ if [[ $SKIP_FIRMWARE_UPGRADE != "true" ]]; then ex mkdir -p $sonic_fs_mountpoint ex mount -t squashfs $sonic_fs_path $sonic_fs_mountpoint - kernel_mft=$(chroot $sonic_fs_mountpoint dpkg -l | grep kernel-mft-dkms-modules | awk '/^ii/ {print $2}') - mft_files=$(chroot $sonic_fs_mountpoint dpkg -L $kernel_mft) + # Mount shared memory needed for FW manager + ex mkdir -m 1777 /dev/shm + ex mount -t tmpfs -o size=4G tmpfs /dev/shm - for f in $mft_files; do - if [[ $sonic_fs_mountpoint/$f != *.ko ]]; then - continue - fi - - insmod "$sonic_fs_mountpoint/$f" - done - - ex mkdir -p /etc/mlnx/ - - ex ln -s /mnt/$image_dir/platform/fw/asic/fw-BF3.mfa /etc/mlnx/fw-BF3.mfa - - ex mst start - - cp -R $sonic_fs_mountpoint/usr/bin/asic_detect/ /usr/bin/ + # Mount other filesystems needed for FW manager + ex mount -t proc /proc $sonic_fs_mountpoint/proc + ex mount -t sysfs /sys $sonic_fs_mountpoint/sys + ex mount --bind /dev $sonic_fs_mountpoint/dev + ex mount -t tmpfs -o rw tmpfs $sonic_fs_mountpoint/tmp + ex mount --bind /mnt $sonic_fs_mountpoint/host if function_exists bfb_pre_fw_install; then log "Running bfb_pre_fw_install from bf.cfg" bfb_pre_fw_install fi - ex $sonic_fs_mountpoint/usr/bin/mlnx-fw-upgrade.sh -v --no-mst - if [[ $? != 0 ]]; then - log "ERROR: FW update failed" - fi + ex chroot $sonic_fs_mountpoint mst start + ex chroot $sonic_fs_mountpoint /usr/local/bin/mlnx-fw-manager --nosyslog --verbose if [[ $FORCE_FW_CONFIG_RESET == "true" ]]; then - ex $sonic_fs_mountpoint/usr/bin/mlnx-fw-upgrade.sh -v -r --no-mst + ex chroot $sonic_fs_mountpoint /usr/local/bin/mlnx-fw-manager --reset --nosyslog --verbose fi + ex umount $sonic_fs_mountpoint/host + ex umount $sonic_fs_mountpoint/tmp + ex umount $sonic_fs_mountpoint/proc + ex umount $sonic_fs_mountpoint/sys + ex umount $sonic_fs_mountpoint/dev ex umount $sonic_fs_mountpoint + ex umount /dev/shm fi if function_exists bfb_post_sonic_install; then diff --git a/platform/nvidia-bluefield/recipes/bluefield-soc.mk b/platform/nvidia-bluefield/recipes/bluefield-soc.mk index fd71b477311..9f5bbe6ffd2 100644 --- a/platform/nvidia-bluefield/recipes/bluefield-soc.mk +++ b/platform/nvidia-bluefield/recipes/bluefield-soc.mk @@ -16,8 +16,8 @@ # # Bluefied Software Distribution Version -BFSOC_VERSION = 4.13.1 -BFSOC_REVISION = 13827 +BFSOC_VERSION = 4.14.0 +BFSOC_REVISION = 13868 BFB_IMG_TYPE = prod BFSOC_BUILD_DATE = diff --git a/platform/nvidia-bluefield/recipes/dpu-sai.mk b/platform/nvidia-bluefield/recipes/dpu-sai.mk index 44005c004c4..61f97b943ed 100644 --- a/platform/nvidia-bluefield/recipes/dpu-sai.mk +++ b/platform/nvidia-bluefield/recipes/dpu-sai.mk @@ -15,7 +15,7 @@ # limitations under the License. # -DPU_SAI_VERSION = SAIBuild0.0.47.0 +DPU_SAI_VERSION = SAIBuild0.0.50.0 # Place here URL where SAI sources exist DPU_SAI_SOURCE_BASE_URL= diff --git a/platform/nvidia-bluefield/recipes/fw.mk b/platform/nvidia-bluefield/recipes/fw.mk index 4b5508a6697..e17582da333 100644 --- a/platform/nvidia-bluefield/recipes/fw.mk +++ b/platform/nvidia-bluefield/recipes/fw.mk @@ -19,7 +19,7 @@ DPU_NIC_FW_BASE_URL = DPU_NIC_FW_VERSION = BF3_FW_BASE_URL = -BF3_FW_VERSION = 47.1080 +BF3_FW_VERSION = 48.0410 BF3_FW_FILE = fw-BlueField-3-rel-32_$(subst .,_,$(BF3_FW_VERSION)).mfa diff --git a/platform/nvidia-bluefield/recipes/installer-image.mk b/platform/nvidia-bluefield/recipes/installer-image.mk index c0c58f2c6b3..813441c0052 100644 --- a/platform/nvidia-bluefield/recipes/installer-image.mk +++ b/platform/nvidia-bluefield/recipes/installer-image.mk @@ -1,7 +1,7 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# Apache-2.0 +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -45,12 +45,14 @@ $(SONIC_BF_IMAGE_BASE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR) \ $(OFED_KERNEL_UTILS) \ $(MLNX_IPROUTE2) -DISABLED_DOCKERS = $(DOCKER_SFLOW) $(DOCKER_MGMT_FRAMEWORK) $(DOCKER_NAT) $(DOCKER_TEAMD) $(DOCKER_ROUTER_ADVERTISER) $(DOCKER_MUX) +$(SONIC_BF_IMAGE_BASE)_PYTHON_WHEELS += $(MELLANOX_FW_MANAGER) + +DISABLED_DOCKERS = $(DOCKER_SFLOW) $(DOCKER_MGMT_FRAMEWORK) $(DOCKER_NAT) $(DOCKER_TEAMD) $(DOCKER_ROUTER_ADVERTISER) $(DOCKER_MUX) $(DOCKER_SNMP) $(DOCKER_LLDP) $(DOCKER_RESTAPI) DISABLED_PACKAGES_LOCAL = $(DOCKER_DHCP_RELAY) $(DOCKER_MACSEC) -DISABLED_FEATURE_FLAGS = INCLUDE_SFLOW INCLUDE_MGMT_FRAMEWORK INCLUDE_NAT INCLUDE_MACSEC INCLUDE_TEAMD INCLUDE_ROUTER_ADVERTISER INCLUDE_MUX +DISABLED_FEATURE_FLAGS = INCLUDE_SFLOW INCLUDE_MGMT_FRAMEWORK INCLUDE_NAT INCLUDE_MACSEC INCLUDE_TEAMD INCLUDE_ROUTER_ADVERTISER INCLUDE_MUX INCLUDE_RESTAPI $(info Disabling the following docker images: $(DISABLED_DOCKERS)) $(info Disabling the following packages: $(DISABLED_PACKAGES_LOCAL)) -$(info Disabling the following feauture flags: $(DISABLED_FEATURE_FLAGS)) +$(info Disabling the following feature flags: $(DISABLED_FEATURE_FLAGS)) SONIC_PACKAGES_LOCAL := $(filter-out $(DISABLED_PACKAGES_LOCAL), $(SONIC_PACKAGES_LOCAL)) @@ -68,6 +70,7 @@ $(SONIC_BF_IMAGE_BIN)_DEPENDS += $($(SONIC_BF_IMAGE_BASE)_DEPENDS) $(SONIC_BF_IMAGE_BIN)_DOCKERS += $($(SONIC_BF_IMAGE_BASE)_DOCKERS) $(SONIC_BF_IMAGE_BIN)_LAZY_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_LAZY_INSTALLS) $(SONIC_BF_IMAGE_BIN)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) +$(SONIC_BF_IMAGE_BIN)_PYTHON_WHEELS += $($(SONIC_BF_IMAGE_BASE)_PYTHON_WHEELS) # BFB (Bluefield BootStream) style image SONIC_BF_IMAGE_BFB = $(SONIC_BF_IMAGE_BASE).bfb @@ -78,5 +81,6 @@ $(SONIC_BF_IMAGE_BFB)_DEPENDS += $($(SONIC_BF_IMAGE_BASE)_DEPENDS) $(MFT) $(MFT_ $(SONIC_BF_IMAGE_BFB)_DOCKERS += $($(SONIC_BF_IMAGE_BASE)_DOCKERS) $(SONIC_BF_IMAGE_BFB)_LAZY_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_LAZY_INSTALLS) $(SONIC_BF_IMAGE_BFB)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) +$(SONIC_BF_IMAGE_BFB)_PYTHON_WHEELS += $($(SONIC_BF_IMAGE_BASE)_PYTHON_WHEELS) SONIC_INSTALLERS += $(SONIC_BF_IMAGE_BIN) $(SONIC_BF_IMAGE_BFB) diff --git a/platform/nvidia-bluefield/recipes/sdk.mk b/platform/nvidia-bluefield/recipes/sdk.mk index 14eea952354..10f87d737ee 100644 --- a/platform/nvidia-bluefield/recipes/sdk.mk +++ b/platform/nvidia-bluefield/recipes/sdk.mk @@ -20,7 +20,7 @@ SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sonic-bluefield-packages/bin # Place here URL where SDK sources exist SDK_SOURCE_BASE_URL = -SDK_VERSION = 25.10-RC5 +SDK_VERSION = 26.1-RC3 SDK_COLLECTX_URL = https://linux.mellanox.com/public/repo/doca/1.5.2/debian12/aarch64/ diff --git a/platform/nvidia-bluefield/rules.mk b/platform/nvidia-bluefield/rules.mk index 3ccd6b1eb7a..80454333b42 100644 --- a/platform/nvidia-bluefield/rules.mk +++ b/platform/nvidia-bluefield/rules.mk @@ -1,7 +1,7 @@ # # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# Apache-2.0 +# Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: 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. @@ -20,6 +20,7 @@ RECIPE_DIR = recipes override TARGET_BOOTLOADER=grub +include $(PLATFORM_PATH)/fw-manager/fw-manager.mk include $(PLATFORM_PATH)/$(RECIPE_DIR)/bluefield-soc.mk include $(PLATFORM_PATH)/$(RECIPE_DIR)/mft.mk include $(PLATFORM_PATH)/$(RECIPE_DIR)/fw.mk diff --git a/platform/pddf/i2c/modules/psu/driver/pddf_psu_api.c b/platform/pddf/i2c/modules/psu/driver/pddf_psu_api.c index ed9566733cb..d7a34d3a611 100644 --- a/platform/pddf/i2c/modules/psu/driver/pddf_psu_api.c +++ b/platform/pddf/i2c/modules/psu/driver/pddf_psu_api.c @@ -502,10 +502,35 @@ int sonic_i2c_get_psu_block_default(void *client, PSU_DATA_ATTR *adata, void *da char buf[32]=""; //temporary placeholder for block data uint8_t offset = (uint8_t)adata->offset; int data_len = adata->len; + bool is_pmbus = strncmp(adata->devtype, "pmbus", strlen("pmbus")) == 0; + uint8_t pmbus_data_len = 0; + bool read_pmbus_data_len = false; while (retry) { - status = i2c_smbus_read_i2c_block_data((struct i2c_client *)client, offset, data_len-1, buf); + if (is_pmbus) + { + /* For PMBus - first read 1 byte to get the data length */ + if (!read_pmbus_data_len) + { + status = i2c_smbus_read_i2c_block_data((struct i2c_client *)client, offset, 1, buf); + + if (likely(status>=0)) + { + pmbus_data_len = buf[0]; + if (pmbus_data_len > sizeof(buf) - 2) + pmbus_data_len = sizeof(buf) - 2; + read_pmbus_data_len = true; + } + } + if (likely(read_pmbus_data_len)) + status = i2c_smbus_read_i2c_block_data((struct i2c_client *)client, offset, pmbus_data_len+1, buf); + } + else + { + status = i2c_smbus_read_i2c_block_data((struct i2c_client *)client, offset, data_len-1, buf); + } + if (unlikely(status<0)) { msleep(60); @@ -522,14 +547,18 @@ int sonic_i2c_get_psu_block_default(void *client, PSU_DATA_ATTR *adata, void *da } else { - buf[data_len-1] = '\0'; + if (is_pmbus) + { + buf[pmbus_data_len+1] = '\0'; + strscpy(padata->val.strval, buf+1, sizeof(padata->val.strval)); + } + else + { + buf[data_len-1] = '\0'; + strscpy(padata->val.strval, buf, sizeof(padata->val.strval)); + } } - if (strncmp(adata->devtype, "pmbus", strlen("pmbus")) == 0) - strncpy(padata->val.strval, buf+1, data_len-1); - else - strncpy(padata->val.strval, buf, data_len); - psu_dbg(KERN_ERR "%s: status = %d, buf block: %s\n", __FUNCTION__, status, padata->val.strval); return 0; } diff --git a/platform/pddf/i2c/utils/pddfparse.py b/platform/pddf/i2c/utils/pddfparse.py index 45e40b672e4..c347430316b 100755 --- a/platform/pddf/i2c/utils/pddfparse.py +++ b/platform/pddf/i2c/utils/pddfparse.py @@ -1382,8 +1382,7 @@ def validate_psu_device(self, dev, ops): if attr.get("attr_devaddr") is not None: if attr.get("attr_offset") is not None: if attr.get("attr_mask") is not None: - if attr.get("attr_len") is not None: - ret_val = "psu success" + ret_val = "psu success" else: ret_val = "psu failed" diff --git a/platform/pddf/i2c/utils/schema/PSU-PMBUS.schema b/platform/pddf/i2c/utils/schema/PSU-PMBUS.schema index 424a14f0c21..c669abef879 100644 --- a/platform/pddf/i2c/utils/schema/PSU-PMBUS.schema +++ b/platform/pddf/i2c/utils/schema/PSU-PMBUS.schema @@ -96,8 +96,7 @@ "attr_devtype", "attr_offset", "attr_mask", - "attr_cmpval", - "attr_len" + "attr_cmpval" ] } ] diff --git a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py index 95956a7503f..f0d82740661 100644 --- a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py +++ b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py @@ -278,3 +278,21 @@ def get_system_led(self, led_device_name): ############################################## # Other methods ############################################## + def get_watchdog(self): + """ + Retreives hardware watchdog device on this chassis + + Returns: + An object derived from WatchdogBase representing the hardware + watchdog device + """ + try: + if self._watchdog is None: + from sonic_platform.watchdog import Watchdog + # Create the watchdog Instance + self._watchdog = Watchdog() + + except Exception as e: + syslog.syslog(syslog.LOG_WARNING, "{}".format(e)) + return self._watchdog + diff --git a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py index 33675254d4f..93ffa6b714e 100644 --- a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py +++ b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py @@ -183,7 +183,26 @@ def get_speed(self): else: speed = int(float(output['status'])) - max_speed = int(self.plugin_data['PSU']['PSU_FAN_MAX_SPEED']) + psu_plugin_data = self.plugin_data['PSU'] + if 'PSU_FAN_MAX_SPEED_MAP' in psu_plugin_data: + psu_fan_max_speed_map = psu_plugin_data['PSU_FAN_MAX_SPEED_MAP'] + + max_speed = None + output = self.pddf_obj.get_attr_name_output(device, "psu_model_name") + if output and 'status' in output: + model = output['status'] + model = model.rstrip() + + if model in psu_fan_max_speed_map: + max_speed = int(psu_fan_max_speed_map[model]) + + # Fall back to default if not able to get model name or model + # not listed + if max_speed is None: + max_speed = int(psu_fan_max_speed_map['default']) + else: + max_speed = int(psu_plugin_data['PSU_FAN_MAX_SPEED']) + speed_percentage = round((speed*100)/max_speed) return speed_percentage else: diff --git a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_watchdog.py b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_watchdog.py new file mode 100644 index 00000000000..aa5ca71c22a --- /dev/null +++ b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_watchdog.py @@ -0,0 +1,246 @@ +#!/usr/bin/env python3 + +############################################################################# +# +# Watchdog contains an implementation of SONiC Platform Base Watchdog API +# +############################################################################# +import ctypes +import fcntl +import os +import subprocess +import time +import array +import syslog + +try: + from sonic_platform_base.watchdog_base import WatchdogBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + +""" ioctl constants """ +IO_WRITE = 0x40000000 +IO_READ = 0x80000000 +IO_READ_WRITE = 0xC0000000 +IO_SIZE_INT = 0x00040000 +IO_SIZE_40 = 0x00280000 +IO_TYPE_WATCHDOG = ord('W') << 8 + +WDR_INT = IO_READ | IO_SIZE_INT | IO_TYPE_WATCHDOG +WDR_40 = IO_READ | IO_SIZE_40 | IO_TYPE_WATCHDOG +WDWR_INT = IO_READ_WRITE | IO_SIZE_INT | IO_TYPE_WATCHDOG + +""" Watchdog ioctl commands """ +WDIOC_GETSUPPORT = 0 | WDR_40 +WDIOC_GETSTATUS = 1 | WDR_INT +WDIOC_GETBOOTSTATUS = 2 | WDR_INT +WDIOC_GETTEMP = 3 | WDR_INT +WDIOC_SETOPTIONS = 4 | WDR_INT +WDIOC_KEEPALIVE = 5 | WDR_INT +WDIOC_SETTIMEOUT = 6 | WDWR_INT +WDIOC_GETTIMEOUT = 7 | WDR_INT +WDIOC_SETPRETIMEOUT = 8 | WDWR_INT +WDIOC_GETPRETIMEOUT = 9 | WDR_INT +WDIOC_GETTIMELEFT = 10 | WDR_INT + +""" Watchdog status constants """ +WDIOS_DISABLECARD = 0x0001 +WDIOS_ENABLECARD = 0x0002 + +WDT_COMMON_ERROR = -1 +WD_MAIN_IDENTITY = "iTCO_wdt" +WDT_SYSFS_PATH = "/sys/class/watchdog/" + +DEFAULT_TIMEOUT=180 +watchdog = 0 + +class PddfWatchdog(WatchdogBase): + + watchdog = None + def __init__(self): + + self.watchdog, self.wdt_main_dev_name = self._get_wdt() + if self.wdt_main_dev_name is None: + raise Exception("Watchdog device not found. Watchdog is not supported on this platform") + + self.status_path = "/sys/class/watchdog/%s/status" % self.wdt_main_dev_name + self.state_path = "/sys/class/watchdog/%s/state" % self.wdt_main_dev_name + self.timeout_path = "/sys/class/watchdog/%s/timeout" % self.wdt_main_dev_name + # Set default value + self._disable() + self.armed = False + self.timeout = DEFAULT_TIMEOUT + + def _is_wd_main(self, dev): + """ + Checks watchdog identity + """ + identity = self._read_file( + "{}/{}/identity".format(WDT_SYSFS_PATH, dev)) + return identity == WD_MAIN_IDENTITY or identity == 'wdat_wdt' + + def _get_wdt(self): + """ + Retrieves watchdog device + """ + global watchdog + wdt_main_dev_list = [dev for dev in os.listdir( + "/dev/") if dev.startswith("watchdog") and self._is_wd_main(dev)] + if not wdt_main_dev_list: + return (None, None) + wdt_main_dev_name = wdt_main_dev_list[0] + watchdog_device_path = "/dev/{}".format(wdt_main_dev_name) + if not watchdog: + watchdog = os.open(watchdog_device_path, os.O_RDWR) + return watchdog, wdt_main_dev_name + + def _read_file(self, file_path): + """ + Read text file + """ + try: + with open(file_path, "r") as fd: + txt = fd.read() + except IOError: + return WDT_COMMON_ERROR + return txt.strip() + + def _enable(self): + """ + Turn on the watchdog timer + """ + req = array.array('h', [WDIOS_ENABLECARD]) + fcntl.ioctl(self.watchdog, WDIOC_SETOPTIONS, req, False) + + def _disable(self): + """ + Turn off the watchdog timer + """ + req = array.array('h', [WDIOS_DISABLECARD]) + fcntl.ioctl(self.watchdog, WDIOC_SETOPTIONS, req, False) + + def _keepalive(self): + """ + Keep alive watchdog timer + """ + fcntl.ioctl(self.watchdog, WDIOC_KEEPALIVE) + + def _settimeout(self, seconds): + """ + Set watchdog timer timeout + @param seconds - timeout in seconds + @return is the actual set timeout + """ + req = array.array('I', [seconds]) + fcntl.ioctl(self.watchdog, WDIOC_SETTIMEOUT, req, True) + return int(req[0]) + + def _gettimeout(self, timeout_path): + """ + Get watchdog timeout + @return watchdog timeout + """ + req = array.array('I', [0]) + fcntl.ioctl(self.watchdog, WDIOC_GETTIMEOUT, req, True) + + return int(req[0]) + + def _gettimeleft(self): + """ + Get time left before watchdog timer expires + @return time left in seconds + """ + req = array.array('I', [0]) + fcntl.ioctl(self.watchdog, WDIOC_GETTIMELEFT, req, True) + + return int(req[0]) + + ################################################################# + + def arm(self, seconds): + """ + Arm the hardware watchdog with a timeout of seconds. + If the watchdog is currently armed, calling this function will + simply reset the timer to the provided value. If the underlying + hardware does not support the value provided in , this + method should arm the watchdog with the *next greater* available + value. + Returns: + An integer specifying the *actual* number of seconds the watchdog + was armed with. On failure returns -1. + """ + + ret = WDT_COMMON_ERROR + if seconds < 0: + return ret + + try: + if self.timeout != seconds: + self.timeout = self._settimeout(seconds) + if self.armed: + self._keepalive() + else: + self._settimeout(seconds) + self._enable() + self.armed = True + ret = self.timeout + except IOError as e: + pass + + return ret + + def disarm(self): + """ + Disarm the hardware watchdog + Returns: + A boolean, True if watchdog is disarmed successfully, False if not + """ + disarmed = False + if self.is_armed(): + try: + self._disable() + self.armed = False + disarmed = True + except IOError: + pass + + return disarmed + + def is_armed(self): + """ + Retrieves the armed state of the hardware watchdog. + Returns: + A boolean, True if watchdog is armed, False if not + """ + + return self.armed + + def get_remaining_time(self): + """ + If the watchdog is armed, retrieve the number of seconds remaining on + the watchdog timer + Returns: + An integer specifying the number of seconds remaining on thei + watchdog timer. If the watchdog is not armed, returns -1. + """ + + timeleft = WDT_COMMON_ERROR + + if self.armed: + try: + timeleft = self._gettimeleft() + except IOError: + pass + + return timeleft + + def __del__(self): + """ + Close watchdog + """ + + if self.watchdog is not None : + os.close(self.watchdog) + + + diff --git a/platform/pensando/docker-dpu.mk b/platform/pensando/docker-dpu.mk index 7eafdb68061..194c93255f5 100644 --- a/platform/pensando/docker-dpu.mk +++ b/platform/pensando/docker-dpu.mk @@ -8,13 +8,9 @@ $(DOCKER_DPU)_PATH = $(PLATFORM_PATH)/$(DOCKER_DPU_STEM) $(DOCKER_DPU)_LOAD_DOCKERS = $(DOCKER_DPU_BASE) -SONIC_DOCKER_IMAGES += $(DOCKER_DPU) - -$(DOCKER_DPU)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE) - $(DOCKER_DPU)_PACKAGE_NAME = dpu $(DOCKER_DPU)_CONTAINER_NAME = dpu $(DOCKER_DPU)_VERSION = 1.0.0 -SONIC_BULLSEYE_DOCKERS += $(DOCKER_DPU) +SONIC_DOCKER_IMAGES += $(DOCKER_DPU) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DPU) diff --git a/platform/pensando/docker-syncd-pensando.mk b/platform/pensando/docker-syncd-pensando.mk index e3ba335aed7..831e4d21d4c 100644 --- a/platform/pensando/docker-syncd-pensando.mk +++ b/platform/pensando/docker-syncd-pensando.mk @@ -1,7 +1,7 @@ # docker image for centec syncd DOCKER_SYNCD_PLATFORM_CODE = pensando -include $(PLATFORM_PATH)/../template/docker-syncd-bullseye.mk +include $(PLATFORM_PATH)/../template/docker-syncd-bookworm.mk $(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) diff --git a/platform/pensando/docker-syncd-pensando/Dockerfile.j2 b/platform/pensando/docker-syncd-pensando/Dockerfile.j2 index 6ef61d8ddb4..e1901279b05 100755 --- a/platform/pensando/docker-syncd-pensando/Dockerfile.j2 +++ b/platform/pensando/docker-syncd-pensando/Dockerfile.j2 @@ -1,4 +1,4 @@ -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name diff --git a/platform/pensando/dsc-drivers/debian/ionic-modules.install b/platform/pensando/dsc-drivers/debian/ionic-modules.install index 5bf3e9f92b4..6a2baab8ca4 100644 --- a/platform/pensando/dsc-drivers/debian/ionic-modules.install +++ b/platform/pensando/dsc-drivers/debian/ionic-modules.install @@ -1,6 +1,6 @@ -src/drivers/linux/build/mdev.ko lib/modules/6.12.41+deb13-sonic-arm64/extra -src/drivers/linux/build/mnet_uio_pdrv_genirq.ko lib/modules/6.12.41+deb13-sonic-arm64/extra -src/drivers/linux/build/ionic_mnic.ko lib/modules/6.12.41+deb13-sonic-arm64/extra +src/drivers/linux/mdev/mdev.ko lib/modules/6.12.41+deb13-sonic-arm64/extra +src/drivers/linux/mnet_uio_pdrv_genirq/mnet_uio_pdrv_genirq.ko lib/modules/6.12.41+deb13-sonic-arm64/extra +src/drivers/linux/eth/ionic/ionic_mnic.ko lib/modules/6.12.41+deb13-sonic-arm64/extra src/drivers/linux/pciesvc/6.12.41+deb13-sonic-arm64/pciesvc.ko lib/modules/6.12.41+deb13-sonic-arm64/extra src/drivers/linux/pciesvc/6.12.41+deb13-sonic-arm64/pciesvc_upg.ko lib/modules/6.12.41+deb13-sonic-arm64/extra systemd/ionic-modules.service lib/systemd/system diff --git a/platform/pensando/dsc-drivers/debian/rules b/platform/pensando/dsc-drivers/debian/rules index 1fff71dbd78..a6549bb1869 100755 --- a/platform/pensando/dsc-drivers/debian/rules +++ b/platform/pensando/dsc-drivers/debian/rules @@ -44,7 +44,7 @@ binary-arch: #dh_clean -k #dh_installdirs -binary-indep: +binary-indep: build dh_testdir dh_installdirs diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/Makefile b/platform/pensando/dsc-drivers/src/drivers/linux/Makefile index cf07266595a..30c3a9dff30 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/Makefile +++ b/platform/pensando/dsc-drivers/src/drivers/linux/Makefile @@ -82,23 +82,25 @@ KBUILD_RULE = $(MAKE) -C $(KSRC) $(KOPT) M=$(CURDIR) KMOD_SRC_DIR=$(CURDIR) mnic: KOPT+=$(ETH_KOPT) mnic: @echo "===> Building MNIC driver " + $(MAKE) -C $(KSRC) V=1 M=$(KMOD_SRC_DIR)/eth/ionic $(KOPT) mkdir -p $(KMOD_OUT_DIR) - touch $(KMOD_OUT_DIR)/Makefile - $(MAKE) -C $(KSRC) V=1 M=$(KMOD_OUT_DIR) src=$(KMOD_SRC_DIR)/eth/ionic $(KOPT) - mv ${KMOD_OUT_DIR}/Module.symvers ${KMOD_OUT_DIR}/Module.symvers.mnic + mv $(KMOD_SRC_DIR)/eth/ionic/Module.symvers \ + $(KMOD_OUT_DIR)/Module.symvers.mnic mnet_uio_pdrv_genirq: KOPT+=$(ETH_KOPT) mnet_uio_pdrv_genirq: @echo "===> Building MNET_UIO driver " - $(MAKE) -C $(KSRC) V=1 M=$(KMOD_OUT_DIR) src=$(KMOD_SRC_DIR)/mnet_uio_pdrv_genirq $(KOPT) - mv ${KMOD_OUT_DIR}/Module.symvers ${KMOD_OUT_DIR}/Module.symvers.uio + $(MAKE) -C $(KSRC) V=1 M=$(KMOD_SRC_DIR)/mnet_uio_pdrv_genirq $(KOPT) + #$(MAKE) -C $(KSRC) V=1 M=$(KMOD_OUT_DIR) src=$(KMOD_SRC_DIR)/mnet_uio_pdrv_genirq $(KOPT) + mv ${KMOD_SRC_DIR}/mnet_uio_pdrv_genirq/Module.symvers ${KMOD_OUT_DIR}/Module.symvers.uio mdev: KOPT+=$(ETH_KOPT) mdev: KSYMS+=$(KSYMS_MNIC) mdev: KSYMS+=$(KSYMS_UIO) mdev: @echo "===> Building MDEV driver " - $(MAKE) -C $(KSRC) V=1 M=$(KMOD_OUT_DIR) src=$(KMOD_SRC_DIR)/mdev $(KOPT) + #$(MAKE) -C $(KSRC) V=1 M=$(KMOD_SRC_DIR)/mdev KBUILD_OUTPUT=$(KMOD_OUT_DIR) $(KOPT) + $(MAKE) -C $(KSRC) V=1 M=$(KMOD_SRC_DIR)/mdev $(KOPT) eth: KOPT+=$(ETH_KOPT) eth: diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/Makefile b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/Makefile index 15b11bcb10e..1fb77b1f30a 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/Makefile +++ b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_IONIC) := ionic.o obj-$(CONFIG_IONIC_MNIC) := ionic_mnic.o -ccflags-y := -g -I$(M)/../common -I$(M)/../../common -I$(src) +ccflags-y := -g -I$(M)/../../common -I$(M)/../../../common -I$(src) ionic-y := ionic_main.o ionic_bus_pci.o ionic_dev.o ionic_ethtool.o \ ionic_lif.o ionic_rx_filter.o ionic_txrx.o ionic_debugfs.o \ diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_bus_platform.c b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_bus_platform.c index dca083ff9da..bc40c6b19ef 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_bus_platform.c +++ b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_bus_platform.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "ionic.h" @@ -159,19 +160,34 @@ static void ionic_mnic_set_msi_msg(struct msi_desc *desc, struct msi_msg *msg) int ionic_bus_alloc_irq_vectors(struct ionic *ionic, unsigned int nintrs) { - int err = 0; - - err = platform_msi_domain_alloc_irqs(ionic->dev, nintrs, - ionic_mnic_set_msi_msg); - if (err) - return err; - - return nintrs; + struct device *dev = ionic->dev; + struct irq_domain *domain; + int err; + + /* 1. Explicitly associate the Platform MSI domain if not already set */ + if (!dev_get_msi_domain(dev)) { + domain = of_msi_get_domain(dev, dev->of_node, DOMAIN_BUS_PLATFORM_MSI); + if (domain) { + dev_set_msi_domain(dev, domain); + } else { + dev_err(dev, "Failed to find Platform MSI domain\n"); + return -EINVAL; + } + } + + /* 2. Modern allocation helper with the required callback */ + err = platform_device_msi_init_and_alloc_irqs(dev, nintrs, ionic_mnic_set_msi_msg); + if (err) { + dev_err(dev, "Platform MSI allocation failed: %d\n", err); + return err; + } + + return nintrs; } void ionic_bus_free_irq_vectors(struct ionic *ionic) { - platform_msi_domain_free_irqs(ionic->dev); + platform_device_msi_free_irqs_all(ionic->dev); } struct net_device *ionic_alloc_netdev(struct ionic *ionic) @@ -425,7 +441,7 @@ int ionic_probe(struct platform_device *pfdev) } EXPORT_SYMBOL_GPL(ionic_probe); -int ionic_remove(struct platform_device *pfdev) +void ionic_remove(struct platform_device *pfdev) { struct ionic *ionic = platform_get_drvdata(pfdev); @@ -446,7 +462,7 @@ int ionic_remove(struct platform_device *pfdev) dev_info(ionic->dev, "removed\n"); } - return 0; + return; } EXPORT_SYMBOL_GPL(ionic_remove); @@ -484,3 +500,4 @@ void ionic_bus_unregister_driver(void) { platform_driver_unregister(&ionic_driver); } + diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_ethtool.c b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_ethtool.c index 8cfe461e8ca..7b70db873f8 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_ethtool.c +++ b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_ethtool.c @@ -1073,10 +1073,10 @@ static u32 ionic_get_rxfh_key_size(struct net_device *netdev) } #ifdef HAVE_RXFH_HASHFUNC -static int ionic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, +static int ionic_get_rxfh_legacy(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc) #else -static int ionic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key) +static int ionic_get_rxfh_legacy(struct net_device *netdev, u32 *indir, u8 *key) #endif { struct ionic_lif *lif = netdev_priv(netdev); @@ -1099,11 +1099,33 @@ static int ionic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key) return 0; } +static int ionic_get_rxfh(struct net_device *netdev, + struct ethtool_rxfh_param *rxfh) +{ +#ifdef HAVE_RXFH_HASHFUNC + u8 hfunc; + int ret; + + ret = ionic_get_rxfh_legacy(netdev, + rxfh->indir, + rxfh->key, + &hfunc); + if (!ret) + rxfh->hfunc = hfunc; + + return ret; +#else + return ionic_get_rxfh_legacy(netdev, + rxfh->indir, + rxfh->key); +#endif +} + #ifdef HAVE_RXFH_HASHFUNC -static int ionic_set_rxfh(struct net_device *netdev, const u32 *indir, +static int ionic_set_rxfh_legacy(struct net_device *netdev, const u32 *indir, const u8 *key, const u8 hfunc) #else -static int ionic_set_rxfh(struct net_device *netdev, const u32 *indir, +static int ionic_set_rxfh_legacy(struct net_device *netdev, const u32 *indir, const u8 *key) #endif { @@ -1117,6 +1139,22 @@ static int ionic_set_rxfh(struct net_device *netdev, const u32 *indir, return ionic_lif_rss_config(lif, lif->rss_types, key, indir); } +static int ionic_set_rxfh(struct net_device *netdev, + struct ethtool_rxfh_param *rxfh, + struct netlink_ext_ack *extack) +{ +#ifdef HAVE_RXFH_HASHFUNC + return ionic_set_rxfh_legacy(netdev, + rxfh->indir, + rxfh->key, + rxfh->hfunc); +#else + return ionic_set_rxfh_legacy(netdev, + rxfh->indir, + rxfh->key); +#endif +} + static int ionic_set_tunable(struct net_device *dev, const struct ethtool_tunable *tuna, const void *data) @@ -1224,26 +1262,27 @@ static int ionic_get_module_eeprom(struct net_device *netdev, #if IS_ENABLED(CONFIG_PTP_1588_CLOCK) static int ionic_get_ts_info(struct net_device *netdev, - struct ethtool_ts_info *info) + struct kernel_ethtool_ts_info *info) { struct ionic_lif *lif = netdev_priv(netdev); struct ionic *ionic = lif->ionic; __le64 mask; + /* Fallback to generic ethtool handler if no PHC */ if (!lif->phc || !lif->phc->ptp) return ethtool_op_get_ts_info(netdev, info); info->phc_index = ptp_clock_index(lif->phc->ptp); - info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | - SOF_TIMESTAMPING_RX_SOFTWARE | - SOF_TIMESTAMPING_SOFTWARE | - SOF_TIMESTAMPING_TX_HARDWARE | - SOF_TIMESTAMPING_RX_HARDWARE | - SOF_TIMESTAMPING_RAW_HARDWARE; - - /* tx modes */ + info->so_timestamping = + SOF_TIMESTAMPING_TX_SOFTWARE | + SOF_TIMESTAMPING_RX_SOFTWARE | + SOF_TIMESTAMPING_SOFTWARE | + SOF_TIMESTAMPING_TX_HARDWARE | + SOF_TIMESTAMPING_RX_HARDWARE | + SOF_TIMESTAMPING_RAW_HARDWARE; + /* TX timestamp modes */ info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON); @@ -1257,8 +1296,7 @@ static int ionic_get_ts_info(struct net_device *netdev, info->tx_types |= BIT(HWTSTAMP_TX_ONESTEP_P2P); #endif - /* rx filters */ - + /* RX timestamp filters */ info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL); @@ -1318,7 +1356,7 @@ static int ionic_get_ts_info(struct net_device *netdev, return 0; } -#endif +#endif /* CONFIG_PTP_1588_CLOCK */ static int ionic_nway_reset(struct net_device *netdev) { @@ -1413,3 +1451,4 @@ void ionic_ethtool_set_ops(struct net_device *netdev) { netdev->ethtool_ops = &ionic_ethtool_ops; } + diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_trace.h b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_trace.h index 5c2fa8e1002..e4b85ced7da 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_trace.h +++ b/platform/pensando/dsc-drivers/src/drivers/linux/eth/ionic/ionic_trace.h @@ -22,12 +22,14 @@ DECLARE_EVENT_CLASS(ionic_q_start_stop_template, TP_ARGS(q), - TP_STRUCT__entry(__field(unsigned int, index) - __string(devname, q->lif->netdev->name) + TP_STRUCT__entry( + __field(u16, index) + __string(devname, q->lif->netdev->name) ), - TP_fast_assign(__entry->index = q->index; - __assign_str(devname, q->lif->netdev->name); + TP_fast_assign( + __entry->index = q->index; + __assign_str(devname); ), TP_printk("%s: queue[%u]", __get_str(devname), __entry->index) @@ -51,3 +53,4 @@ DEFINE_EVENT(ionic_q_start_stop_template, ionic_q_start, #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE ionic_trace #include + diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/mdev/mdev_drv.c b/platform/pensando/dsc-drivers/src/drivers/linux/mdev/mdev_drv.c index c3cb3baeb26..c539493e618 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/mdev/mdev_drv.c +++ b/platform/pensando/dsc-drivers/src/drivers/linux/mdev/mdev_drv.c @@ -490,7 +490,7 @@ static int mdev_probe(struct platform_device *pfdev) return 0; } -static int mdev_remove(struct platform_device *pfdev) +static void mdev_remove(struct platform_device *pfdev) { struct mdev_dev *mdev, *tmp; @@ -500,7 +500,7 @@ static int mdev_remove(struct platform_device *pfdev) devm_kfree(mdev_device, mdev); } - return 0; + return; } static const struct of_device_id mdev_of_match[] = { @@ -564,7 +564,7 @@ static int __init mdev_init(void) struct mdev_dev *mdev, *tmp; int ret; - mdev_class = class_create(THIS_MODULE, DRV_NAME); + mdev_class = class_create(DRV_NAME); if (IS_ERR(mdev_class)) { ret = PTR_ERR(mdev_class); goto error_out; @@ -668,3 +668,4 @@ MODULE_AUTHOR("Pensando Systems"); MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); + diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/Makefile b/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/Makefile index d2e3d2cda7b..026b487bab7 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/Makefile +++ b/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/Makefile @@ -7,20 +7,17 @@ obj-m := $(MODNAME).o $(shell echo '#define PCIESVC_VERSION "'`date`'"' >version.h) -kpci := - -pciesvc-src := $(shell cd $(PWD) && ls pciesvc/src/*.c) -pciesvc-obj := $(patsubst %.c,%.o,$(pciesvc-src)) -kpci += $(pciesvc-obj) - INCLUDES = -I/sonic/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc \ -I/sonic/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/pciesvc/include \ -I/sonic/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/pciesvc/src \ -I/usr/src/linux-headers-$(shell echo $(KVERSION) | sed 's/-arm64//')-common/include/linux #-I/usr/include \ #-I$(PWD) -$(MODNAME)-y := $(kpci) kpci_get_entry.o kpcimgr_module.o kpcinterface.o \ - kpci_entry.o kpci_kexec.o kpci_test.o pciesvc_end.o + +# Unity build: compile all .c files as a single translation unit +# This eliminates cross-file BL/ADRP instructions for kexec compatibility +# Only kpci_entry.S (assembly) needs to be compiled separately +$(MODNAME)-y := pciesvc_unity.o kpci_entry.o KDIR := /lib/modules/$(KVERSION)/build PWD := $(shell pwd) diff --git a/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/kpci_get_entry.c b/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/kpci_get_entry.c index d50c15d6646..c0fee1771d3 100644 --- a/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/kpci_get_entry.c +++ b/platform/pensando/dsc-drivers/src/drivers/linux/pciesvc/kpci_get_entry.c @@ -1,24 +1,25 @@ -#include #include "kpcimgr_api.h" -extern char pciesvc_end; -extern void kpcimgr_init_intr(void *); -extern void kpcimgr_init_fn(void *); -extern void kpcimgr_version_fn(char **); -extern void kpcimgr_init_poll(void *); -extern void pciesvc_shut(int); -extern void kpcimgr_poll(kstate_t *, int, int); -extern unsigned long kpcimgr_get_holding_pen(unsigned long, unsigned int); -extern int kpcimgr_ind_intr(void *, int); -extern int kpcimgr_not_intr(void *, int); -extern void kpcimgr_undefined_entry(void); -extern int pciesvc_sysfs_cmd_read(void *, char *, int *); -extern int pciesvc_sysfs_cmd_write(void *, char *, size_t, int *); - +/* + * For unity builds, all these functions are defined in other .c files + * that are included before this file. We only need extern declarations + * for symbols that are truly external (pciesvc_start/end markers and + * version variables). + * + * For separate compilation, we include pciesvc_system_extern.h which + * provides the correct prototypes. + */ +#include "pciesvc_system_extern.h" + +/* Code boundary markers */ +extern void pciesvc_start(void); +extern void pciesvc_end(void); + +/* Version variables */ extern int pciesvc_version_major; extern int pciesvc_version_minor; -struct kpcimgr_entry_points_t ep; +static struct kpcimgr_entry_points_t ep; struct kpcimgr_entry_points_t *kpci_get_entry_points(void) { @@ -29,7 +30,8 @@ struct kpcimgr_entry_points_t *kpci_get_entry_points(void) ep.expected_mgr_version = 3; ep.lib_version_major = pciesvc_version_major; ep.lib_version_minor = pciesvc_version_minor; - ep.code_end = &pciesvc_end; + ep.code_start = (void *)pciesvc_start; + ep.code_end = (void *)pciesvc_end; for (i=0; i> CPLD_REV_SHIFT) & CPLD_REV_MASK + if rev == 0x2: + return self.mtfuji_rev_v2 + else: + return self.mtfuji_rev_v1 + return "N/A" + except: + return "N/A" + def readline_txt_file(self, path): try: with open(path, 'r') as f: @@ -146,3 +169,19 @@ def readline_txt_file(self, path): pass return '' + def get_slot_id(self): + cmd = "cpldapp -r 0xA" + try: + if self.is_host(): + slot_id = self.run_docker_cmd(cmd) + return int(slot_id,16) + else: + slot_id_file = DOCKER_HWSKU_PATH + "/dpu_slot_id" + slot_id_hex = open(slot_id_file, "r").read() + if slot_id_hex: + slot_id = int(slot_id_hex, 16) + return slot_id + return -1 + except: + return -1 + diff --git a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/pcie.py b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/pcie.py new file mode 100644 index 00000000000..e8101dcb503 --- /dev/null +++ b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/pcie.py @@ -0,0 +1,136 @@ +try: + import os + import yaml + from .helper import APIHelper + from sonic_platform_base.sonic_pcie.pcie_common import PcieUtil +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + +ETH_ENTRY = { + "dev": "00", + "fn": "0", + "id": "1004", # dev_id=0x1004 + "name": "Ethernet controller: AMD Pensando Systems DSC Management Controller", +} +SER_ENTRY = { + "dev": "00", + "fn": "1", + "id": "100a", # dev_id=0x100a + "name": "Serial controller: AMD Pensando Systems DSC Serial Port Controller", +} + +HOST_PLATFORM_PATH = '/usr/share/sonic/device' + +class Pcie(PcieUtil): + def __init__(self, path): + self._api_helper = APIHelper() + self.pcie_yaml_path = "/".join([HOST_PLATFORM_PATH, self._api_helper.get_platform(), "pcie.yaml"]) + if self._api_helper.is_host(): + self.create_pcie_yaml(self.pcie_yaml_path) + super().__init__(path) + + def get_pcie_check(self): + self.load_config_file() + for item_conf in self.confInfo: + item_conf["result"] = "Passed" + return self.confInfo + + def get_pcie_device(self): + """ + Parse `pcieutil dev` output and return a list of PCI devices, + enriched with id and name from ETH_ENTRY / SER_ENTRY. + """ + if self._api_helper.is_host(): + output = self._api_helper.run_docker_cmd("pcieutil dev") + if not output: + return [] + + lines = output.strip().splitlines() + if len(lines) < 2: + return [] + + pci_list = [] + + # Skip header + for line in lines[1:]: + fields = line.split() + if len(fields) < 4: + continue + + # hdl lif name p:bb:dd.f intx intrs + pcie_addr = fields[3] # 0:18:00.0 + + try: + _, bus_hex, devfn = pcie_addr.split(":") + dev, fn = devfn.split(".") + bus = f"{int(bus_hex, 16):02x}" + except ValueError: + continue + + # Attach ID + Name from constants + if fn == ETH_ENTRY["fn"]: + entry = ETH_ENTRY + elif fn == SER_ENTRY["fn"]: + entry = SER_ENTRY + else: + # Unknown PCIe function – ignore + continue + + pci_list.append({ + "bus": bus, + "dev": dev, + "fn": fn, + "id": entry["id"], + "name": entry["name"] + }) + else: + if not os.path.exists(self.pcie_yaml_path): + return [] + + try: + with open(self.pcie_yaml_path, "r", encoding="utf-8") as f: + data = yaml.safe_load(f) + except Exception: + return [] + + if not isinstance(data, list): + return [] + + pci_list = [] + for item in data: + # Defensive parsing + try: + pci_list.append({ + "bus": item["bus"], + "dev": item["dev"], + "fn": item["fn"], + "id": item["id"], + "name": item["name"] + }) + except KeyError: + continue + + return pci_list + + def create_pcie_yaml(self, path): + """ + Create pcie.yaml using fully-populated PCI device info + """ + pci_devices = self.get_pcie_device() + if not pci_devices: + return + + lines = [] + + for dev in pci_devices: + lines.append(f"- bus: '{dev['bus']}'") + lines.append(f" dev: '{dev['dev']}'") + lines.append(f" fn: '{dev['fn']}'") + lines.append(f" id: {dev['id']}") + lines.append(f" name: '{dev['name']}'") + + yaml_text = "\n".join(lines) + "\n" + + with open(path, "w", encoding="utf-8") as f: + f.write(yaml_text) + diff --git a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/sensor.py b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/sensor.py index c83bf4ca5f1..14f44b754bb 100644 --- a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/sensor.py +++ b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/sensor.py @@ -13,12 +13,13 @@ from sonic_platform_base.sensor_base import SensorBase import os import syslog + from .helper import APIHelper except ImportError as e: raise ImportError(str(e) + "- required module not found") NOT_AVAILABLE = "N/A" # [ Sensor-Name, sysfs, low_threshold, high_threshold, critical_low, critical_high] -VOLTAGE_SENSOR_MAPPING = [ +VOLTAGE_SENSOR_MAPPING_V1 = [ ["VP0P85_VDD_DDR_DPU0", "/sys/bus/i2c/devices/0-0044/hwmon/hwmon2/in2_input", "0.816", "0.884", "0.7905", "0.9095"], ["VP1P2_DDR_VDDQ_DPU0", "/sys/bus/i2c/devices/0-0044/hwmon/hwmon2/in3_input", "1.152", "1.248", "1.116", "1.284"], ["VP0P75_VDD_CORE_DPU0 1", "/sys/bus/i2c/devices/0-0055/hwmon/hwmon1/in2_input", "0.72", "0.78", "0.6975", "0.8025"], @@ -28,7 +29,7 @@ ] # [ Sensor-Name, sysfs, low_threshold, high_threshold, critical_low, critical_high] -CURRENT_SENSOR_MAPPING = [ +CURRENT_SENSOR_MAPPING_V1 = [ ["VP0P85_VDD_DDR_DPU0", "/sys/bus/i2c/devices/0-0044/hwmon/hwmon2/curr1_input", "0", "15100", NOT_AVAILABLE, "30000"], ["VP1P2_DDR_VDDQ_DPU0", "/sys/bus/i2c/devices/0-0044/hwmon/hwmon2/curr2_input", "0", "13800", NOT_AVAILABLE, "30000"], ["VP0P75_VDD_CORE_DPU0 1", "/sys/bus/i2c/devices/0-0055/hwmon/hwmon1/curr1_input", "0", "25000", NOT_AVAILABLE, "30000"], @@ -37,13 +38,35 @@ ["VP0P85_VDD_ARM_DPU0", "/sys/bus/i2c/devices/0-0066/hwmon/hwmon0/curr2_input", "0", "29100", NOT_AVAILABLE, "30000"], ] +# [ Sensor-Name, sysfs, low_threshold, high_threshold, critical_low, critical_high] +VOLTAGE_SENSOR_MAPPING_V2 = [ + ["VP0P85_VDD_DDR_DPU0", "/sys/bus/i2c/devices/0-0072/hwmon/hwmon0/in2_input", "0.816", "0.884", "0.7905", "0.9095"], + ["VP1P2_DDR_VDDQ_DPU0", "/sys/bus/i2c/devices/0-0072/hwmon/hwmon0/in3_input", "1.152", "1.248", "1.116", "1.284"], + ["VP0P75_VDD_CORE_DPU0", "/sys/bus/i2c/devices/0-0062/hwmon/hwmon1/in2_input", "0.72", "0.78", "0.6975", "0.8025"], + ["VP0P85_VDD_ARM_DPU0", "/sys/bus/i2c/devices/0-0062/hwmon/hwmon1/in3_input", "0.816", "0.884", "0.7905", "0.9095"] +] + +# [ Sensor-Name, sysfs, low_threshold, high_threshold, critical_low, critical_high] +CURRENT_SENSOR_MAPPING_V2 = [ + ["VP0P85_VDD_DDR_DPU0", "/sys/bus/i2c/devices/0-0072/hwmon/hwmon0/curr1_input", "0", "15100", NOT_AVAILABLE, "30000"], + ["VP1P2_DDR_VDDQ_DPU0", "/sys/bus/i2c/devices/0-0072/hwmon/hwmon0/curr2_input", "0", "13800", NOT_AVAILABLE, "30000"], + ["VP0P75_VDD_CORE_DPU0", "/sys/bus/i2c/devices/0-0062/hwmon/hwmon1/curr1_input", "0", "25000", NOT_AVAILABLE, "30000"], + ["VP0P85_VDD_ARM_DPU0", "/sys/bus/i2c/devices/0-0062/hwmon/hwmon1/curr2_input", "0", "29100", NOT_AVAILABLE, "30000"], +] + class VoltageSensor(SensorBase): """ Abstract base class for interfacing with a voltage sensor module """ @classmethod def _validate_voltage_sensors(cls): - for sensor_name, sensor_hwmon, *_ in VOLTAGE_SENSOR_MAPPING: + from sonic_platform.helper import APIHelper + apiHelper = APIHelper() + board_rev = apiHelper.get_board_rev() + voltage_sensor_mapping = VOLTAGE_SENSOR_MAPPING_V1 + if board_rev == apiHelper.mtfuji_rev_v2: + voltage_sensor_mapping = VOLTAGE_SENSOR_MAPPING_V2 + for sensor_name, sensor_hwmon, *_ in voltage_sensor_mapping: if not os.path.exists(sensor_hwmon): return False return True @@ -58,14 +81,19 @@ def get_unit(cls): def __init__(self, voltage_sensor_index): SensorBase.__init__(self) + self._api_helper = APIHelper() self.index = voltage_sensor_index self.sensor_hwmon_path = None - sensor_hwmon = VOLTAGE_SENSOR_MAPPING[self.index][1] + self.board_rev = self._api_helper.get_board_rev() + self.voltage_sensor_mapping = VOLTAGE_SENSOR_MAPPING_V1 + if self.board_rev == self._api_helper.mtfuji_rev_v2: + self.voltage_sensor_mapping = VOLTAGE_SENSOR_MAPPING_V2 + sensor_hwmon = self.voltage_sensor_mapping[self.index][1] if os.path.exists(sensor_hwmon): self.sensor_hwmon_path = sensor_hwmon def get_name(self): - return VOLTAGE_SENSOR_MAPPING[self.index][0] + return self.voltage_sensor_mapping[self.index][0] def get_value(self): voltage = 0.0 @@ -83,7 +111,7 @@ def get_high_threshold(self): Returns: High threshold """ - value = VOLTAGE_SENSOR_MAPPING[self.index][3] + value = self.voltage_sensor_mapping[self.index][3] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -95,7 +123,7 @@ def get_low_threshold(self): Returns: Low threshold """ - value = VOLTAGE_SENSOR_MAPPING[self.index][2] + value = self.voltage_sensor_mapping[self.index][2] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -107,7 +135,7 @@ def get_high_critical_threshold(self): Returns: The high critical threshold value of sensor """ - value = VOLTAGE_SENSOR_MAPPING[self.index][5] + value = self.voltage_sensor_mapping[self.index][5] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -119,7 +147,7 @@ def get_low_critical_threshold(self): Returns: The low critical threshold value of sensor """ - value = VOLTAGE_SENSOR_MAPPING[self.index][4] + value = self.voltage_sensor_mapping[self.index][4] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -130,7 +158,13 @@ class CurrentSensor(SensorBase): """ @classmethod def _validate_current_sensors(cls): - for sensor_name, sensor_hwmon, *_ in CURRENT_SENSOR_MAPPING: + from sonic_platform.helper import APIHelper + apiHelper = APIHelper() + board_rev = apiHelper.get_board_rev() + current_sensor_mapping = CURRENT_SENSOR_MAPPING_V1 + if board_rev == apiHelper.mtfuji_rev_v2: + current_sensor_mapping = CURRENT_SENSOR_MAPPING_V2 + for sensor_name, sensor_hwmon, *_ in current_sensor_mapping: if not os.path.exists(sensor_hwmon): return False return True @@ -145,14 +179,19 @@ def get_unit(cls): def __init__(self, current_sensor_index): SensorBase.__init__(self) + self._api_helper = APIHelper() self.index = current_sensor_index self.sensor_hwmon_path = None - sensor_hwmon = CURRENT_SENSOR_MAPPING[self.index][1] + self.board_rev = self._api_helper.get_board_rev() + self.current_sensor_mapping = CURRENT_SENSOR_MAPPING_V1 + if self.board_rev == self._api_helper.mtfuji_rev_v2: + self.current_sensor_mapping = CURRENT_SENSOR_MAPPING_V2 + sensor_hwmon = self.current_sensor_mapping[self.index][1] if os.path.exists(sensor_hwmon): self.sensor_hwmon_path = sensor_hwmon def get_name(self): - return CURRENT_SENSOR_MAPPING[self.index][0] + return self.current_sensor_mapping[self.index][0] def get_value(self): current = 0 @@ -170,7 +209,7 @@ def get_high_threshold(self): Returns: High threshold """ - value = CURRENT_SENSOR_MAPPING[self.index][3] + value = self.current_sensor_mapping[self.index][3] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -182,7 +221,7 @@ def get_low_threshold(self): Returns: Low threshold """ - value = CURRENT_SENSOR_MAPPING[self.index][2] + value = self.current_sensor_mapping[self.index][2] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -194,7 +233,7 @@ def get_high_critical_threshold(self): Returns: The high critical threshold value of sensor """ - value = CURRENT_SENSOR_MAPPING[self.index][5] + value = self.current_sensor_mapping[self.index][5] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) @@ -206,7 +245,7 @@ def get_low_critical_threshold(self): Returns: The low critical threshold value of sensor """ - value = CURRENT_SENSOR_MAPPING[self.index][4] + value = self.current_sensor_mapping[self.index][4] if value == NOT_AVAILABLE: return NOT_AVAILABLE return float(value) diff --git a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/thermal.py b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/thermal.py index 10dd541fc14..c7bcab4d4e4 100644 --- a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/thermal.py +++ b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/thermal.py @@ -17,6 +17,7 @@ raise ImportError(str(e) + "- required module not found") g_board_id = None +g_board_rev = None class Thermal(ThermalBase): """Pensando-specific Thermal class""" @@ -28,9 +29,8 @@ class Thermal(ThermalBase): ] # [ Sensor-Name, sysfs, low_threshold, high_threshold, critical_low, critical_high] - SENSOR_MAPPING_MTFUJI = [ - ["Die temperature", "/sys/class/hwmon/hwmon0/temp2_input", 1, 110, -10, 130], - ["Board temperature", "/sys/class/hwmon/hwmon0/temp1_input", 1, 110, -10, 130], + SENSOR_MAPPING_MTFUJI_V1 = [ + ["Power Rail temperature", "/sys/class/hwmon/hwmon0/temp1_input", 1, 110, -10, 130], ["VP0P85_VDD_DDR_DPU0", "/sys/bus/i2c/devices/0-0044/hwmon/hwmon2/temp2_input", 1, 110, -10, 130], ["VP1P2_DDR_VDDQ_DPU0", "/sys/bus/i2c/devices/0-0044/hwmon/hwmon2/temp3_input", 1, 110, -10, 130], ["VP0P75_VDD_CORE_DPU0 1", "/sys/bus/i2c/devices/0-0055/hwmon/hwmon1/temp2_input", 1, 110, -10, 130], @@ -39,12 +39,23 @@ class Thermal(ThermalBase): ["VP0P85_VDD_ARM_DPU0", "/sys/bus/i2c/devices/0-0066/hwmon/hwmon0/temp3_input", 1, 110, -10, 130], ] + # [ Sensor-Name, sysfs, low_threshold, high_threshold, critical_low, critical_high] + SENSOR_MAPPING_MTFUJI_V2 = [ + ["Power Rail temperature", "/sys/class/hwmon/hwmon0/temp1_input", 1, 110, -10, 130], + ["VP0P85_VDD_DDR_DPU0", "/sys/bus/i2c/devices/0-0072/hwmon/hwmon0/temp1_input", 1, 110, -10, 130], + ["VP1P2_DDR_VDDQ_DPU0", "/sys/bus/i2c/devices/0-0072/hwmon/hwmon0/temp2_input", 1, 110, -10, 130], + ["VP0P75_VDD_CORE_DPU0", "/sys/bus/i2c/devices/0-0062/hwmon/hwmon1/temp1_input", 1, 110, -10, 130], + ["VP0P85_VDD_ARM_DPU0", "/sys/bus/i2c/devices/0-0062/hwmon/hwmon1/temp2_input", 1, 110, -10, 130], + ] + @classmethod def _thermals_available(cls): global g_board_id + global g_board_rev from sonic_platform.helper import APIHelper apiHelper = APIHelper() g_board_id = apiHelper.get_board_id() + g_board_rev = apiHelper.get_board_rev() temp_hwmon = '/sys/bus/i2c/devices/i2c-0/0-004c/hwmon' if g_board_id == apiHelper.mtfuji_board_id: temp_hwmon = '/sys/class/hwmon/hwmon0/temp1_input' @@ -58,11 +69,18 @@ def __init__(self, thermal_index, sfp = None): self._api_helper = APIHelper() self.index = thermal_index + 1 self.board_id = g_board_id + self.board_rev = g_board_rev + self.sensor_mapping = self.SENSOR_MAPPING if self.board_id != self._api_helper.mtfuji_board_id: temp_hwmon = '/sys/bus/i2c/devices/i2c-0/0-004c/hwmon' self.temp_dir = None if os.path.exists(temp_hwmon): self.temp_dir = temp_hwmon + '/' + os.listdir(temp_hwmon)[0] + else: + if self.board_rev == self._api_helper.mtfuji_rev_v1: + self.sensor_mapping = self.SENSOR_MAPPING_MTFUJI_V1 + if self.board_rev == self._api_helper.mtfuji_rev_v2: + self.sensor_mapping = self.SENSOR_MAPPING_MTFUJI_V2 def get_name(self): """ @@ -71,8 +89,8 @@ def get_name(self): string: The name of the thermal """ if self.board_id == self._api_helper.mtfuji_board_id: - return self.SENSOR_MAPPING_MTFUJI[self.index - 1][0] - return self.SENSOR_MAPPING[self.index - 1] + return self.sensor_mapping[self.index - 1][0] + return self.sensor_mapping[self.index - 1] def get_presence(self): """ @@ -119,7 +137,7 @@ def get_temperature(self): try : temp_file = None if self.board_id == self._api_helper.mtfuji_board_id: - temp_file = self.SENSOR_MAPPING_MTFUJI[self.index - 1][1] + temp_file = self.sensor_mapping[self.index - 1][1] else: temp_file = self.temp_dir +'/temp{0}_input'.format(str(self.index)) temperature = float(open(temp_file).read()) / 1000.0 @@ -136,7 +154,7 @@ def get_high_threshold(self): up to nearest thousandth of one degree Celsius, e.g. 30.125 """ if self.board_id == self._api_helper.mtfuji_board_id: - return float(self.SENSOR_MAPPING_MTFUJI[self.index - 1][3]) + return float(self.sensor_mapping[self.index - 1][3]) raise NotImplementedError def get_low_threshold(self): @@ -148,7 +166,7 @@ def get_low_threshold(self): up to nearest thousandth of one degree Celsius, e.g. 30.125 """ if self.board_id == self._api_helper.mtfuji_board_id: - return float(self.SENSOR_MAPPING_MTFUJI[self.index - 1][2]) + return float(self.sensor_mapping[self.index - 1][2]) raise NotImplementedError def get_high_critical_threshold(self): @@ -167,7 +185,7 @@ def get_high_critical_threshold(self): except Exception: pass else: - return float(self.SENSOR_MAPPING_MTFUJI[self.index - 1][5]) + return float(self.sensor_mapping[self.index - 1][5]) return float(temperature) def get_low_critical_threshold(self): @@ -179,7 +197,7 @@ def get_low_critical_threshold(self): up to nearest thousandth of one degree Celsius, e.g. 30.125 """ if self.board_id == self._api_helper.mtfuji_board_id: - return float(self.SENSOR_MAPPING_MTFUJI[self.index - 1][4]) + return float(self.sensor_mapping[self.index - 1][4]) raise NotImplementedError diff --git a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/watchdog.py b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/watchdog.py index afa94c13ae7..94e109eeaa2 100644 --- a/platform/pensando/sonic-platform-modules-dpu/sonic_platform/watchdog.py +++ b/platform/pensando/sonic-platform-modules-dpu/sonic_platform/watchdog.py @@ -16,8 +16,8 @@ except ImportError as e: raise ImportError(str(e) + "- required module not found") -WATCHDOG_STATUS = "/sys/class/watchdog/watchdog1/status" -WATCHDOG_TIMEOUT = "/sys/class/watchdog/watchdog1/timeout" +WATCHDOG_STATUS = "/sys/class/watchdog/watchdog0/status" +WATCHDOG_TIMEOUT = "/sys/class/watchdog/watchdog0/timeout" WATCHDOG_ARMED_MASK = 0x8000 class Watchdog(WatchdogBase): diff --git a/platform/vs/docker-sonic-vs/frr/zebra.conf b/platform/vs/docker-sonic-vs/frr/zebra.conf index 9e3bd42315d..91e4da4654c 100644 --- a/platform/vs/docker-sonic-vs/frr/zebra.conf +++ b/platform/vs/docker-sonic-vs/frr/zebra.conf @@ -1,4 +1,4 @@ -no zebra nexthop kernel enable +zebra nexthop kernel enable no fpm use-next-hop-groups fpm address 127.0.0.1 zebra nexthop-group keep 1 diff --git a/platform/vs/onie.mk b/platform/vs/onie.mk index badd7b35194..1314e63ead7 100644 --- a/platform/vs/onie.mk +++ b/platform/vs/onie.mk @@ -1,10 +1,10 @@ ONIE_RECOVERY_IMAGE = onie-recovery-x86_64-kvm_x86_64-r0.iso -$(ONIE_RECOVERY_IMAGE)_URL = "https://packages.trafficmanager.net/public/onie/onie-recovery-x86_64-kvm_x86_64-r0.iso" +$(ONIE_RECOVERY_IMAGE)_URL = "$(BUILD_PUBLIC_URL)/onie/onie-recovery-x86_64-kvm_x86_64-r0.iso" ONIE_RECOVERY_KVM_4ASIC_IMAGE = onie-recovery-x86_64-kvm_x86_64_4_asic-r0.iso -$(ONIE_RECOVERY_KVM_4ASIC_IMAGE)_URL = "https://packages.trafficmanager.net/public/onie/onie-recovery-x86_64-kvm_x86_64_4_asic-r0.iso" +$(ONIE_RECOVERY_KVM_4ASIC_IMAGE)_URL = "$(BUILD_PUBLIC_URL)/onie/onie-recovery-x86_64-kvm_x86_64_4_asic-r0.iso" ONIE_RECOVERY_KVM_6ASIC_IMAGE = onie-recovery-x86_64-kvm_x86_64_6_asic-r0.iso -$(ONIE_RECOVERY_KVM_6ASIC_IMAGE)_URL = "https://packages.trafficmanager.net/public/onie/onie-recovery-x86_64-kvm_x86_64_6_asic-r0.iso" +$(ONIE_RECOVERY_KVM_6ASIC_IMAGE)_URL = "$(BUILD_PUBLIC_URL)/onie/onie-recovery-x86_64-kvm_x86_64_6_asic-r0.iso" SONIC_ONLINE_FILES += $(ONIE_RECOVERY_IMAGE) $(ONIE_RECOVERY_KVM_4ASIC_IMAGE) $(ONIE_RECOVERY_KVM_6ASIC_IMAGE) diff --git a/rules/config b/rules/config index 516efe5cb1d..ee13cf2dbec 100644 --- a/rules/config +++ b/rules/config @@ -16,6 +16,21 @@ SONIC_CONFIG_BUILD_JOBS = 1 # Corresponding -j argument will be passed to make/dpkg commands that build separate packages SONIC_CONFIG_MAKE_JOBS = $(shell nproc) +# SONIC_BUILD_MEMORY - set memory limit for the build container. +# When set, passes --memory and --memory-swap flags to docker run. +# This prevents the kernel OOM killer from silently killing build processes +# (or unrelated host processes) when parallel builds exhaust system RAM. +# The OOM will instead be contained within the build container. +# Example: SONIC_BUILD_MEMORY = 24g +# Set to "none" to explicitly disable. +# SONIC_BUILD_MEMORY = + +# SONIC_BUILD_MEMORY_SWAP - set memory+swap limit for the build container. +# Only takes effect when SONIC_BUILD_MEMORY is set. Defaults to double +# the value of SONIC_BUILD_MEMORY if not specified (Docker default behavior). +# Set to -1 for unlimited swap. Set equal to SONIC_BUILD_MEMORY to disable swap. +# SONIC_BUILD_MEMORY_SWAP = + # DEFAULT_BUILD_LOG_TIMESTAMP - add timestamp in build log # Supported format: simple, none DEFAULT_BUILD_LOG_TIMESTAMP = none @@ -40,6 +55,12 @@ DEFAULT_USERNAME = admin # DEFAULT_PASSWORD - default password for installer build DEFAULT_PASSWORD = YourPaSsWoRd +# BMC_NOS_ACCOUNT_USERNAME - default BMC NOS account username +BMC_NOS_ACCOUNT_USERNAME ?= yormnAnb + +# BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD - default password for BMC root account +BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD ?= + # ENABLE_ZTP - installs Zero Touch Provisioning support. # ENABLE_ZTP = y @@ -244,8 +265,16 @@ SECURE_UPGRADE_MODE ?= "no_sign" SECURE_UPGRADE_KERNEL_CAFILE ?= $(SECURE_UPGRADE_SIGNING_CERT) SECURE_UPGRADE_PROD_SIGNING_TOOL ?= SECURE_UPGRADE_PROD_TOOL_ARGS ?= -# PACKAGE_URL_PREFIX - the package url prefix -PACKAGE_URL_PREFIX ?= https://packages.trafficmanager.net/packages + +# BUILD_SNAPSHOT_URL - Default debian snapshot mirror url +# Mirror of https://snapshot.debian.org/archive +BUILD_SNAPSHOT_URL ?= http://packages.trafficmanager.net/snapshot + +# BUILD_PUBLIC_URL - Default public mirror url +BUILD_PUBLIC_URL ?= https://packages.trafficmanager.net/public + +# BUILD_PACKAGES_URL - Default packages mirror url +BUILD_PACKAGES_URL ?= https://packages.trafficmanager.net/packages # TRUSTED_GPG_URLS - the trusted gpgs, separated by comma TRUSTED_GPG_URLS = https://packages.microsoft.com/keys/microsoft.asc diff --git a/rules/docker-auditd-watchdog.dep b/rules/docker-auditd-watchdog.dep deleted file mode 100644 index 506e2154b21..00000000000 --- a/rules/docker-auditd-watchdog.dep +++ /dev/null @@ -1,10 +0,0 @@ -DPATH := $($(DOCKER_AUDITD_WATCHDOG)_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-auditd-watchdog.mk rules/docker-auditd-watchdog.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files $(DPATH)) - -$(DOCKER_AUDITD_WATCHDOG)_CACHE_MODE := GIT_CONTENT_SHA -$(DOCKER_AUDITD_WATCHDOG)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(DOCKER_AUDITD_WATCHDOG)_DEP_FILES := $(DEP_FILES) - -$(eval $(call add_dbg_docker,$(DOCKER_AUDITD_WATCHDOG),$(DOCKER_AUDITD_WATCHDOG_DBG))) diff --git a/rules/docker-auditd-watchdog.mk b/rules/docker-auditd-watchdog.mk deleted file mode 100644 index 11ae100775b..00000000000 --- a/rules/docker-auditd-watchdog.mk +++ /dev/null @@ -1,28 +0,0 @@ -# docker image for auditd watchdog - -DOCKER_AUDITD_WATCHDOG_STEM = docker-auditd-watchdog -DOCKER_AUDITD_WATCHDOG = $(DOCKER_AUDITD_WATCHDOG_STEM).gz -DOCKER_AUDITD_WATCHDOG_DBG = $(DOCKER_AUDITD_WATCHDOG_STEM)-$(DBG_IMAGE_MARK).gz - -$(DOCKER_AUDITD_WATCHDOG)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) - -$(DOCKER_AUDITD_WATCHDOG)_PATH = $(DOCKERS_PATH)/$(DOCKER_AUDITD_WATCHDOG_STEM) - -$(DOCKER_AUDITD_WATCHDOG)_VERSION = 1.0.0 -$(DOCKER_AUDITD_WATCHDOG)_PACKAGE_NAME = auditd_watchdog - -SONIC_DOCKER_IMAGES += $(DOCKER_AUDITD_WATCHDOG) -SONIC_BOOKWORM_DOCKERS += $(DOCKER_AUDITD_WATCHDOG) -SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_AUDITD_WATCHDOG) - -SONIC_DOCKER_DBG_IMAGES += $(DOCKER_AUDITD_WATCHDOG_DBG) -SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_AUDITD_WATCHDOG_DBG) -SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_AUDITD_WATCHDOG_DBG) - -$(DOCKER_AUDITD_WATCHDOG)_CONTAINER_NAME = auditd_watchdog -$(DOCKER_AUDITD_WATCHDOG)_RUN_OPT += -t --privileged --pid=host -$(DOCKER_AUDITD_WATCHDOG)_RUN_OPT += -v /lib/systemd/system:/lib/systemd/system:rw -$(DOCKER_AUDITD_WATCHDOG)_RUN_OPT += -v /etc/audit:/etc/audit:rw -$(DOCKER_AUDITD_WATCHDOG)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro -$(DOCKER_AUDITD_WATCHDOG)_RUN_OPT += -v /etc/localtime:/etc/localtime:ro - diff --git a/rules/docker-auditd.dep b/rules/docker-auditd.dep deleted file mode 100644 index 9aa4b2b3854..00000000000 --- a/rules/docker-auditd.dep +++ /dev/null @@ -1,10 +0,0 @@ -DPATH := $($(DOCKER_AUDITD)_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-auditd.mk rules/docker-auditd.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files $(DPATH)) - -$(DOCKER_AUDITD)_CACHE_MODE := GIT_CONTENT_SHA -$(DOCKER_AUDITD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(DOCKER_AUDITD)_DEP_FILES := $(DEP_FILES) - -$(eval $(call add_dbg_docker,$(DOCKER_AUDITD),$(DOCKER_AUDITD_DBG))) diff --git a/rules/docker-auditd.mk b/rules/docker-auditd.mk deleted file mode 100644 index 7b5e8d40779..00000000000 --- a/rules/docker-auditd.mk +++ /dev/null @@ -1,28 +0,0 @@ -# docker image for auditd - -DOCKER_AUDITD_STEM = docker-auditd -DOCKER_AUDITD = $(DOCKER_AUDITD_STEM).gz -DOCKER_AUDITD_DBG = $(DOCKER_AUDITD_STEM)-$(DBG_IMAGE_MARK).gz - -$(DOCKER_AUDITD)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) - -$(DOCKER_AUDITD)_PATH = $(DOCKERS_PATH)/$(DOCKER_AUDITD_STEM) - -$(DOCKER_AUDITD)_VERSION = 1.0.0 -$(DOCKER_AUDITD)_PACKAGE_NAME = auditd - -SONIC_DOCKER_IMAGES += $(DOCKER_AUDITD) -SONIC_BOOKWORM_DOCKERS += $(DOCKER_AUDITD) -SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_AUDITD) - -SONIC_DOCKER_DBG_IMAGES += $(DOCKER_AUDITD_DBG) -SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_AUDITD_DBG) -SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_AUDITD_DBG) - -$(DOCKER_AUDITD)_CONTAINER_NAME = auditd -$(DOCKER_AUDITD)_RUN_OPT += -t --privileged --pid=host -$(DOCKER_AUDITD)_RUN_OPT += -v /lib/systemd/system:/lib/systemd/system:rw -$(DOCKER_AUDITD)_RUN_OPT += -v /etc/audit:/etc/audit:rw -$(DOCKER_AUDITD)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro -$(DOCKER_AUDITD)_RUN_OPT += -v /etc/localtime:/etc/localtime:ro - diff --git a/rules/docker-base-bookworm.mk b/rules/docker-base-bookworm.mk index dbeebb4b9c8..90ff3967d5a 100644 --- a/rules/docker-base-bookworm.mk +++ b/rules/docker-base-bookworm.mk @@ -18,7 +18,13 @@ endif $(DOCKER_BASE_BOOKWORM)_PYTHON_WHEELS += $(SUPERVISOR) -$(DOCKER_BASE_BOOKWORM)_DBG_IMAGE_PACKAGES += $(GDB) $(GDBSERVER) $(VIM) $(OPENSSH) $(SSHPASS) $(STRACE) +$(DOCKER_BASE_BOOKWORM)_DBG_IMAGE_PACKAGES += $(GDB) $(GDBSERVER) $(VIM) $(SSHPASS) $(STRACE) + +ifeq ($(INCLUDE_FIPS), y) +$(DOCKER_BASE_BOOKWORM)_DBG_DEPENDS += $(FIPS_OPENSSH_CLIENT) +else +$(DOCKER_BASE_BOOKWORM)_DBG_IMAGE_PACKAGES += $(OPENSSH) +endif SONIC_DOCKER_IMAGES += $(DOCKER_BASE_BOOKWORM) SONIC_BOOKWORM_DOCKERS += $(DOCKER_BASE_BOOKWORM) diff --git a/rules/docker-base-trixie.dep b/rules/docker-base-trixie.dep new file mode 100644 index 00000000000..b71efe33578 --- /dev/null +++ b/rules/docker-base-trixie.dep @@ -0,0 +1,10 @@ + +DPATH := $($(DOCKER_BASE_TRIXIE)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-base-trixie.mk rules/docker-base-trixie.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) +DEP_FILES += dockers/dockerfile-macros.j2 + +$(DOCKER_BASE_TRIXIE)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_BASE_TRIXIE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_BASE_TRIXIE)_DEP_FILES := $(DEP_FILES) diff --git a/rules/docker-base-trixie.mk b/rules/docker-base-trixie.mk new file mode 100644 index 00000000000..5b7742fcc4f --- /dev/null +++ b/rules/docker-base-trixie.mk @@ -0,0 +1,29 @@ +# Docker base image (based on Debian Trixie) + +DOCKER_BASE_TRIXIE = docker-base-trixie.gz +$(DOCKER_BASE_TRIXIE)_PATH = $(DOCKERS_PATH)/docker-base-trixie + +$(DOCKER_BASE_TRIXIE)_DEPENDS += $(SOCAT) + +GDB = gdb +GDBSERVER = gdbserver +VIM = vim +OPENSSH = openssh-client +SSHPASS = sshpass +STRACE = strace + +ifeq ($(INCLUDE_FIPS), y) +$(DOCKER_BASE_TRIXIE)_DEPENDS += $(FIPS_OPENSSL_LIBSSL) $(FIPS_OPENSSL_LIBSSL_DEV) $(FIPS_OPENSSL) $(SYMCRYPT_OPENSSL) \ + $(FIPS_KRB5) $(FIPS_KRB5_SUPPORT0) $(FIPS_KRB5_3) $(FIPS_KRB5_LIBGSSAPI) +endif + +$(DOCKER_BASE_TRIXIE)_DBG_IMAGE_PACKAGES += $(GDB) $(GDBSERVER) $(VIM) $(SSHPASS) $(STRACE) + +ifeq ($(INCLUDE_FIPS), y) +$(DOCKER_BASE_TRIXIE)_DBG_DEPENDS += $(FIPS_OPENSSH_CLIENT) +else +$(DOCKER_BASE_TRIXIE)_DBG_IMAGE_PACKAGES += $(OPENSSH) +endif + +SONIC_DOCKER_IMAGES += $(DOCKER_BASE_TRIXIE) +SONIC_TRIXIE_DOCKERS += $(DOCKER_BASE_TRIXIE) diff --git a/rules/docker-config-engine-trixie.dep b/rules/docker-config-engine-trixie.dep new file mode 100644 index 00000000000..57de1bfb251 --- /dev/null +++ b/rules/docker-config-engine-trixie.dep @@ -0,0 +1,10 @@ + +DPATH := $($(DOCKER_CONFIG_ENGINE_TRIXIE)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-config-engine-trixie.mk rules/docker-config-engine-trixie.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) +DEP_FILES += dockers/dockerfile-macros.j2 + +$(DOCKER_CONFIG_ENGINE_TRIXIE)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_CONFIG_ENGINE_TRIXIE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_DEP_FILES := $(DEP_FILES) diff --git a/rules/docker-config-engine-trixie.mk b/rules/docker-config-engine-trixie.mk new file mode 100644 index 00000000000..59bbd5f4e75 --- /dev/null +++ b/rules/docker-config-engine-trixie.mk @@ -0,0 +1,38 @@ +# docker image for sonic config engine + +DOCKER_CONFIG_ENGINE_TRIXIE = docker-config-engine-trixie.gz +$(DOCKER_CONFIG_ENGINE_TRIXIE)_PATH = $(DOCKERS_PATH)/docker-config-engine-trixie + +$(DOCKER_CONFIG_ENGINE_TRIXIE)_DEPENDS += $(LIBSWSSCOMMON) \ + $(LIBYANG) \ + $(LIBYANG_CPP) \ + $(LIBYANG_PY3) \ + $(PYTHON3_SWSSCOMMON) \ + $(SONIC_DB_CLI) \ + $(SONIC_EVENTD) \ + $(SONIC_SUPERVISORD_UTILITIES_RS) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \ + $(SONIC_YANG_MGMT_PY3) \ + $(SONIC_YANG_MODELS_PY3) \ + $(SONIC_CONTAINERCFGD) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY3) \ + $(SONIC_SUPERVISORD_UTILITIES) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_LOAD_DOCKERS += $(DOCKER_BASE_TRIXIE) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_FILES += $(SWSS_VARS_TEMPLATE) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_FILES += $(RSYSLOG_PLUGIN_CONF_J2) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_FILES += $($(SONIC_CTRMGRD)_CONTAINER_SCRIPT) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_FILES += $($(SONIC_CTRMGRD)_HEALTH_PROBE) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_FILES += $($(SONIC_CTRMGRD)_STARTUP_SCRIPT) + +$(DOCKER_CONFIG_ENGINE_TRIXIE)_DBG_DEPENDS = $($(DOCKER_BASE_TRIXIE)_DBG_DEPENDS) \ + $(LIBSWSSCOMMON_DBG) \ + $(LIBYANG_DBG) \ + $(LIBYANG_CPP_DBG) \ + $(LIBYANG_PY3_DBG) \ + $(PYTHON3_SWSSCOMMON_DBG) \ + $(SONIC_DB_CLI_DBG) \ + $(SONIC_EVENTD_DBG) +$(DOCKER_CONFIG_ENGINE_TRIXIE)_DBG_IMAGE_PACKAGES = $($(DOCKER_BASE_TRIXIE)_DBG_IMAGE_PACKAGES) + +SONIC_DOCKER_IMAGES += $(DOCKER_CONFIG_ENGINE_TRIXIE) +SONIC_TRIXIE_DOCKERS += $(DOCKER_CONFIG_ENGINE_TRIXIE) diff --git a/rules/docker-gnmi-sidecar.dep b/rules/docker-gnmi-sidecar.dep new file mode 100644 index 00000000000..23b114ab437 --- /dev/null +++ b/rules/docker-gnmi-sidecar.dep @@ -0,0 +1,10 @@ +DPATH := $($(DOCKER_GNMI_SIDECAR)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-gnmi-sidecar.mk rules/docker-gnmi-sidecar.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) + +$(DOCKER_GNMI_SIDECAR)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_GNMI_SIDECAR)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_GNMI_SIDECAR)_DEP_FILES := $(DEP_FILES) + +$(eval $(call add_dbg_docker,$(DOCKER_GNMI_SIDECAR),$(DOCKER_GNMI_SIDECAR_DBG))) diff --git a/rules/docker-gnmi-sidecar.mk b/rules/docker-gnmi-sidecar.mk new file mode 100644 index 00000000000..44b962b4639 --- /dev/null +++ b/rules/docker-gnmi-sidecar.mk @@ -0,0 +1,47 @@ +# docker image for docker-gnmi-sidecar + +DOCKER_GNMI_SIDECAR_STEM = docker-gnmi-sidecar +DOCKER_GNMI_SIDECAR = $(DOCKER_GNMI_SIDECAR_STEM).gz +DOCKER_GNMI_SIDECAR_DBG = $(DOCKER_GNMI_SIDECAR_STEM)-$(DBG_IMAGE_MARK).gz + +$(DOCKER_GNMI_SIDECAR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) + +$(DOCKER_GNMI_SIDECAR)_PATH = $(DOCKERS_PATH)/$(DOCKER_GNMI_SIDECAR_STEM) + +$(DOCKER_GNMI_SIDECAR)_VERSION = 1.0.0 +$(DOCKER_GNMI_SIDECAR)_PACKAGE_NAME = gnmi-sidecar + +SONIC_DOCKER_IMAGES += $(DOCKER_GNMI_SIDECAR) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_GNMI_SIDECAR) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_GNMI_SIDECAR) + +SONIC_DOCKER_DBG_IMAGES += $(DOCKER_GNMI_SIDECAR_DBG) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_GNMI_SIDECAR_DBG) +SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_GNMI_SIDECAR_DBG) + + +$(DOCKER_GNMI_SIDECAR)_DEPENDS += $(LIBSWSSCOMMON) + +$(DOCKER_GNMI_SIDECAR)_INSTALL_PYTHON_WHEELS = $(SONIC_PY_COMMON_PY3) + +$(DOCKER_GNMI_SIDECAR)_INSTALL_DEBS = $(LIBSWSSCOMMON) \ + $(PYTHON3_SWSSCOMMON) \ + $(LIBYANG_PY3) + +$(DOCKER_GNMI_SIDECAR)_CONTAINER_NAME = gnmi-sidecar +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += -t --pid=host +# Container hardening: Replace --privileged with specific capabilities +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += --cap-add=SYS_ADMIN +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += --cap-add=SYS_PTRACE +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += --cap-add=DAC_OVERRIDE +# Security options needed for nsenter to access host namespaces +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += --security-opt apparmor=unconfined +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += --security-opt seccomp=unconfined +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += -v /lib/systemd/system:/lib/systemd/system:rw +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += -v /etc/audit:/etc/audit:rw +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_GNMI_SIDECAR)_RUN_OPT += -v /etc/localtime:/etc/localtime:ro + +$(DOCKER_GNMI_SIDECAR)_FILES += $(CONTAINER_CHECKER) +$(DOCKER_GNMI_SIDECAR)_FILES += $(GNMI_SYSTEMD) +$(DOCKER_GNMI_SIDECAR)_FILES += $(K8S_POD_CONTROL) diff --git a/rules/docker-gnmi.mk b/rules/docker-gnmi.mk index 58a786e4f9d..2f5a2e50e3d 100644 --- a/rules/docker-gnmi.mk +++ b/rules/docker-gnmi.mk @@ -42,8 +42,15 @@ $(DOCKER_GNMI)_RUN_OPT += -v /tmp:/mnt/host/tmp:rw $(DOCKER_GNMI)_RUN_OPT += -v /var/tmp:/mnt/host/var/tmp:rw # For host command execution in gnoi. $(DOCKER_GNMI)_RUN_OPT += --pid=host -# For host command execution in gnoi. -$(DOCKER_GNMI)_RUN_OPT += --privileged +# Container hardening: Replace --privileged with specific capabilities +$(DOCKER_GNMI)_RUN_OPT += --cap-add=SYS_ADMIN +$(DOCKER_GNMI)_RUN_OPT += --cap-add=SYS_BOOT +$(DOCKER_GNMI)_RUN_OPT += --cap-add=SYS_PTRACE +$(DOCKER_GNMI)_RUN_OPT += --cap-add=NET_ADMIN +$(DOCKER_GNMI)_RUN_OPT += --cap-add=DAC_OVERRIDE +# Security options needed for nsenter to access host namespaces from within container +$(DOCKER_GNMI)_RUN_OPT += --security-opt apparmor=unconfined +$(DOCKER_GNMI)_RUN_OPT += --security-opt seccomp=unconfined # For GNOI running sudo command in case of container NS remapping. $(DOCKER_GNMI)_RUN_OPT += --userns=host diff --git a/rules/docker-restapi-sidecar.dep b/rules/docker-restapi-sidecar.dep new file mode 100644 index 00000000000..e6244f910a7 --- /dev/null +++ b/rules/docker-restapi-sidecar.dep @@ -0,0 +1,10 @@ +DPATH := $($(DOCKER_RESTAPI_SIDECAR)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-restapi-sidecar.mk rules/docker-restapi-sidecar.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) + +$(DOCKER_RESTAPI_SIDECAR)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_RESTAPI_SIDECAR)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_RESTAPI_SIDECAR)_DEP_FILES := $(DEP_FILES) + +$(eval $(call add_dbg_docker,$(DOCKER_RESTAPI_SIDECAR),$(DOCKER_RESTAPI_SIDECAR_DBG))) diff --git a/rules/docker-restapi-sidecar.mk b/rules/docker-restapi-sidecar.mk new file mode 100644 index 00000000000..df0384980a0 --- /dev/null +++ b/rules/docker-restapi-sidecar.mk @@ -0,0 +1,44 @@ +# docker image for docker-restapi-sidecar + +DOCKER_RESTAPI_SIDECAR_STEM = docker-restapi-sidecar +DOCKER_RESTAPI_SIDECAR = $(DOCKER_RESTAPI_SIDECAR_STEM).gz +DOCKER_RESTAPI_SIDECAR_DBG = $(DOCKER_RESTAPI_SIDECAR_STEM)-$(DBG_IMAGE_MARK).gz + +$(DOCKER_RESTAPI_SIDECAR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) + +$(DOCKER_RESTAPI_SIDECAR)_PATH = $(DOCKERS_PATH)/$(DOCKER_RESTAPI_SIDECAR_STEM) + +$(DOCKER_RESTAPI_SIDECAR)_VERSION = 1.0.0 +$(DOCKER_RESTAPI_SIDECAR)_PACKAGE_NAME = restapi-sidecar + +SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI_SIDECAR) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_RESTAPI_SIDECAR) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_RESTAPI_SIDECAR) + +SONIC_DOCKER_DBG_IMAGES += $(DOCKER_RESTAPI_SIDECAR_DBG) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_RESTAPI_SIDECAR_DBG) +SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_RESTAPI_SIDECAR_DBG) + + +$(DOCKER_RESTAPI_SIDECAR)_DEPENDS += $(LIBSWSSCOMMON) + +$(DOCKER_RESTAPI_SIDECAR)_INSTALL_PYTHON_WHEELS = $(SONIC_PY_COMMON_PY3) + +$(DOCKER_RESTAPI_SIDECAR)_INSTALL_DEBS = $(LIBSWSSCOMMON) \ + $(PYTHON3_SWSSCOMMON) \ + $(LIBYANG_PY3) + +$(DOCKER_RESTAPI_SIDECAR)_CONTAINER_NAME = restapi-sidecar +# NOTE: This container must run in privileged mode with host PID namespace so that +# nsenter can access host namespaces and systemd-related scripts/files can be +# synchronized with the host system. This grants broad host access and should be +# restricted to environments where this level of privilege is acceptable. +$(DOCKER_RESTAPI_SIDECAR)_RUN_OPT += -t --privileged --pid=host +$(DOCKER_RESTAPI_SIDECAR)_RUN_OPT += -v /lib/systemd/system:/lib/systemd/system:rw +$(DOCKER_RESTAPI_SIDECAR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_RESTAPI_SIDECAR)_RUN_OPT += -v /etc/localtime:/etc/localtime:ro + +$(DOCKER_RESTAPI_SIDECAR)_FILES += $(CONTAINER_CHECKER) +$(DOCKER_RESTAPI_SIDECAR)_FILES += $(RESTAPI_SYSTEMD) +$(DOCKER_RESTAPI_SIDECAR)_FILES += $(K8S_POD_CONTROL) + diff --git a/rules/docker-restapi-watchdog.dep b/rules/docker-restapi-watchdog.dep new file mode 100644 index 00000000000..811bce80959 --- /dev/null +++ b/rules/docker-restapi-watchdog.dep @@ -0,0 +1,10 @@ +DPATH := $($(DOCKER_RESTAPI_WATCHDOG)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-restapi-watchdog.mk rules/docker-restapi-watchdog.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) + +$(DOCKER_RESTAPI_WATCHDOG)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_RESTAPI_WATCHDOG)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_RESTAPI_WATCHDOG)_DEP_FILES := $(DEP_FILES) + +$(eval $(call add_dbg_docker,$(DOCKER_RESTAPI_WATCHDOG),$(DOCKER_RESTAPI_WATCHDOG_DBG))) diff --git a/rules/docker-restapi-watchdog.mk b/rules/docker-restapi-watchdog.mk new file mode 100644 index 00000000000..b8fd9a71d0c --- /dev/null +++ b/rules/docker-restapi-watchdog.mk @@ -0,0 +1,27 @@ +# docker image for restapi watchdog + +DOCKER_RESTAPI_WATCHDOG_STEM = docker-restapi-watchdog +DOCKER_RESTAPI_WATCHDOG = $(DOCKER_RESTAPI_WATCHDOG_STEM).gz +DOCKER_RESTAPI_WATCHDOG_DBG = $(DOCKER_RESTAPI_WATCHDOG_STEM)-$(DBG_IMAGE_MARK).gz + +$(DOCKER_RESTAPI_WATCHDOG)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) +$(DOCKER_RESTAPI_WATCHDOG)_PATH = $(DOCKERS_PATH)/$(DOCKER_RESTAPI_WATCHDOG_STEM) + +$(DOCKER_RESTAPI_WATCHDOG)_VERSION = 1.0.0 +$(DOCKER_RESTAPI_WATCHDOG)_PACKAGE_NAME = restapi_watchdog + +SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI_WATCHDOG) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_RESTAPI_WATCHDOG) +ifeq ($(INCLUDE_RESTAPI), y) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_RESTAPI_WATCHDOG) +endif + +SONIC_DOCKER_DBG_IMAGES += $(DOCKER_RESTAPI_WATCHDOG_DBG) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_RESTAPI_WATCHDOG_DBG) +ifeq ($(INCLUDE_RESTAPI), y) +SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_RESTAPI_WATCHDOG_DBG) +endif + +$(DOCKER_RESTAPI_WATCHDOG)_CONTAINER_NAME = restapi_watchdog +$(DOCKER_RESTAPI_WATCHDOG)_RUN_OPT += -t +$(DOCKER_RESTAPI_WATCHDOG)_RUN_OPT += -v /etc/localtime:/etc/localtime:ro diff --git a/rules/docker-swss-layer-trixie.dep b/rules/docker-swss-layer-trixie.dep new file mode 100644 index 00000000000..e71bb4e235f --- /dev/null +++ b/rules/docker-swss-layer-trixie.dep @@ -0,0 +1,10 @@ + +DPATH := $($(DOCKER_SWSS_LAYER_TRIXIE)_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-swss-layer-trixie.mk rules/docker-swss-layer-trixie.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(DPATH)) +DEP_FILES += dockers/dockerfile-macros.j2 + +$(DOCKER_SWSS_LAYER_TRIXIE)_CACHE_MODE := GIT_CONTENT_SHA +$(DOCKER_SWSS_LAYER_TRIXIE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(DOCKER_SWSS_LAYER_TRIXIE)_DEP_FILES := $(DEP_FILES) diff --git a/rules/docker-swss-layer-trixie.mk b/rules/docker-swss-layer-trixie.mk new file mode 100644 index 00000000000..5f97c82fdfb --- /dev/null +++ b/rules/docker-swss-layer-trixie.mk @@ -0,0 +1,14 @@ +# trixie-based docker image for sonic swss layer + +DOCKER_SWSS_LAYER_TRIXIE = docker-swss-layer-trixie.gz +$(DOCKER_SWSS_LAYER_TRIXIE)_PATH = $(DOCKERS_PATH)/docker-swss-layer-trixie + +$(DOCKER_SWSS_LAYER_TRIXIE)_DEPENDS += $(SWSS) +$(DOCKER_SWSS_LAYER_TRIXIE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_TRIXIE) + +$(DOCKER_SWSS_LAYER_TRIXIE)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_TRIXIE)_DBG_DEPENDS) \ + $(SWSS_DBG) +$(DOCKER_SWSS_LAYER_TRIXIE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_TRIXIE)_DBG_IMAGE_PACKAGES) + +SONIC_DOCKER_IMAGES += $(DOCKER_SWSS_LAYER_TRIXIE) +SONIC_TRIXIE_DOCKERS += $(DOCKER_SWSS_LAYER_TRIXIE) diff --git a/rules/docker-telemetry-sidecar.mk b/rules/docker-telemetry-sidecar.mk index 1754be61095..85660878f7f 100644 --- a/rules/docker-telemetry-sidecar.mk +++ b/rules/docker-telemetry-sidecar.mk @@ -21,6 +21,9 @@ SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_TELEMETRY_SIDECAR_DBG) $(DOCKER_TELEMETRY_SIDECAR)_DEPENDS += $(LIBSWSSCOMMON) + +$(DOCKER_TELEMETRY_SIDECAR)_INSTALL_PYTHON_WHEELS = $(SONIC_PY_COMMON_PY3) + $(DOCKER_TELEMETRY_SIDECAR)_INSTALL_DEBS = $(LIBSWSSCOMMON) \ $(PYTHON3_SWSSCOMMON) \ $(LIBYANG_PY3) @@ -36,10 +39,3 @@ $(DOCKER_TELEMETRY_SIDECAR)_FILES += $(CONTAINER_CHECKER) $(DOCKER_TELEMETRY_SIDECAR)_FILES += $(TELEMETRY_SYSTEMD) $(DOCKER_TELEMETRY_SIDECAR)_FILES += $(K8S_POD_CONTROL) -.PHONY: docker-telemetry-sidecar-ut -docker-telemetry-sidecar-ut: $(PYTHON_WHEELS_PATH)/sonic_py_common-1.0-py3-none-any.whl-install - @echo "Running unit tests for systemd_stub.py..." - @PYTHONPATH=dockers/docker-telemetry-sidecar \ - python3 -m pytest -q dockers/docker-telemetry-sidecar/cli-plugin-tests - -target/docker-telemetry-sidecar.gz: docker-telemetry-sidecar-ut diff --git a/rules/libyang.mk b/rules/libyang.mk index bdb70c31cf7..8fb732c33b3 100644 --- a/rules/libyang.mk +++ b/rules/libyang.mk @@ -13,12 +13,8 @@ ifeq ($(BLDENV),trixie) $(LIBYANG)_DEPENDS += $(LIBPCRE3_DEV) $(LIBPCRE3) $(LIBPCRE16_3) $(LIBPCRE32_3) $(LIBPCRECPP0V5) $(LIBYANG)_RDEPENDS += $(LIBPCRE3) endif +$(LIBYANG)_PHONIES += $(LIBYANG3-DEV-DONE) $(LIBYANG)_SRC_PATH = $(SRC_PATH)/libyang -ifeq ($(BLDENV),bookworm) -# introduce artifical dependency between LIBYANG and FRR -# make sure LIBYANG is compile after FRR -$(LIBYANG)_AFTER = $(FRR) -endif SONIC_MAKE_DEBS += $(LIBYANG) LIBYANG_DEV = libyang-dev_$(LIBYANG_VERSION)_$(CONFIGURED_ARCH).deb diff --git a/rules/libyang3-dev-done.dep b/rules/libyang3-dev-done.dep new file mode 100644 index 00000000000..c93c19c8563 --- /dev/null +++ b/rules/libyang3-dev-done.dep @@ -0,0 +1,9 @@ + +SPATH := +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang3-dev-done.mk rules/libyang3-dev-done.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) + +$(LIBYANG3-DEV-DONE)_CACHE_MODE := none +$(LIBYANG3-DEV-DONE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(LIBYANG3-DEV-DONE)_DEP_FILES := $(DEP_FILES) + diff --git a/rules/libyang3-dev-done.mk b/rules/libyang3-dev-done.mk new file mode 100644 index 00000000000..e9d0c3bd3fd --- /dev/null +++ b/rules/libyang3-dev-done.mk @@ -0,0 +1,21 @@ +# libyang1-dev and libyang3-dev are not designed to coexist. The way +# SONiC builds, however, it depends on libyang3-dev being installed first +# and anything that needs it being built then, and only then, should +# libyang1-dev be installed, and the remaining packages can then be +# built. +# +# Any package that relies directly on $(LIBYANG3_DEV) needs to be listed +# as a dependency for libyang3-dev-done. +# +# libyang1 won't even be built until everything needing libyang3-dev is +# done. + +LIBYANG3-DEV-DONE = libyang3-dev-done +$(LIBYANG3-DEV-DONE)_DEPENDS = $(LIBYANG3_PY3) + +# Not compiling FRR for Trixie +ifeq ($(BLDENV),bookworm) +$(LIBYANG3-DEV-DONE)_DEPENDS += $(FRR) +endif + +SONIC_PHONIES += $(LIBYANG3-DEV-DONE) diff --git a/rules/scripts.mk b/rules/scripts.mk index e30c29234a2..cb58385e7fa 100644 --- a/rules/scripts.mk +++ b/rules/scripts.mk @@ -26,6 +26,12 @@ $(CONTAINER_CHECKER)_PATH = files/image_config/monit TELEMETRY_SYSTEMD = telemetry.sh $(TELEMETRY_SYSTEMD)_PATH = files/scripts +GNMI_SYSTEMD = gnmi.sh +$(GNMI_SYSTEMD)_PATH = files/scripts + +RESTAPI_SYSTEMD = restapi.sh +$(RESTAPI_SYSTEMD)_PATH = files/scripts + K8S_POD_CONTROL = k8s_pod_control.sh $(K8S_POD_CONTROL)_PATH = files/scripts @@ -53,6 +59,8 @@ SONIC_COPY_FILES += $(CONFIGDB_LOAD_SCRIPT) \ $(SYSCTL_NET_CONFIG) \ $(CONTAINER_CHECKER) \ $(TELEMETRY_SYSTEMD) \ + $(GNMI_SYSTEMD) \ + $(RESTAPI_SYSTEMD) \ $(K8S_POD_CONTROL) \ $(UPDATE_CHASSISDB_CONFIG_SCRIPT) \ $(SWSS_VARS_TEMPLATE) \ diff --git a/rules/snmpd.mk b/rules/snmpd.mk index 83d9103da5b..fe0aa9caf91 100644 --- a/rules/snmpd.mk +++ b/rules/snmpd.mk @@ -3,10 +3,10 @@ # TODO(trixie): Update version to version in Trixie ifeq ($(BLDENV),trixie) SNMPD_VERSION = 5.9.4+dfsg -SNMPD_VERSION_FULL = $(SNMPD_VERSION)-2 +SNMPD_VERSION_FULL = $(SNMPD_VERSION)-2+deb13u1 else ifeq ($(BLDENV),bookworm) SNMPD_VERSION = 5.9.3+dfsg -SNMPD_VERSION_FULL = $(SNMPD_VERSION)-2 +SNMPD_VERSION_FULL = $(SNMPD_VERSION)-2+deb12u1 else ifeq ($(BLDENV),bullseye) SNMPD_VERSION = 5.9+dfsg SNMPD_VERSION_FULL = $(SNMPD_VERSION)-4+deb11u1 diff --git a/rules/sonic-fips.mk b/rules/sonic-fips.mk index 398b8df39d6..fc7147ef73b 100644 --- a/rules/sonic-fips.mk +++ b/rules/sonic-fips.mk @@ -34,7 +34,7 @@ FIPS_GOLANG_VERSION = 1.15.15-1~deb11u4+fips FIPS_KRB5_VERSION = 1.18.3-6+deb11u5+fips endif -FIPS_URL_PREFIX = https://packages.trafficmanager.net/public/fips/$(BLDENV)/$(FIPS_VERSION)/$(CONFIGURED_ARCH) +FIPS_URL_PREFIX = $(BUILD_PUBLIC_URL)/fips/$(BLDENV)/$(FIPS_VERSION)/$(CONFIGURED_ARCH) SYMCRYPT_OPENSSL_NAME = symcrypt-openssl SYMCRYPT_OPENSSL = $(SYMCRYPT_OPENSSL_NAME)_$(FIPS_VERSION)_$(CONFIGURED_ARCH).deb diff --git a/rules/sonic-utilities-data.mk b/rules/sonic-utilities-data.mk index 8eca8b1c973..4e8aa141011 100644 --- a/rules/sonic-utilities-data.mk +++ b/rules/sonic-utilities-data.mk @@ -2,4 +2,5 @@ SONIC_UTILITIES_DATA = sonic-utilities-data_1.0-1_all.deb $(SONIC_UTILITIES_DATA)_SRC_PATH = $(SRC_PATH)/sonic-utilities/sonic-utilities-data +$(SONIC_UTILITIES_DATA)_WHEEL_DEPENDS = $(SONIC_UTILITIES_PY3) SONIC_DPKG_DEBS += $(SONIC_UTILITIES_DATA) diff --git a/rules/supervisor.mk b/rules/supervisor.mk index 0681a207cf3..f55fb333006 100644 --- a/rules/supervisor.mk +++ b/rules/supervisor.mk @@ -1,6 +1,6 @@ # supervisor python3 wheel -SUPERVISOR = supervisor-4.2.5-py2.py3-none-any.whl +SUPERVISOR = supervisor-4.3.0-py2.py3-none-any.whl $(SUPERVISOR)_SRC_PATH = $(SRC_PATH)/supervisor $(SUPERVISOR)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SUPERVISOR) diff --git a/rules/vpp.mk b/rules/vpp.mk index 00b5c1903a7..0c9e61e7bd1 100644 --- a/rules/vpp.mk +++ b/rules/vpp.mk @@ -22,27 +22,9 @@ LIBNUMA := $(shell apt-get download --print-uris libnuma1 | cut -d " " -f2) $(LIBNUMA)_URL := $(shell apt-get download --print-uris libnuma1 | cut -d " " -f1) SONIC_ONLINE_DEBS += $(LIBNUMA) -LIBMBEDCRYPTO3 := $(shell apt-get download --print-uris libmbedcrypto3 | cut -d " " -f2) -$(LIBMBEDCRYPTO3)_URL := $(shell apt-get download --print-uris libmbedcrypto3 | cut -d " " -f1) -SONIC_ONLINE_DEBS += $(LIBMBEDCRYPTO3) - - -LIBMBEDX509 := $(shell apt-get download --print-uris libmbedx509-0 | cut -d " " -f2) -$(LIBMBEDX509)_URL := $(shell apt-get download --print-uris libmbedx509-0 | cut -d " " -f1) -SONIC_ONLINE_DEBS += $(LIBMBEDX509) -$(LIBMBEDX509)_DEPENDS += $(LIBMBEDCRYPTO3) -$(LIBMBEDX509)_RDEPENDS += $(LIBMBEDCRYPTO3) - - -LIBMBEDTLS12 := $(shell apt-get download --print-uris libmbedtls12 | cut -d " " -f2) -$(LIBMBEDTLS12)_URL := $(shell apt-get download --print-uris libmbedtls12 | cut -d " " -f1) -SONIC_ONLINE_DEBS += $(LIBMBEDTLS12) -$(LIBMBEDTLS12)_DEPENDS += $(LIBMBEDCRYPTO3) $(LIBMBEDX509) -$(LIBMBEDTLS12)_RDEPENDS += $(LIBMBEDCRYPTO3) $(LIBMBEDX509) - VPP_PLUGIN_CORE = vpp-plugin-core_$(VPP_VERSION_SONIC)_$(CONFIGURED_ARCH).deb -$(VPP_PLUGIN_CORE)_DEPENDS += $(LIBMBEDCRYPTO3) $(LIBMBEDX509) $(LIBMBEDTLS12) $(VPP_MAIN) -$(VPP_PLUGIN_CORE)_RDEPENDS += $(LIBMBEDCRYPTO3) $(LIBMBEDX509) $(LIBMBEDTLS12) $(VPP_MAIN) +$(VPP_PLUGIN_CORE)_DEPENDS += $(VPP_MAIN) +$(VPP_PLUGIN_CORE)_RDEPENDS += $(VPP_MAIN) $(eval $(call add_derived_package,$(VPPINFRA),$(VPP_PLUGIN_CORE))) VPP_PLUGIN_DPDK = vpp-plugin-dpdk_$(VPP_VERSION_SONIC)_$(CONFIGURED_ARCH).deb diff --git a/scripts/build_debian_base_system.sh b/scripts/build_debian_base_system.sh index d4e4ab0593e..3e3b6242382 100755 --- a/scripts/build_debian_base_system.sh +++ b/scripts/build_debian_base_system.sh @@ -23,10 +23,11 @@ generate_version_file() sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "dpkg-query -W -f '\${Package}==\${Version}\n'" > $TARGET_BASEIMAGE_PATH/versions-deb-${IMAGE_DISTRO}-${CONFIGURED_ARCH} } -MIRROR_URL=http://deb.debian.org/debian if [ "$MIRROR_SNAPSHOT" == y ]; then SNAPSHOT_TIMESTAMP=$(grep "^debian==" $TARGET/versions/default/versions-mirror | tail -n 1 | sed 's/.*==//') - MIRROR_URL=http://packages.trafficmanager.net/snapshot/debian/$SNAPSHOT_TIMESTAMP + MIRROR_URL=$BUILD_SNAPSHOT_URL/debian/$SNAPSHOT_TIMESTAMP +else + MIRROR_URL=http://deb.debian.org/debian fi if [ "$ENABLE_VERSION_CONTROL_DEB" != "y" ] || [ ! -d files/build/versions/host-base-image ]; then diff --git a/scripts/build_mirror_config.sh b/scripts/build_mirror_config.sh index 7686997657c..b264c5933de 100755 --- a/scripts/build_mirror_config.sh +++ b/scripts/build_mirror_config.sh @@ -43,11 +43,11 @@ if [ "$MIRROR_SNAPSHOT" == y ]; then DEBIAN_SECURITY_TIMESTAMP=$(curl $DEFAULT_MIRROR_URL_PREFIX/debian-snapshot/debian-security/latest) fi - DEFAULT_MIRROR_URLS=http://deb.debian.org/debian/,http://packages.trafficmanager.net/snapshot/debian/$DEBIAN_TIMESTAMP/ - DEFAULT_MIRROR_SECURITY_URLS=http://deb.debian.org/debian-security/,http://packages.trafficmanager.net/snapshot/debian-security/$DEBIAN_SECURITY_TIMESTAMP/ + DEFAULT_MIRROR_URLS=http://deb.debian.org/debian/,$BUILD_SNAPSHOT_URL/debian/$DEBIAN_TIMESTAMP/ + DEFAULT_MIRROR_SECURITY_URLS=http://deb.debian.org/debian-security/,$BUILD_SNAPSHOT_URL/debian-security/$DEBIAN_SECURITY_TIMESTAMP/ if [ "$DISTRIBUTION" == "buster" ] || [ "$DISTRIBUTION" == "bullseye" ]; then - DEFAULT_MIRROR_URLS=http://archive.debian.org/debian/,http://packages.trafficmanager.net/snapshot/debian/$DEBIAN_TIMESTAMP/ + DEFAULT_MIRROR_URLS=http://archive.debian.org/debian/,$BUILD_SNAPSHOT_URL/debian/$DEBIAN_TIMESTAMP/ fi mkdir -p target/versions/default @@ -68,8 +68,10 @@ TEMPLATE=files/apt/sources.list.j2 MIRROR_URLS=$MIRROR_URLS MIRROR_SECURITY_URLS=$MIRROR_SECURITY_URLS j2 $TEMPLATE | sed '/^$/N;/^\n$/D' > $CONFIG_PATH/sources.list.$ARCHITECTURE if [ "$MIRROR_SNAPSHOT" == y ]; then + # Escape special characters in BUILD_SNAPSHOT_URL for use in sed regex + ESCAPED_MIRROR_URL=$(echo "$BUILD_SNAPSHOT_URL" | sed 's/[\/&.]/\\&/g') # Set the snapshot mirror, and add the SET_REPR_MIRRORS flag - sed -i -e "/^#*deb.*packages.trafficmanager.net/! s/^#*deb/#&/" -e "\$a#SET_REPR_MIRRORS" $CONFIG_PATH/sources.list.$ARCHITECTURE + sed -i -e "/^#*deb.*$ESCAPED_MIRROR_URL/! s/^#*deb/#&/" -e "\$a#SET_REPR_MIRRORS" $CONFIG_PATH/sources.list.$ARCHITECTURE fi # Handle apt retry count config diff --git a/scripts/generate_buildinfo_config.sh b/scripts/generate_buildinfo_config.sh index d0bfb942ec4..749113b1f5a 100755 --- a/scripts/generate_buildinfo_config.sh +++ b/scripts/generate_buildinfo_config.sh @@ -6,10 +6,12 @@ BUILDINFO_CONFIG=$BUILDINFO_PATH/buildinfo/config/buildinfo.config mkdir -p $BUILDINFO_PATH/buildinfo/config -echo "export PACKAGE_URL_PREFIX=$PACKAGE_URL_PREFIX" > $BUILDINFO_CONFIG +echo "export BUILD_PACKAGES_URL=$BUILD_PACKAGES_URL" > $BUILDINFO_CONFIG echo "export SONIC_VERSION_CONTROL_COMPONENTS=$SONIC_VERSION_CONTROL_COMPONENTS" >> $BUILDINFO_CONFIG echo "export SONIC_VERSION_CACHE=${SONIC_VERSION_CACHE}" >> $BUILDINFO_CONFIG echo "export SONIC_VERSION_CACHE_SOURCE=${SONIC_VERSION_CACHE_SOURCE}" >> $BUILDINFO_CONFIG echo "export DISTRO=${DISTRO}" >> $BUILDINFO_CONFIG echo "export MIRROR_SNAPSHOT=$MIRROR_SNAPSHOT" >> $BUILDINFO_CONFIG +echo "export BUILD_PUBLIC_URL=$BUILD_PUBLIC_URL" >> $BUILDINFO_CONFIG +echo "export BUILD_SNAPSHOT_URL=$BUILD_SNAPSHOT_URL" >> $BUILDINFO_CONFIG echo "export PIP_HTTP_TIMEOUT=$PIP_HTTP_TIMEOUT" >> $BUILDINFO_CONFIG diff --git a/scripts/prerequisites.sh b/scripts/prerequisites.sh index b7cce6faaf8..47f830ef0d4 100644 --- a/scripts/prerequisites.sh +++ b/scripts/prerequisites.sh @@ -36,11 +36,12 @@ run_step "Installing prerequisites (python3-pip, git)" \ sudo apt install -y python3-pip git run_step "Installing jinjanator (j2)" \ - bash -c 'pip3 install --user jinjanator || sudo apt install j2cli' + bash -c 'pip3 install --user jinjanator || sudo apt-get install -y j2cli' echo "==> Testing j2 availability..." if ! command -v j2 >/dev/null 2>&1; then echo "[ERROR] j2 is not runnable." + echo "If installed via pip, ensure ~/.local/bin is in your PATH." echo "Please logout and login, then run the script again." exit 1 else diff --git a/scripts/process_log.sh b/scripts/process_log.sh index 9977535ed81..ffc3c18117c 100755 --- a/scripts/process_log.sh +++ b/scripts/process_log.sh @@ -1,5 +1,11 @@ #!/bin/bash +# Exit immediately when receiving SIGINT/SIGTERM so that Ctrl-C during +# a build actually stops the process pipeline instead of leaving +# process_log.sh running (and blocking make from exiting). +trap 'exit 130' INT +trap 'exit 143' TERM + add_timestamp="" while getopts ":t" opt; do @@ -16,5 +22,3 @@ while IFS= read -r line; do fi printf '%s\n' "$line" done - - diff --git a/slave.mk b/slave.mk index 7aa74ef48e3..348388b6882 100644 --- a/slave.mk +++ b/slave.mk @@ -30,6 +30,7 @@ DOCKERS_PATH = dockers BLDENV := $(shell lsb_release -cs) DEBS_PATH = $(TARGET_PATH)/debs/$(BLDENV) FILES_PATH = $(TARGET_PATH)/files/$(BLDENV) +PHONY_PATH = $(TARGET_PATH)/phony/$(BLDENV) PYTHON_DEBS_PATH = $(TARGET_PATH)/python-debs/$(BLDENV) PYTHON_WHEELS_PATH = $(TARGET_PATH)/python-wheels/$(BLDENV) PROJECT_ROOT := $(shell pwd) @@ -43,8 +44,11 @@ BULLSEYE_DEBS_PATH = $(TARGET_PATH)/debs/bullseye BULLSEYE_FILES_PATH = $(TARGET_PATH)/files/bullseye BOOKWORM_DEBS_PATH = $(TARGET_PATH)/debs/bookworm BOOKWORM_FILES_PATH = $(TARGET_PATH)/files/bookworm +BOOKWORM_PHONY_PATH = $(TARGET_PATH)/phony/bookworm TRIXIE_DEBS_PATH = $(TARGET_PATH)/debs/trixie TRIXIE_FILES_PATH = $(TARGET_PATH)/files/trixie +TRIXIE_PHONY_PATH = $(TARGET_PATH)/phony/trixie + DBG_IMAGE_MARK = dbg DBG_SRC_ARCHIVE_FILE = $(TARGET_PATH)/sonic_src.tar.gz BUILD_WORKDIR = /sonic @@ -95,6 +99,8 @@ export CROSS_BUILD_ENVIRON export BLDENV export BUILD_WORKDIR export MIRROR_SNAPSHOT +export BUILD_PUBLIC_URL +export BUILD_SNAPSHOT_URL export SONIC_OS_VERSION export FILES_PATH export PROJECT_ROOT @@ -128,7 +134,9 @@ configure : $(Q)mkdir -p $(BUSTER_FILES_PATH) $(Q)mkdir -p $(BULLSEYE_FILES_PATH) $(Q)mkdir -p $(BOOKWORM_FILES_PATH) + $(Q)mkdir -p $(BOOKWORM_PHONY_PATH) $(Q)mkdir -p $(TRIXIE_FILES_PATH) + $(Q)mkdir -p $(TRIXIE_PHONY_PATH) $(Q)mkdir -p $(PYTHON_DEBS_PATH) $(Q)mkdir -p $(PYTHON_WHEELS_PATH) $(Q)mkdir -p $(DPKG_ADMINDIR_PATH) @@ -154,7 +162,7 @@ include $(RULES_PATH)/config ############################################################################### ## Version control related exports ############################################################################### -export PACKAGE_URL_PREFIX +export BUILD_PACKAGES_URL export TRUSTED_GPG_URLS export SONIC_VERSION_CONTROL_COMPONENTS DEFAULT_CONTAINER_REGISTRY := $(SONIC_DEFAULT_CONTAINER_REGISTRY) @@ -708,8 +716,9 @@ SONIC_TARGET_LIST += $(addprefix $(FILES_PATH)/, $(SONIC_ONLINE_FILES)) # SOME_NEW_FILE = some_new_deb.deb # $(SOME_NEW_FILE)_SRC_PATH = $(SRC_PATH)/project_name # $(SOME_NEW_FILE)_DEPENDS = $(SOME_OTHER_DEB1) $(SOME_OTHER_DEB2) ... +# $(SOME_NEW_FILE)_PHONIES = $(SOME_PHONY_NAME) ... # SONIC_MAKE_FILES += $(SOME_NEW_FILE) -$(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) : $(FILES_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \ +$(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) : $(FILES_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) $$(addprefix $(PHONY_PATH)/,$$($$*_PHONIES)) \ $$(addprefix $(DEBS_PATH)/,$$($$*_AFTER)) \ $(call dpkg_depend,$(FILES_PATH)/%.dep) $(HEADER) @@ -740,6 +749,33 @@ $(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) : $(FILES_PATH)/% : .platform $ SONIC_TARGET_LIST += $(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) + +# Phony build target +# +# Can be used to enforce strict build order in dependencies that cannot otherwise +# be done. +# +# Does not actually use .PHONY but instead a file. This is to prevent unnecessary +# rebuilds of things like containers which would otherwise think a change occurred. +# +# Also omitted is dpkg_depend() since this is not a cacheable item. +# +# Add new phony: +# SOME_PHONY = some_phony +# $(SOME_PHONY)_DEPENDS = $(SOME_DEB) ... +# $(SOME_PHONY)_WHEEL_DEPENDS = $(SOME_WHEEL) ... +# SONIC_PHONIES += $(SOME_PHONY) +$(addprefix $(PHONY_PATH)/, $(SONIC_PHONIES)) : $(PHONY_PATH)/% : .platform \ + $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \ + $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_WHEEL_DEPENDS))) \ + $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) + $(HEADER) + touch $@ + $(FOOTER) + +SONIC_TARGET_LIST += $(addprefix $(PHONY_PATH)/, $(SONIC_PHONIES)) + + ############################################################################### ## Debian package related targets ############################################################################### @@ -751,11 +787,13 @@ SONIC_TARGET_LIST += $(addprefix $(FILES_PATH)/, $(SONIC_MAKE_FILES)) # SOME_NEW_DEB = some_new_deb.deb # $(SOME_NEW_DEB)_SRC_PATH = $(SRC_PATH)/project_name # $(SOME_NEW_DEB)_DEPENDS = $(SOME_OTHER_DEB1) $(SOME_OTHER_DEB2) ... +# $(SOME_NEW_DEB)_PHONIES = $(SOME_PHONY_NAME) ... # SONIC_MAKE_DEBS += $(SOME_NEW_DEB) $(addprefix $(DEBS_PATH)/, $(SONIC_MAKE_DEBS)) : $(DEBS_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \ $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_WHEEL_DEPENDS))) \ $$(addprefix $(DEBS_PATH)/,$$($$*_AFTER)) \ $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) \ + $$(addprefix $(PHONY_PATH)/,$$($$*_PHONIES)) \ $(call dpkg_depend,$(DEBS_PATH)/%.dep) $(HEADER) @@ -787,15 +825,18 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_MAKE_DEBS)) : $(DEBS_PATH)/% : .platform $$(a SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH)/, $(SONIC_MAKE_DEBS)) + # Build project with dpkg-buildpackage # Add new package for build: # SOME_NEW_DEB = some_new_deb.deb # $(SOME_NEW_DEB)_SRC_PATH = $(SRC_PATH)/project_name # $(SOME_NEW_DEB)_DEPENDS = $(SOME_OTHER_DEB1) $(SOME_OTHER_DEB2) ... +# $(SOME_NEW_DEB)_PHONIES = $(SOME_PHONY_NAME) ... # SONIC_DPKG_DEBS += $(SOME_NEW_DEB) $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_WHEEL_DEPENDS))) $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \ $$(addprefix $(DEBS_PATH)/,$$($$*_AFTER)) \ $$(addprefix $(FILES_PATH)/,$$($$*_AFTER_FILES)) \ + $$(addprefix $(PHONY_PATH)/,$$($$*_PHONIES)) \ $(call dpkg_depend,$(DEBS_PATH)/%.dep ) $(HEADER) @@ -873,7 +914,7 @@ SONIC_INSTALL_DEBS = $(addsuffix -install,$(addprefix $(DEBS_PATH)/, \ $(SONIC_PYTHON_STDEB_DEBS) \ $(SONIC_DERIVED_DEBS) \ $(SONIC_EXTRA_DEBS))) -$(SONIC_INSTALL_DEBS) : $(DEBS_PATH)/%-install : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) $(DEBS_PATH)/$$* +$(SONIC_INSTALL_DEBS) : $(DEBS_PATH)/%-install : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_WHEEL_DEPENDS))) $$(addprefix $(PHONY_PATH)/,$$($$*_PHONIES)) $(DEBS_PATH)/$$* $(HEADER) [ -f $(DEBS_PATH)/$* ] || { echo $(DEBS_PATH)/$* does not exist $(LOG) && false $(LOG) } for i in {1..360}; do @@ -906,11 +947,13 @@ endif # SOME_NEW_DEB = some_new_deb.deb # $(SOME_NEW_DEB)_SRC_PATH = $(SRC_PATH)/project_name # $(SOME_NEW_DEB)_DEPENDS = $(SOME_OTHER_DEB1) $(SOME_OTHER_DEB2) ... +# $(SOME_NEW_DEB)_PHONIES += $(SOME_PHONY_NAME) # SONIC_PYTHON_STDEB_DEBS += $(SOME_NEW_DEB) $(addprefix $(PYTHON_DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS)) : $(PYTHON_DEBS_PATH)/% : .platform \ $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEBS_DEPENDS))) \ $$(addsuffix -install,$$(addprefix $(PYTHON_DEBS_PATH)/,$$($$*_DEPENDS))) \ $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_WHEEL_DEPENDS))) \ + $$(addprefix $(PHONY_PATH)/,$$($$*_PHONIES)) \ $(call dpkg_depend,$(PYTHON_DEBS_PATH)/%.dep) $(HEADER) @@ -948,8 +991,9 @@ SONIC_TARGET_LIST += $(addprefix $(PYTHON_DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS # $(SOME_NEW_WHL)_SRC_PATH = $(SRC_PATH)/project_name # $(SOME_NEW_WHL)_PYTHON_VERSION = 2 (or 3) # $(SOME_NEW_WHL)_DEPENDS = $(SOME_OTHER_WHL1) $(SOME_OTHER_WHL2) ... +# $(SOME_NEW_WHL)_PHONIES = $(SOME_PHONY_NAME) ... # SONIC_PYTHON_WHEELS += $(SOME_NEW_WHL) -$(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_DEPENDS))) \ +$(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_DEPENDS))) $$(addprefix $(PHONY_PATH)/,$$($$*_PHONIES)) \ $(call dpkg_depend,$(PYTHON_WHEELS_PATH)/%.dep) \ $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEBS_DEPENDS))) $(HEADER) @@ -1000,7 +1044,7 @@ SONIC_TARGET_LIST += $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) # Targets for installing python wheels. # Autogenerated SONIC_INSTALL_WHEELS = $(addsuffix -install, $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS))) -$(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_DEPENDS))) $(PYTHON_WHEELS_PATH)/$$* +$(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuffix -install,$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_DEPENDS))) $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEBS_DEPENDS))) $(PYTHON_WHEELS_PATH)/$$* $(HEADER) [ -f $(PYTHON_WHEELS_PATH)/$* ] || { echo $(PYTHON_WHEELS_PATH)/$* does not exist $(LOG) && exit 1; } # put a lock here to avoid race conditions @@ -1203,7 +1247,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile $(call generate_manifest,$*) # Prepare docker build info - PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ + BUILD_PACKAGES_URL=$(BUILD_PACKAGES_URL) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \ SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \ @@ -1272,7 +1316,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG j2 $($*.gz_PATH)/Dockerfile-dbg.j2 > $($*.gz_PATH)/Dockerfile-dbg $(call generate_manifest,$*,dbg) # Prepare docker build info - PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ + BUILD_PACKAGES_URL=$(BUILD_PACKAGES_URL) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \ SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \ @@ -1371,11 +1415,13 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_RFS_TARGETS)) : $(TARGET_PATH)/% : \ USERNAME="$(USERNAME)" \ PASSWORD="$(PASSWORD)" \ CHANGE_DEFAULT_PASSWORD="$(CHANGE_DEFAULT_PASSWORD)" \ + BMC_NOS_ACCOUNT_USERNAME="$(BMC_NOS_ACCOUNT_USERNAME)" \ + BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD="$(BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD)" \ TARGET_MACHINE=$(machine) \ IMAGE_TYPE=$($(installer)_IMAGE_TYPE) \ TARGET_PATH=$(TARGET_PATH) \ TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \ - PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ + BUILD_PACKAGES_URL=$(BUILD_PACKAGES_URL) \ DBGOPT='$(DBGOPT)' \ SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \ MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) \ @@ -1633,13 +1679,15 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ USERNAME="$(USERNAME)" \ PASSWORD="$(PASSWORD)" \ CHANGE_DEFAULT_PASSWORD="$(CHANGE_DEFAULT_PASSWORD)" \ + BMC_NOS_ACCOUNT_USERNAME="$(BMC_NOS_ACCOUNT_USERNAME)" \ + BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD="$(BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD)" \ TARGET_MACHINE=$(dep_machine) \ IMAGE_TYPE=$($*_IMAGE_TYPE) \ TARGET_PATH=$(TARGET_PATH) \ ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \ - PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ + BUILD_PACKAGES_URL=$(BUILD_PACKAGES_URL) \ DBGOPT='$(DBGOPT)' \ SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \ MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) \ @@ -1660,6 +1708,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ USERNAME="$(USERNAME)" \ PASSWORD="$(PASSWORD)" \ + BMC_NOS_ACCOUNT_USERNAME="$(BMC_NOS_ACCOUNT_USERNAME)" \ + BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD="$(BMC_ROOT_ACCOUNT_DEFAULT_PASSWORD)" \ TARGET_MACHINE=$(dep_machine) \ IMAGE_TYPE=$($*_IMAGE_TYPE) \ ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \ @@ -1709,6 +1759,9 @@ SONIC_CLEAN_FILES = $(addsuffix -clean,$(addprefix $(FILES_PATH)/, \ $(SONIC_COPY_FILES) \ $(SONIC_MAKE_FILES))) +SONIC_CLEAN_PHONIES = $(addsuffix -clean,$(addprefix $(PHONY_PATH)/, \ + $(SONIC_PHONIES))) + $(SONIC_CLEAN_DEBS) :: $(DEBS_PATH)/%-clean : .platform $$(addsuffix -clean,$$(addprefix $(DEBS_PATH)/,$$($$*_MAIN_DEB))) $(Q)# remove derived or extra targets if main one is removed, because we treat them $(Q)# as part of one package @@ -1717,6 +1770,9 @@ $(SONIC_CLEAN_DEBS) :: $(DEBS_PATH)/%-clean : .platform $$(addsuffix -clean,$$(a $(SONIC_CLEAN_FILES) :: $(FILES_PATH)/%-clean : .platform $(Q)rm -f $(FILES_PATH)/$* +$(SONIC_CLEAN_PHONIES) :: $(PHONY_PATH)/%-clean : .platform + $(Q)rm -f $(PHONY_PATH)/$* + SONIC_CLEAN_TARGETS += $(addsuffix -clean,$(addprefix $(TARGET_PATH)/, \ $(SONIC_DOCKER_IMAGES) \ $(SONIC_DOCKER_DBG_IMAGES) \ @@ -1745,7 +1801,7 @@ clean-versions :: .platform vclean:: .platform @sudo rm -rf target/vcache/* target/baseimage* -clean :: .platform clean-logs clean-versions $$(SONIC_CLEAN_DEBS) $$(SONIC_CLEAN_FILES) $$(SONIC_CLEAN_TARGETS) $$(SONIC_CLEAN_STDEB_DEBS) $$(SONIC_CLEAN_WHEELS) +clean :: .platform clean-logs clean-versions $$(SONIC_CLEAN_DEBS) $$(SONIC_CLEAN_FILES) $$(SONIC_CLEAN_PHONIES) $$(SONIC_CLEAN_TARGETS) $$(SONIC_CLEAN_STDEB_DEBS) $$(SONIC_CLEAN_WHEELS) ############################################################################### ## all @@ -1772,7 +1828,7 @@ jessie : $$(addprefix $(TARGET_PATH)/,$$(JESSIE_DOCKER_IMAGES)) \ ## Standard targets ############################################################################### -.PHONY : $(SONIC_CLEAN_DEBS) $(SONIC_CLEAN_FILES) $(SONIC_CLEAN_TARGETS) $(SONIC_CLEAN_STDEB_DEBS) $(SONIC_CLEAN_WHEELS) $(SONIC_PHONY_TARGETS) clean distclean configure +.PHONY : $(SONIC_CLEAN_DEBS) $(SONIC_CLEAN_FILES) $(SONIC_CLEAN_PHONIES) $(SONIC_CLEAN_TARGETS) $(SONIC_CLEAN_STDEB_DEBS) $(SONIC_CLEAN_WHEELS) $(SONIC_PHONY_TARGETS) clean distclean configure .INTERMEDIATE : $(SONIC_INSTALL_DEBS) $(SONIC_INSTALL_WHEELS) $(DOCKER_LOAD_TARGETS) docker-start .platform diff --git a/sonic-slave-bookworm/Dockerfile.j2 b/sonic-slave-bookworm/Dockerfile.j2 index 274a60b2bf6..f5578428aac 100644 --- a/sonic-slave-bookworm/Dockerfile.j2 +++ b/sonic-slave-bookworm/Dockerfile.j2 @@ -27,6 +27,13 @@ COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"] COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] {%- else %} COPY ["sources.list.amd64", "/etc/apt/sources.list"] +{%- endif %} + +# Install certificates by disabling the peer verification +RUN apt -o Acquire::https::Verify-Peer=false update && \ + apt -o Acquire::https::Verify-Peer=false install -y ca-certificates + +{%- if CROSS_BUILD_ENVIRON == "y" %} {%- if CONFIGURED_ARCH == "armhf" %} ARG arch=armhf ARG gcc_arch=arm-linux-gnueabihf @@ -534,8 +541,8 @@ RUN eatmydata apt-get install -y kernel-wedge # For gobgp and telemetry build RUN eatmydata apt-get install -y golang {%- if INCLUDE_FIPS == "y" %} -RUN wget -O golang-go.deb 'https://packages.trafficmanager.net/public/fips/bookworm/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-1.19-go_{{ FIPS_GOLANG_VERSION }}_{{ CONFIGURED_ARCH }}.deb' \ - && wget -O golang-src.deb 'https://packages.trafficmanager.net/public/fips/bookworm/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-1.19-src_{{ FIPS_GOLANG_VERSION }}_all.deb' \ +RUN wget -O golang-go.deb '{{ BUILD_PUBLIC_URL }}/fips/bookworm/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-1.19-go_{{ FIPS_GOLANG_VERSION }}_{{ CONFIGURED_ARCH }}.deb' \ + && wget -O golang-src.deb '{{ BUILD_PUBLIC_URL }}/fips/bookworm/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-1.19-src_{{ FIPS_GOLANG_VERSION }}_all.deb' \ && eatmydata dpkg -i golang-go.deb golang-src.deb \ && ln -sf /usr/lib/go-1.19 /usr/local/go \ && rm golang-go.deb golang-src.deb @@ -566,7 +573,7 @@ RUN pip3 install pyyaml-include # For building sonic_ycabled # Note: Match version in bookworm -RUN pip3 install grpcio==1.51.1 grpcio-tools==1.51.1 +RUN pip3 install grpcio==1.51.1 grpcio-tools==1.51.1 --no-build-isolation # For running Python unit tests RUN pip3 install pytest-runner==5.2 @@ -666,7 +673,6 @@ RUN pip3 install git+https://github.com/aristanetworks/swi-tools.git@bead66bf261 {% if CONFIGURED_ARCH != "amd64" -%} # Install node.js for azure pipeline -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN eatmydata apt-get install -y nodejs {%- if CROSS_BUILD_ENVIRON == "y" %} @@ -780,7 +786,9 @@ ENV RUSTUP_HOME $RUST_ROOT ENV PATH $PATH:$RUST_ROOT/bin # Install cargo-tarpaulin for code coverage -RUN $RUST_ROOT/bin/cargo install --locked cargo-tarpaulin +# Pin version to avoid dependency conflicts with Rust 1.86.0 +# (cargo-tarpaulin v0.35.2 pulled in gimli 0.33.0 which needs Rust 1.88+) +RUN $RUST_ROOT/bin/cargo install --locked cargo-tarpaulin@0.35.1 {# Include vendor-defined rules for slave container if it exists. Contained in ../files #} {% with DEBIAN_VERSION='bookworm' %} diff --git a/sonic-slave-trixie/Dockerfile.j2 b/sonic-slave-trixie/Dockerfile.j2 index 99b0f6dd7d9..26f6d52d4ed 100644 --- a/sonic-slave-trixie/Dockerfile.j2 +++ b/sonic-slave-trixie/Dockerfile.j2 @@ -27,6 +27,13 @@ COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"] COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] {%- else %} COPY ["sources.list.amd64", "/etc/apt/sources.list"] +{%- endif %} + +# Install certificates by disabling the peer verification +RUN apt -o Acquire::https::Verify-Peer=false update && \ + apt -o Acquire::https::Verify-Peer=false install -y ca-certificates + +{%- if CROSS_BUILD_ENVIRON == "y" %} {%- if CONFIGURED_ARCH == "armhf" %} ARG arch=armhf ARG gcc_arch=arm-linux-gnueabihf @@ -554,8 +561,8 @@ RUN eatmydata apt-get install -y kernel-wedge # For gobgp and telemetry build RUN eatmydata apt-get install -y golang golang-go {%- if INCLUDE_FIPS == "y" %} -RUN wget -O golang-go.deb 'https://packages.trafficmanager.net/public/fips/trixie/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-{{ FIPS_GOLANG_MAIN_VERSION }}-go_{{ FIPS_GOLANG_VERSION }}_{{ CONFIGURED_ARCH }}.deb' \ - && wget -O golang-src.deb 'https://packages.trafficmanager.net/public/fips/trixie/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-{{ FIPS_GOLANG_MAIN_VERSION }}-src_{{ FIPS_GOLANG_VERSION }}_all.deb' \ +RUN wget -O golang-go.deb '{{ BUILD_PUBLIC_URL }}/fips/trixie/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-{{ FIPS_GOLANG_MAIN_VERSION }}-go_{{ FIPS_GOLANG_VERSION }}_{{ CONFIGURED_ARCH }}.deb' \ + && wget -O golang-src.deb '{{ BUILD_PUBLIC_URL }}/fips/trixie/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-{{ FIPS_GOLANG_MAIN_VERSION }}-src_{{ FIPS_GOLANG_VERSION }}_all.deb' \ && eatmydata dpkg -i golang-go.deb golang-src.deb \ && ln -sf /usr/lib/go-{{ FIPS_GOLANG_MAIN_VERSION }} /usr/local/go \ && rm golang-go.deb golang-src.deb @@ -784,7 +791,9 @@ ENV RUSTUP_HOME=$RUST_ROOT ENV PATH=$PATH:$RUST_ROOT/bin # Install cargo-tarpaulin for code coverage -RUN $RUST_ROOT/bin/cargo install --locked cargo-tarpaulin +# Pin version to avoid dependency conflicts with Rust 1.86.0 +# (cargo-tarpaulin v0.35.2 pulled in gimli 0.33.0 which needs Rust 1.88+) +RUN $RUST_ROOT/bin/cargo install --locked cargo-tarpaulin@0.35.1 {# Include vendor-defined rules for slave container if it exists. Contained in ../files #} {% with DEBIAN_VERSION='trixie' %} diff --git a/src/dhcpmon b/src/dhcpmon index 1237e8d4600..d78974ffabb 160000 --- a/src/dhcpmon +++ b/src/dhcpmon @@ -1 +1 @@ -Subproject commit 1237e8d4600470955af06ef616de427dc5f863e7 +Subproject commit d78974ffabb5e8ad0466b8e721a74033f1f53f98 diff --git a/src/dhcprelay b/src/dhcprelay index f908c859958..8987cbb750c 160000 --- a/src/dhcprelay +++ b/src/dhcprelay @@ -1 +1 @@ -Subproject commit f908c8599584ed755d404d2636fe413471cb6666 +Subproject commit 8987cbb750c04bce79dc8514c56aa1fbeee3e8b4 diff --git a/src/grub2/patch/large-uid-skip-cpio-ustar.patch b/src/grub2/patch/large-uid-skip-cpio-ustar.patch new file mode 100644 index 00000000000..84682ebbe7c --- /dev/null +++ b/src/grub2/patch/large-uid-skip-cpio-ustar.patch @@ -0,0 +1,16 @@ +diff --git a/tests/cpio_test.in b/tests/cpio_test.in +index 5742cf17b..add41ef22 100644 +--- a/tests/cpio_test.in ++++ b/tests/cpio_test.in +@@ -11,6 +11,10 @@ fi + "@builddir@/grub-fs-tester" cpio_odc + "@builddir@/grub-fs-tester" cpio_newc + "@builddir@/grub-fs-tester" cpio_crc +-"@builddir@/grub-fs-tester" cpio_ustar ++# If the UID of the user running tests is > 2097151 skip testing ustar as the format does ++# not support large uids. ++if [ `id -u` -le "2097151" ] ; then ++ "@builddir@/grub-fs-tester" cpio_ustar ++fi + "@builddir@/grub-fs-tester" cpio_hpbin + "@builddir@/grub-fs-tester" cpio_hpodc diff --git a/src/grub2/patch/series b/src/grub2/patch/series index 183b19fbbdb..5aa942ab311 100644 --- a/src/grub2/patch/series +++ b/src/grub2/patch/series @@ -1,2 +1,3 @@ # This series applies on GIT commit f954d68d5e8dc7eb0081ad7bc1ced9ff5ca687a7 adjust-build-rules-for-debian.patch +large-uid-skip-cpio-ustar.patch diff --git a/src/ixgbe/Makefile b/src/ixgbe/Makefile index 436a4b85c74..753445b9dc3 100644 --- a/src/ixgbe/Makefile +++ b/src/ixgbe/Makefile @@ -6,7 +6,7 @@ MAIN_TARGET = ixgbe.ko $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf ./ixgbe-$(IXGBE_DRIVER_VERSION) - wget -O ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz "https://packages.trafficmanager.net/public/ixgbe-5.2.4.tar.gz" + wget -O ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz "$(BUILD_PUBLIC_URL)/ixgbe-5.2.4.tar.gz" tar xzf ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz # Patch diff --git a/src/libyang/patch/libyang-increase-lyht-min-size.patch b/src/libyang/patch/libyang-increase-lyht-min-size.patch new file mode 100644 index 00000000000..d869ba8bfb0 --- /dev/null +++ b/src/libyang/patch/libyang-increase-lyht-min-size.patch @@ -0,0 +1,13 @@ +diff --git a/src/hash_table.h b/src/hash_table.h +--- a/src/hash_table.h ++++ b/src/hash_table.h +@@ -53,7 +53,7 @@ + #define LYHT_SHRINK_PERCENTAGE 25 + + /** never shrink beyond this size */ +-#define LYHT_MIN_SIZE 8 ++#define LYHT_MIN_SIZE 65536 + + /** + * @brief Generic hash table record. + diff --git a/src/libyang/patch/series b/src/libyang/patch/series index aaa6b8807f0..be0dd1ca73f 100644 --- a/src/libyang/patch/series +++ b/src/libyang/patch/series @@ -5,3 +5,4 @@ large_file_support_arm32.patch debian-packaging-files.patch libyang-leaf-must.patch libyang-with-python-3.12.patch +libyang-increase-lyht-min-size.patch diff --git a/src/linkmgrd b/src/linkmgrd index a7beee3795a..15f71fa5d3c 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit a7beee3795ac64044ccc322d68bfc4c88801fc30 +Subproject commit 15f71fa5d3c06e13096630a2849754f0cf66b2fd diff --git a/src/lldpd/Makefile b/src/lldpd/Makefile index 73c23d56c2d..6762fa16a03 100644 --- a/src/lldpd/Makefile +++ b/src/lldpd/Makefile @@ -5,7 +5,7 @@ SHELL = /bin/bash MAIN_TARGET = $(LLDPD) DERIVED_TARGETS = $(LIBLLDPCTL) $(LLDPD_DBG) -LLDP_URL = https://packages.trafficmanager.net/public/debian/pool/main/l/lldpd +LLDP_URL = $(BUILD_PUBLIC_URL)/debian/pool/main/l/lldpd DSC_FILE = lldpd_$(LLDPD_VERSION_FULL).dsc ORIG_FILE = lldpd_$(LLDPD_VERSION).orig.tar.gz diff --git a/src/lldpd/patch/0002-use-a-different-socket-for-changes-and-queries.patch b/src/lldpd/patch/0002-use-a-different-socket-for-changes-and-queries.patch new file mode 100644 index 00000000000..139b26e5280 --- /dev/null +++ b/src/lldpd/patch/0002-use-a-different-socket-for-changes-and-queries.patch @@ -0,0 +1,191 @@ +diff --git a/src/daemon/netlink.c b/src/daemon/netlink.c +index 55f9b66..e7db1fc 100644 +--- a/src/daemon/netlink.c ++++ b/src/daemon/netlink.c +@@ -38,7 +38,8 @@ struct netlink_req { + }; + + struct lldpd_netlink { +- int nl_socket; ++ int nl_socket_queries; ++ int nl_socket_changes; + int nl_socket_recv_size; + /* Cache */ + struct interfaces_device_list *devices; +@@ -94,34 +95,35 @@ netlink_socket_set_buffer_size(int s, int optname, const char *optname_str, int + * @return 0 on success, -1 otherwise + */ + static int +-netlink_connect(struct lldpd *cfg, int protocol, unsigned groups) ++netlink_connect(struct lldpd *cfg, unsigned groups) + { +- int s; ++ int s1 = -1, s2 = -1; + struct sockaddr_nl local = { .nl_family = AF_NETLINK, + .nl_pid = 0, + .nl_groups = groups }; + +- /* Open Netlink socket */ +- log_debug("netlink", "opening netlink socket"); +- s = socket(AF_NETLINK, SOCK_RAW, protocol); +- if (s == -1) { +- log_warn("netlink", "unable to open netlink socket"); +- return -1; ++ /* Open Netlink socket for subscriptions */ ++ log_debug("netlink", "opening netlink sockets"); ++ s1 = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); ++ if (s1 == -1) { ++ log_warn("netlink", "unable to open netlink socket for changes"); ++ goto error; + } + if (NETLINK_SEND_BUFSIZE && +- netlink_socket_set_buffer_size(s, SO_SNDBUF, "SO_SNDBUF", ++ netlink_socket_set_buffer_size(s1, SO_SNDBUF, "SO_SNDBUF", + NETLINK_SEND_BUFSIZE) == -1) { +- close(s); +- return -1; ++ log_warn("netlink", "unable to set send buffer size"); ++ goto error; + } + +- int rc = netlink_socket_set_buffer_size(s, SO_RCVBUF, "SO_RCVBUF", ++ int rc = netlink_socket_set_buffer_size(s1, SO_RCVBUF, "SO_RCVBUF", + NETLINK_RECEIVE_BUFSIZE); + switch (rc) { + case -1: +- close(s); +- return -1; ++ log_warn("netlink", "unable to set receiver buffer size"); ++ goto error; + case -2: ++ /* Cannot set size */ + cfg->g_netlink->nl_socket_recv_size = 0; + break; + default: +@@ -129,13 +131,24 @@ netlink_connect(struct lldpd *cfg, int protocol, unsigned groups) + break; + } + if (groups && +- bind(s, (struct sockaddr *)&local, sizeof(struct sockaddr_nl)) < 0) { ++ bind(s1, (struct sockaddr *)&local, sizeof(struct sockaddr_nl)) < 0) { + log_warn("netlink", "unable to bind netlink socket"); +- close(s); +- return -1; ++ goto error; + } +- cfg->g_netlink->nl_socket = s; ++ ++ /* Opening Netlink socket to for queries */ ++ s2 = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); ++ if (s2 == -1) { ++ log_warn("netlink", "unable to open netlink socket for queries"); ++ goto error; ++ } ++ cfg->g_netlink->nl_socket_changes = s1; ++ cfg->g_netlink->nl_socket_queries = s2; + return 0; ++error: ++ if (s1 != -1) close(s1); ++ if (s2 != -1) close(s2); ++ return -1; + } + + /** +@@ -525,13 +538,12 @@ netlink_merge(struct interfaces_device *old, struct interfaces_device *new) + * @return 0 on success, -1 on error + */ + static int +-netlink_recv(struct lldpd *cfg, struct interfaces_device_list *ifs, ++netlink_recv(struct lldpd *cfg, int s, struct interfaces_device_list *ifs, + struct interfaces_address_list *ifas) + { + int end = 0, ret = 0, flags, retry = 0; + struct iovec iov; + int link_update = 0; +- int s = cfg->g_netlink->nl_socket; + + struct interfaces_device *ifdold; + struct interfaces_device *ifdnew; +@@ -570,8 +582,10 @@ netlink_recv(struct lldpd *cfg, struct interfaces_device_list *ifs, + } + int rsize = cfg->g_netlink->nl_socket_recv_size; + if (errno == ENOBUFS && rsize > 0 && +- rsize < NETLINK_MAX_RECEIVE_BUFSIZE) { +- /* Try to increase buffer size */ ++ rsize < NETLINK_MAX_RECEIVE_BUFSIZE && ++ s == cfg->g_netlink->nl_socket_changes) { ++ /* Try to increase buffer size, only for the ++ * socket used to receive changes */ + rsize *= 2; + if (rsize > NETLINK_MAX_RECEIVE_BUFSIZE) { + rsize = NETLINK_MAX_RECEIVE_BUFSIZE; +@@ -843,7 +857,7 @@ netlink_subscribe_changes(struct lldpd *cfg) + netlink_group_mask(RTNLGRP_IPV4_IFADDR) | + netlink_group_mask(RTNLGRP_IPV6_IFADDR); + +- return netlink_connect(cfg, NETLINK_ROUTE, groups); ++ return netlink_connect(cfg, groups); + } + + /** +@@ -852,7 +866,8 @@ static void + netlink_change_cb(struct lldpd *cfg) + { + if (cfg->g_netlink == NULL) return; +- netlink_recv(cfg, cfg->g_netlink->devices, cfg->g_netlink->addresses); ++ netlink_recv(cfg, cfg->g_netlink->nl_socket_changes, cfg->g_netlink->devices, ++ cfg->g_netlink->addresses); + } + + /** +@@ -897,22 +912,24 @@ netlink_initialize(struct lldpd *cfg) + } + TAILQ_INIT(ifs); + +- if (netlink_send(cfg->g_netlink->nl_socket, RTM_GETADDR, AF_UNSPEC, 1) == -1) ++ if (netlink_send(cfg->g_netlink->nl_socket_queries, RTM_GETADDR, AF_UNSPEC, ++ 1) == -1) + goto end; +- netlink_recv(cfg, NULL, ifaddrs); +- if (netlink_send(cfg->g_netlink->nl_socket, RTM_GETLINK, AF_PACKET, 2) == -1) ++ netlink_recv(cfg, cfg->g_netlink->nl_socket_queries, NULL, ifaddrs); ++ if (netlink_send(cfg->g_netlink->nl_socket_queries, RTM_GETLINK, AF_PACKET, ++ 2) == -1) + goto end; +- netlink_recv(cfg, ifs, NULL); ++ netlink_recv(cfg, cfg->g_netlink->nl_socket_queries, ifs, NULL); + #ifdef ENABLE_DOT1 + /* If we have a bridge, search for VLAN-aware bridges */ + TAILQ_FOREACH (iff, ifs, next) { + if (iff->type & IFACE_BRIDGE_T) { + log_debug("netlink", + "interface %s is a bridge, check for VLANs", iff->name); +- if (netlink_send(cfg->g_netlink->nl_socket, RTM_GETLINK, ++ if (netlink_send(cfg->g_netlink->nl_socket_queries, RTM_GETLINK, + AF_BRIDGE, 3) == -1) + goto end; +- netlink_recv(cfg, ifs, NULL); ++ netlink_recv(cfg, cfg->g_netlink->nl_socket_queries, ifs, NULL); + break; + } + } +@@ -920,7 +937,7 @@ netlink_initialize(struct lldpd *cfg) + + /* Listen to any future change */ + cfg->g_iface_cb = netlink_change_cb; +- if (levent_iface_subscribe(cfg, cfg->g_netlink->nl_socket) == -1) { ++ if (levent_iface_subscribe(cfg, cfg->g_netlink->nl_socket_changes) == -1) { + goto end; + } + +@@ -937,7 +954,10 @@ void + netlink_cleanup(struct lldpd *cfg) + { + if (cfg->g_netlink == NULL) return; +- if (cfg->g_netlink->nl_socket != -1) close(cfg->g_netlink->nl_socket); ++ if (cfg->g_netlink->nl_socket_changes != -1) ++ close(cfg->g_netlink->nl_socket_changes); ++ if (cfg->g_netlink->nl_socket_queries != -1) ++ close(cfg->g_netlink->nl_socket_queries); + interfaces_free_devices(cfg->g_netlink->devices); + interfaces_free_addresses(cfg->g_netlink->addresses); diff --git a/src/lldpd/patch/series b/src/lldpd/patch/series index 8aa5ab8d8f3..c92e03c1bae 100644 --- a/src/lldpd/patch/series +++ b/src/lldpd/patch/series @@ -1,2 +1,3 @@ -# This series applies on GIT commit 396961a038a38675d46f96eaa7b430b2a1f8701b +# This series applies on GIT commit 7a595f1adfa4ae5302ba7953e14fd69c8579aa16 0001-return-error-when-port-does-not-exist.patch +0002-use-a-different-socket-for-changes-and-queries.patch diff --git a/src/ptf-py3.patch/0006-Improve-the-runtime-of-method-verify_n.patch b/src/ptf-py3.patch/0006-Improve-the-runtime-of-method-verify_n.patch new file mode 100644 index 00000000000..cabc2c1674d --- /dev/null +++ b/src/ptf-py3.patch/0006-Improve-the-runtime-of-method-verify_n.patch @@ -0,0 +1,75 @@ +From bbb1b6f39d94ff9ba2efd127bc82559856ffc351 Mon Sep 17 00:00:00 2001 +From: AntonHryshchuk +Date: Wed, 14 Jan 2026 09:42:08 +0200 +Subject: [PATCH] [testutils] improve the runtime of the method + verify_no_packet_any on scale ports number + +Signed-off-by: AntonHryshchuk +--- + src/ptf/testutils.py | 44 +++++++++++++++++++++++++++++++++++--------- + 1 file changed, 35 insertions(+), 9 deletions(-) + +diff --git a/src/ptf/testutils.py b/src/ptf/testutils.py +index 2ebf6a7..f355620 100755 +--- a/src/ptf/testutils.py ++++ b/src/ptf/testutils.py +@@ -3328,21 +3328,47 @@ def verify_packets(test, pkt, ports=[], device_number=0, timeout=None, n_timeout + verify_no_other_packets(test, device_number=device_number, timeout=n_timeout) + + +-def verify_no_packet_any(test, pkt, ports=[], device_number=0, timeout=None): ++def verify_no_packet_any(test, pkt, ports=[], device_number=0, timeout=1): + """ +- Check that a packet is NOT received on _any_ of the specified ports belonging to +- the given device (default device_number is 0). ++ Verify that a packet is NOT received on any of the specified ports belonging to ++ the given device within the given timeout. Uses a single global timeout and repeatedly ++ polls all ports with zero per-port timeout. ++ Raises: ++ test.fail if the packet is received on any of the specified ports. + """ + test.assertTrue( + len(ports) != 0, + "No port available to validate receiving packet on device %d, " % device_number, + ) +- for device, port in ptf_ports(): +- if device != device_number: +- continue +- if port in ports: +- print("verifying packet on port device", device_number, "port", port) +- verify_no_packet(test, pkt, (device, port), timeout=timeout) ++ ports = list(ports) ++ logging.debug("Negative check for pkt on device %d, ports %s", device_number, ports) ++ start = time.monotonic() ++ while True: ++ remaining = timeout - (time.monotonic() - start) ++ if remaining <= 0: ++ return # PASS - packet not observed within timeout window ++ ++ for device, port in ptf_ports(): ++ if device != device_number or port not in ports: ++ continue ++ ++ result = dp_poll( ++ test, ++ device_number=device_number, ++ port_number=port, ++ timeout=0, # non-blocking poll ++ exp_pkt=pkt, ++ ) ++ ++ if isinstance(result, test.dataplane.PollSuccess): ++ test.fail( ++ "Unexpected packet received on device %d, port %d" ++ % (device_number, port) ++ ) ++ ++ # Small sleep to avoid busy-looping and excessive CPU usage. ++ # Also gives dataplane threads time to enqueue incoming packets. ++ time.sleep(0.05) + + + def verify_packets_any( +-- +2.45.1 + diff --git a/src/ptf-py3.patch/series b/src/ptf-py3.patch/series index 20aadfff995..f71670fb1fb 100644 --- a/src/ptf-py3.patch/series +++ b/src/ptf-py3.patch/series @@ -3,3 +3,4 @@ 0003-Avoid-local-version-scheme-by-setuptools-scm.patch 0004-Consider-only-expected-packets-for-timeout.patch 0005-Fix-a-multithreading-issue-in-writing-pcap-files-204.patch +0006-Improve-the-runtime-of-method-verify_n.patch diff --git a/src/snmpd/Makefile b/src/snmpd/Makefile index 4945e654599..24dd652fbc9 100644 --- a/src/snmpd/Makefile +++ b/src/snmpd/Makefile @@ -38,7 +38,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf net-snmp-$(SNMPD_VERSION) # download debian net-snmp - dget -u https://packages.trafficmanager.net/public/debian/pool/main/n/net-snmp/net-snmp_$(SNMPD_VERSION_FULL).dsc + dget -u $(BUILD_PUBLIC_URL)/debian/pool/main/n/net-snmp/net-snmp_$(SNMPD_VERSION_FULL).dsc pushd net-snmp-$(SNMPD_VERSION) git init diff --git a/src/socat/Makefile b/src/socat/Makefile index bee404ebc57..58f9861a50e 100644 --- a/src/socat/Makefile +++ b/src/socat/Makefile @@ -10,9 +10,9 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf ./socat-1.7.4.1 # Get source package - wget -NO socat_$(SOCAT_VERSION).dsc "https://packages.trafficmanager.net/public/debian/socat_1.7.4.1-3.dsc" - wget -NO socat_$(SOCAT_VERSION).debian.tar.xz "https://packages.trafficmanager.net/public/debian/socat_1.7.4.1-3.debian.tar.xz" - wget -NO socat_1.7.4.1.orig.tar.gz "https://packages.trafficmanager.net/public/debian/socat_1.7.4.1.orig.tar.gz" + wget -NO socat_$(SOCAT_VERSION).dsc "$(BUILD_PUBLIC_URL)/debian/socat_1.7.4.1-3.dsc" + wget -NO socat_$(SOCAT_VERSION).debian.tar.xz "$(BUILD_PUBLIC_URL)/debian/socat_1.7.4.1-3.debian.tar.xz" + wget -NO socat_1.7.4.1.orig.tar.gz "$(BUILD_PUBLIC_URL)/debian/socat_1.7.4.1.orig.tar.gz" dpkg-source -x socat_$(SOCAT_VERSION).dsc diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_db.py b/src/sonic-bgpcfgd/bgpcfgd/managers_db.py index 8d2c80cfebc..37d2eee99a8 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_db.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_db.py @@ -19,30 +19,10 @@ def __init__(self, common_objs, db, table): def set_handler(self, key, data): """ Implementation of 'SET' command for this class """ - - if self.__set_handler_validate(key, data) == True: - cmd_list = [] - bgp_asn = data["bgp_asn"] - state = data["suppress-fib-pending"] - cmd_list.append("router bgp %s" % bgp_asn) - if state == "disabled": - cmd_list.append("no bgp suppress-fib-pending") - else: - cmd_list.append("bgp suppress-fib-pending") - cmd_list.append("exit") - - self.cfg_mgr.push_list(cmd_list) - self.directory.put(self.db_name, self.table_name, key, data) return True def del_handler(self, key): """ Implementation of 'DEL' command for this class """ - self.directory.remove(self.db_name, self.table_name, key) - - def __set_handler_validate(self, key, data): - if data: - if ((key == "localhost") and ("bgp_asn" in data) and ("suppress-fib-pending" in data and data["suppress-fib-pending"] in ["enabled","disabled"])): - return True - return False + self.directory.remove(self.db_name, self.table_name, key) \ No newline at end of file diff --git a/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_no_export.conf b/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_no_export.conf index 39d6866ad30..8fe6b7b7a42 100644 --- a/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_no_export.conf +++ b/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_no_export.conf @@ -28,7 +28,7 @@ route-map CHECK_IDF_ISOLATION permit 2 route-map CHECK_IDF_ISOLATION permit 3 match tag 1001 set community 12345:12345 +no route-map CHECK_IDF_ISOLATION deny 4 route-map CHECK_IDF_ISOLATION permit 10 - set community no-export additive - no route-map CHECK_IDF_ISOLATION deny 4 + set community no-export additive diff --git a/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_withdraw_all.conf b/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_withdraw_all.conf index cbf1c19b2e9..cc9dab0dd0c 100644 --- a/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_withdraw_all.conf +++ b/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_all_idf_isolated_withdraw_all.conf @@ -29,5 +29,5 @@ route-map CHECK_IDF_ISOLATION permit 3 match tag 1001 set community 12345:12345 route-map CHECK_IDF_ISOLATION deny 4 - route-map CHECK_IDF_ISOLATION permit 10 - no set community no-export additive +route-map CHECK_IDF_ISOLATION permit 10 + no set community no-export additive diff --git a/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_idf_isolated.conf b/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_idf_isolated.conf index 838dd4e9c5b..6cf029f738d 100644 --- a/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_idf_isolated.conf +++ b/src/sonic-bgpcfgd/tests/data/general/peer-group.conf/result_idf_isolated.conf @@ -7,6 +7,6 @@ route-map CHECK_IDF_ISOLATION permit 2 route-map CHECK_IDF_ISOLATION permit 3 match tag 1001 set community 12345:12345 +no route-map CHECK_IDF_ISOLATION deny 4 route-map CHECK_IDF_ISOLATION permit 10 - set community no-export additive - no route-map CHECK_IDF_ISOLATION deny 4 + set community no-export additive diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_no_export.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_no_export.conf index fa269cd9662..4bae84b75de 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_no_export.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_no_export.conf @@ -7,6 +7,6 @@ route-map CHECK_IDF_ISOLATION permit 2 route-map CHECK_IDF_ISOLATION permit 3 match tag 1002 set community 12345:555 +no route-map CHECK_IDF_ISOLATION deny 4 route-map CHECK_IDF_ISOLATION permit 10 - set community no-export additive - no route-map CHECK_IDF_ISOLATION deny 4 \ No newline at end of file + set community no-export additive diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_withdraw_all.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_withdraw_all.conf index 4cc312a7222..f5b89ee6251 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_withdraw_all.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/idf_isolate/idf_isolated_withdraw_all.conf @@ -8,5 +8,5 @@ route-map CHECK_IDF_ISOLATION permit 3 match tag 1002 set community 12345:555 route-map CHECK_IDF_ISOLATION deny 4 - route-map CHECK_IDF_ISOLATION permit 10 - no set community no-export additive \ No newline at end of file +route-map CHECK_IDF_ISOLATION permit 10 + no set community no-export additive diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf index db6d35f20eb..74e295b923a 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-bgpcfgd/tests/test_db.py b/src/sonic-bgpcfgd/tests/test_db.py index 0176ffca24c..7078bc2735f 100644 --- a/src/sonic-bgpcfgd/tests/test_db.py +++ b/src/sonic-bgpcfgd/tests/test_db.py @@ -30,14 +30,6 @@ def test_set_del_handler(): assert "test_key2" in m.directory.get_slot(m.db_name, m.table_name) assert m.directory.get(m.db_name, m.table_name, "test_key2") == {} - res = m.set_handler("localhost", {'bgp_asn':'65100','suppress-fib-pending':'enabled'}) - assert res, "Returns always True" - assert m.directory.get(m.db_name, m.table_name, "localhost") == {'bgp_asn':'65100','suppress-fib-pending':'enabled'} - - res = m.set_handler("localhost", {'bgp_asn':'65100','suppress-fib-pending':'disabled'}) - assert res, "Returns always True" - assert m.directory.get(m.db_name, m.table_name, "localhost") == {'bgp_asn':'65100','suppress-fib-pending':'disabled'} - # test del_handler m.del_handler("test_key") assert "test_key" not in m.directory.get_slot(m.db_name, m.table_name) diff --git a/src/sonic-bmp b/src/sonic-bmp index db233845103..c4eeaebc92a 160000 --- a/src/sonic-bmp +++ b/src/sonic-bmp @@ -1 +1 @@ -Subproject commit db2338451035d40ac23aa35801f125142659f64e +Subproject commit c4eeaebc92a9afe8251b0c61782f0b259fb08f23 diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index cd951363747..c3ebfe25c78 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -11,7 +11,6 @@ POST_VERSION_PATH=$BUILDINFO_PATH/post-versions VERSION_DEB_PREFERENCE=$BUILDINFO_PATH/versions/01-versions-deb WEB_VERSION_FILE=$VERSION_PATH/versions-web BUILD_WEB_VERSION_FILE=$BUILD_VERSION_PATH/versions-web -REPR_MIRROR_URL_PATTERN='http:\/\/packages.trafficmanager.net\/' DPKG_INSTALLTION_LOCK_FILE=/tmp/.dpkg_installation.lock GET_RETRY_COUNT=5 @@ -34,7 +33,7 @@ PKG_CACHE_FILE_NAME=${PKG_CACHE_PATH}/cache.tgz . ${BUILDINFO_PATH}/scripts/utils.sh -URL_PREFIX=$(echo "${PACKAGE_URL_PREFIX}" | sed -E "s#(//[^/]*/).*#\1#") +URL_PREFIX=$(echo "${BUILD_PACKAGES_URL}" | sed -E "s#(//[^/]*/).*#\1#") log_err() { @@ -112,15 +111,15 @@ get_version_cache_option() set_reproducible_mirrors() { # Remove the charater # in front of the line if matched - local expression="s/^#\s*\(.*$REPR_MIRROR_URL_PATTERN\)/\1/" + local expression="s,^#\s*\(.*$BUILD_SNAPSHOT_URL\),\1," # Add the character # in front of the line, if not match the URL pattern condition - local expression2="/^#*deb.*$REPR_MIRROR_URL_PATTERN/! s/^#*deb/#&/" + local expression2="\,^#*deb.*$BUILD_SNAPSHOT_URL,! s,^#*deb,#&," local expression3="\$a#SET_REPR_MIRRORS" if [ "$1" = "-d" ]; then # Add the charater # in front of the line if match - expression="s/^deb.*$REPR_MIRROR_URL_PATTERN/#\0/" + expression="s,^deb.*$BUILD_SNAPSHOT_URL,#\0," # Remove the character # in front of the line, if not match the URL pattern condition - expression2="/^#*deb.*$REPR_MIRROR_URL_PATTERN/! s/^#\s*(#*deb)/\1/" + expression2="\,^#*deb.*$BUILD_SNAPSHOT_URL,! s,^#\s*(#*deb),\1," expression3="/#SET_REPR_MIRRORS/d" fi if [[ "$1" != "-d" ]] && [ -f /etc/apt/sources.list.d/debian.sources ]; then @@ -132,7 +131,7 @@ set_reproducible_mirrors() local mirrors="/etc/apt/sources.list $(find /etc/apt/sources.list.d/ -type f)" for mirror in $mirrors; do - if ! grep -iq "$REPR_MIRROR_URL_PATTERN" "$mirror"; then + if ! grep -iq "$BUILD_SNAPSHOT_URL" "$mirror"; then continue fi @@ -212,7 +211,7 @@ download_packages() else local version_filename="${filename}-${version}" - local proxy_url="${PACKAGE_URL_PREFIX}/${version_filename}" + local proxy_url="${BUILD_PACKAGES_URL}/${version_filename}" local url_exist=$(check_if_url_exist $proxy_url) if [ "$url_exist" == y ]; then parameters[$i]=$proxy_url diff --git a/src/sonic-config-engine/portconfig.py b/src/sonic-config-engine/portconfig.py index cbe5e2afe41..c40e6c5147b 100644 --- a/src/sonic-config-engine/portconfig.py +++ b/src/sonic-config-engine/portconfig.py @@ -37,7 +37,7 @@ BRKOUT_MODE = "default_brkout_mode" CUR_BRKOUT_MODE = "brkout_mode" INTF_KEY = "interfaces" -OPTIONAL_HWSKU_ATTRIBUTES = ["fec", "autoneg", "role", "subport"] +OPTIONAL_HWSKU_ATTRIBUTES = ["fec", "autoneg", "role"] BRKOUT_PATTERN = r'(\d{1,6})x(\d{1,6}G?)(\[(\d{1,6}G?,?)*\])?(\((\d{1,6})\))?' BRKOUT_PATTERN_GROUPS = 6 @@ -375,22 +375,12 @@ def get_config(self): lanes = self._lanes[lane_id:lane_id + lanes_per_port] - alias = self._breakout_capabilities[alias_id] - # If alias follows new SONiC port naming convention (e.g. et[sX]pY[abcd]), - # we can derive subport directly based on the breakout mode. Otherwise, - # fallback to the old method. - if m := re.match(r"et(s\d+)?p\d+([a-l])?", alias): - breakout = m.groups()[-1] - subport = "0" if not breakout else str(ord(breakout) - ord('a') + 1) - else: - subport = "0" if total_num_ports == 1 else str(alias_id + 1) - port_config = { - 'alias': alias, + 'alias': self._breakout_capabilities[alias_id], 'lanes': ','.join(lanes), 'speed': str(entry.default_speed), 'index': self._indexes[lane_id], - 'subport': subport + 'subport': "0" if total_num_ports == 1 else str(alias_id + 1) } # If the lane speed is greater than 50G, enable FEC diff --git a/src/sonic-config-engine/sonic-cfggen b/src/sonic-config-engine/sonic-cfggen index d72608539a7..faf2ed84df1 100755 --- a/src/sonic-config-engine/sonic-cfggen +++ b/src/sonic-config-engine/sonic-cfggen @@ -33,7 +33,7 @@ from config_samples import generate_sample_config, get_available_config from functools import partial from minigraph import minigraph_encoder, parse_xml, parse_device_desc_xml, parse_asic_sub_role, parse_asic_switch_type, parse_hostname from portconfig import get_port_config, get_breakout_mode -from sonic_py_common.multi_asic import get_asic_id_from_name, get_asic_device_id, is_multi_asic +from sonic_py_common.multi_asic import get_asic_id_from_name, get_asic_device_id, is_multi_asic, get_asic_sub_role from sonic_py_common import device_info from swsscommon.swsscommon import ConfigDBConnector, SonicDBConfig, ConfigDBPipeConnector from asic_sensors_config import get_asic_sensors_config @@ -348,12 +348,19 @@ def main(): args = parser.parse_args() platform = device_info.get_platform() + data = {} + + bmc_data = None + if platform: + bmc_data = device_info.get_bmc_data() + if bmc_data: + for key, value in bmc_data.items(): + deep_update(data, {'DEVICE_METADATA': {'bmc': {key:value}}}) db_kwargs = {} if args.redis_unix_sock_file is not None: db_kwargs['unix_socket_path'] = args.redis_unix_sock_file - data = {} hwsku = args.hwsku asic_name = args.namespace asic_id = None @@ -472,6 +479,10 @@ def main(): else: hardware_data['DEVICE_METADATA']['localhost'].update(asic_id=device_id) + sub_role = get_asic_sub_role(asic_id) + if sub_role is not None: + hardware_data['DEVICE_METADATA']['localhost'].update(sub_role=sub_role) + deep_update(data, hardware_data) asic_sensors = {} diff --git a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf index 8c29a8289a3..2fd31e61c28 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf index 03e18a4a519..e0bf09762e0 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf b/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf index a4c50cf6796..aefcba80def 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py2/zebra_frr_dualtor.conf b/src/sonic-config-engine/tests/sample_output/py2/zebra_frr_dualtor.conf index c8bc3658420..c8e07ecb838 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/zebra_frr_dualtor.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/zebra_frr_dualtor.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf index f047976b5a3..7ad170b0cfd 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf index 91aa73b8369..114e10c2030 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf b/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf index 7db3d3f42d3..caa34b2da07 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-config-engine/tests/sample_output/py3/zebra_frr_dualtor.conf b/src/sonic-config-engine/tests/sample_output/py3/zebra_frr_dualtor.conf index 584b761905a..60c5108f824 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/zebra_frr_dualtor.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/zebra_frr_dualtor.conf @@ -4,8 +4,7 @@ ! file: zebra.conf ! ! -! Force disable next hop group support -no zebra nexthop kernel enable +zebra nexthop kernel enable ! ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups diff --git a/src/sonic-ctrmgrd-rs/debian/rules b/src/sonic-ctrmgrd-rs/debian/rules index 0ecfaac60f9..9771b9f0c79 100755 --- a/src/sonic-ctrmgrd-rs/debian/rules +++ b/src/sonic-ctrmgrd-rs/debian/rules @@ -9,6 +9,10 @@ override_dh_auto_build: cargo build --release --all +override_dh_auto_install: + # do nothing + : + override_dh_auto_clean: cargo clean --release diff --git a/src/sonic-dash-api b/src/sonic-dash-api index 82ff211fca9..18a29c1c8a2 160000 --- a/src/sonic-dash-api +++ b/src/sonic-dash-api @@ -1 +1 @@ -Subproject commit 82ff211fca9c6032f8e2656886d090704cde8f75 +Subproject commit 18a29c1c8a21aeb22a4893c786564acaf8212156 diff --git a/src/sonic-dash-ha b/src/sonic-dash-ha index b38d8fb68c7..8f9893d4a59 160000 --- a/src/sonic-dash-ha +++ b/src/sonic-dash-ha @@ -1 +1 @@ -Subproject commit b38d8fb68c7e1a1d3c866fdb65e840c7da1021d8 +Subproject commit 8f9893d4a59c6dd29115d5393b073be4d461c037 diff --git a/src/sonic-dash-ha.patch/0001-build-use-relative-path-when-building-cargo-dependen.patch b/src/sonic-dash-ha.patch/0001-build-use-relative-path-when-building-cargo-dependen.patch new file mode 100644 index 00000000000..875f50612fd --- /dev/null +++ b/src/sonic-dash-ha.patch/0001-build-use-relative-path-when-building-cargo-dependen.patch @@ -0,0 +1,25 @@ +From 3402023e04bcfce7b94127a287c02b9a53b37d2a Mon Sep 17 00:00:00 2001 +From: Liu Shilong +Date: Wed, 10 Dec 2025 13:44:52 +0800 +Subject: [PATCH] [build] use relative path when building cargo dependency + swss-common. + +--- + Cargo.toml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 3fc3f23..1bbfe4d 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -97,8 +97,8 @@ swss-serde = { version = "0.1.0", path = "crates/swss-serde" } + swbus-actor = { version = "0.1.0", path = "crates/swbus-actor" } + sonicdb-derive = { version = "0.1.0", path = "crates/sonicdb-derive" } + sonic-dash-api-proto = { version = "0.1.0", path = "crates/sonic-dash-api-proto" } +-swss-common = { git = "https://github.com/sonic-net/sonic-swss-common.git", branch = "master" } +-swss-common-testing = { git = "https://github.com/sonic-net/sonic-swss-common.git", branch = "master" } ++swss-common = { path = "../sonic-swss-common/crates/swss-common" } ++swss-common-testing = { path = "../sonic-swss-common/crates/swss-common-testing" } + + # Dev dependencies + criterion = "0.5" diff --git a/src/sonic-dash-ha.patch/series b/src/sonic-dash-ha.patch/series new file mode 100644 index 00000000000..b77e31d2cbf --- /dev/null +++ b/src/sonic-dash-ha.patch/series @@ -0,0 +1 @@ +0001-build-use-relative-path-when-building-cargo-dependen.patch diff --git a/src/sonic-dbsyncd b/src/sonic-dbsyncd index 2f0af22ff71..22335e06886 160000 --- a/src/sonic-dbsyncd +++ b/src/sonic-dbsyncd @@ -1 +1 @@ -Subproject commit 2f0af22ff71768e35dfeb21ad200ea67903c8827 +Subproject commit 22335e0688627429967d7c751c7ff8c9c6bb6d00 diff --git a/src/sonic-device-data/tests/media_checker b/src/sonic-device-data/tests/media_checker index 73ac91f87da..0c32caf124c 100755 --- a/src/sonic-device-data/tests/media_checker +++ b/src/sonic-device-data/tests/media_checker @@ -11,7 +11,8 @@ si_param_list = ["preemphasis", "idriver", "ipredriver", \ "main", "pre1", "pre2", "pre3", \ "post1", "post2", "post3", "attn", \ "ob_m2lp", "ob_alev_out", "obplev", "obnlev", \ - "regn_bfm1p", "regn_bfm1n", "unreliable_los", "interface_type"] + "regn_bfm1p", "regn_bfm1n", "unreliable_los", \ + "rxpolarity", "interface_type"] lane_speed_key_prefix = 'speed:' lane_prefix = "lane" comma_separator = "," diff --git a/src/sonic-device-data/tests/permitted_list b/src/sonic-device-data/tests/permitted_list index 4d442f1b43c..7efe9b040d9 100644 --- a/src/sonic-device-data/tests/permitted_list +++ b/src/sonic-device-data/tests/permitted_list @@ -365,3 +365,4 @@ system_contains_multiple_pipe_device appl_param_rcy_mirror_ports_range rcy_mirror_to_forward_port_map port_priorities_sch +sai_lag_default_crc_hash diff --git a/src/sonic-eventd/Makefile b/src/sonic-eventd/Makefile index bc30a721c3d..f907a3a14d1 100644 --- a/src/sonic-eventd/Makefile +++ b/src/sonic-eventd/Makefile @@ -11,10 +11,10 @@ EVENTD_MONIT_CONF := tools/monit_events CP := cp MKDIR := mkdir CC := g++ -LIBS := -levent -lhiredis -lswsscommon -lpthread -lboost_thread -lboost_system -lzmq -lboost_serialization -luuid -llua5.1 +LIBS := -lhiredis -lswsscommon -lzmq -lboost_serialization -llua5.1 TEST_LIBS := -L/usr/src/gtest -lgtest -lgtest_main -lgmock -lgmock_main -CFLAGS += -Wall -std=c++17 -fPIE -I$(PWD)/../sonic-swss-common/common +CFLAGS += -Wall -std=c++17 -fPIE PWD := $(shell pwd) ifneq ($(MAKECMDGOALS),clean) @@ -87,7 +87,7 @@ deinstall: $(RM) -rf $(DESTDIR)/etc clean: - -$(RM) $(EVENTD_TARGET) $(OBJS) $(EVENTD_TOOL) $(TOOL_OBJS) $(RSYSLOG-PLUGIN_TARGET) $(RSYSLOG-PLUGIN_OBJS) $(EVENTD_TEST) $(TEST_OBJS) $(RSYSLOG-PLUGIN_TEST) $(RSYSLOG-PLUGIN-TEST_OBJS) + -$(RM) $(EVENTD_TARGET) $(OBJS) $(EVENTD_TOOL) $(TOOL_OBJS) $(RSYSLOG-PLUGIN_TARGET) $(RSYSLOG-PLUGIN_OBJS) $(EVENTD_TEST) $(TEST_OBJS) $(RSYSLOG-PLUGIN_TEST) $(RSYSLOG-PLUGIN-TEST_OBJS) $(C_DEPS) -@echo ' ' .PHONY: all clean dependents diff --git a/src/sonic-eventd/debian/control b/src/sonic-eventd/debian/control index c583e288e41..ebf61a9f69b 100644 --- a/src/sonic-eventd/debian/control +++ b/src/sonic-eventd/debian/control @@ -2,7 +2,7 @@ Source: sonic-eventd Section: devel Priority: optional Maintainer: Renuka Manavalan -Build-Depends: debhelper (>= 12.0.0), libevent-dev, libboost-thread-dev | libboost-thread1.83-dev, libboost-system-dev | libboost-system1.83-dev, libswsscommon-dev, liblua5.1-0 +Build-Depends: debhelper (>= 12.0.0), libswsscommon-dev, liblua5.1-0, libzmq3-dev, libboost-serialization1.83-dev Standards-Version: 3.9.3 Homepage: https://github.com/Azure/sonic-buildimage XS-Go-Import-Path: github.com/Azure/sonic-buildimage diff --git a/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.cpp b/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.cpp index 52a70fd182a..a17d7f59d6e 100644 --- a/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.cpp +++ b/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.cpp @@ -4,12 +4,13 @@ #include #include #include +#include #include "rsyslog_plugin.h" #include using json = nlohmann::json; -bool RsyslogPlugin::g_running; +std::atomic RsyslogPlugin::g_running; bool RsyslogPlugin::onMessage(string msg, lua_State* luaState) { string tag; diff --git a/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.h b/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.h index ae6c9baf963..c5662933d52 100644 --- a/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.h +++ b/src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.h @@ -10,9 +10,10 @@ extern "C" #include #include #include +#include +#include +#include #include "syslog_parser.h" -#include "events.h" -#include "logger.h" using namespace std; using namespace swss; @@ -25,7 +26,7 @@ using namespace swss; class RsyslogPlugin { public: - static bool g_running; + static atomic g_running; int onInit(); bool onMessage(string msg, lua_State* luaState); void run(); diff --git a/src/sonic-eventd/rsyslog_plugin/syslog_parser.cpp b/src/sonic-eventd/rsyslog_plugin/syslog_parser.cpp index 399e319680a..bd7d2fa6102 100644 --- a/src/sonic-eventd/rsyslog_plugin/syslog_parser.cpp +++ b/src/sonic-eventd/rsyslog_plugin/syslog_parser.cpp @@ -1,7 +1,7 @@ #include #include +#include #include "syslog_parser.h" -#include "logger.h" /** * Parses syslog message and returns structured event diff --git a/src/sonic-eventd/rsyslog_plugin/syslog_parser.h b/src/sonic-eventd/rsyslog_plugin/syslog_parser.h index 0d5217a35ac..6f68399a118 100644 --- a/src/sonic-eventd/rsyslog_plugin/syslog_parser.h +++ b/src/sonic-eventd/rsyslog_plugin/syslog_parser.h @@ -12,7 +12,7 @@ extern "C" #include #include #include -#include "events.h" +#include #include "timestamp_formatter.h" using namespace std; diff --git a/src/sonic-eventd/rsyslog_plugin/timestamp_formatter.cpp b/src/sonic-eventd/rsyslog_plugin/timestamp_formatter.cpp index cc179adbbc7..53730f2762e 100644 --- a/src/sonic-eventd/rsyslog_plugin/timestamp_formatter.cpp +++ b/src/sonic-eventd/rsyslog_plugin/timestamp_formatter.cpp @@ -1,7 +1,7 @@ #include +#include +#include #include "timestamp_formatter.h" -#include "logger.h" -#include "events.h" using namespace std; diff --git a/src/sonic-eventd/rsyslog_plugin_tests/rsyslog_plugin_ut.cpp b/src/sonic-eventd/rsyslog_plugin_tests/rsyslog_plugin_ut.cpp index aafd357006e..14f322f36d2 100644 --- a/src/sonic-eventd/rsyslog_plugin_tests/rsyslog_plugin_ut.cpp +++ b/src/sonic-eventd/rsyslog_plugin_tests/rsyslog_plugin_ut.cpp @@ -9,9 +9,9 @@ extern "C" #include #include #include +#include #include "gtest/gtest.h" #include -#include "events.h" #include "../rsyslog_plugin/rsyslog_plugin.h" #include "../rsyslog_plugin/syslog_parser.h" #include "../rsyslog_plugin/timestamp_formatter.h" diff --git a/src/sonic-eventd/src/eventd.cpp b/src/sonic-eventd/src/eventd.cpp index 67ee09ce1d2..d36bc7a4950 100644 --- a/src/sonic-eventd/src/eventd.cpp +++ b/src/sonic-eventd/src/eventd.cpp @@ -1,7 +1,7 @@ #include #include +#include #include "eventd.h" -#include "dbconnector.h" #include "zmq.h" /* @@ -57,8 +57,22 @@ static bool s_unit_testing = false; int eventd_proxy::init() { - int ret = -1, rc = 0; - SWSS_LOG_INFO("Start xpub/xsub proxy"); + SWSS_LOG_INFO("Start xpub/xsub proxy"); + + m_thr = thread(&eventd_proxy::run, this); + + while (!m_init_done) { + this_thread::sleep_for(chrono::milliseconds(10)); + } + + return m_init_result; +} + +void +eventd_proxy::run() +{ + int rc = 0; + SWSS_LOG_INFO("Running xpub/xsub proxy"); m_frontend = zmq_socket(m_ctx, ZMQ_XSUB); RET_ON_ERR(m_frontend != NULL, "failing to get ZMQ_XSUB socket"); @@ -78,20 +92,33 @@ eventd_proxy::init() rc = zmq_bind(m_capture, get_config(string(CAPTURE_END_KEY)).c_str()); RET_ON_ERR(rc == 0, "Failing to bind capture PUB to %s", get_config(string(CAPTURE_END_KEY)).c_str()); - m_thr = thread(&eventd_proxy::run, this); - ret = 0; -out: - return ret; -} - -void -eventd_proxy::run() -{ - SWSS_LOG_INFO("Running xpub/xsub proxy"); + /* Signal successful initialization to init() */ + m_init_result = 0; + m_init_done = true; /* runs forever until zmq context is terminated */ zmq_proxy(m_frontend, m_backend, m_capture); +out: + /* Signal failure if we got here before successful init */ + if (!m_init_done) { + m_init_result = 1; + m_init_done = true; + } + + if (m_frontend != NULL) { + zmq_close(m_frontend); + m_frontend = NULL; + } + if (m_backend != NULL) { + zmq_close(m_backend); + m_backend = NULL; + } + if (m_capture != NULL) { + zmq_close(m_capture); + m_capture = NULL; + } + SWSS_LOG_INFO("Stopped xpub/xsub proxy"); } @@ -111,25 +138,27 @@ stats_collector::stats_collector() : void stats_collector::set_heartbeat_interval(int val) { + int interval_count_to_set = 0; if (val > 0) { /* Round to highest possible multiples of MIN */ - m_heartbeats_interval_cnt = + interval_count_to_set = (((val * 1000) + STATS_HEARTBEAT_MIN - 1) / STATS_HEARTBEAT_MIN); } else if (val == 0) { /* Least possible */ - m_heartbeats_interval_cnt = 1; + interval_count_to_set = 1; } else if (val == -1) { /* Turn off heartbeat */ - m_heartbeats_interval_cnt = 0; + interval_count_to_set = 0; SWSS_LOG_INFO("Heartbeat turned OFF"); } /* Any other value is ignored as invalid */ + m_heartbeats_interval_cnt = interval_count_to_set; SWSS_LOG_INFO("Set heartbeat: val=%d secs cnt=%d min=%d ms final=%d secs", - val, m_heartbeats_interval_cnt, STATS_HEARTBEAT_MIN, - (m_heartbeats_interval_cnt * STATS_HEARTBEAT_MIN / 1000)); + val, interval_count_to_set, STATS_HEARTBEAT_MIN, + (interval_count_to_set * STATS_HEARTBEAT_MIN / 1000)); } @@ -255,7 +284,7 @@ stats_collector::run_collector() if (rc < 0) { SWSS_LOG_ERROR( "event_receive failed with rc=%d; stats:published(%lu)", rc, - m_lst_counters[INDEX_COUNTERS_EVENTS_PUBLISHED]); + m_lst_counters[INDEX_COUNTERS_EVENTS_PUBLISHED].load()); } if (!m_pause_heartbeat && (m_heartbeats_interval_cnt > 0) && ++hb_cntr >= m_heartbeats_interval_cnt) { @@ -525,7 +554,7 @@ capture_service::set_control(capture_control_t ctrl, event_serialized_lst_t *lst int duration = CAPTURE_SERVICE_POLLING_DURATION; /* Can go in single step only. */ - RET_ON_ERR((ctrl - m_ctrl) == 1, "m_ctrl(%d)+1 < ctrl(%d)", m_ctrl, ctrl); + RET_ON_ERR((ctrl - m_ctrl) == 1, "m_ctrl(%d)+1 < ctrl(%d)", m_ctrl.load(), ctrl); switch(ctrl) { case INIT_CAPTURE: @@ -794,12 +823,12 @@ run_eventd_service() service.close_service(); stats_instance.stop(); - if (proxy != NULL) { - delete proxy; - } if (zctx != NULL) { zmq_ctx_term(zctx); } + if (proxy != NULL) { + delete proxy; + } SWSS_LOG_INFO("Eventd service exiting\n"); } diff --git a/src/sonic-eventd/src/eventd.h b/src/sonic-eventd/src/eventd.h index 960dfb8b8dc..5347d003ce8 100644 --- a/src/sonic-eventd/src/eventd.h +++ b/src/sonic-eventd/src/eventd.h @@ -1,10 +1,11 @@ /* * Header file for eventd daemon */ -#include "table.h" -#include "events_service.h" -#include "events.h" -#include "events_wrap.h" +#include +#include +#include +#include +#include #define ARRAY_SIZE(l) (sizeof(l)/sizeof((l)[0])) @@ -38,13 +39,9 @@ class eventd_proxy { public: eventd_proxy(void *ctx) : m_ctx(ctx), m_frontend(NULL), m_backend(NULL), - m_capture(NULL) {}; + m_capture(NULL), m_init_done(false), m_init_result(0) {}; ~eventd_proxy() { - zmq_close(m_frontend); - zmq_close(m_backend); - zmq_close(m_capture); - if (m_thr.joinable()) m_thr.join(); } @@ -59,6 +56,8 @@ class eventd_proxy void *m_backend; void *m_capture; thread m_thr; + std::atomic m_init_done; + std::atomic m_init_result; }; @@ -141,11 +140,11 @@ class stats_collector void run_writer(); - atomic m_updated; + std::atomic m_updated; - counters_t m_lst_counters[COUNTERS_EVENTS_TOTAL]; + std::atomic m_lst_counters[COUNTERS_EVENTS_TOTAL]; - bool m_shutdown; + std::atomic m_shutdown; thread m_thr_collector; thread m_thr_writer; @@ -153,11 +152,11 @@ class stats_collector shared_ptr m_counters_db; shared_ptr m_stats_table; - bool m_pause_heartbeat; + std::atomic m_pause_heartbeat; - uint64_t m_heartbeats_published; + std::atomic m_heartbeats_published; - int m_heartbeats_interval_cnt; + std::atomic m_heartbeats_interval_cnt; }; /* @@ -234,8 +233,8 @@ class capture_service void *m_ctx; stats_collector *m_stats_instance; - bool m_cap_run; - capture_control_t m_ctrl; + std::atomic m_cap_run; + std::atomic m_ctrl; thread m_thr; int m_cache_max; diff --git a/src/sonic-eventd/src/main.cpp b/src/sonic-eventd/src/main.cpp index 698c39dbfce..fec35882d07 100644 --- a/src/sonic-eventd/src/main.cpp +++ b/src/sonic-eventd/src/main.cpp @@ -1,4 +1,4 @@ -#include "logger.h" +#include #include "eventd.h" void run_eventd_service(); diff --git a/src/sonic-eventd/tests/eventd_ut.cpp b/src/sonic-eventd/tests/eventd_ut.cpp index 6c2ddb11604..338f3ae7c04 100644 --- a/src/sonic-eventd/tests/eventd_ut.cpp +++ b/src/sonic-eventd/tests/eventd_ut.cpp @@ -5,9 +5,10 @@ #include #include #include +#include +#include +#include #include "gtest/gtest.h" -#include "events_common.h" -#include "events.h" #include "../src/eventd.h" using namespace std; @@ -150,8 +151,7 @@ static const test_data_t ldata[] = { }, }; -void run_cap(void *zctx, bool &term, string &read_source, - int &cnt) +void run_cap(void *zctx, atomic &term, atomic &cnt) { void *mock_cap = zmq_socket (zctx, ZMQ_SUB); string source; @@ -176,8 +176,8 @@ void run_cap(void *zctx, bool &term, string &read_source, zmq_close(mock_cap); } -void run_sub(void *zctx, bool &term, string &read_source, internal_events_lst_t &lst, - int &cnt) +void run_sub(void *zctx, atomic &term, internal_events_lst_t &lst, + atomic &cnt) { void *mock_sub = zmq_socket (zctx, ZMQ_SUB); string source; @@ -192,7 +192,6 @@ void run_sub(void *zctx, bool &term, string &read_source, internal_events_lst_t while(!term) { if (0 == zmq_message_read(mock_sub, 0, source, ev_int)) { lst.push_back(ev_int); - read_source.swap(source); cnt = (int)lst.size(); } } @@ -222,11 +221,11 @@ void run_pub(void *mock_pub, const string wr_source, internal_events_lst_t &lst) TEST(eventd, proxy) { printf("Proxy TEST started\n"); - bool term_sub = false; - bool term_cap = false; - string rd_csource, rd_source, wr_source("hello"); + atomic term_sub = false; + atomic term_cap = false; + string wr_source("hello"); internal_events_lst_t rd_evts, wr_evts; - int rd_evts_sz = 0, rd_cevts_sz = 0; + atomic rd_evts_sz = 0, rd_cevts_sz = 0; int wr_sz; void *zctx = zmq_ctx_new(); @@ -239,10 +238,10 @@ TEST(eventd, proxy) EXPECT_EQ(0, pxy->init()); /* capture in a thread */ - thread thrc(&run_cap, zctx, ref(term_cap), ref(rd_csource), ref(rd_cevts_sz)); + thread thrc(&run_cap, zctx, ref(term_cap), ref(rd_cevts_sz)); /* subscriber in a thread */ - thread thr(&run_sub, zctx, ref(term_sub), ref(rd_source), ref(rd_evts), ref(rd_evts_sz)); + thread thr(&run_sub, zctx, ref(term_sub), ref(rd_evts), ref(rd_evts_sz)); /* Init pub connection */ void *mock_pub = init_pub(zctx); @@ -253,8 +252,8 @@ TEST(eventd, proxy) wr_evts.push_back(create_ev(ldata[i])); } - EXPECT_TRUE(rd_evts.empty()); - EXPECT_TRUE(rd_source.empty()); + EXPECT_EQ(rd_evts_sz, 0); + EXPECT_EQ(rd_cevts_sz, 0); /* Publish events. */ run_pub(mock_pub, wr_source, wr_evts); @@ -276,11 +275,11 @@ TEST(eventd, proxy) zmq_close(mock_pub); + zmq_ctx_term(zctx); + delete pxy; pxy = NULL; - zmq_ctx_term(zctx); - /* Provide time for async proxy removal to complete */ this_thread::sleep_for(chrono::milliseconds(200)); @@ -291,9 +290,8 @@ TEST(eventd, capture) { printf("Capture TEST started\n"); - bool term_sub = false; - string sub_source; - int sub_evts_sz = 0; + atomic term_sub = false; + atomic sub_evts_sz = 0; internal_events_lst_t sub_evts; stats_collector stats_instance; @@ -330,7 +328,7 @@ TEST(eventd, capture) EXPECT_EQ(0, pcap->set_control(INIT_CAPTURE)); /* Run subscriber; Else publisher will drop events on floor, with no subscriber. */ - thread thr_sub(&run_sub, zctx, ref(term_sub), ref(sub_source), ref(sub_evts), ref(sub_evts_sz)); + thread thr_sub(&run_sub, zctx, ref(term_sub), ref(sub_evts), ref(sub_evts_sz)); EXPECT_TRUE(init_cache > 1); EXPECT_TRUE((cache_max+3) < (int)ARRAY_SIZE(ldata)); @@ -410,9 +408,6 @@ TEST(eventd, capture) EXPECT_EQ(last_evts_read, last_evts_exp); EXPECT_EQ(overflow, overflow_exp); - delete pxy; - pxy = NULL; - delete pcap; pcap = NULL; @@ -421,6 +416,9 @@ TEST(eventd, capture) zmq_close(mock_pub); zmq_ctx_term(zctx); + delete pxy; + pxy = NULL; + /* Provide time for async proxy removal to complete */ this_thread::sleep_for(chrono::milliseconds(200)); @@ -435,9 +433,8 @@ TEST(eventd, captureCacheMax) * Need to run subscriber; Else publisher would skip publishing * in the absence of any subscriber. */ - bool term_sub = false; - string sub_source; - int sub_evts_sz = 0; + atomic term_sub = false; + atomic sub_evts_sz = 0; internal_events_lst_t sub_evts; stats_collector stats_instance; @@ -473,7 +470,7 @@ TEST(eventd, captureCacheMax) EXPECT_TRUE(init_cache > 1); /* Run subscriber; Else publisher will drop events on floor, with no subscriber. */ - thread thr_sub(&run_sub, zctx, ref(term_sub), ref(sub_source), ref(sub_evts), ref(sub_evts_sz)); + thread thr_sub(&run_sub, zctx, ref(term_sub), ref(sub_evts), ref(sub_evts_sz)); /* Collect few serailized strings of events for startup cache */ for(int i=0; i < init_cache; ++i) { @@ -539,9 +536,6 @@ TEST(eventd, captureCacheMax) EXPECT_TRUE(last_evts_read.empty()); EXPECT_EQ(overflow, 0); - delete pxy; - pxy = NULL; - delete pcap; pcap = NULL; @@ -550,6 +544,9 @@ TEST(eventd, captureCacheMax) zmq_close(mock_pub); zmq_ctx_term(zctx); + delete pxy; + pxy = NULL; + /* Provide time for async proxy removal to complete */ this_thread::sleep_for(chrono::milliseconds(200)); @@ -718,12 +715,10 @@ void wait_for_heartbeat(stats_collector &stats_instance, long unsigned int cnt, int wait_ms = 3000) { - int diff = 0; - auto st = duration_cast(system_clock::now().time_since_epoch()).count(); while (stats_instance.heartbeats_published() == cnt) { auto en = duration_cast(system_clock::now().time_since_epoch()).count(); - diff = en - st; + auto diff = en - st; if (diff > wait_ms) { EXPECT_LE(diff, wait_ms); EXPECT_EQ(cnt, stats_instance.heartbeats_published()); @@ -789,10 +784,10 @@ TEST(eventd, heartbeat) stats_instance.stop(); - delete pxy; - zmq_ctx_term(zctx); + delete pxy; + printf("heartbeat TEST completed\n"); } @@ -920,11 +915,12 @@ TEST(eventd, testDB) stats_instance.stop(); - delete pxy; delete pcap; zmq_ctx_term(zctx); + delete pxy; + printf("DB TEST completed\n"); } diff --git a/src/sonic-eventd/tests/main.cpp b/src/sonic-eventd/tests/main.cpp index f0d011305a5..3244d303b7a 100644 --- a/src/sonic-eventd/tests/main.cpp +++ b/src/sonic-eventd/tests/main.cpp @@ -1,5 +1,5 @@ #include "gtest/gtest.h" -#include "dbconnector.h" +#include #include #include diff --git a/src/sonic-eventd/tools/events_tool.cpp b/src/sonic-eventd/tools/events_tool.cpp index 8b969b2f80a..76e0e1f3139 100644 --- a/src/sonic-eventd/tools/events_tool.cpp +++ b/src/sonic-eventd/tools/events_tool.cpp @@ -1,8 +1,8 @@ #include #include #include -#include "events.h" -#include "events_common.h" +#include +#include /* * Sample i/p file contents for send @@ -77,7 +77,7 @@ t_map_to_str(const Map &m) string sep; _ss << "{"; - for (const auto elem: m) { + for (const auto &elem: m) { _ss << sep << "{" << elem.first << "," << elem.second << "}"; if (sep.empty()) { sep = ", "; diff --git a/src/sonic-frr/dplane_fpm_sonic/dplane_fpm_sonic.c b/src/sonic-frr/dplane_fpm_sonic/dplane_fpm_sonic.c index 151ec8b996b..19312ae0bf1 100644 --- a/src/sonic-frr/dplane_fpm_sonic/dplane_fpm_sonic.c +++ b/src/sonic-frr/dplane_fpm_sonic/dplane_fpm_sonic.c @@ -1153,7 +1153,6 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, { struct zebra_srv6 *srv6 = zebra_srv6_get_default(); struct zebra_vrf *zvrf; - struct srv6_locator *l, *locator = NULL; struct listnode *node; struct rtattr *nest; const struct seg6local_context *seg6local_ctx; @@ -1165,6 +1164,7 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, uint32_t table_id; uint32_t action; uint32_t block_len, node_len, func_len, arg_len; + bool is_usid = false; struct { struct nlmsghdr n; @@ -1294,23 +1294,18 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, if (cmd == RTM_DELSRV6LOCALSID) return NLMSG_ALIGN(req->n.nlmsg_len); - for (ALL_LIST_ELEMENTS_RO(srv6->locators, node, l)) { - if (prefix_match(&l->prefix, p)) { - locator = l; - break; - } - } + is_usid = CHECK_SRV6_FLV_OP(nexthop->nh_srv6->seg6local_ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); switch (nexthop->nh_srv6->seg6local_action) { case ZEBRA_SEG6_LOCAL_ACTION_END: - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UN : FPM_SRV6_LOCALSID_ACTION_END; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UN : FPM_SRV6_LOCALSID_ACTION_END; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) return -1; break; case ZEBRA_SEG6_LOCAL_ACTION_END_X: - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UA : FPM_SRV6_LOCALSID_ACTION_END_X; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UA : FPM_SRV6_LOCALSID_ACTION_END_X; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) @@ -1336,7 +1331,7 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, return -1; break; case ZEBRA_SEG6_LOCAL_ACTION_END_DX6: - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UDX6 : FPM_SRV6_LOCALSID_ACTION_END_DX6; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UDX6 : FPM_SRV6_LOCALSID_ACTION_END_DX6; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) @@ -1347,7 +1342,7 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, return -1; break; case ZEBRA_SEG6_LOCAL_ACTION_END_DX4: - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UDX4 : FPM_SRV6_LOCALSID_ACTION_END_DX4; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UDX4 : FPM_SRV6_LOCALSID_ACTION_END_DX4; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) @@ -1362,7 +1357,7 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, if (!zvrf) return false; - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UDT6 : FPM_SRV6_LOCALSID_ACTION_END_DT6; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UDT6 : FPM_SRV6_LOCALSID_ACTION_END_DT6; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) @@ -1378,7 +1373,7 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, if (!zvrf) return false; - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UDT4 : FPM_SRV6_LOCALSID_ACTION_END_DT4; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UDT4 : FPM_SRV6_LOCALSID_ACTION_END_DT4; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) @@ -1394,7 +1389,7 @@ static ssize_t netlink_srv6_localsid_msg_encode(int cmd, if (!zvrf) return false; - action = (locator && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID)) ? FPM_SRV6_LOCALSID_ACTION_UDT46 : FPM_SRV6_LOCALSID_ACTION_END_DT46; + action = is_usid ? FPM_SRV6_LOCALSID_ACTION_UDT46 : FPM_SRV6_LOCALSID_ACTION_END_DT46; if (!nl_attr_put32(&req->n, datalen, FPM_SRV6_LOCALSID_ACTION, action)) diff --git a/src/sonic-frr/patch/0098-SRv6-Add-support-for-multiple-SRv6-locators.patch b/src/sonic-frr/patch/0098-SRv6-Add-support-for-multiple-SRv6-locators.patch new file mode 100644 index 00000000000..46b3255340b --- /dev/null +++ b/src/sonic-frr/patch/0098-SRv6-Add-support-for-multiple-SRv6-locators.patch @@ -0,0 +1,6459 @@ +From 52fa57314df2d8c2ad1d3fa88fecee8c155db93c Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Wed, 14 May 2025 17:03:38 +0000 +Subject: [PATCH 01/25] *: Add locator to SID release API + +Daemons can release an SRv6 SID by calling the +srv6_manager_release_sid() API exposed by SID Manager. + +Currently, the srv6_manager_release_sid() API takes two arguments: +zclient and SID context to be released. So far, these two arguments +were enough to release a SID, because a SID was uniquely identified by +the SID context. + +int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx); + +However, with the support from multiple locators, a SID context can be +allocated from multiple locators. This means that the SID context is no +longer sufficient to uniquely identify a SID. Instead, a SID is +uniquely identified by the pair (SID context, locator). + +This commit extends the srv6_manager_release_sid() API by adding a new +argument locator_name. + +int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, + const char *locator_name); + +Signed-off-by: Carmine Scarpitta +--- + bgpd/bgp_mplsvpn.c | 20 +++++++++--------- + bgpd/bgp_zebra.c | 7 ++++--- + bgpd/bgp_zebra.h | 2 +- + isisd/isis_srv6.c | 4 ++-- + isisd/isis_zebra.c | 7 ++++--- + isisd/isis_zebra.h | 2 +- + lib/zclient.c | 19 +++++++++++++++-- + lib/zclient.h | 4 ++-- + staticd/static_zebra.c | 2 +- + zebra/zapi_msg.c | 17 +++++++++++++++- + zebra/zebra_srv6.c | 46 +++++++++++++++++++++++++++++------------- + zebra/zebra_srv6.h | 11 +++++----- + 12 files changed, 96 insertions(+), 45 deletions(-) + +diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c +index b00f3d189c72..c2736cd1fafe 100644 +--- a/bgpd/bgp_mplsvpn.c ++++ b/bgpd/bgp_mplsvpn.c +@@ -534,7 +534,7 @@ void vpn_leak_zebra_vrf_sid_withdraw_per_af(struct bgp *bgp, afi_t afi) + ctx.vrf_id = bgp->vrf_id; + ctx.behavior = afi == AFI_IP ? ZEBRA_SEG6_LOCAL_ACTION_END_DT4 + : ZEBRA_SEG6_LOCAL_ACTION_END_DT6; +- bgp_zebra_release_srv6_sid(&ctx); ++ bgp_zebra_release_srv6_sid(&ctx, bgp->vpn_policy[afi].tovpn_sid_locator->name); + } + + /* +@@ -576,7 +576,7 @@ void vpn_leak_zebra_vrf_sid_withdraw_per_vrf(struct bgp *bgp) + + ctx.vrf_id = bgp->vrf_id; + ctx.behavior = ZEBRA_SEG6_LOCAL_ACTION_END_DT46; +- bgp_zebra_release_srv6_sid(&ctx); ++ bgp_zebra_release_srv6_sid(&ctx, bgp->tovpn_sid_locator->name); + } + + /* +@@ -963,19 +963,19 @@ void delete_vrf_tovpn_sid_per_af(struct bgp *bgp_vpn, struct bgp *bgp_vrf, + return; + } + +- srv6_locator_free(bgp_vrf->vpn_policy[afi].tovpn_sid_locator); +- bgp_vrf->vpn_policy[afi].tovpn_sid_locator = NULL; +- + if (bgp_vrf->vpn_policy[afi].tovpn_sid) { + ctx.vrf_id = bgp_vrf->vrf_id; + ctx.behavior = afi == AFI_IP ? ZEBRA_SEG6_LOCAL_ACTION_END_DT4 + : ZEBRA_SEG6_LOCAL_ACTION_END_DT6; +- bgp_zebra_release_srv6_sid(&ctx); ++ bgp_zebra_release_srv6_sid(&ctx, bgp_vrf->vpn_policy[afi].tovpn_sid_locator->name); + + sid_unregister(bgp_vpn, bgp_vrf->vpn_policy[afi].tovpn_sid); + XFREE(MTYPE_BGP_SRV6_SID, bgp_vrf->vpn_policy[afi].tovpn_sid); + } + bgp_vrf->vpn_policy[afi].tovpn_sid_transpose_label = 0; ++ ++ srv6_locator_free(bgp_vrf->vpn_policy[afi].tovpn_sid_locator); ++ bgp_vrf->vpn_policy[afi].tovpn_sid_locator = NULL; + } + + void delete_vrf_tovpn_sid_per_vrf(struct bgp *bgp_vpn, struct bgp *bgp_vrf) +@@ -1006,13 +1006,10 @@ void delete_vrf_tovpn_sid_per_vrf(struct bgp *bgp_vpn, struct bgp *bgp_vrf) + return; + } + +- srv6_locator_free(bgp_vrf->tovpn_sid_locator); +- bgp_vrf->tovpn_sid_locator = NULL; +- + if (bgp_vrf->tovpn_sid) { + ctx.vrf_id = bgp_vrf->vrf_id; + ctx.behavior = ZEBRA_SEG6_LOCAL_ACTION_END_DT46; +- bgp_zebra_release_srv6_sid(&ctx); ++ bgp_zebra_release_srv6_sid(&ctx, bgp_vrf->tovpn_sid_locator->name); + + sid_unregister(bgp_vpn, bgp_vrf->tovpn_sid); + XFREE(MTYPE_BGP_SRV6_SID, bgp_vrf->tovpn_sid); +@@ -1021,6 +1018,9 @@ void delete_vrf_tovpn_sid_per_vrf(struct bgp *bgp_vpn, struct bgp *bgp_vrf) + XFREE(MTYPE_BGP_SRV6_SID, bgp_vrf->tovpn_sid_explicit); + } + bgp_vrf->tovpn_sid_transpose_label = 0; ++ ++ srv6_locator_free(bgp_vrf->tovpn_sid_locator); ++ bgp_vrf->tovpn_sid_locator = NULL; + } + + void delete_vrf_tovpn_sid(struct bgp *bgp_vpn, struct bgp *bgp_vrf, afi_t afi) +diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c +index 4b0ee78c12a7..7fa133a5cc07 100644 +--- a/bgpd/bgp_zebra.c ++++ b/bgpd/bgp_zebra.c +@@ -4560,19 +4560,20 @@ bool bgp_zebra_request_srv6_sid(const struct srv6_sid_ctx *ctx, + * to use the SID. + * + * @param ctx Context to be associated with the SID to be released ++ * @param locator_name Parent locator of the SID + */ +-void bgp_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx) ++void bgp_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx, const char *locator_name) + { + int ret; + +- if (!ctx) ++ if (!ctx || !locator_name) + return; + + /* + * Send the Release SRv6 SID request to the SRv6 Manager and check the + * result + */ +- ret = srv6_manager_release_sid(bgp_zclient, ctx); ++ ret = srv6_manager_release_sid(bgp_zclient, ctx, locator_name); + if (ret < 0) { + zlog_warn("%s: error releasing SRv6 SID!", __func__); + return; +diff --git a/bgpd/bgp_zebra.h b/bgpd/bgp_zebra.h +index d4b5eae468e1..dec7b25f8ab9 100644 +--- a/bgpd/bgp_zebra.h ++++ b/bgpd/bgp_zebra.h +@@ -129,7 +129,7 @@ extern bool bgp_zebra_request_srv6_sid(const struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, + const char *locator_name, + uint32_t *sid_func); +-extern void bgp_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx); ++extern void bgp_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx, const char *locator_name); + + extern void bgp_zebra_send_nexthop_label(int cmd, mpls_label_t label, + ifindex_t index, vrf_id_t vrfid, +diff --git a/isisd/isis_srv6.c b/isisd/isis_srv6.c +index 720a7a502dd6..aa2cf3ea99be 100644 +--- a/isisd/isis_srv6.c ++++ b/isisd/isis_srv6.c +@@ -127,7 +127,7 @@ bool isis_srv6_locator_unset(struct isis_area *area) + * and release/free the SID context if it is not yes by other protocols. + */ + ctx.behavior = ZEBRA_SEG6_LOCAL_ACTION_END; +- isis_zebra_release_srv6_sid(&ctx); ++ isis_zebra_release_srv6_sid(&ctx, area->srv6db.config.srv6_locator_name); + + listnode_delete(area->srv6db.srv6_sids, sid); + isis_srv6_sid_free(sid); +@@ -143,7 +143,7 @@ bool isis_srv6_locator_unset(struct isis_area *area) + ctx.behavior = ZEBRA_SEG6_LOCAL_ACTION_END_X; + ctx.nh6 = sra->nexthop; + ctx.ifindex = sra->adj->circuit->interface->ifindex; +- isis_zebra_release_srv6_sid(&ctx); ++ isis_zebra_release_srv6_sid(&ctx, area->srv6db.config.srv6_locator_name); + + srv6_endx_sid_del(sra); + } +diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c +index 70bc48a41e92..48f7560bc755 100644 +--- a/isisd/isis_zebra.c ++++ b/isisd/isis_zebra.c +@@ -1478,19 +1478,20 @@ bool isis_zebra_request_srv6_sid(const struct srv6_sid_ctx *ctx, + * to use the SID. + * + * @param ctx Context to be associated with the SID to be released ++ * @param locator_name Parent locator of the SID + */ +-void isis_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx) ++void isis_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx, const char *locator_name) + { + int ret; + +- if (!ctx) ++ if (!ctx || !locator_name) + return; + + /* + * Send the Release SRv6 SID request to the SRv6 Manager and check the + * result + */ +- ret = srv6_manager_release_sid(isis_zclient, ctx); ++ ret = srv6_manager_release_sid(isis_zclient, ctx, locator_name); + if (ret < 0) { + zlog_warn("%s: error releasing SRv6 SID!", __func__); + return; +diff --git a/isisd/isis_zebra.h b/isisd/isis_zebra.h +index 83a71b7dc907..ded79ccf66f9 100644 +--- a/isisd/isis_zebra.h ++++ b/isisd/isis_zebra.h +@@ -73,6 +73,6 @@ extern void isis_zebra_request_srv6_sid_endx(struct isis_adjacency *adj); + extern bool isis_zebra_request_srv6_sid(const struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, + const char *locator_name); +-extern void isis_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx); ++extern void isis_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx, const char *locator_name); + + #endif /* _ZEBRA_ISIS_ZEBRA_H */ +diff --git a/lib/zclient.c b/lib/zclient.c +index 558626fa351f..173cb5fd7c89 100644 +--- a/lib/zclient.c ++++ b/lib/zclient.c +@@ -3583,12 +3583,15 @@ int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx + * + * @param zclient Zclient used to connect to SRv6 manager (zebra) + * @param ctx Context associated with the SRv6 SID to be removed ++ * @param locator_name Parent locator of the SID + * @result 0 on success, -1 otherwise + */ +-int srv6_manager_release_sid(struct zclient *zclient, +- const struct srv6_sid_ctx *ctx) ++int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, ++ const char *locator_name) + { + struct stream *s; ++ uint8_t flags = 0; ++ size_t len; + char buf[256]; + + if (zclient->sock < 0) { +@@ -3611,6 +3614,18 @@ int srv6_manager_release_sid(struct zclient *zclient, + /* Context associated with the SRv6 SID */ + stream_put(s, ctx, sizeof(struct srv6_sid_ctx)); + ++ /* Flags */ ++ if (locator_name) ++ SET_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_HAS_LOCATOR); ++ stream_putc(s, flags); ++ ++ /* SRv6 locator */ ++ if (CHECK_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_HAS_LOCATOR)) { ++ len = strlen(locator_name); ++ stream_putw(s, len); ++ stream_put(s, locator_name, len); ++ } ++ + /* Put length at the first point of the stream. */ + stream_putw_at(s, 0, stream_get_endp(s)); + +diff --git a/lib/zclient.h b/lib/zclient.h +index 49aa531c1b08..b730a58fedbc 100644 +--- a/lib/zclient.h ++++ b/lib/zclient.h +@@ -1125,8 +1125,8 @@ extern int srv6_manager_get_sid(struct zclient *zclient, + const struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, + const char *locator_name, uint32_t *sid_func); +-extern int srv6_manager_release_sid(struct zclient *zclient, +- const struct srv6_sid_ctx *ctx); ++extern int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, ++ const char *locator_name); + + extern enum zclient_send_status zebra_send_sr_policy(struct zclient *zclient, + int cmd, +diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c +index 82a2d41afa6f..9f462550a77d 100644 +--- a/staticd/static_zebra.c ++++ b/staticd/static_zebra.c +@@ -1168,7 +1168,7 @@ extern void static_zebra_release_srv6_sid(struct static_srv6_sid *sid) + } + + /* remove the SRv6 SID from the zebra RIB */ +- ret = srv6_manager_release_sid(static_zclient, &ctx); ++ ret = srv6_manager_release_sid(static_zclient, &ctx, sid->locator->name); + if (ret == ZCLIENT_SEND_FAILURE) + flog_err(EC_LIB_ZAPI_SOCKET, "zclient_send_get_srv6_sid() delete failed: %s", + safe_strerror(errno)); +diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c +index 20a4c26f6341..4f3727cf42c6 100644 +--- a/zebra/zapi_msg.c ++++ b/zebra/zapi_msg.c +@@ -3100,15 +3100,30 @@ static void zread_srv6_manager_release_srv6_sid(struct zserv *client, + { + struct stream *s; + struct srv6_sid_ctx ctx = {}; ++ char locator[SRV6_LOCNAME_SIZE] = { 0 }; ++ uint16_t len; ++ uint8_t flags; + + /* Get input stream */ + s = msg; + + /* Get data */ + STREAM_GET(&ctx, s, sizeof(struct srv6_sid_ctx)); ++ STREAM_GETC(s, flags); ++ if (CHECK_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_HAS_LOCATOR)) { ++ STREAM_GETW(s, len); ++ ++ if (len > SRV6_LOCNAME_SIZE) { ++ zlog_warn("Received locator name length (%u) exceeds maximum length (%u)", ++ len, SRV6_LOCNAME_SIZE); ++ goto stream_failure; ++ } ++ ++ STREAM_GET(locator, s, len); ++ } + + /* Call hook to release a SID using wrapper */ +- srv6_manager_release_sid_call(client, &ctx); ++ srv6_manager_release_sid_call(client, &ctx, locator); + + stream_failure: + return; +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 3cfc1c606ff2..2acffc1a6ee8 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -69,7 +69,8 @@ DEFINE_HOOK(srv6_manager_get_sid, + const char *locator_name), + (sid, client, ctx, sid_value, locator_name)); + DEFINE_HOOK(srv6_manager_release_sid, +- (struct zserv *client, struct srv6_sid_ctx *ctx), (client, ctx)); ++ (struct zserv * client, struct srv6_sid_ctx *ctx, const char *locator_name), ++ (client, ctx, locator_name)); + DEFINE_HOOK(srv6_manager_get_locator, + (struct srv6_locator **locator, struct zserv *client, + const char *locator_name), +@@ -115,10 +116,10 @@ void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, + locator_name); + } + +-void srv6_manager_release_sid_call(struct zserv *client, +- struct srv6_sid_ctx *ctx) ++void srv6_manager_release_sid_call(struct zserv *client, struct srv6_sid_ctx *ctx, ++ const char *locator_name) + { +- hook_call(srv6_manager_release_sid, client, ctx); ++ hook_call(srv6_manager_release_sid, client, ctx, locator_name); + } + + void srv6_manager_get_locator_call(struct srv6_locator **locator, +@@ -2182,9 +2183,11 @@ static int release_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + * + * @param client The client for which the SID has to be released + * @param ctx Context associated with the SRv6 SID to be released ++ * @param locator Parent locator of the SID + * @return 0 on success, -1 otherwise + */ +-int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx) ++int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, ++ struct srv6_locator *locator) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + char buf[256]; +@@ -2198,6 +2201,13 @@ int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx) + srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), + client->proto, client->instance); + ++ if (zctx->sid->locator != locator) { ++ zlog_err("SRv6 SID %pI6 ctx %s is not allocated from the provided locator %s", ++ &zctx->sid->value, srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), ++ locator->name); ++ return -1; ++ } ++ + /* Ensures the SID is in use by the client */ + if (!listnode_lookup(zctx->sid->client_list, client)) { + flog_err(EC_ZEBRA_SM_DAEMON_MISMATCH, "%s: Daemon mismatch!!", +@@ -2392,7 +2402,7 @@ int release_daemon_srv6_sids(struct zserv *client) + if (!listnode_lookup(ctx->sid->client_list, client)) + continue; + +- ret = release_srv6_sid(client, ctx); ++ ret = release_srv6_sid(client, ctx, ctx->sid->locator); + if (ret == 0) + count++; + } +@@ -2408,32 +2418,40 @@ int release_daemon_srv6_sids(struct zserv *client) + * + * @param client The client zapi session + * @param ctx Context associated with the SRv6 SID ++ * @param locator_name Locator from which the SID has to be allocated (for dynamic SID allocation) + * @return 0 on success, -1 on failure + */ +-static int srv6_manager_release_sid_internal(struct zserv *client, +- struct srv6_sid_ctx *ctx) ++static int srv6_manager_release_sid_internal(struct zserv *client, struct srv6_sid_ctx *ctx, ++ const char *locator_name) + { + int ret = -1; + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_ctx *zctx; + struct listnode *node, *nnode; + char buf[256]; +- const char *locator_name = NULL; ++ struct srv6_locator *locator = NULL; + struct in6_addr sid_value = {}; + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: releasing SRv6 SID associated with ctx %s", + __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx)); + ++ if (locator_name && locator_name[0] != '\0') { ++ locator = zebra_srv6_locator_lookup(locator_name); ++ if (!locator) { ++ zlog_err("%s: invalid SM request arguments: SRv6 locator '%s' does not exist", ++ __func__, locator_name); ++ return -1; ++ } ++ } ++ + /* Lookup Zebra SID context and release it */ + for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, zctx)) + if (memcmp(&zctx->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) { +- if (zctx->sid) { +- if (zctx->sid->locator) +- locator_name = (const char *)zctx->sid->locator->name; ++ if (zctx->sid) + sid_value = zctx->sid->value; +- } +- ret = release_srv6_sid(client, zctx); ++ ++ ret = release_srv6_sid(client, zctx, locator); + break; + } + +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 1599fd7adfbd..233635ed6f69 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -237,7 +237,8 @@ DECLARE_HOOK(srv6_manager_get_sid, + const char *locator_name), + (sid, client, ctx, sid_value, locator_name)); + DECLARE_HOOK(srv6_manager_release_sid, +- (struct zserv *client, struct srv6_sid_ctx *ctx), (client, ctx)); ++ (struct zserv * client, struct srv6_sid_ctx *ctx, const char *locator_name), ++ (client, ctx, locator_name)); + DECLARE_HOOK(srv6_manager_get_locator, + (struct srv6_locator **locator, struct zserv *client, + const char *locator_name), +@@ -302,8 +303,8 @@ extern void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, + struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, + const char *locator_name); +-extern void srv6_manager_release_sid_call(struct zserv *client, +- struct srv6_sid_ctx *ctx); ++extern void srv6_manager_release_sid_call(struct zserv *client, struct srv6_sid_ctx *ctx, ++ const char *locator_name); + + extern void srv6_manager_get_locator_call(struct srv6_locator **locator, + struct zserv *client, +@@ -311,8 +312,8 @@ extern void srv6_manager_get_locator_call(struct srv6_locator **locator, + + extern int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, const char *locator_name); +-extern int release_srv6_sid(struct zserv *client, +- struct zebra_srv6_sid_ctx *zctx); ++extern int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, ++ struct srv6_locator *locator); + extern int release_daemon_srv6_sids(struct zserv *client); + extern int srv6_manager_get_sid_response(struct zebra_srv6_sid *sid, + struct zserv *client); + +From 1b4cffbd0cbec523f9b306e102fd50df0dfd7c18 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Wed, 14 May 2025 17:54:43 +0000 +Subject: [PATCH 02/25] staticd: Fix SID structure pushed to zebra + +In order to install a SID into zebra, staticd fills in a seg6local_ctx +data structure and pushes this context to zebra. + +Currently, lcnode_func_len is filled with only the node length, while +it should be filled with node length + function length. + +This commit fixes the issue by setting these parameters for all SRv6 +endpoints. + +Signed-off-by: Carmine Scarpitta +--- + staticd/static_zebra.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c +index 9f462550a77d..3c9a6cb8717a 100644 +--- a/staticd/static_zebra.c ++++ b/staticd/static_zebra.c +@@ -654,14 +654,10 @@ void static_zebra_srv6_sid_install(struct static_srv6_sid *sid) + action = ZEBRA_SEG6_LOCAL_ACTION_END; + SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); + SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_PSP); +- ctx.flv.lcblock_len = sid->locator->block_bits_length; +- ctx.flv.lcnode_func_len = sid->locator->node_bits_length; + break; + case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID: + action = ZEBRA_SEG6_LOCAL_ACTION_END; + SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); +- ctx.flv.lcblock_len = sid->locator->block_bits_length; +- ctx.flv.lcnode_func_len = sid->locator->node_bits_length; + break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT6: + action = ZEBRA_SEG6_LOCAL_ACTION_END_DT6; +@@ -772,8 +768,6 @@ void static_zebra_srv6_sid_install(struct static_srv6_sid *sid) + return; + } + SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); +- ctx.flv.lcblock_len = sid->locator->block_bits_length; +- ctx.flv.lcnode_func_len = sid->locator->node_bits_length; + break; + case SRV6_ENDPOINT_BEHAVIOR_END_PSP_USD: + case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID_PSP_USD: +@@ -802,6 +796,9 @@ void static_zebra_srv6_sid_install(struct static_srv6_sid *sid) + + ctx.function_len = sid->addr.prefixlen - (ctx.block_len + ctx.node_len); + ++ ctx.flv.lcblock_len = sid->locator->block_bits_length; ++ ctx.flv.lcnode_func_len = ctx.node_len + ctx.function_len; ++ + /* Attach the SID to the SRv6 interface */ + if (!ifp) { + ifp = if_lookup_by_name(DEFAULT_SRV6_IFNAME, VRF_DEFAULT); + +From 5f10526e56781cb15d2057f85d5309f0403043b2 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 10 May 2025 10:48:43 +0000 +Subject: [PATCH 03/25] *: Support allocation of SRv6 local-only FIB entries + +draft-ietf-spring-srv6-srh-compression section #5.3 recommends to program +two entries in the FIB: +* local-only FIB entry, e.g., FCBB:BBBB:E000::/48 +* combined FIB entry, e.g., FCBB:BBBB:1:E000::/64 + +But SID Manager can currently allocate only the combined FIB entry. + +This commit extends the API exposed the srv6_manager_get_sid() and +srv6_manager_release_sid() APIs to support the allocation of local-only +FIB entry. + +Note that at this time, these APIs are always called with is_localonly=false, +as daemons only support the combined FIB entry. + +Signed-off-by: Carmine Scarpitta +--- + bgpd/bgp_zebra.c | 5 ++-- + isisd/isis_zebra.c | 4 +-- + lib/zclient.c | 10 +++++-- + lib/zclient.h | 10 +++---- + staticd/static_zebra.c | 4 +-- + zebra/zapi_msg.c | 11 +++++-- + zebra/zebra_srv6.c | 68 +++++++++++++++++++++--------------------- + zebra/zebra_srv6.h | 26 ++++++++-------- + 8 files changed, 73 insertions(+), 65 deletions(-) + +diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c +index 7fa133a5cc07..c21ecfce2abf 100644 +--- a/bgpd/bgp_zebra.c ++++ b/bgpd/bgp_zebra.c +@@ -4543,8 +4543,7 @@ bool bgp_zebra_request_srv6_sid(const struct srv6_sid_ctx *ctx, + * Send the Get SRv6 SID request to the SRv6 Manager and check the + * result + */ +- ret = srv6_manager_get_sid(bgp_zclient, ctx, sid_value, locator_name, +- sid_func); ++ ret = srv6_manager_get_sid(bgp_zclient, ctx, sid_value, locator_name, sid_func, false); + if (ret < 0) { + zlog_warn("%s: error getting SRv6 SID!", __func__); + return false; +@@ -4573,7 +4572,7 @@ void bgp_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx, const char *loca + * Send the Release SRv6 SID request to the SRv6 Manager and check the + * result + */ +- ret = srv6_manager_release_sid(bgp_zclient, ctx, locator_name); ++ ret = srv6_manager_release_sid(bgp_zclient, ctx, locator_name, false); + if (ret < 0) { + zlog_warn("%s: error releasing SRv6 SID!", __func__); + return; +diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c +index 48f7560bc755..1670bc5f2b8a 100644 +--- a/isisd/isis_zebra.c ++++ b/isisd/isis_zebra.c +@@ -1462,7 +1462,7 @@ bool isis_zebra_request_srv6_sid(const struct srv6_sid_ctx *ctx, + * Send the Get SRv6 SID request to the SRv6 Manager and check the + * result + */ +- ret = srv6_manager_get_sid(isis_zclient, ctx, sid_value, locator_name, NULL); ++ ret = srv6_manager_get_sid(isis_zclient, ctx, sid_value, locator_name, NULL, false); + if (ret < 0) { + zlog_warn("%s: error getting SRv6 SID!", __func__); + return false; +@@ -1491,7 +1491,7 @@ void isis_zebra_release_srv6_sid(const struct srv6_sid_ctx *ctx, const char *loc + * Send the Release SRv6 SID request to the SRv6 Manager and check the + * result + */ +- ret = srv6_manager_release_sid(isis_zclient, ctx, locator_name); ++ ret = srv6_manager_release_sid(isis_zclient, ctx, locator_name, false); + if (ret < 0) { + zlog_warn("%s: error releasing SRv6 SID!", __func__); + return; +diff --git a/lib/zclient.c b/lib/zclient.c +index 173cb5fd7c89..6dd7d5731ce9 100644 +--- a/lib/zclient.c ++++ b/lib/zclient.c +@@ -3526,8 +3526,8 @@ int srv6_manager_get_locator(struct zclient *zclient, const char *locator_name) + * @result 0 on success, -1 otherwise + */ + int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, const char *locator_name, +- uint32_t *sid_func) ++ struct in6_addr *sid_value, const char *locator_name, uint32_t *sid_func, ++ bool is_localonly) + { + struct stream *s; + uint8_t flags = 0; +@@ -3558,6 +3558,8 @@ int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx + SET_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_HAS_SID_VALUE); + if (locator_name) + SET_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_HAS_LOCATOR); ++ if (is_localonly) ++ SET_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_IS_LOCALONLY); + stream_putc(s, flags); + + /* SRv6 SID value */ +@@ -3587,7 +3589,7 @@ int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx + * @result 0 on success, -1 otherwise + */ + int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, +- const char *locator_name) ++ const char *locator_name, bool is_localonly) + { + struct stream *s; + uint8_t flags = 0; +@@ -3617,6 +3619,8 @@ int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx + /* Flags */ + if (locator_name) + SET_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_HAS_LOCATOR); ++ if (is_localonly) ++ SET_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_IS_LOCALONLY); + stream_putc(s, flags); + + /* SRv6 locator */ +diff --git a/lib/zclient.h b/lib/zclient.h +index b730a58fedbc..71923b58985e 100644 +--- a/lib/zclient.h ++++ b/lib/zclient.h +@@ -1114,6 +1114,7 @@ extern int tm_release_table_chunk(struct zclient *zclient, uint32_t start, + /* Zebra SRv6 Manager flags */ + #define ZAPI_SRV6_MANAGER_SID_FLAG_HAS_SID_VALUE 0x01 + #define ZAPI_SRV6_MANAGER_SID_FLAG_HAS_LOCATOR 0x02 ++#define ZAPI_SRV6_MANAGER_SID_FLAG_IS_LOCALONLY 0x04 + + extern int srv6_manager_get_locator_chunk(struct zclient *zclient, + const char *locator_name); +@@ -1121,12 +1122,11 @@ extern int srv6_manager_release_locator_chunk(struct zclient *zclient, + const char *locator_name); + extern int srv6_manager_get_locator(struct zclient *zclient, + const char *locator_name); +-extern int srv6_manager_get_sid(struct zclient *zclient, +- const struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, +- const char *locator_name, uint32_t *sid_func); ++extern int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, ++ struct in6_addr *sid_value, const char *locator_name, ++ uint32_t *sid_func, bool is_localonly); + extern int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, +- const char *locator_name); ++ const char *locator_name, bool is_localonly); + + extern enum zclient_send_status zebra_send_sr_policy(struct zclient *zclient, + int cmd, +diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c +index 3c9a6cb8717a..d9ec3135a16b 100644 +--- a/staticd/static_zebra.c ++++ b/staticd/static_zebra.c +@@ -1074,7 +1074,7 @@ extern void static_zebra_request_srv6_sid(struct static_srv6_sid *sid) + + /* Request SRv6 SID from SID Manager */ + ret = srv6_manager_get_sid(static_zclient, &ctx, &sid->addr.prefix, sid->locator->name, +- NULL); ++ NULL, false); + if (ret < 0) + zlog_warn("%s: error getting SRv6 SID!", __func__); + } +@@ -1165,7 +1165,7 @@ extern void static_zebra_release_srv6_sid(struct static_srv6_sid *sid) + } + + /* remove the SRv6 SID from the zebra RIB */ +- ret = srv6_manager_release_sid(static_zclient, &ctx, sid->locator->name); ++ ret = srv6_manager_release_sid(static_zclient, &ctx, sid->locator->name, false); + if (ret == ZCLIENT_SEND_FAILURE) + flog_err(EC_LIB_ZAPI_SOCKET, "zclient_send_get_srv6_sid() delete failed: %s", + safe_strerror(errno)); +diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c +index 4f3727cf42c6..454f05598da7 100644 +--- a/zebra/zapi_msg.c ++++ b/zebra/zapi_msg.c +@@ -3066,6 +3066,7 @@ static void zread_srv6_manager_get_srv6_sid(struct zserv *client, + uint16_t len; + struct zebra_srv6_sid *sid = NULL; + uint8_t flags; ++ bool is_localonly = false; + + /* Get input stream */ + s = msg; +@@ -3081,9 +3082,12 @@ static void zread_srv6_manager_get_srv6_sid(struct zserv *client, + STREAM_GETW(s, len); + STREAM_GET(locator, s, len); + } ++ if (CHECK_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_IS_LOCALONLY)) ++ is_localonly = true; ++ + + /* Call hook to get a SID using wrapper */ +- srv6_manager_get_sid_call(&sid, client, &ctx, sid_value_ptr, locator); ++ srv6_manager_get_sid_call(&sid, client, &ctx, sid_value_ptr, locator, is_localonly); + + stream_failure: + return; +@@ -3103,6 +3107,7 @@ static void zread_srv6_manager_release_srv6_sid(struct zserv *client, + char locator[SRV6_LOCNAME_SIZE] = { 0 }; + uint16_t len; + uint8_t flags; ++ bool is_localonly = false; + + /* Get input stream */ + s = msg; +@@ -3121,9 +3126,11 @@ static void zread_srv6_manager_release_srv6_sid(struct zserv *client, + + STREAM_GET(locator, s, len); + } ++ if (CHECK_FLAG(flags, ZAPI_SRV6_MANAGER_SID_FLAG_IS_LOCALONLY)) ++ is_localonly = true; + + /* Call hook to release a SID using wrapper */ +- srv6_manager_release_sid_call(client, &ctx, locator); ++ srv6_manager_release_sid_call(client, &ctx, locator, is_localonly); + + stream_failure: + return; +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 2acffc1a6ee8..4a1087bf224d 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -64,13 +64,13 @@ DEFINE_HOOK(srv6_manager_release_chunk, + (client, locator_name, vrf_id)); + + DEFINE_HOOK(srv6_manager_get_sid, +- (struct zebra_srv6_sid **sid, struct zserv *client, +- struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, +- const char *locator_name), +- (sid, client, ctx, sid_value, locator_name)); ++ (struct zebra_srv6_sid **sid, struct zserv *client, struct srv6_sid_ctx *ctx, ++ struct in6_addr *sid_value, const char *locator_name, bool is_localonly), ++ (sid, client, ctx, sid_value, locator_name, is_localonly)); + DEFINE_HOOK(srv6_manager_release_sid, +- (struct zserv * client, struct srv6_sid_ctx *ctx, const char *locator_name), +- (client, ctx, locator_name)); ++ (struct zserv *client, struct srv6_sid_ctx *ctx, const char *locator_name, ++ bool is_localonly), ++ (client, ctx, locator_name, is_localonly)); + DEFINE_HOOK(srv6_manager_get_locator, + (struct srv6_locator **locator, struct zserv *client, + const char *locator_name), +@@ -107,19 +107,17 @@ int srv6_manager_client_disconnect_cb(struct zserv *client) + } + + +-void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, +- struct zserv *client, struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, +- const char *locator_name) ++void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, struct zserv *client, ++ struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, ++ const char *locator_name, bool is_localonly) + { +- hook_call(srv6_manager_get_sid, sid, client, ctx, sid_value, +- locator_name); ++ hook_call(srv6_manager_get_sid, sid, client, ctx, sid_value, locator_name, is_localonly); + } + + void srv6_manager_release_sid_call(struct zserv *client, struct srv6_sid_ctx *ctx, +- const char *locator_name) ++ const char *locator_name, bool is_localonly) + { +- hook_call(srv6_manager_release_sid, client, ctx, locator_name); ++ hook_call(srv6_manager_release_sid, client, ctx, locator_name, is_localonly); + } + + void srv6_manager_get_locator_call(struct srv6_locator **locator, +@@ -1484,13 +1482,13 @@ static bool alloc_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + * @param ctx Context for which the SID has been requested + * @param sid_value specific SRv6 SID value (i.e. IPv6 address) to be + * allocated explicitly ++ * @param is_localonly SID is local-only + * + * @return 0 if the function returned an existing SID and SID value has not changed, + * 1 if a new SID has been allocated or the existing SID value has changed, -1 if an error occurred + */ +-static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, +- struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value) ++static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, ++ struct in6_addr *sid_value, bool is_localonly) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_ctx *s = NULL; +@@ -1631,13 +1629,13 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, + * @param sid SID returned + * @param ctx Context for which the SID has been requested + * @param locator SRv6 locator from which the SID has to be allocated ++ * @param is_localonly SID is local-only + * + * @return 0 if the function returned an existing SID and SID value has not changed, + * 1 if a new SID has been allocated or the existing SID value has changed, -1 if an error occurred + */ +-static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, +- struct srv6_sid_ctx *ctx, +- struct srv6_locator *locator) ++static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, ++ struct srv6_locator *locator, bool is_localonly) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_block *block; +@@ -1737,12 +1735,13 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, + * @param ctx Context for which the SID has been requested + * @param sid_value SRv6 SID value to be allocated (for explicit SID allocation) + * @param locator_name Parent SRv6 locator from which the SID has to be allocated (for dynamic SID allocation) ++ * @param is_localonly SID is local-only + * + * @return 0 if the function returned an existing SID and SID value has not changed, + * 1 if a new SID has been allocated or the existing SID value has changed, -1 if an error occurred + */ +-int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, const char *locator_name) ++int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, ++ const char *locator_name, bool is_localonly) + { + int ret = -1; + struct srv6_locator *locator; +@@ -1813,7 +1812,7 @@ int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, + return -1; + } + +- ret = get_srv6_sid_explicit(sid, ctx, sid_value); ++ ret = get_srv6_sid_explicit(sid, ctx, sid_value, is_localonly); + } else { + /* + * Dynamic SID allocation: allocate any available SID value +@@ -1832,7 +1831,7 @@ int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, + return -1; + } + +- ret = get_srv6_sid_dynamic(sid, ctx, locator); ++ ret = get_srv6_sid_dynamic(sid, ctx, locator, is_localonly); + } + + return ret; +@@ -2184,10 +2183,11 @@ static int release_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + * @param client The client for which the SID has to be released + * @param ctx Context associated with the SRv6 SID to be released + * @param locator Parent locator of the SID ++ * @param is_localonly SID is local-only + * @return 0 on success, -1 otherwise + */ + int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, +- struct srv6_locator *locator) ++ struct srv6_locator *locator, bool is_localonly) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + char buf[256]; +@@ -2310,14 +2310,13 @@ static int srv6_manager_get_srv6_locator_internal(struct srv6_locator **locator, + * @param sid_value SID value (i.e., IPv6 address) that has to be assigned to the SID + * (for explicit SID allocation) + * @param locator_name Locator from which the SID has to be allocated (for dynamic SID allocation) ++ * @param is_localonly SID is local-only + * + * @return 0 on success, -1 otherwise + */ +-static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, +- struct zserv *client, +- struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, +- const char *locator_name) ++static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, struct zserv *client, ++ struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, ++ const char *locator_name, bool is_localonly) + { + int ret = -1; + struct listnode *node; +@@ -2329,7 +2328,7 @@ static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, + __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), + sid_value ? sid_value : &in6addr_any, locator_name); + +- ret = get_srv6_sid(sid, ctx, sid_value, locator_name); ++ ret = get_srv6_sid(sid, ctx, sid_value, locator_name, is_localonly); + if (ret < 0) { + zlog_warn("%s: not got SRv6 SID for ctx %s, sid_value=%pI6, locator_name=%s", + __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), +@@ -2402,7 +2401,7 @@ int release_daemon_srv6_sids(struct zserv *client) + if (!listnode_lookup(ctx->sid->client_list, client)) + continue; + +- ret = release_srv6_sid(client, ctx, ctx->sid->locator); ++ ret = release_srv6_sid(client, ctx, ctx->sid->locator, false); + if (ret == 0) + count++; + } +@@ -2419,10 +2418,11 @@ int release_daemon_srv6_sids(struct zserv *client) + * @param client The client zapi session + * @param ctx Context associated with the SRv6 SID + * @param locator_name Locator from which the SID has to be allocated (for dynamic SID allocation) ++ * @param is_localonly SID is local-only + * @return 0 on success, -1 on failure + */ + static int srv6_manager_release_sid_internal(struct zserv *client, struct srv6_sid_ctx *ctx, +- const char *locator_name) ++ const char *locator_name, bool is_localonly) + { + int ret = -1; + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +@@ -2451,7 +2451,7 @@ static int srv6_manager_release_sid_internal(struct zserv *client, struct srv6_s + if (zctx->sid) + sid_value = zctx->sid->value; + +- ret = release_srv6_sid(client, zctx, locator); ++ ret = release_srv6_sid(client, zctx, locator, is_localonly); + break; + } + +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 233635ed6f69..0ceb1589a325 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -232,13 +232,13 @@ DECLARE_HOOK(srv6_manager_release_chunk, + (client, locator_name, vrf_id)); + + DECLARE_HOOK(srv6_manager_get_sid, +- (struct zebra_srv6_sid **sid, struct zserv *client, +- struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, +- const char *locator_name), +- (sid, client, ctx, sid_value, locator_name)); ++ (struct zebra_srv6_sid **sid, struct zserv *client, struct srv6_sid_ctx *ctx, ++ struct in6_addr *sid_value, const char *locator_name, bool is_localonly), ++ (sid, client, ctx, sid_value, locator_name, is_localonly)); + DECLARE_HOOK(srv6_manager_release_sid, +- (struct zserv * client, struct srv6_sid_ctx *ctx, const char *locator_name), +- (client, ctx, locator_name)); ++ (struct zserv *client, struct srv6_sid_ctx *ctx, const char *locator_name, ++ bool is_localonly), ++ (client, ctx, locator_name, is_localonly)); + DECLARE_HOOK(srv6_manager_get_locator, + (struct srv6_locator **locator, struct zserv *client, + const char *locator_name), +@@ -298,22 +298,20 @@ zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, struct in6_addr *sid_value, + extern void zebra_srv6_sid_free(struct zebra_srv6_sid *sid); + extern void delete_zebra_srv6_sid(void *val); + +-extern void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, +- struct zserv *client, +- struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, +- const char *locator_name); ++extern void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, struct zserv *client, ++ struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, ++ const char *locator_name, bool is_localonly); + extern void srv6_manager_release_sid_call(struct zserv *client, struct srv6_sid_ctx *ctx, +- const char *locator_name); ++ const char *locator_name, bool is_localonly); + + extern void srv6_manager_get_locator_call(struct srv6_locator **locator, + struct zserv *client, + const char *locator_name); + + extern int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, const char *locator_name); ++ struct in6_addr *sid_value, const char *locator_name, bool is_localonly); + extern int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, +- struct srv6_locator *locator); ++ struct srv6_locator *locator, bool is_localonly); + extern int release_daemon_srv6_sids(struct zserv *client); + extern int srv6_manager_get_sid_response(struct zebra_srv6_sid *sid, + struct zserv *client); + +From d64390a1255d2e7a727599a0c094e082b6bc794f Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 17 May 2025 08:43:43 +0000 +Subject: [PATCH 04/25] staticd: Add support for local-only SIDs + +Extend staticd to support local-only SIDs. + +Signed-off-by: Carmine Scarpitta +--- + lib/zclient.c | 2 ++ + staticd/static_zebra.c | 22 ++++++++++++++++++++-- + zebra/zebra_srv6.c | 1 + + 3 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/lib/zclient.c b/lib/zclient.c +index 6dd7d5731ce9..29e2e60b738c 100644 +--- a/lib/zclient.c ++++ b/lib/zclient.c +@@ -3523,6 +3523,7 @@ int srv6_manager_get_locator(struct zclient *zclient, const char *locator_name) + * @param sid_value SRv6 SID value for explicit SID allocation + * @param locator_name Name of the parent locator for dynamic SID allocation + * @param sid_func SID function assigned by the SRv6 Manager ++ * @param is_localonly SID is local-only + * @result 0 on success, -1 otherwise + */ + int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, +@@ -3586,6 +3587,7 @@ int srv6_manager_get_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx + * @param zclient Zclient used to connect to SRv6 manager (zebra) + * @param ctx Context associated with the SRv6 SID to be removed + * @param locator_name Parent locator of the SID ++ * @param is_localonly SID is local-only + * @result 0 on success, -1 otherwise + */ + int srv6_manager_release_sid(struct zclient *zclient, const struct srv6_sid_ctx *ctx, +diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c +index d9ec3135a16b..b02156c847ec 100644 +--- a/staticd/static_zebra.c ++++ b/staticd/static_zebra.c +@@ -979,6 +979,23 @@ static bool static_zebra_sid_locator_block_check(struct static_srv6_sid *sid) + return true; + } + ++static bool is_srv6_sid_localonly(const struct static_srv6_sid *sid) ++{ ++ struct prefix_ipv6 block = {}; ++ struct prefix_ipv6 locator = {}; ++ ++ block = sid->locator->prefix; ++ block.prefixlen = sid->locator->block_bits_length; ++ apply_mask(&block); ++ ++ locator = sid->locator->prefix; ++ ++ if (prefix_match(&block, &sid->addr) && !prefix_match(&locator, &sid->addr)) ++ return true; ++ ++ return false; ++} ++ + extern void static_zebra_request_srv6_sid(struct static_srv6_sid *sid) + { + struct srv6_sid_ctx ctx = {}; +@@ -1074,7 +1091,7 @@ extern void static_zebra_request_srv6_sid(struct static_srv6_sid *sid) + + /* Request SRv6 SID from SID Manager */ + ret = srv6_manager_get_sid(static_zclient, &ctx, &sid->addr.prefix, sid->locator->name, +- NULL, false); ++ NULL, is_srv6_sid_localonly(sid)); + if (ret < 0) + zlog_warn("%s: error getting SRv6 SID!", __func__); + } +@@ -1165,7 +1182,8 @@ extern void static_zebra_release_srv6_sid(struct static_srv6_sid *sid) + } + + /* remove the SRv6 SID from the zebra RIB */ +- ret = srv6_manager_release_sid(static_zclient, &ctx, sid->locator->name, false); ++ ret = srv6_manager_release_sid(static_zclient, &ctx, sid->locator->name, ++ is_srv6_sid_localonly(sid)); + if (ret == ZCLIENT_SEND_FAILURE) + flog_err(EC_LIB_ZAPI_SOCKET, "zclient_send_get_srv6_sid() delete failed: %s", + safe_strerror(errno)); +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 4a1087bf224d..7ec345660eb0 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -944,6 +944,7 @@ void zebra_srv6_encap_src_addr_unset(void) + * @param sid_value SRv6 SID address returned + * @param locator Parent locator of the SRv6 SID + * @param sid_func Function part of the SID ++ * @param is_localonly SID is local-only + * @return True if success, False otherwise + */ + static bool zebra_srv6_sid_compose(struct in6_addr *sid_value, + +From d75f0740c5ac8875fc1d6585aa8c728a41a5a881 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Wed, 25 Jun 2025 11:44:44 +0000 +Subject: [PATCH 05/25] zebra: Add support for block-len 48, node-len 16, + func-len 16 + +Signed-off-by: Carmine Scarpitta +--- + lib/command.h | 1 + + vtysh/vtysh.c | 20 ++++++ + zebra/zebra_srv6.c | 33 ++++++++++ + zebra/zebra_srv6.h | 13 ++++ + zebra/zebra_srv6_vty.c | 139 +++++++++++++++++++++++++++++++++++++---- + 5 files changed, 193 insertions(+), 13 deletions(-) + +diff --git a/lib/command.h b/lib/command.h +index 282eca94913c..ea08a74d6ad8 100644 +--- a/lib/command.h ++++ b/lib/command.h +@@ -159,6 +159,7 @@ enum node_type { + SRV6_ENCAP_NODE, /* SRv6 encapsulation node */ + SRV6_SID_FORMATS_NODE, /* SRv6 SID formats config node */ + SRV6_SID_FORMAT_USID_F3216_NODE, /* SRv6 uSID f3216 format config node */ ++ SRV6_SID_FORMAT_USID_F4816_NODE, /* SRv6 uSID f4816 format config node */ + SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, /* SRv6 uncompressed f4024 format config node */ + VTY_NODE, /* Vty node. */ + FPM_NODE, /* Dataplane FPM node. */ +diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c +index 5a19af1f74ca..1f21f2cda9f4 100644 +--- a/vtysh/vtysh.c ++++ b/vtysh/vtysh.c +@@ -1354,6 +1354,11 @@ static struct cmd_node srv6_sid_format_usid_f3216_node = { + .prompt = "%s(config-srv6-format)# " + }; + ++static struct cmd_node srv6_sid_format_usid_f4816_node = { .name = "srv6-format-usid-f4816", ++ .node = SRV6_SID_FORMAT_USID_F4816_NODE, ++ .parent_node = SRV6_SID_FORMATS_NODE, ++ .prompt = "%s(config-srv6-format)# " }; ++ + static struct cmd_node srv6_sid_format_uncompressed_f4024_node = { + .name = "srv6-format-uncompressed-f4024", + .node = SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, +@@ -1757,6 +1762,15 @@ DEFUNSH(VTYSH_ZEBRA, srv6_sid_format_f3216_usid, srv6_sid_format_f3216_usid_cmd, + return CMD_SUCCESS; + } + ++DEFUNSH(VTYSH_ZEBRA, srv6_sid_format_f4816_usid, srv6_sid_format_f4816_usid_cmd, ++ "format usid-f4816", ++ "Configure SRv6 SID format\n" ++ "Configure the uSID f4816 format\n") ++{ ++ vty->node = SRV6_SID_FORMAT_USID_F4816_NODE; ++ return CMD_SUCCESS; ++} ++ + DEFUNSH(VTYSH_ZEBRA, srv6_sid_format_f4024_uncompressed, srv6_sid_format_f4024_uncompressed_cmd, + "format uncompressed-f4024", + "Configure SRv6 SID format\n" +@@ -2683,6 +2697,7 @@ DEFUNSH(VTYSH_ZEBRA, exit_srv6_sid_format, exit_srv6_sid_format_cmd, + "exit", "Exit from SRv6 SID format configuration mode\n") + { + if (vty->node == SRV6_SID_FORMAT_USID_F3216_NODE || ++ vty->node == SRV6_SID_FORMAT_USID_F4816_NODE || + vty->node == SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE) + vty->node = SRV6_SID_FORMATS_NODE; + return CMD_SUCCESS; +@@ -5114,6 +5129,7 @@ void vtysh_init_vty(void) + install_node(&srv6_encap_node); + install_node(&srv6_sid_formats_node); + install_node(&srv6_sid_format_usid_f3216_node); ++ install_node(&srv6_sid_format_usid_f4816_node); + install_node(&srv6_sid_format_uncompressed_f4024_node); + + vtysh_init_cmd(); +@@ -5572,6 +5588,7 @@ void vtysh_init_vty(void) + install_element(SRV6_ENCAP_NODE, &vtysh_end_all_cmd); + + install_element(SRV6_SID_FORMATS_NODE, &srv6_sid_format_f3216_usid_cmd); ++ install_element(SRV6_SID_FORMATS_NODE, &srv6_sid_format_f4816_usid_cmd); + install_element(SRV6_SID_FORMATS_NODE, + &srv6_sid_format_f4024_uncompressed_cmd); + install_element(SRV6_SID_FORMATS_NODE, &exit_srv6_sid_formats_cmd); +@@ -5581,6 +5598,9 @@ void vtysh_init_vty(void) + &exit_srv6_sid_format_cmd); + install_element(SRV6_SID_FORMAT_USID_F3216_NODE, &vtysh_end_all_cmd); + ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &exit_srv6_sid_format_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &vtysh_end_all_cmd); ++ + install_element(SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, + &exit_srv6_sid_format_cmd); + install_element(SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 7ec345660eb0..89d8f23baa14 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -354,6 +354,34 @@ static struct srv6_sid_format *create_srv6_sid_format_usid_f3216(void) + return format; + } + ++/* ++ * Helper function to create the SRv6 compressed format `usid-f4816`. ++ */ ++static struct srv6_sid_format *create_srv6_sid_format_usid_f4816(void) ++{ ++ struct srv6_sid_format *format = NULL; ++ ++ format = srv6_sid_format_alloc(SRV6_SID_FORMAT_USID_F4816_NAME); ++ ++ format->type = SRV6_SID_FORMAT_TYPE_USID; ++ ++ /* Define block/node/function length */ ++ format->block_len = SRV6_SID_FORMAT_USID_F4816_BLOCK_LEN; ++ format->node_len = SRV6_SID_FORMAT_USID_F4816_NODE_LEN; ++ format->function_len = SRV6_SID_FORMAT_USID_F4816_FUNCTION_LEN; ++ format->argument_len = SRV6_SID_FORMAT_USID_F4816_ARGUMENT_LEN; ++ ++ /* Define the ranges from which the SID function can be allocated */ ++ format->config.usid.lib_start = SRV6_SID_FORMAT_USID_F4816_LIB_START; ++ format->config.usid.elib_start = SRV6_SID_FORMAT_USID_F4816_ELIB_START; ++ format->config.usid.elib_end = SRV6_SID_FORMAT_USID_F4816_ELIB_END; ++ format->config.usid.wlib_start = SRV6_SID_FORMAT_USID_F4816_WLIB_START; ++ format->config.usid.wlib_end = SRV6_SID_FORMAT_USID_F4816_WLIB_END; ++ format->config.usid.ewlib_start = SRV6_SID_FORMAT_USID_F4816_EWLIB_START; ++ ++ return format; ++} ++ + /* + * Helper function to create the SRv6 uncompressed format. + */ +@@ -710,6 +738,7 @@ struct zebra_srv6 *zebra_srv6_get_default(void) + { + static bool first_execution = true; + struct srv6_sid_format *format_usidf3216; ++ struct srv6_sid_format *format_usidf4816; + struct srv6_sid_format *format_uncompressed; + + if (first_execution) { +@@ -724,6 +753,10 @@ struct zebra_srv6 *zebra_srv6_get_default(void) + format_usidf3216 = create_srv6_sid_format_usid_f3216(); + srv6_sid_format_register(format_usidf3216); + ++ /* Create SID format `usid-f4816` */ ++ format_usidf4816 = create_srv6_sid_format_usid_f4816(); ++ srv6_sid_format_register(format_usidf4816); ++ + /* Create SID format `uncompressed` */ + format_uncompressed = create_srv6_sid_format_uncompressed(); + srv6_sid_format_register(format_uncompressed); +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 0ceb1589a325..a056dcadaf8e 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -29,6 +29,19 @@ + #define SRV6_SID_FORMAT_USID_F3216_WLIB_END 0xFFF7 + #define SRV6_SID_FORMAT_USID_F3216_EWLIB_START 0xFFF7 + ++/* Default config for SRv6 SID `usid-f4816` format */ ++#define SRV6_SID_FORMAT_USID_F4816_NAME "usid-f4816" ++#define SRV6_SID_FORMAT_USID_F4816_BLOCK_LEN 48 ++#define SRV6_SID_FORMAT_USID_F4816_NODE_LEN 16 ++#define SRV6_SID_FORMAT_USID_F4816_FUNCTION_LEN 16 ++#define SRV6_SID_FORMAT_USID_F4816_ARGUMENT_LEN 0 ++#define SRV6_SID_FORMAT_USID_F4816_LIB_START 0xE000 ++#define SRV6_SID_FORMAT_USID_F4816_ELIB_START 0xFE00 ++#define SRV6_SID_FORMAT_USID_F4816_ELIB_END 0xFEFF ++#define SRV6_SID_FORMAT_USID_F4816_WLIB_START 0xFFF0 ++#define SRV6_SID_FORMAT_USID_F4816_WLIB_END 0xFFF7 ++#define SRV6_SID_FORMAT_USID_F4816_EWLIB_START 0xFFF7 ++ + /* Default config for SRv6 SID `uncompressed` format */ + #define SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NAME "uncompressed-f4024" + #define SRV6_SID_FORMAT_UNCOMPRESSED_F4024_BLOCK_LEN 40 +diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c +index f43ffd1705d7..c457f91fada2 100644 +--- a/zebra/zebra_srv6_vty.c ++++ b/zebra/zebra_srv6_vty.c +@@ -83,6 +83,11 @@ static struct cmd_node srv6_sid_format_usid_f3216_node = { + .prompt = "%s(config-srv6-format)# " + }; + ++static struct cmd_node srv6_sid_format_usid_f4816_node = { .name = "srv6-format-usid-f4816", ++ .node = SRV6_SID_FORMAT_USID_F4816_NODE, ++ .parent_node = SRV6_SID_FORMATS_NODE, ++ .prompt = "%s(config-srv6-format)# " }; ++ + static struct cmd_node srv6_sid_format_uncompressed_f4024_node = { + .name = "srv6-format-uncompressed-f4024", + .node = SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, +@@ -825,6 +830,9 @@ DEFPY (locator_prefix, + expected_prefixlen = + SRV6_SID_FORMAT_USID_F3216_BLOCK_LEN + + SRV6_SID_FORMAT_USID_F3216_NODE_LEN; ++ else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) ++ expected_prefixlen = SRV6_SID_FORMAT_USID_F4816_BLOCK_LEN + ++ SRV6_SID_FORMAT_USID_F4816_NODE_LEN; + else if (strmatch(format->name, + SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NAME)) + expected_prefixlen = +@@ -982,9 +990,10 @@ DEFPY (locator_flavor_psp, + + DEFPY(locator_sid_format, + locator_sid_format_cmd, +- "format $format", ++ "format $format", + "Configure SRv6 SID format\n" + "Specify usid-f3216 format\n" ++ "Specify usid-f4816 format\n" + "Specify uncompressed-f4024 format\n") + { + VTY_DECLVAR_CONTEXT(srv6_locator, locator); +@@ -995,6 +1004,9 @@ DEFPY(locator_sid_format, + if (strmatch(format, SRV6_SID_FORMAT_USID_F3216_NAME)) + expected_prefixlen = SRV6_SID_FORMAT_USID_F3216_BLOCK_LEN + + SRV6_SID_FORMAT_USID_F3216_NODE_LEN; ++ else if (strmatch(format, SRV6_SID_FORMAT_USID_F4816_NAME)) ++ expected_prefixlen = SRV6_SID_FORMAT_USID_F4816_BLOCK_LEN + ++ SRV6_SID_FORMAT_USID_F4816_NODE_LEN; + else if (strmatch(format, SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NAME)) + expected_prefixlen = + SRV6_SID_FORMAT_UNCOMPRESSED_F4024_BLOCK_LEN + +@@ -1127,6 +1139,46 @@ DEFUN(no_srv6_sid_format_f3216_usid, + return CMD_SUCCESS; + } + ++DEFUN_NOSH (srv6_sid_format_f4816_usid, ++ srv6_sid_format_f4816_usid_cmd, ++ "format usid-f4816", ++ "Configure SRv6 SID format\n" ++ "Configure the uSID f4816 format\n") ++{ ++ struct srv6_sid_format *format; ++ ++ format = srv6_sid_format_lookup(SRV6_SID_FORMAT_USID_F4816_NAME); ++ assert(format); ++ ++ VTY_PUSH_CONTEXT(SRV6_SID_FORMAT_USID_F4816_NODE, format); ++ return CMD_SUCCESS; ++} ++ ++DEFUN(no_srv6_sid_format_f4816_usid, ++ no_srv6_sid_format_f4816_usid_cmd, ++ "no format usid-f4816", ++ NO_STR ++ "Configure SRv6 SID format\n" ++ "Configure the uSID f4816 format\n") ++{ ++ struct srv6_sid_format *format; ++ ++ format = srv6_sid_format_lookup(SRV6_SID_FORMAT_USID_F4816_NAME); ++ assert(format); ++ ++ format->config.usid.lib_start = SRV6_SID_FORMAT_USID_F4816_LIB_START; ++ format->config.usid.elib_start = SRV6_SID_FORMAT_USID_F4816_ELIB_START; ++ format->config.usid.elib_end = SRV6_SID_FORMAT_USID_F4816_ELIB_END; ++ format->config.usid.wlib_start = SRV6_SID_FORMAT_USID_F4816_WLIB_START; ++ format->config.usid.wlib_end = SRV6_SID_FORMAT_USID_F4816_WLIB_END; ++ format->config.usid.ewlib_start = SRV6_SID_FORMAT_USID_F4816_EWLIB_START; ++ ++ /* Notify zclients that the format has changed */ ++ zebra_srv6_sid_format_changed_cb(format); ++ ++ return CMD_SUCCESS; ++} ++ + DEFUN_NOSH (srv6_sid_format_f4024_uncompressed, + srv6_sid_format_uncompressed_cmd, + "format uncompressed-f4024", +@@ -1193,6 +1245,8 @@ DEFPY(no_srv6_sid_format_usid_lib, + if (strmatch(format->name, SRV6_SID_FORMAT_USID_F3216_NAME)) + format->config.usid.lib_start = + SRV6_SID_FORMAT_USID_F3216_LIB_START; ++ else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) ++ format->config.usid.lib_start = SRV6_SID_FORMAT_USID_F4816_LIB_START; + else + assert(0); + +@@ -1241,6 +1295,9 @@ DEFPY(no_srv6_sid_format_usid_lib_explicit, + SRV6_SID_FORMAT_USID_F3216_ELIB_START; + format->config.usid.elib_end = + SRV6_SID_FORMAT_USID_F3216_ELIB_END; ++ } else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) { ++ format->config.usid.elib_start = SRV6_SID_FORMAT_USID_F4816_ELIB_START; ++ format->config.usid.elib_end = SRV6_SID_FORMAT_USID_F4816_ELIB_END; + } else { + assert(0); + } +@@ -1288,6 +1345,10 @@ DEFPY(no_srv6_sid_format_usid_wlib, + SRV6_SID_FORMAT_USID_F3216_WLIB_START; + format->config.usid.wlib_end = + SRV6_SID_FORMAT_USID_F3216_WLIB_END; ++ } ++ if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) { ++ format->config.usid.wlib_start = SRV6_SID_FORMAT_USID_F4816_WLIB_START; ++ format->config.usid.wlib_end = SRV6_SID_FORMAT_USID_F4816_WLIB_END; + } else { + assert(0); + } +@@ -1330,6 +1391,8 @@ DEFPY(no_srv6_sid_format_usid_wide_lib_explicit, + if (strmatch(format->name, SRV6_SID_FORMAT_USID_F3216_NAME)) + format->config.usid.ewlib_start = + SRV6_SID_FORMAT_USID_F3216_EWLIB_START; ++ else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) ++ format->config.usid.ewlib_start = SRV6_SID_FORMAT_USID_F4816_EWLIB_START; + else + assert(0); + +@@ -1383,8 +1446,7 @@ static bool has_default_sid_format_config(struct srv6_sid_format *format) + { + bool has_default_config = true; + +- switch (format->type) { +- case SRV6_SID_FORMAT_TYPE_USID: ++ if (strmatch(format->name, SRV6_SID_FORMAT_USID_F3216_NAME)) { + if (format->config.usid.lib_start != SRV6_SID_FORMAT_USID_F3216_LIB_START) + has_default_config = false; + +@@ -1402,18 +1464,28 @@ static bool has_default_sid_format_config(struct srv6_sid_format *format) + + if (format->config.usid.ewlib_start != SRV6_SID_FORMAT_USID_F3216_EWLIB_START) + has_default_config = false; ++ } else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) { ++ if (format->config.usid.lib_start != SRV6_SID_FORMAT_USID_F4816_LIB_START) ++ has_default_config = false; + +- break; ++ if (format->config.usid.elib_start != SRV6_SID_FORMAT_USID_F4816_ELIB_START) ++ has_default_config = false; + +- case SRV6_SID_FORMAT_TYPE_UNCOMPRESSED: +- if (format->config.uncompressed.explicit_start != +- SRV6_SID_FORMAT_UNCOMPRESSED_F4024_EXPLICIT_RANGE_START) ++ if (format->config.usid.elib_end != SRV6_SID_FORMAT_USID_F4816_ELIB_END) + has_default_config = false; + +- break; ++ if (format->config.usid.wlib_start != SRV6_SID_FORMAT_USID_F4816_WLIB_START) ++ has_default_config = false; + +- case SRV6_SID_FORMAT_TYPE_UNSPEC: +- break; ++ if (format->config.usid.wlib_end != SRV6_SID_FORMAT_USID_F4816_WLIB_END) ++ has_default_config = false; ++ ++ if (format->config.usid.ewlib_start != SRV6_SID_FORMAT_USID_F4816_EWLIB_START) ++ has_default_config = false; ++ } else if (strmatch(format->name, SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NAME)) { ++ if (format->config.uncompressed.explicit_start != ++ SRV6_SID_FORMAT_UNCOMPRESSED_F4024_EXPLICIT_RANGE_START) ++ has_default_config = false; + } + + return has_default_config; +@@ -1500,14 +1572,14 @@ static int zebra_sr_config(struct vty *vty) + /* This SID format is using the default config, skipping */ + continue; + +- if (format->type == SRV6_SID_FORMAT_TYPE_UNCOMPRESSED) { ++ if (strmatch(format->name, ++ SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NAME)) { + vty_out(vty, " format %s\n", format->name); + if (format->config.uncompressed.explicit_start != + SRV6_SID_FORMAT_UNCOMPRESSED_F4024_EXPLICIT_RANGE_START) + vty_out(vty, " explicit start %u\n", + format->config.uncompressed.explicit_start); +- } +- if (format->type == SRV6_SID_FORMAT_TYPE_USID) { ++ } else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F3216_NAME)) { + vty_out(vty, " format %s\n", format->name); + if (format->config.usid.lib_start != + SRV6_SID_FORMAT_USID_F3216_LIB_START) +@@ -1534,6 +1606,33 @@ static int zebra_sr_config(struct vty *vty) + vty_out(vty, + " wide-local-id-block explicit start %u\n", + format->config.usid.ewlib_start); ++ } else if (strmatch(format->name, SRV6_SID_FORMAT_USID_F4816_NAME)) { ++ vty_out(vty, " format %s\n", format->name); ++ if (format->config.usid.lib_start != ++ SRV6_SID_FORMAT_USID_F4816_LIB_START) ++ vty_out(vty, " local-id-block start %u\n", ++ format->config.usid.lib_start); ++ if (format->config.usid.elib_start != ++ SRV6_SID_FORMAT_USID_F4816_ELIB_START || ++ format->config.usid.elib_end != ++ SRV6_SID_FORMAT_USID_F4816_ELIB_END) ++ vty_out(vty, ++ " local-id-block explicit start %u end %u\n", ++ format->config.usid.elib_start, ++ format->config.usid.elib_end); ++ if (format->config.usid.wlib_start != ++ SRV6_SID_FORMAT_USID_F4816_WLIB_START || ++ format->config.usid.wlib_end != ++ SRV6_SID_FORMAT_USID_F4816_WLIB_END) ++ vty_out(vty, ++ " wide-local-id-block start %u end %u\n", ++ format->config.usid.wlib_start, ++ format->config.usid.wlib_end); ++ if (format->config.usid.ewlib_start != ++ SRV6_SID_FORMAT_USID_F4816_EWLIB_START) ++ vty_out(vty, ++ " wide-local-id-block explicit start %u\n", ++ format->config.usid.ewlib_start); + } + vty_out(vty, " exit\n"); + vty_out(vty, " !\n"); +@@ -1561,6 +1660,7 @@ void zebra_srv6_vty_init(void) + install_node(&srv6_encap_node); + install_node(&srv6_sid_formats_node); + install_node(&srv6_sid_format_usid_f3216_node); ++ install_node(&srv6_sid_format_usid_f4816_node); + install_node(&srv6_sid_format_uncompressed_f4024_node); + install_default(SEGMENT_ROUTING_NODE); + install_default(SRV6_NODE); +@@ -1569,6 +1669,7 @@ void zebra_srv6_vty_init(void) + install_default(SRV6_ENCAP_NODE); + install_default(SRV6_SID_FORMATS_NODE); + install_default(SRV6_SID_FORMAT_USID_F3216_NODE); ++ install_default(SRV6_SID_FORMAT_USID_F4816_NODE); + install_default(SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE); + + /* Command for change node */ +@@ -1581,10 +1682,12 @@ void zebra_srv6_vty_init(void) + install_element(SRV6_LOCS_NODE, &srv6_locator_cmd); + install_element(SRV6_LOCS_NODE, &no_srv6_locator_cmd); + install_element(SRV6_SID_FORMATS_NODE, &srv6_sid_format_f3216_usid_cmd); ++ install_element(SRV6_SID_FORMATS_NODE, &srv6_sid_format_f4816_usid_cmd); + install_element(SRV6_SID_FORMATS_NODE, + &srv6_sid_format_uncompressed_cmd); + install_element(SRV6_SID_FORMATS_NODE, + &no_srv6_sid_format_f3216_usid_cmd); ++ install_element(SRV6_SID_FORMATS_NODE, &no_srv6_sid_format_f4816_usid_cmd); + install_element(SRV6_SID_FORMATS_NODE, + &no_srv6_sid_format_f4024_uncompressed_cmd); + +@@ -1612,6 +1715,16 @@ void zebra_srv6_vty_init(void) + &srv6_sid_format_usid_wide_lib_explicit_cmd); + install_element(SRV6_SID_FORMAT_USID_F3216_NODE, + &no_srv6_sid_format_usid_wide_lib_explicit_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &srv6_sid_format_usid_lib_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &no_srv6_sid_format_usid_lib_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &srv6_sid_format_usid_lib_explicit_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &no_srv6_sid_format_usid_lib_explicit_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &srv6_sid_format_usid_wlib_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, &no_srv6_sid_format_usid_wlib_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, ++ &srv6_sid_format_usid_wide_lib_explicit_cmd); ++ install_element(SRV6_SID_FORMAT_USID_F4816_NODE, ++ &no_srv6_sid_format_usid_wide_lib_explicit_cmd); + install_element(SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, + &srv6_sid_format_explicit_cmd); + install_element(SRV6_SID_FORMAT_UNCOMPRESSED_F4024_NODE, + +From ba376a0b264681fbcc53dfb8bdc708056b599260 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 17 May 2025 08:44:49 +0000 +Subject: [PATCH 06/25] zebra: Abstract APIs to manage SRv6 SID blocks + +Refactor code to manage SID blocks. + +This commit does no functional change. It does a refactoring of the +existing code to manage SID blocks. + +There are several places in the code where we need to allocate/release +SID blocks. This commit defines APIs to allocate/release SID blocks, +so we can call these APIs where needed without having to duplicate code. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 82 +++++++++++++++++++++++++++++++--------------- + zebra/zebra_srv6.h | 2 ++ + 2 files changed, 57 insertions(+), 27 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 89d8f23baa14..2eca41113405 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -206,16 +206,12 @@ void zebra_srv6_locator_format_set(struct srv6_locator *locator, + struct srv6_sid_format *format) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +- struct zebra_srv6_sid_block *block_old, *block_new; +- struct prefix_ipv6 block_pfx_new; + struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *ctx; + + if (!locator) + return; + +- locator->sid_format = format; +- + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: Locator %s format has changed, old=%s new=%s", + __func__, locator->name, +@@ -244,32 +240,13 @@ void zebra_srv6_locator_format_set(struct srv6_locator *locator, + __func__, locator->name); + + /* Release the current parent block */ +- block_old = locator->sid_block; +- if (block_old) { +- block_old->refcnt--; +- if (block_old->refcnt == 0) { +- listnode_delete(srv6->sid_blocks, block_old); +- zebra_srv6_sid_block_free(block_old); +- } +- } +- locator->sid_block = NULL; ++ zebra_srv6_sid_locator_block_release(locator); + +- block_pfx_new = locator->prefix; +- if (format) +- block_pfx_new.prefixlen = format->block_len; +- else +- block_pfx_new.prefixlen = locator->block_bits_length; +- apply_mask(&block_pfx_new); ++ /* Change format */ ++ locator->sid_format = format; + + /* Allocate the new parent block */ +- block_new = zebra_srv6_sid_block_lookup(&block_pfx_new); +- if (!block_new) { +- block_new = zebra_srv6_sid_block_alloc(format, &block_pfx_new); +- listnode_add(srv6->sid_blocks, block_new); +- } +- +- block_new->refcnt++; +- locator->sid_block = block_new; ++ zebra_srv6_sid_locator_block_alloc(locator); + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: Locator %s format has changed, send SRV6_LOCATOR_ADD notification to zclients", +@@ -576,6 +553,57 @@ zebra_srv6_sid_block_lookup(struct prefix_ipv6 *prefix) + return NULL; + } + ++static void zebra_srv6_sid_block_refcnt_increment(struct zebra_srv6_sid_block *block) ++{ ++ block->refcnt++; ++} ++ ++static void zebra_srv6_sid_block_refcnt_decrement(struct zebra_srv6_sid_block *block) ++{ ++ struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ ++ assert(block->refcnt > 0); ++ ++ block->refcnt--; ++ if (block->refcnt == 0) { ++ listnode_delete(srv6->sid_blocks, block); ++ zebra_srv6_sid_block_free(block); ++ } ++} ++ ++void zebra_srv6_sid_locator_block_alloc(struct srv6_locator *locator) ++{ ++ struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ struct zebra_srv6_sid_block *block_new; ++ struct prefix_ipv6 block_pfx_new; ++ struct srv6_sid_format *format; ++ ++ format = locator->sid_format; ++ ++ block_pfx_new = locator->prefix; ++ if (format) ++ block_pfx_new.prefixlen = format->block_len; ++ else ++ block_pfx_new.prefixlen = locator->block_bits_length; ++ apply_mask(&block_pfx_new); ++ ++ /* Allocate the new parent block */ ++ block_new = zebra_srv6_sid_block_lookup(&block_pfx_new); ++ if (!block_new) { ++ block_new = zebra_srv6_sid_block_alloc(format, &block_pfx_new); ++ listnode_add(srv6->sid_blocks, block_new); ++ } ++ ++ zebra_srv6_sid_block_refcnt_increment(block_new); ++ locator->sid_block = block_new; ++} ++ ++void zebra_srv6_sid_locator_block_release(struct srv6_locator *locator) ++{ ++ zebra_srv6_sid_block_refcnt_decrement(locator->sid_block); ++ locator->sid_block = NULL; ++} ++ + /* --- Zebra SRv6 SID management functions ---------------------------------- */ + + /** +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index a056dcadaf8e..9f8a67c73be6 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -302,6 +302,8 @@ extern void zebra_srv6_sid_block_free(struct zebra_srv6_sid_block *block); + extern void delete_zebra_srv6_sid_block(void *val); + extern struct zebra_srv6_sid_block * + zebra_srv6_sid_block_lookup(struct prefix_ipv6 *prefix); ++void zebra_srv6_sid_locator_block_alloc(struct srv6_locator *locator); ++void zebra_srv6_sid_locator_block_release(struct srv6_locator *locator); + + extern struct zebra_srv6_sid * + zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, struct in6_addr *sid_value, + +From a31ef7bdae62ce50b9530922ee4c9e3c9cc9fee2 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 06:25:38 +0000 +Subject: [PATCH 07/25] zebra: Parse and validate SIDs early + +Currently, when SID Manager gets a SID allocation request from a daemon, +it first does some work (e.g. checking if the SID has been already +allocated) and only after it decompose the SID received and verifies +that the SID is valid. + +However, there is no point to do any work if the SID is not valid. +Therefore, it makes sense to do the SID validity check early and return +immediately if the SID is not valid. + +This commit moves the check for SID validity early in the SID allocation +request handling function. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 2eca41113405..344e7ceb2566 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -1564,6 +1564,13 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + if (!ctx || !sid_value) + return -1; + ++ /* Get parent locator and function of the provided SID */ ++ if (!zebra_srv6_sid_decompose(sid_value, &block, &locator, &sid_func, &sid_func_wide)) { ++ zlog_err("%s: invalid SM request arguments: parent block/locator not found for SID %pI6", ++ __func__, sid_value); ++ return -1; ++ } ++ + /* Check if we already have a SID associated with the provided context */ + for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, s)) { + if (memcmp(&s->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) { +@@ -1600,14 +1607,6 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + } + } + +- /* Get parent locator and function of the provided SID */ +- if (!zebra_srv6_sid_decompose(sid_value, &block, &locator, &sid_func, +- &sid_func_wide)) { +- zlog_err("%s: invalid SM request arguments: parent block/locator not found for SID %pI6", +- __func__, sid_value); +- return -1; +- } +- + if (ctx->behavior == ZEBRA_SEG6_LOCAL_ACTION_END) { + zctx = zebra_srv6_sid_ctx_alloc(); + zctx->ctx = *ctx; + +From 03b9d6d3a833893d190c91d91d7323e68701b5dc Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 07:02:23 +0000 +Subject: [PATCH 08/25] zebra: Add function to perform SID ctx lookup + +Add a function to perform SID lookup by context. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 13 +++++++++++++ + zebra/zebra_srv6.h | 1 + + 2 files changed, 14 insertions(+) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 344e7ceb2566..baee9d2a3786 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -161,6 +161,19 @@ void delete_zebra_srv6_sid_ctx(void *val) + zebra_srv6_sid_ctx_free((struct zebra_srv6_sid_ctx *)val); + } + ++struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx *ctx) ++{ ++ struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ struct zebra_srv6_sid_ctx *zctx; ++ struct listnode *node; ++ ++ for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, zctx)) ++ if (memcmp(&zctx->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) ++ return zctx; ++ ++ return NULL; ++} ++ + /* --- Zebra SRv6 SID format management functions --------------------------- */ + + void srv6_sid_format_register(struct srv6_sid_format *format) +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 9f8a67c73be6..908bc826078b 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -334,5 +334,6 @@ extern int srv6_manager_get_sid_response(struct zebra_srv6_sid *sid, + extern struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_alloc(void); + extern void zebra_srv6_sid_ctx_free(struct zebra_srv6_sid_ctx *ctx); + extern void delete_zebra_srv6_sid_ctx(void *val); ++extern struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx *ctx); + + #endif /* _ZEBRA_SRV6_H */ + +From 3669d03855a0befa1aef07080acb6c14d53e9672 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 09:09:04 +0000 +Subject: [PATCH 09/25] zebra: Refactor release_srv6_sid() function + +Refactor release_srv6_sid() function to make it more readable and +maintainable. + +There is no functional change. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 41 ++++++++++++++++++++--------------------- + 1 file changed, 20 insertions(+), 21 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index baee9d2a3786..8fed45012bff 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -2251,6 +2251,25 @@ static int release_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + return 0; + } + ++static void release_srv6_sid_func(const struct zebra_srv6_sid_ctx *zctx) ++{ ++ if (!(zctx->sid->block->sid_format && ++ zctx->sid->block->sid_format->type == SRV6_SID_FORMAT_TYPE_USID && ++ zctx->ctx.behavior == ZEBRA_SEG6_LOCAL_ACTION_END) && ++ !(!zctx->sid->block->sid_format && zctx->ctx.behavior == ZEBRA_SEG6_LOCAL_ACTION_END)) { ++ if (zctx->sid->alloc_mode == SRV6_SID_ALLOC_MODE_EXPLICIT) ++ /* Release SRv6 SID function */ ++ release_srv6_sid_func_explicit(zctx->sid->block, zctx->sid->func, ++ zctx->sid->wide_func); ++ else if (zctx->sid->alloc_mode == SRV6_SID_ALLOC_MODE_DYNAMIC) ++ /* Release SRv6 SID function */ ++ release_srv6_sid_func_dynamic(zctx->sid->block, zctx->sid->func); ++ else ++ /* We should never arrive here */ ++ assert(0); ++ } ++} ++ + /** + * Core function, release the SRv6 SID associated with a given context. + * +@@ -2309,27 +2328,7 @@ int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, + srv6_sid_ctx2str(buf, sizeof(buf), + &zctx->ctx)); + +- if (!(zctx->sid->block->sid_format && +- zctx->sid->block->sid_format->type == +- SRV6_SID_FORMAT_TYPE_USID && +- zctx->ctx.behavior == ZEBRA_SEG6_LOCAL_ACTION_END) && +- !(!zctx->sid->block->sid_format && +- zctx->ctx.behavior == ZEBRA_SEG6_LOCAL_ACTION_END)) { +- if (zctx->sid->alloc_mode == +- SRV6_SID_ALLOC_MODE_EXPLICIT) +- /* Release SRv6 SID function */ +- release_srv6_sid_func_explicit(zctx->sid->block, +- zctx->sid->func, +- zctx->sid->wide_func); +- else if (zctx->sid->alloc_mode == +- SRV6_SID_ALLOC_MODE_DYNAMIC) +- /* Release SRv6 SID function */ +- release_srv6_sid_func_dynamic(zctx->sid->block, +- zctx->sid->func); +- else +- /* We should never arrive here */ +- assert(0); +- } ++ release_srv6_sid_func(zctx); + + /* Free the SID */ + zebra_srv6_sid_free(zctx->sid); + +From 1678a69ae3548f7e8f6dd2f4a6fc33da2c9d0243 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 07:22:59 +0000 +Subject: [PATCH 10/25] zebra: Refactor get_srv6_sid_explicit() function + +Refactor get_srv6_sid_explicit() function to make it more readable +and maintainable. + +There is no functional change. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 135 +++++++++++++++++---------------------------- + 1 file changed, 52 insertions(+), 83 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 8fed45012bff..c15d2b470810 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -39,8 +39,7 @@ DEFINE_MTYPE_STATIC(SRV6_MGR, ZEBRA_SRV6_SID_CTX, "SRv6 SID context"); + static struct zebra_srv6 g_srv6; + + /* Prototypes */ +-static int release_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, +- uint32_t sid_func); ++static void release_srv6_sid_func(const struct zebra_srv6_sid_ctx *zctx); + + /* define hooks for the basic API, so that it can be specialized or served + * externally +@@ -1566,9 +1565,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + struct in6_addr *sid_value, bool is_localonly) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +- struct zebra_srv6_sid_ctx *s = NULL; + struct zebra_srv6_sid_ctx *zctx = NULL; +- struct listnode *node; + uint32_t sid_func = 0, sid_func_wide = 0; + struct srv6_locator *locator = NULL; + struct zebra_srv6_sid_block *block = NULL; +@@ -1585,45 +1582,66 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + } + + /* Check if we already have a SID associated with the provided context */ +- for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, s)) { +- if (memcmp(&s->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) { +- /* +- * If the context is already associated with a SID that has the same SID value, then +- * return the existing SID +- */ +- if (sid_same(&s->sid->value, sid_value)) { +- if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: returning existing SRv6 SID %pI6 ctx %s", +- __func__, &s->sid->value, +- srv6_sid_ctx2str(buf, +- sizeof(buf), +- ctx)); +- *sid = s->sid; +- return 0; +- } ++ zctx = zebra_srv6_sid_ctx_lookup(ctx); + +- /* +- * It is not allowed to allocate an explicit SID for a given context if the context +- * is already associated with an explicit SID +- */ +- if (s->sid->alloc_mode == SRV6_SID_ALLOC_MODE_EXPLICIT) { +- zlog_err("%s: cannot alloc SID %pI6 for ctx %s: ctx already associated with SID %pI6", +- __func__, sid_value, +- srv6_sid_ctx2str(buf, sizeof(buf), +- &s->ctx), +- &s->sid->value); ++ if (zctx) { ++ /* ++ * If the context is already associated with a SID that has the same SID value, then ++ * return the existing SID ++ */ ++ if (sid_same(&zctx->sid->value, sid_value)) { ++ if (IS_ZEBRA_DEBUG_SRV6) ++ zlog_debug("%s: returning existing SRv6 SID %pI6 ctx %s", __func__, ++ &zctx->sid->value, ++ srv6_sid_ctx2str(buf, sizeof(buf), ctx)); ++ *sid = zctx->sid; ++ return 0; ++ } ++ ++ /* Allocate an explicit SID function for the SID */ ++ if (ctx->behavior != ZEBRA_SEG6_LOCAL_ACTION_END) ++ if (!alloc_srv6_sid_func_explicit(block, sid_func, sid_func_wide)) { ++ zlog_err("%s: invalid SM request arguments: failed to allocate SID function %u from block %pFX", ++ __func__, sid_func, &block->prefix); + return -1; + } + +- zctx = s; +- break; ++ /* ++ * If we already have a SID associated with this context, we need to ++ * deallocate the current SID function before allocating the new one ++ */ ++ if (zctx->sid) { ++ if (IS_ZEBRA_DEBUG_SRV6) ++ zlog_debug("%s: ctx %s already associated with SID %pI6, releasing existing SID", ++ __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), ++ &zctx->sid->value); ++ ++ release_srv6_sid_func(zctx); ++ ++ zctx->sid->value = *sid_value; ++ zctx->sid->locator = locator; ++ zctx->sid->block = block; ++ zctx->sid->func = sid_func; ++ zctx->sid->wide_func = sid_func_wide; ++ zctx->sid->alloc_mode = SRV6_SID_ALLOC_MODE_EXPLICIT; ++ ++ *sid = zctx->sid; ++ (*sid)->ctx = zctx; + } +- } ++ } else { ++ /* Allocate an explicit SID function for the SID */ ++ if (ctx->behavior != ZEBRA_SEG6_LOCAL_ACTION_END) ++ if (!alloc_srv6_sid_func_explicit(block, sid_func, sid_func_wide)) { ++ zlog_err("%s: invalid SM request arguments: failed to allocate SID function %u from block %pFX", ++ __func__, sid_func, &block->prefix); ++ return -1; ++ } + +- if (ctx->behavior == ZEBRA_SEG6_LOCAL_ACTION_END) { ++ /* If we don't have a zebra SID context for this context, allocate a new one */ + zctx = zebra_srv6_sid_ctx_alloc(); + zctx->ctx = *ctx; + ++ /* Allocate the SID to store SID information */ + *sid = zebra_srv6_sid_alloc(zctx, sid_value, locator, block, sid_func, + SRV6_SID_ALLOC_MODE_EXPLICIT); + if (!(*sid)) { +@@ -1635,56 +1653,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + (*sid)->ctx = zctx; + zctx->sid = *sid; + listnode_add(srv6->sids, zctx); +- +- if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: allocated explicit SRv6 SID %pI6 for context %s", __func__, +- &(*sid)->value, srv6_sid_ctx2str(buf, sizeof(buf), ctx)); +- +- return 1; +- } +- +- /* Allocate an explicit SID function for the SID */ +- if (!alloc_srv6_sid_func_explicit(block, sid_func, sid_func_wide)) { +- zlog_err("%s: invalid SM request arguments: failed to allocate SID function %u from block %pFX", +- __func__, sid_func, &block->prefix); +- return -1; +- } +- +- if (!zctx) { +- /* If we don't have a zebra SID context for this context, allocate a new one */ +- zctx = zebra_srv6_sid_ctx_alloc(); +- zctx->ctx = *ctx; +- } else { +- /* +- * If we already have a SID associated with this context, we need to +- * deallocate the current SID function before allocating the new one +- */ +- if (zctx->sid) { +- if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: ctx %s already associated with a dynamic SID %pI6, releasing dynamic SID", +- __func__, +- srv6_sid_ctx2str(buf, sizeof(buf), +- ctx), +- &zctx->sid->value); +- +- release_srv6_sid_func_dynamic(block, zctx->sid->func); +- zebra_srv6_sid_free(zctx->sid); +- zctx->sid = NULL; +- } +- } +- +- /* Allocate the SID to store SID information */ +- *sid = zebra_srv6_sid_alloc(zctx, sid_value, locator, block, sid_func, +- SRV6_SID_ALLOC_MODE_EXPLICIT); +- if (!(*sid)) { +- flog_err(EC_ZEBRA_SM_CANNOT_ASSIGN_SID, +- "%s: failed to create SRv6 SID %s (%pI6)", __func__, +- srv6_sid_ctx2str(buf, sizeof(buf), ctx), sid_value); +- return -1; + } +- (*sid)->ctx = zctx; +- zctx->sid = *sid; +- listnode_add(srv6->sids, zctx); + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: allocated explicit SRv6 SID %pI6 for context %s", + +From 5d0f5756c9edd1d942bdb19cf7e45c607b2defe4 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 07:56:48 +0000 +Subject: [PATCH 11/25] zebra: Refactor get_srv6_sid_dynamic() function + +Refactor get_srv6_sid_dynamic() function to make it more readable and +maintainable. + +There is no functional change. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 23 ++++------------------- + 1 file changed, 4 insertions(+), 19 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index c15d2b470810..b27357508ae3 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -1683,9 +1683,7 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_block *block; + struct srv6_sid_format *format; +- struct zebra_srv6_sid_ctx *s = NULL; + struct zebra_srv6_sid_ctx *zctx; +- struct listnode *node; + struct in6_addr sid_value; + uint32_t sid_func = 0; + char buf[256]; +@@ -1700,23 +1698,10 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + * If we already have a SID for the provided context, we return the existing + * SID instead of allocating a new one. + */ +- for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, s)) { +- if (locator && s->sid && s->sid->locator) { +- if (strncmp(s->sid->locator->name, locator->name, +- SRV6_LOCNAME_SIZE)) { +- continue; +- } +- } +- if (memcmp(&s->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) { +- if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: returning existing SID %s %pI6", +- __func__, +- srv6_sid_ctx2str(buf, sizeof(buf), +- ctx), +- &s->sid->value); +- *sid = s->sid; +- return 0; +- } ++ zctx = zebra_srv6_sid_ctx_lookup(ctx); ++ if (zctx && strncmp(zctx->sid->locator->name, locator->name, SRV6_LOCNAME_SIZE)) { ++ *sid = zctx->sid; ++ return 0; + } + + if (format && format->type == SRV6_SID_FORMAT_TYPE_USID && + +From 356f28f528bbb03c691bc431b1286899d80afb4a Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 00:14:09 +0000 +Subject: [PATCH 12/25] zebra: Add data structure to store SIDs parent locators + +With the introduction of support for multiple locators, daemons can +now request a SID context from multiple locators. We need to have a +mechanism to track which locators a SID context has been allocated from. + +To support this, we extend the SID context data structure by adding a +list 'entries' that tracks the locators from which the SID context has +been allocated. + +When a daemon requests a SID context from a locator, we create a new +SID entry in the entries list of the SID context. + +When a daemon releases a SID context from a locator, we remove the +corresponding entry from the entries list. If there are no other entries, +we release the SID context because it is no longer used. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 182 +++++++++++++++++++++++++++++++++++++++++++++ + zebra/zebra_srv6.h | 45 +++++++++++ + 2 files changed, 227 insertions(+) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index b27357508ae3..dd269b18e718 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -35,6 +35,7 @@ DEFINE_MTYPE_STATIC(SRV6_MGR, ZEBRA_SRV6_USID_WLIB, + "SRv6 uSID Wide LIB information"); + DEFINE_MTYPE_STATIC(SRV6_MGR, ZEBRA_SRV6_SID, "SRv6 SID"); + DEFINE_MTYPE_STATIC(SRV6_MGR, ZEBRA_SRV6_SID_CTX, "SRv6 SID context"); ++DEFINE_MTYPE_STATIC(SRV6_MGR, ZEBRA_SRV6_SID_ENTRY_INFO, "SRv6 SID entry information"); + + static struct zebra_srv6 g_srv6; + +@@ -205,6 +206,36 @@ struct srv6_sid_format *srv6_sid_format_lookup(const char *name) + return NULL; + } + ++static void zebra_srv6_sid_entry_del_by_locator(struct zebra_srv6_sid *sid, ++ struct srv6_locator *locator) ++{ ++ struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ struct zebra_srv6_sid_entry *entry; ++ ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) ++ if (entry->locator == locator) { ++ zebra_srv6_sid_entry_list_del(&sid->entries, entry); ++ zebra_srv6_sid_entry_free(entry); ++ } ++ ++ if (zebra_srv6_sid_entry_list_count(&sid->entries) == 0) { ++ listnode_delete(srv6->sids, sid->ctx); ++ zebra_srv6_sid_ctx_free(sid->ctx); ++ ++ zebra_srv6_sid_free(sid); ++ } ++} ++ ++void zebra_srv6_sid_entry_del_by_locator_all_sids(struct srv6_locator *locator) ++{ ++ struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ struct listnode *node, *nnode; ++ struct zebra_srv6_sid_ctx *ctx; ++ ++ for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) ++ zebra_srv6_sid_entry_del_by_locator(ctx->sid, locator); ++} ++ + /* + * Called to change the SID format of a locator. + * +@@ -648,12 +679,20 @@ zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, struct in6_addr *sid_value, + sid->func = sid_func; + sid->alloc_mode = alloc_mode; + sid->client_list = list_new(); ++ zebra_srv6_sid_entry_list_init(&sid->entries); + + return sid; + } + + void zebra_srv6_sid_free(struct zebra_srv6_sid *sid) + { ++ struct zebra_srv6_sid_entry *entry; ++ ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) { ++ zebra_srv6_sid_entry_list_del(&sid->entries, entry); ++ zebra_srv6_sid_entry_free(entry); ++ } ++ zebra_srv6_sid_entry_list_fini(&sid->entries); + list_delete(&sid->client_list); + XFREE(MTYPE_ZEBRA_SRV6_SID, sid); + } +@@ -668,6 +707,136 @@ void delete_zebra_srv6_sid(void *val) + zebra_srv6_sid_free((struct zebra_srv6_sid *)val); + } + ++void zebra_srv6_sid_client_add(struct zebra_srv6_sid *sid, bool is_localonly, ++ struct srv6_locator *locator, struct zserv *client) ++{ ++ struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_client *zclient; ++ ++ entry = zebra_srv6_sid_entry_lookup(sid, locator->name, is_localonly); ++ if (!entry) ++ return; ++ ++ zclient = zebra_srv6_sid_client_lookup(sid, entry, client); ++ if (!zclient) { ++ zclient = XCALLOC(MTYPE_ZEBRA_SRV6_SID_ENTRY_INFO, ++ sizeof(struct zebra_srv6_sid_client)); ++ zclient->client = client; ++ ++ zebra_srv6_sid_client_list_add_tail(&entry->clients_list, zclient); ++ } ++} ++ ++struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_alloc(void) ++{ ++ struct zebra_srv6_sid_entry *entry = NULL; ++ ++ entry = XCALLOC(MTYPE_ZEBRA_SRV6_SID_ENTRY_INFO, sizeof(struct zebra_srv6_sid_entry)); ++ ++ return entry; ++} ++ ++void zebra_srv6_sid_entry_free(struct zebra_srv6_sid_entry *entry) ++{ ++ struct zebra_srv6_sid_client *sclient; ++ ++ frr_each_safe (zebra_srv6_sid_client_list, &entry->clients_list, sclient) { ++ zebra_srv6_sid_client_list_del(&entry->clients_list, sclient); ++ XFREE(MTYPE_ZEBRA_SRV6_SID_ENTRY_INFO, sclient); ++ } ++ zebra_srv6_sid_client_list_fini(&entry->clients_list); ++ XFREE(MTYPE_ZEBRA_SRV6_SID_ENTRY_INFO, entry); ++} ++ ++struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_lookup(struct zebra_srv6_sid *sid, ++ const char *locator_name, ++ bool is_localonly) ++{ ++ struct zebra_srv6_sid_entry *entry; ++ ++ if (!locator_name) ++ return NULL; ++ ++ frr_each (zebra_srv6_sid_entry_list, &sid->entries, entry) ++ if (!strncmp(entry->locator->name, locator_name, SRV6_LOCNAME_SIZE) && ++ entry->is_localonly == is_localonly) ++ return entry; ++ ++ return NULL; ++} ++ ++void zebra_srv6_sid_client_del(struct zebra_srv6_sid *sid, struct zebra_srv6_sid_entry *entry, ++ struct zebra_srv6_sid_client *sclient) ++{ ++ zebra_srv6_sid_client_list_del(&entry->clients_list, sclient); ++ XFREE(MTYPE_ZEBRA_SRV6_SID_ENTRY_INFO, sclient); ++ if (zebra_srv6_sid_client_list_count(&entry->clients_list) == 0) { ++ zebra_srv6_sid_entry_list_del(&sid->entries, entry); ++ zebra_srv6_sid_entry_free(entry); ++ } ++} ++ ++void zebra_srv6_sid_client_del_all(struct zebra_srv6_sid *sid, struct zserv *client) ++{ ++ struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_client *zclient; ++ ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) { ++ zclient = zebra_srv6_sid_client_lookup(sid, entry, client); ++ if (!zclient) ++ continue; ++ ++ /* Remove the client from the list of clients using the SID */ ++ zebra_srv6_sid_client_list_del(&entry->clients_list, zclient); ++ XFREE(MTYPE_ZEBRA_SRV6_SID_ENTRY_INFO, zclient); ++ if (zebra_srv6_sid_client_list_count(&entry->clients_list) == 0) { ++ zebra_srv6_sid_entry_list_del(&sid->entries, entry); ++ zebra_srv6_sid_entry_free(entry); ++ } ++ } ++ ++ /* ++ * If the SID is not used by any other client, then deallocate it ++ * and remove it from the SRv6 database. ++ */ ++ if (zebra_srv6_sid_entry_list_count(&sid->entries) == 0) { ++ release_srv6_sid_func(sid->ctx); ++ ++ /* Remove the SID context from the list and free memory */ ++ listnode_delete(srv6->sids, sid->ctx); ++ zebra_srv6_sid_ctx_free(sid->ctx); ++ ++ /* Free the SID */ ++ zebra_srv6_sid_free(sid); ++ } ++} ++ ++struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_add(struct zebra_srv6_sid *sid, ++ const char *locator_name, ++ struct in6_addr *sid_value, bool is_localonly) ++{ ++ struct zebra_srv6_sid_entry *entry; ++ struct srv6_locator *locator; ++ ++ locator = zebra_srv6_locator_lookup(locator_name); ++ if (!locator) ++ return NULL; ++ ++ entry = zebra_srv6_sid_entry_lookup(sid, locator_name, is_localonly); ++ if (entry) ++ return entry; ++ ++ entry = zebra_srv6_sid_entry_alloc(); ++ entry->locator = locator; ++ entry->sid_value = *sid_value; ++ entry->is_localonly = is_localonly; ++ zebra_srv6_sid_client_list_init(&entry->clients_list); ++ zebra_srv6_sid_entry_list_add_tail(&sid->entries, entry); ++ ++ return entry; ++} ++ + void zebra_srv6_locator_add(struct srv6_locator *locator) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +@@ -2224,6 +2393,19 @@ static void release_srv6_sid_func(const struct zebra_srv6_sid_ctx *zctx) + } + } + ++struct zebra_srv6_sid_client *zebra_srv6_sid_client_lookup(struct zebra_srv6_sid *sid, ++ struct zebra_srv6_sid_entry *entry, ++ struct zserv *client) ++{ ++ struct zebra_srv6_sid_client *zclient; ++ ++ frr_each (zebra_srv6_sid_client_list, &entry->clients_list, zclient) ++ if (zclient->client == client) ++ return zclient; ++ ++ return NULL; ++} ++ + /** + * Core function, release the SRv6 SID associated with a given context. + * +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 908bc826078b..cb63c3738cc8 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -152,6 +152,27 @@ srv6_sid_alloc_mode2str(enum srv6_sid_alloc_mode alloc_mode) + } + } + ++PREDECL_DLIST(zebra_srv6_sid_client_list); ++ ++struct zebra_srv6_sid_client { ++ struct zserv *client; ++ ++ struct zebra_srv6_sid_client_list_item item; ++}; ++ ++DECLARE_DLIST(zebra_srv6_sid_client_list, struct zebra_srv6_sid_client, item); ++ ++PREDECL_DLIST(zebra_srv6_sid_entry_list); ++ ++struct zebra_srv6_sid_entry { ++ struct zebra_srv6_sid_client_list_head clients_list; ++ struct srv6_locator *locator; ++ struct in6_addr sid_value; ++ bool is_localonly; ++ ++ struct zebra_srv6_sid_entry_list_item item; ++}; ++ + /* SRv6 SID instance. */ + struct zebra_srv6_sid { + /* +@@ -184,8 +205,13 @@ struct zebra_srv6_sid { + + /* List of clients that are using the SID */ + struct list *client_list; ++ ++ /* List of SID entries allocated for this SID */ ++ struct zebra_srv6_sid_entry_list_head entries; + }; + ++DECLARE_DLIST(zebra_srv6_sid_entry_list, struct zebra_srv6_sid_entry, item); ++ + /* + * Zebra SRv6 SID context. + * A context defines a behavior and (optionally) some behavior-specific +@@ -313,6 +339,25 @@ zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, struct in6_addr *sid_value, + extern void zebra_srv6_sid_free(struct zebra_srv6_sid *sid); + extern void delete_zebra_srv6_sid(void *val); + ++struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_alloc(void); ++void zebra_srv6_sid_entry_free(struct zebra_srv6_sid_entry *client); ++struct zebra_srv6_sid_client *zebra_srv6_sid_client_lookup(struct zebra_srv6_sid *sid, ++ struct zebra_srv6_sid_entry *entry, ++ struct zserv *client); ++struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_lookup(struct zebra_srv6_sid *sid, ++ const char *locator_name, ++ bool is_localonly); ++void zebra_srv6_sid_client_del_all(struct zebra_srv6_sid *sid, struct zserv *client); ++void zebra_srv6_sid_client_del(struct zebra_srv6_sid *sid, struct zebra_srv6_sid_entry *entry, ++ struct zebra_srv6_sid_client *sclient); ++void zebra_srv6_sid_entry_del_by_locator_all_sids(struct srv6_locator *locator); ++void zebra_srv6_sid_client_add(struct zebra_srv6_sid *sid, bool is_localonly, ++ struct srv6_locator *locator, struct zserv *client); ++struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_add(struct zebra_srv6_sid *sid, ++ const char *locator_name, ++ struct in6_addr *sid_value, ++ bool is_localonly); ++ + extern void srv6_manager_get_sid_call(struct zebra_srv6_sid **sid, struct zserv *client, + struct srv6_sid_ctx *ctx, struct in6_addr *sid_value, + const char *locator_name, bool is_localonly); + +From 5bf3c69da68ac59c6f9b3c7348cd5b17c142eb12 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 00:41:32 +0000 +Subject: [PATCH 13/25] zebra: Fix compose and decompose functions + +This commit does the following changes: +* extend the sid_compose() function to support allocation of local-only +SIDs +* extend the sid_compose() function to support SIDs allocated from wide +LIB +* fix an issue in the sid_compose() function. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 62 ++++++++++++++++++++++++++++------------------ + 1 file changed, 38 insertions(+), 24 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index dd269b18e718..8a595ed4fdff 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -1186,29 +1186,33 @@ void zebra_srv6_encap_src_addr_unset(void) + * @param sid_value SRv6 SID address returned + * @param locator Parent locator of the SRv6 SID + * @param sid_func Function part of the SID ++ * @param sid_func_wide Wide function of the SID + * @param is_localonly SID is local-only + * @return True if success, False otherwise + */ +-static bool zebra_srv6_sid_compose(struct in6_addr *sid_value, +- struct srv6_locator *locator, +- uint32_t sid_func) ++static bool zebra_srv6_sid_compose(struct in6_addr *sid_value, struct srv6_locator *locator, ++ uint32_t sid_func, uint32_t sid_func_wide, bool is_localonly) + { + uint8_t offset, func_len; + struct srv6_sid_format *format; ++ struct zebra_srv6_sid_block *block; + + if (!sid_value || !locator) + return false; + ++ block = locator->sid_block; ++ + format = locator->sid_format; + if (format) { +- offset = format->block_len + format->node_len; ++ offset = is_localonly ? format->block_len : format->block_len + format->node_len; + func_len = format->function_len; + } else { +- offset = locator->block_bits_length + locator->node_bits_length; ++ offset = is_localonly ? locator->block_bits_length ++ : locator->block_bits_length + locator->node_bits_length; + func_len = locator->function_bits_length; + } + +- *sid_value = locator->prefix.prefix; ++ *sid_value = is_localonly ? block->prefix.prefix : locator->prefix.prefix; + for (uint8_t idx = 0; idx < func_len; idx++) { + uint8_t tidx = offset + idx; + +@@ -1216,6 +1220,13 @@ static bool zebra_srv6_sid_compose(struct in6_addr *sid_value, + if (sid_func >> (func_len - 1 - idx) & 0x1) + sid_value->s6_addr[tidx / 8] |= 0x1 << (7 - tidx % 8); + } ++ for (uint8_t idx = 0; idx < func_len; idx++) { ++ uint8_t tidx = offset + func_len + idx; ++ ++ sid_value->s6_addr[tidx / 8] &= ~(0x1 << (7 - tidx % 8)); ++ if (sid_func_wide >> (func_len - 1 - idx) & 0x1) ++ sid_value->s6_addr[tidx / 8] |= 0x1 << (7 - tidx % 8); ++ } + + return true; + } +@@ -1338,29 +1349,31 @@ static bool zebra_srv6_sid_decompose(struct in6_addr *sid_value, + (struct prefix *)&tmp_prefix)) { + format = b->sid_format; + +- if (!format) +- continue; +- +- offset = format->block_len + format->node_len; +- func_len = format->function_len; ++ if (format) { ++ offset = format->block_len; ++ func_len = format->function_len; ++ } else { ++ offset = b->prefix.prefixlen; ++ func_len = SRV6_SID_FORMAT_USID_F3216_FUNCTION_LEN; ++ } + + for (uint8_t idx = 0; idx < func_len; idx++) { + uint8_t tidx = offset + idx; + *sid_func |= (sid_value->s6_addr[tidx / 8] & + (0x1 << (7 - tidx % 8))) +- << ((func_len - 1 - idx) / 8); ++ << (((func_len - 1 - idx) / 8) * 8); + } + + /* + * If function comes from the Wide LIB range, we also + * need to get the Wide function. + */ +- if (*sid_func >= format->config.usid.wlib_start && ++ if (format && format->type == SRV6_SID_FORMAT_TYPE_USID && ++ *sid_func >= format->config.usid.wlib_start && + *sid_func <= format->config.usid.wlib_end) { + format = b->sid_format; + +- offset = format->block_len + format->node_len + +- format->function_len; ++ offset = format->block_len + format->function_len; + + for (uint8_t idx = 0; idx < 16; idx++) { + uint8_t tidx = offset + idx; +@@ -1413,6 +1426,7 @@ static bool alloc_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, + if (format->type == SRV6_SID_FORMAT_TYPE_USID) { + uint32_t elib_start = format->config.usid.elib_start; + uint32_t elib_end = format->config.usid.elib_end; ++ uint32_t wlib_start = format->config.usid.wlib_start; + uint32_t wlib_end = format->config.usid.wlib_end; + uint32_t ewlib_start = format->config.usid.ewlib_start; + uint32_t ewlib_end = wlib_end; +@@ -1450,10 +1464,9 @@ static bool alloc_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, + + /* Ensure that the requested SID function has not already been taken */ + for (ALL_LIST_ELEMENTS_RO(block->u.usid +- .wide_lib[sid_func] ++ .wide_lib[sid_func - wlib_start] + .func_allocated, +- node, +- sid_wide_func_ptr)) ++ node, sid_wide_func_ptr)) + if (*sid_wide_func_ptr == sid_wide_func) + break; + +@@ -1469,11 +1482,10 @@ static bool alloc_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, + */ + sid_wide_func_ptr = zebra_srv6_sid_func_alloc( + sid_wide_func); +- listnode_add(block->u.usid.wide_lib[sid_func] ++ listnode_add(block->u.usid.wide_lib[sid_func - wlib_start] + .func_allocated, + sid_wide_func_ptr); +- block->u.usid.wide_lib[sid_func] +- .num_func_allocated++; ++ block->u.usid.wide_lib[sid_func - wlib_start].num_func_allocated++; + } else { + zlog_warn("%s: function %u is outside ELIB [%u/%u] and EWLIB alloc ranges [%u/%u]", + __func__, sid_func, elib_start, +@@ -1819,6 +1831,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + srv6_sid_ctx2str(buf, sizeof(buf), ctx), sid_value); + return -1; + } ++ (*sid)->wide_func = sid_func_wide; + (*sid)->ctx = zctx; + zctx->sid = *sid; + listnode_add(srv6->sids, zctx); +@@ -1889,7 +1902,7 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + } + + /* Compose the SID as the locator followed by the SID function */ +- zebra_srv6_sid_compose(&sid_value, locator, sid_func); ++ zebra_srv6_sid_compose(&sid_value, locator, sid_func, 0, is_localonly); + } + + /* Allocate a zebra SID context to store SID context information */ +@@ -2065,6 +2078,7 @@ static bool release_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, + if (format->type == SRV6_SID_FORMAT_TYPE_USID) { + uint32_t elib_start = format->config.usid.elib_start; + uint32_t elib_end = format->config.usid.elib_end; ++ uint32_t wlib_start = format->config.usid.wlib_start; + uint32_t ewlib_start = format->config.usid.ewlib_start; + uint32_t ewlib_end = format->config.usid.wlib_end; + uint32_t *sid_wide_func_ptr = NULL; +@@ -2097,7 +2111,7 @@ static bool release_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, + + /* Lookup SID function in the functions allocated list of EWLIB range */ + for (ALL_LIST_ELEMENTS_RO(block->u.usid +- .wide_lib[sid_func] ++ .wide_lib[sid_func - wlib_start] + .func_allocated, + node, sid_wide_func_ptr)) + if (*sid_wide_func_ptr == sid_wide_func) +@@ -2111,7 +2125,7 @@ static bool release_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, + } + + /* Release the SID function from the EWLIB range */ +- listnode_delete(block->u.usid.wide_lib[sid_func] ++ listnode_delete(block->u.usid.wide_lib[sid_func - wlib_start] + .func_allocated, + sid_wide_func_ptr); + zebra_srv6_sid_func_free(sid_wide_func_ptr); + +From 3e8d401ed92903903b516ae3e9a854e7c0218902 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 09:30:34 +0000 +Subject: [PATCH 14/25] zebra: Extend get/release SID APIs to support multiple + locators + +Currently, the get SID and release SID APIs can allocate a SID from a +single locator. + +This commit extends the APIs to support multiple locators + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 132 ++++++++++++++++++++++----------------------- + 1 file changed, 63 insertions(+), 69 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 8a595ed4fdff..a741cbae137e 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -19,6 +19,7 @@ + #include "zebra/zebra_errors.h" + #include "zebra/ge_netlink.h" + #include "zebra/interface.h" ++#include "typesafe.h" + + #include + #include +@@ -248,10 +249,6 @@ void zebra_srv6_sid_entry_del_by_locator_all_sids(struct srv6_locator *locator) + void zebra_srv6_locator_format_set(struct srv6_locator *locator, + struct srv6_sid_format *format) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +- struct listnode *node, *nnode; +- struct zebra_srv6_sid_ctx *ctx; +- + if (!locator) + return; + +@@ -267,16 +264,7 @@ void zebra_srv6_locator_format_set(struct srv6_locator *locator, + /* Notify zclients that the locator is no longer valid */ + zebra_notify_srv6_locator_delete(locator); + +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) { +- if (!ctx->sid || ctx->sid->locator != locator) +- continue; +- +- if (ctx->sid) +- zebra_srv6_sid_free(ctx->sid); +- +- listnode_delete(srv6->sids, ctx); +- zebra_srv6_sid_ctx_free(ctx); +- } ++ zebra_srv6_sid_entry_del_by_locator_all_sids(locator); + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: Locator %s format has changed, send SRV6_LOCATOR_DEL notification to zclients", +@@ -312,8 +300,7 @@ void zebra_srv6_sid_format_changed_cb(struct srv6_sid_format *format) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct srv6_locator *locator; +- struct listnode *node, *nnode; +- struct zebra_srv6_sid_ctx *ctx; ++ struct listnode *node; + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: SID format %s has changed. Notifying zclients.", +@@ -329,16 +316,7 @@ void zebra_srv6_sid_format_changed_cb(struct srv6_sid_format *format) + /* Notify zclients that the locator is no longer valid */ + zebra_notify_srv6_locator_delete(locator); + +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) { +- if (!ctx->sid || ctx->sid->locator != locator) +- continue; +- +- if (ctx->sid) +- zebra_srv6_sid_free(ctx->sid); +- +- listnode_delete(srv6->sids, ctx); +- zebra_srv6_sid_ctx_free(ctx); +- } ++ zebra_srv6_sid_entry_del_by_locator_all_sids(locator); + + /* Notify zclients about the updated locator */ + zebra_notify_srv6_locator_add(locator); +@@ -1770,12 +1748,12 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + * If the context is already associated with a SID that has the same SID value, then + * return the existing SID + */ +- if (sid_same(&zctx->sid->value, sid_value)) { ++ if (zctx->sid->func == sid_func && zctx->sid->wide_func == sid_func_wide) { + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: returning existing SRv6 SID %pI6 ctx %s", __func__, +- &zctx->sid->value, +- srv6_sid_ctx2str(buf, sizeof(buf), ctx)); ++ sid_value, srv6_sid_ctx2str(buf, sizeof(buf), ctx)); + *sid = zctx->sid; ++ zebra_srv6_sid_entry_add(*sid, locator->name, sid_value, is_localonly); + return 0; + } + +@@ -1793,9 +1771,9 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + */ + if (zctx->sid) { + if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: ctx %s already associated with SID %pI6, releasing existing SID", ++ zlog_debug("%s: ctx %s already associated with SID %u, releasing SID", + __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), +- &zctx->sid->value); ++ zctx->sid->func); + + release_srv6_sid_func(zctx); + +@@ -1837,10 +1815,11 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + listnode_add(srv6->sids, zctx); + } + ++ zebra_srv6_sid_entry_add(*sid, locator->name, sid_value, is_localonly); ++ + if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: allocated explicit SRv6 SID %pI6 for context %s", +- __func__, &(*sid)->value, +- srv6_sid_ctx2str(buf, sizeof(buf), ctx)); ++ zlog_debug("%s: allocated explicit SRv6 SID function %u for context %s", __func__, ++ (*sid)->func, srv6_sid_ctx2str(buf, sizeof(buf), ctx)); + + return 1; + } +@@ -1881,7 +1860,17 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + * SID instead of allocating a new one. + */ + zctx = zebra_srv6_sid_ctx_lookup(ctx); +- if (zctx && strncmp(zctx->sid->locator->name, locator->name, SRV6_LOCNAME_SIZE)) { ++ if (zctx) { ++ if (((format && format->type == SRV6_SID_FORMAT_TYPE_USID) || ++ (!format && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID))) && ++ ctx->behavior == ZEBRA_SEG6_LOCAL_ACTION_END) { ++ sid_value = locator->prefix.prefix; ++ } else { ++ zebra_srv6_sid_compose(&sid_value, locator, zctx->sid->func, ++ zctx->sid->wide_func, is_localonly); ++ } ++ zebra_srv6_sid_entry_add(zctx->sid, locator->name, &sid_value, is_localonly); ++ + *sid = zctx->sid; + return 0; + } +@@ -1922,10 +1911,11 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + zctx->sid = *sid; + listnode_add(srv6->sids, zctx); + ++ zebra_srv6_sid_entry_add(*sid, locator->name, &sid_value, is_localonly); ++ + if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: allocated new dynamic SRv6 SID %pI6 for context %s", +- __func__, &(*sid)->value, +- srv6_sid_ctx2str(buf, sizeof(buf), ctx)); ++ zlog_debug("%s: allocated new dynamic SRv6 SID %u for context %s", __func__, ++ (*sid)->func, srv6_sid_ctx2str(buf, sizeof(buf), ctx)); + + return 1; + } +@@ -2434,49 +2424,50 @@ int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + char buf[256]; ++ struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_client *zclient; + + if (!zctx || !zctx->sid) + return -1; + + if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: releasing SRv6 SID %pI6 associated with ctx %s (proto=%u, instance=%u)", +- __func__, &zctx->sid->value, +- srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), +- client->proto, client->instance); +- +- if (zctx->sid->locator != locator) { +- zlog_err("SRv6 SID %pI6 ctx %s is not allocated from the provided locator %s", +- &zctx->sid->value, srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), ++ zlog_debug("%s: releasing SRv6 SID func %u associated with ctx %s (proto=%u, instance=%u)", ++ __func__, zctx->sid->func, ++ srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), client->proto, ++ client->instance); ++ ++ entry = zebra_srv6_sid_entry_lookup(zctx->sid, locator->name, is_localonly); ++ if (!entry) { ++ zlog_err("SRv6 SID func %u ctx %s is not allocated from the provided locator %s", ++ zctx->sid->func, srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), + locator->name); + return -1; + } + +- /* Ensures the SID is in use by the client */ +- if (!listnode_lookup(zctx->sid->client_list, client)) { +- flog_err(EC_ZEBRA_SM_DAEMON_MISMATCH, "%s: Daemon mismatch!!", +- __func__); ++ zclient = zebra_srv6_sid_client_lookup(zctx->sid, entry, client); ++ if (!zclient) { ++ flog_err(EC_ZEBRA_SM_DAEMON_MISMATCH, "%s: Daemon mismatch!!", __func__); + return -1; + } + + /* Remove the client from the list of clients using the SID */ +- listnode_delete(zctx->sid->client_list, client); ++ zebra_srv6_sid_client_del(zctx->sid, entry, zclient); + + if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: released SRv6 SID %pI6 associated with ctx %s (proto=%u, instance=%u)", +- __func__, &zctx->sid->value, +- srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), +- client->proto, client->instance); ++ zlog_debug("%s: released SRv6 SID %u associated with ctx %s (proto=%u, instance=%u)", ++ __func__, zctx->sid->func, ++ srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx), client->proto, ++ client->instance); + + /* + * If the SID is not used by any other client, then deallocate it + * and remove it from the SRv6 database. + */ +- if (listcount(zctx->sid->client_list) == 0) { ++ if (zebra_srv6_sid_entry_list_count(&zctx->sid->entries) == 0) { + if (IS_ZEBRA_DEBUG_SRV6) +- zlog_debug("%s: SRv6 SID %pI6 associated with ctx %s is no longer in use, removing it from SRv6 database", +- __func__, &zctx->sid->value, +- srv6_sid_ctx2str(buf, sizeof(buf), +- &zctx->ctx)); ++ zlog_debug("%s: SRv6 SID %u associated with ctx %s is no longer in use, removing it from SRv6 database", ++ __func__, zctx->sid->func, ++ srv6_sid_ctx2str(buf, sizeof(buf), &zctx->ctx)); + + release_srv6_sid_func(zctx); + +@@ -2545,12 +2536,22 @@ static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, struct zse + struct listnode *node; + struct zserv *c; + char buf[256]; ++ struct srv6_locator *locator = NULL; + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: getting SRv6 SID for ctx %s, sid_value=%pI6, locator_name=%s", + __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), + sid_value ? sid_value : &in6addr_any, locator_name); + ++ if (locator_name && locator_name[0] != '\0') { ++ locator = zebra_srv6_locator_lookup(locator_name); ++ if (!locator) { ++ zlog_err("%s: invalid SM request arguments: SRv6 locator '%s' does not exist", ++ __func__, locator_name); ++ return -1; ++ } ++ } ++ + ret = get_srv6_sid(sid, ctx, sid_value, locator_name, is_localonly); + if (ret < 0) { + zlog_warn("%s: not got SRv6 SID for ctx %s, sid_value=%pI6, locator_name=%s", +@@ -2612,7 +2613,6 @@ int release_daemon_srv6_sids(struct zserv *client) + struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *ctx; + int count = 0; +- int ret; + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: releasing SRv6 SIDs for client proto %s, instance %d, session %u", +@@ -2620,14 +2620,8 @@ int release_daemon_srv6_sids(struct zserv *client) + client->instance, client->session_id); + + /* Iterate over the SIDs and release SIDs used by the client daemon */ +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) { +- if (!listnode_lookup(ctx->sid->client_list, client)) +- continue; +- +- ret = release_srv6_sid(client, ctx, ctx->sid->locator, false); +- if (ret == 0) +- count++; +- } ++ for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) ++ zebra_srv6_sid_client_del_all(ctx->sid, client); + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: released %d SRv6 SIDs", __func__, count); + +From 70c8db344b7992f3349d5c07e57d23acc867082c Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sun, 18 May 2025 20:13:29 +0000 +Subject: [PATCH 15/25] zebra: Extend vty to show SIDs from multiple locators + +Extend show SRv6 SIDs CLI to display SIDs allocated from all the +different locators. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6_vty.c | 278 ++++++++++++++++++++++++----------------- + 1 file changed, 161 insertions(+), 117 deletions(-) + +diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c +index c457f91fada2..207ceb90c99d 100644 +--- a/zebra/zebra_srv6_vty.c ++++ b/zebra/zebra_srv6_vty.c +@@ -342,64 +342,71 @@ static const char *show_srv6_sid_seg6_context(char *str, size_t size, const stru + + static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid) + { +- struct listnode *node; + struct zserv *client; + char clients[256]; + char ctx[256] = {}; + char behavior[256] = {}; + char alloc_mode_str[10] = {}; + char locator_name[SRV6_LOCNAME_SIZE]; ++ struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_client *sclient; + int ret; + +- /* Zclients */ +- if (listcount(sid->client_list)) { +- bool first = true; +- int i = 0; +- for (ALL_LIST_ELEMENTS_RO(sid->client_list, node, client)) { +- if (first) { +- ret = snprintf(clients + i, sizeof(clients) - i, "%s(%d)", +- zebra_route_string(client->proto), client->instance); +- first = false; +- } else { +- ret = snprintf(clients + i, sizeof(clients) - i, ", %s(%d)", +- zebra_route_string(client->proto), client->instance); +- } ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) { ++ /* Zclients */ ++ if (zebra_srv6_sid_client_list_count(&entry->clients_list)) { ++ bool first = true; ++ int i = 0; ++ frr_each_safe (zebra_srv6_sid_client_list, &entry->clients_list, sclient) { ++ client = sclient->client; ++ if (first) { ++ ret = snprintf(clients + i, sizeof(clients) - i, "%s(%d)", ++ zebra_route_string(client->proto), ++ client->instance); ++ first = false; ++ } else { ++ ret = snprintf(clients + i, sizeof(clients) - i, ", %s(%d)", ++ zebra_route_string(client->proto), ++ client->instance); ++ } + +- if (ret > 0) +- i += ret; ++ if (ret > 0) ++ i += ret; ++ } + } +- } + +- /* Behavior */ +- if (sid->locator) { +- if ((sid->locator->sid_format && +- sid->locator->sid_format->type == SRV6_SID_FORMAT_TYPE_USID) || +- (!sid->locator->sid_format && +- CHECK_FLAG(sid->locator->flags, SRV6_LOCATOR_USID))) { +- snprintf(behavior, sizeof(behavior), "%s", +- show_srv6_sid_seg6_action(sid->ctx->ctx.behavior)); +- } else { +- snprintf(behavior, sizeof(behavior), "%s", +- seg6local_action2str(sid->ctx->ctx.behavior)); ++ /* Behavior */ ++ if (entry->locator) { ++ if ((entry->locator->sid_format && ++ entry->locator->sid_format->type == SRV6_SID_FORMAT_TYPE_USID) || ++ (!entry->locator->sid_format && ++ CHECK_FLAG(entry->locator->flags, SRV6_LOCATOR_USID))) { ++ snprintf(behavior, sizeof(behavior), "%s", ++ show_srv6_sid_seg6_action(sid->ctx->ctx.behavior)); ++ } else { ++ snprintf(behavior, sizeof(behavior), "%s", ++ seg6local_action2str(sid->ctx->ctx.behavior)); ++ } + } +- } + +- /* SID context */ +- show_srv6_sid_seg6_context(ctx, sizeof(ctx), &sid->ctx->ctx, sid->ctx->ctx.behavior); ++ /* SID context */ ++ show_srv6_sid_seg6_context(ctx, sizeof(ctx), &sid->ctx->ctx, ++ sid->ctx->ctx.behavior); + +- if (strlen(ctx) == 0) +- snprintf(ctx, sizeof(ctx), "-"); ++ if (strlen(ctx) == 0) ++ snprintf(ctx, sizeof(ctx), "-"); + +- if (sid->locator) +- snprintf(locator_name, sizeof(locator_name), "%s", sid->locator->name); +- else +- snprintf(locator_name, sizeof(locator_name), "-"); ++ if (entry->locator) ++ snprintf(locator_name, sizeof(locator_name), "%s", entry->locator->name); ++ else ++ snprintf(locator_name, sizeof(locator_name), "-"); + +- snprintf(alloc_mode_str, sizeof(alloc_mode_str), "%s", +- srv6_sid_alloc_mode2str(sid->alloc_mode)); ++ snprintf(alloc_mode_str, sizeof(alloc_mode_str), "%s", ++ srv6_sid_alloc_mode2str(sid->alloc_mode)); + +- ttable_add_row(tt, "%pI6|%s|%s|%s|%s|%s", &sid->value, behavior, ctx, clients, locator_name, +- alloc_mode_str); ++ ttable_add_row(tt, "%pI6|%s|%s|%s|%s|%s", &entry->sid_value, behavior, ctx, ++ clients, locator_name, alloc_mode_str); ++ } + } + + static void do_show_srv6_sid_json(struct vty *vty, json_object **json, struct srv6_locator *locator, +@@ -412,75 +419,81 @@ static void do_show_srv6_sid_json(struct vty *vty, json_object **json, struct sr + struct vrf *vrf; + struct zebra_vrf *zvrf; + struct interface *ifp; +- struct listnode *node; + struct zserv *client; ++ struct zebra_srv6_sid_client *sclient; ++ struct zebra_srv6_sid_entry *entry; + char buf[256]; + + if (!sid_ctx || !sid_ctx->sid) + return; + +- if (locator && sid_ctx->sid->locator != locator) +- return; ++ frr_each (zebra_srv6_sid_entry_list, &sid_ctx->sid->entries, entry) { ++ if (locator && entry->locator != locator) ++ return; + +- json_sid = json_object_new_object(); +- json_sid_ctx = json_object_new_object(); ++ json_sid = json_object_new_object(); ++ json_sid_ctx = json_object_new_object(); + +- json_object_string_addf(json_sid, "sid", "%pI6", &sid_ctx->sid->value); +- if ((sid_ctx->sid->locator->sid_format && +- sid_ctx->sid->locator->sid_format->type == SRV6_SID_FORMAT_TYPE_USID) || +- (!sid_ctx->sid->locator->sid_format && +- CHECK_FLAG(sid_ctx->sid->locator->flags, SRV6_LOCATOR_USID))) { +- json_object_string_add(json_sid, "behavior", +- show_srv6_sid_seg6_action(sid_ctx->ctx.behavior)); +- } else { +- json_object_string_add(json_sid, "behavior", +- seg6local_action2str(sid_ctx->ctx.behavior)); +- } ++ json_object_string_addf(json_sid, "sid", "%pI6", &entry->sid_value); ++ if ((entry->locator->sid_format && ++ entry->locator->sid_format->type == SRV6_SID_FORMAT_TYPE_USID) || ++ (!entry->locator->sid_format && ++ CHECK_FLAG(entry->locator->flags, SRV6_LOCATOR_USID))) { ++ json_object_string_add(json_sid, "behavior", ++ show_srv6_sid_seg6_action(sid_ctx->ctx.behavior)); ++ } else { ++ json_object_string_add(json_sid, "behavior", ++ seg6local_action2str(sid_ctx->ctx.behavior)); ++ } + +- if (sid_ctx->ctx.vrf_id) { +- json_object_int_add(json_sid_ctx, "vrfId", sid_ctx->ctx.vrf_id); ++ if (sid_ctx->ctx.vrf_id) { ++ json_object_int_add(json_sid_ctx, "vrfId", sid_ctx->ctx.vrf_id); + +- vrf = vrf_lookup_by_id(sid_ctx->ctx.vrf_id); +- if (vrf) +- json_object_string_add(json_sid_ctx, "vrfName", vrf->name); ++ vrf = vrf_lookup_by_id(sid_ctx->ctx.vrf_id); ++ if (vrf) ++ json_object_string_add(json_sid_ctx, "vrfName", vrf->name); + +- zvrf = vrf_info_lookup(sid_ctx->ctx.vrf_id); +- if (vrf) +- json_object_int_add(json_sid_ctx, "table", zvrf->table_id); +- } +- if (sid_ctx->ctx.ifindex) { +- json_object_int_add(json_sid_ctx, "interfaceIndex", sid_ctx->ctx.ifindex); +- RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) { +- ifp = if_lookup_by_index(sid_ctx->ctx.ifindex, vrf->vrf_id); +- if (ifp) +- json_object_string_add(json_sid_ctx, "interfaceName", ifp->name); ++ zvrf = vrf_info_lookup(sid_ctx->ctx.vrf_id); ++ if (vrf) ++ json_object_int_add(json_sid_ctx, "table", zvrf->table_id); + } +- } +- if (memcmp(&sid_ctx->ctx.nh6, &in6addr_any, sizeof(struct in6_addr)) != 0) { +- json_object_string_addf(json_sid_ctx, "nexthopIpv6Address", "%pI6", +- &sid_ctx->ctx.nh6); +- } +- json_object_object_add(json_sid, "context", json_sid_ctx); +- +- json_object_string_add(json_sid, "locator", sid_ctx->sid->locator->name); +- json_object_string_add(json_sid, "allocationMode", +- srv6_sid_alloc_mode2str(sid_ctx->sid->alloc_mode)); +- +- /* Zclients */ +- json_sid_clients = json_object_new_array(); +- if (listcount(sid_ctx->sid->client_list)) { +- for (ALL_LIST_ELEMENTS_RO(sid_ctx->sid->client_list, node, client)) { +- json_sid_client = json_object_new_object(); +- json_object_string_add(json_sid_client, "protocol", +- zebra_route_string(client->proto)); +- json_object_int_add(json_sid_client, "instance", client->instance); +- json_object_array_add(json_sid_clients, json_sid_client); ++ if (sid_ctx->ctx.ifindex) { ++ json_object_int_add(json_sid_ctx, "interfaceIndex", sid_ctx->ctx.ifindex); ++ RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) { ++ ifp = if_lookup_by_index(sid_ctx->ctx.ifindex, vrf->vrf_id); ++ if (ifp) ++ json_object_string_add(json_sid_ctx, "interfaceName", ++ ifp->name); ++ } + } +- } +- json_object_object_add(json_sid, "clients", json_sid_clients); ++ if (memcmp(&sid_ctx->ctx.nh6, &in6addr_any, sizeof(struct in6_addr)) != 0) { ++ json_object_string_addf(json_sid_ctx, "nexthopIpv6Address", "%pI6", ++ &sid_ctx->ctx.nh6); ++ } ++ json_object_object_add(json_sid, "context", json_sid_ctx); ++ ++ json_object_string_add(json_sid, "locator", entry->locator->name); ++ json_object_string_add(json_sid, "allocationMode", ++ srv6_sid_alloc_mode2str(sid_ctx->sid->alloc_mode)); ++ ++ /* Zclients */ ++ json_sid_clients = json_object_new_array(); ++ if (zebra_srv6_sid_client_list_count(&entry->clients_list)) { ++ frr_each_safe (zebra_srv6_sid_client_list, &entry->clients_list, sclient) { ++ client = sclient->client; ++ json_sid_client = json_object_new_object(); ++ json_object_string_add(json_sid_client, "protocol", ++ zebra_route_string(client->proto)); ++ json_object_int_add(json_sid_client, "instance", client->instance); ++ json_object_array_add(json_sid_clients, json_sid_client); ++ } ++ } ++ json_object_object_add(json_sid, "clients", json_sid_clients); + +- json_object_object_add(*json, inet_ntop(AF_INET6, &sid_ctx->sid->value, buf, sizeof(buf)), +- json_sid); ++ json_object_object_add(*json, ++ inet_ntop(AF_INET6, &entry->sid_value, buf, sizeof(buf)), ++ json_sid); ++ } + } + + static void do_show_srv6_sid_specific(struct vty *vty, json_object **json, +@@ -488,6 +501,8 @@ static void do_show_srv6_sid_specific(struct vty *vty, json_object **json, + struct zebra_srv6_sid_ctx *sid_ctx) + { + struct ttable *tt; ++ struct zebra_srv6_sid_entry *entry; ++ bool found = false; + + if (json) { + do_show_srv6_sid_json(vty, json, locator, sid_ctx); +@@ -506,9 +521,15 @@ static void do_show_srv6_sid_specific(struct vty *vty, json_object **json, + return; + } + +- if (locator && sid_ctx->sid->locator != locator) { +- ttable_del(tt); +- return; ++ if (locator) { ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid_ctx->sid->entries, entry) { ++ if (entry->locator == locator) { ++ found = true; ++ break; ++ } ++ } ++ if (!found) ++ return; + } + + do_show_srv6_sid_line(tt, sid_ctx->sid); +@@ -540,6 +561,7 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + struct zebra_srv6_sid_ctx *ctx; + struct listnode *node; + struct ttable *tt; ++ char *table; + + if (json) { + for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, ctx)) { +@@ -548,7 +570,9 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + continue; + + /* Skip SIDs from locators we are not interested in */ +- if (locator && ctx->sid->locator != locator) ++ if (locator && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) + continue; + + do_show_srv6_sid_json(vty, json, locator, ctx); +@@ -568,7 +592,9 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + continue; + + /* Skip SIDs from locators we are not interested in */ +- if (locator && ctx->sid->locator != locator) ++ if (locator && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) + continue; + + do_show_srv6_sid_line(tt, ctx->sid); +@@ -584,13 +610,9 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + ttable_colseps(tt, 5, LEFT, true, ' '); + + /* Dump the generated table. */ +- if (tt->nrows > 1) { +- char *table; +- +- table = ttable_dump(tt, "\n"); +- vty_out(vty, "%s\n", table); +- XFREE(MTYPE_TMP_TTABLE, table); +- } ++ table = ttable_dump(tt, "\n"); ++ vty_out(vty, "%s\n", table); ++ XFREE(MTYPE_TMP_TTABLE, table); + ttable_del(tt); + } + } +@@ -613,6 +635,8 @@ DEFPY (show_srv6_sid, + struct zebra_srv6_sid_ctx *sid_ctx = NULL, *c; + struct listnode *node; + json_object *json = NULL; ++ bool found = false; ++ struct zebra_srv6_sid_entry *entry; + + if (uj) + json = json_object_new_object(); +@@ -630,9 +654,14 @@ DEFPY (show_srv6_sid, + + if (!IPV6_ADDR_SAME(&sid_value, &in6addr_any)) { + for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, c)) { +- if (c->sid && IPV6_ADDR_SAME(&c->sid->value, &sid_value)) { +- sid_ctx = c; +- break; ++ if (!c->sid) ++ continue; ++ ++ frr_each_safe (zebra_srv6_sid_entry_list, &c->sid->entries, entry) { ++ if (IPV6_ADDR_SAME(&entry->sid_value, &sid_value)) { ++ sid_ctx = c; ++ break; ++ } + } + } + +@@ -645,14 +674,21 @@ DEFPY (show_srv6_sid, + } + } + +- if (locator && sid_ctx) +- if (!sid_ctx->sid || sid_ctx->sid->locator != locator) { ++ if (locator && sid_ctx) { ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid_ctx->sid->entries, entry) { ++ if (entry->locator == locator) { ++ found = true; ++ break; ++ } ++ } ++ if (!sid_ctx->sid || !found) { + if (uj) + vty_json(vty, json); /* Return empty json */ + else + vty_out(vty, "%% Can't find the SRv6 SID in the provided locator\n"); + return CMD_WARNING; + } ++ } + + if (sid_ctx) + do_show_srv6_sid_specific(vty, uj ? &json : NULL, locator, sid_ctx); +@@ -763,6 +799,7 @@ DEFUN (no_srv6_locator, + struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *ctx; + struct srv6_locator *locator = zebra_srv6_locator_lookup(argv[2]->arg); ++ struct zebra_srv6_sid_entry *entry; + + if (!locator) { + vty_out(vty, "%% Can't find SRv6 locator\n"); +@@ -770,14 +807,21 @@ DEFUN (no_srv6_locator, + } + + for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) { +- if (!ctx->sid || ctx->sid->locator != locator) ++ if (!ctx->sid) + continue; + +- if (ctx->sid) ++ frr_each_safe (zebra_srv6_sid_entry_list, &ctx->sid->entries, entry) ++ if (entry->locator == locator) { ++ zebra_srv6_sid_entry_list_del(&ctx->sid->entries, entry); ++ zebra_srv6_sid_entry_free(entry); ++ } ++ ++ if (zebra_srv6_sid_entry_list_count(&ctx->sid->entries) == 0) { + zebra_srv6_sid_free(ctx->sid); + +- listnode_delete(srv6->sids, ctx); +- zebra_srv6_sid_ctx_free(ctx); ++ listnode_delete(srv6->sids, ctx); ++ zebra_srv6_sid_ctx_free(ctx); ++ } + } + + block = locator->sid_block; + +From fe0410b829e48363fe2e36470d5d2ebeabb157c2 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 16 May 2025 11:58:15 +0000 +Subject: [PATCH 16/25] zebra: Notify daemons when SIDs are allocated + +Extend SID Manager to notify daemons when a SID they are interested in +is allocated/released. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 106 ++++++++++++++++++++++++++++++++------------- + 1 file changed, 76 insertions(+), 30 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index a741cbae137e..a4beca158292 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -43,6 +43,9 @@ static struct zebra_srv6 g_srv6; + /* Prototypes */ + static void release_srv6_sid_func(const struct zebra_srv6_sid_ctx *zctx); + ++static bool zebra_srv6_sid_compose(struct in6_addr *sid_value, struct srv6_locator *locator, ++ uint32_t sid_func, uint32_t sid_func_wide, bool is_localonly); ++ + /* define hooks for the basic API, so that it can be specialized or served + * externally + */ +@@ -685,6 +688,54 @@ void delete_zebra_srv6_sid(void *val) + zebra_srv6_sid_free((struct zebra_srv6_sid *)val); + } + ++static void zebra_srv6_sid_clients_notify_single(struct zebra_srv6_sid *sid, ++ struct srv6_locator *locator, ++ struct zserv *client, bool is_localonly, ++ enum zapi_srv6_sid_notify notify) ++{ ++ struct zebra_srv6_sid_entry *entry; ++ struct in6_addr sid_value = {}; ++ ++ entry = zebra_srv6_sid_entry_lookup(sid, locator->name, is_localonly); ++ if (!entry) ++ return; ++ ++ zebra_srv6_sid_compose(&sid_value, locator, sid->func, sid->wide_func, is_localonly); ++ zsend_srv6_sid_notify(client, &sid->ctx->ctx, &sid_value, sid->func, sid->wide_func, ++ locator->name, notify); ++} ++ ++static void zebra_srv6_sid_clients_release_notify_all(struct zebra_srv6_sid *sid) ++{ ++ struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_client *zclient; ++ ++ frr_each (zebra_srv6_sid_entry_list, &sid->entries, entry) ++ frr_each (zebra_srv6_sid_client_list, &entry->clients_list, zclient) ++ zsend_srv6_sid_notify(zclient->client, &sid->ctx->ctx, &entry->sid_value, ++ sid->func, sid->wide_func, entry->locator->name, ++ ZAPI_SRV6_SID_RELEASED); ++} ++ ++static void zebra_srv6_sid_clients_notify_all(struct zebra_srv6_sid *sid, ++ struct srv6_locator *locator, bool is_localonly, ++ enum zapi_srv6_sid_notify notify) ++{ ++ struct in6_addr sid_value = {}; ++ struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_client *zclient; ++ ++ entry = zebra_srv6_sid_entry_lookup(sid, locator->name, is_localonly); ++ if (!entry) ++ return; ++ ++ zebra_srv6_sid_compose(&sid_value, locator, sid->func, sid->wide_func, is_localonly); ++ ++ frr_each (zebra_srv6_sid_client_list, &entry->clients_list, zclient) ++ zsend_srv6_sid_notify(zclient->client, &sid->ctx->ctx, &sid_value, sid->func, ++ sid->wide_func, locator->name, notify); ++} ++ + void zebra_srv6_sid_client_add(struct zebra_srv6_sid *sid, bool is_localonly, + struct srv6_locator *locator, struct zserv *client) + { +@@ -790,6 +841,14 @@ void zebra_srv6_sid_client_del_all(struct zebra_srv6_sid *sid, struct zserv *cli + } + } + ++static void zebra_srv6_sid_entry_delete_all(struct zebra_srv6_sid *sid) ++{ ++ struct zebra_srv6_sid_entry *entry; ++ ++ frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) ++ zebra_srv6_sid_entry_list_del(&sid->entries, entry); ++} ++ + struct zebra_srv6_sid_entry *zebra_srv6_sid_entry_add(struct zebra_srv6_sid *sid, + const char *locator_name, + struct in6_addr *sid_value, bool is_localonly) +@@ -1777,6 +1836,9 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + + release_srv6_sid_func(zctx); + ++ zebra_srv6_sid_clients_release_notify_all(zctx->sid); ++ zebra_srv6_sid_entry_delete_all(zctx->sid); ++ + zctx->sid->value = *sid_value; + zctx->sid->locator = locator; + zctx->sid->block = block; +@@ -2533,8 +2595,6 @@ static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, struct zse + const char *locator_name, bool is_localonly) + { + int ret = -1; +- struct listnode *node; +- struct zserv *c; + char buf[256]; + struct srv6_locator *locator = NULL; + +@@ -2559,41 +2619,27 @@ static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, struct zse + sid_value ? sid_value : &in6addr_any, locator_name); + + /* Notify client about SID alloc failure */ +- zsend_srv6_sid_notify(client, ctx, sid_value, 0, 0, NULL, +- ZAPI_SRV6_SID_FAIL_ALLOC); ++ zebra_srv6_sid_clients_notify_single(*sid, NULL, client, is_localonly, ++ ZAPI_SRV6_SID_FAIL_ALLOC); + } else if (ret == 0) { + assert(*sid); + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: got existing SRv6 SID for ctx %s: sid_value=%pI6 (func=%u) (proto=%u, instance=%u, sessionId=%u), notify client", +- __func__, +- srv6_sid_ctx2str(buf, sizeof(buf), ctx), +- &(*sid)->value, (*sid)->func, client->proto, +- client->instance, client->session_id); +- if (!listnode_lookup((*sid)->client_list, client)) +- listnode_add((*sid)->client_list, client); +- +- zsend_srv6_sid_notify(client, ctx, &(*sid)->value, (*sid)->func, +- (*sid)->wide_func, +- (*sid)->locator ? (*sid)->locator->name +- : NULL, +- ZAPI_SRV6_SID_ALLOCATED); ++ __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), sid_value, ++ (*sid)->func, client->proto, client->instance, ++ client->session_id); ++ zebra_srv6_sid_client_add(*sid, is_localonly, locator, client); ++ zebra_srv6_sid_clients_notify_single(*sid, locator, client, is_localonly, ++ ZAPI_SRV6_SID_ALLOCATED); + } else { + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: got new SRv6 SID for ctx %s: sid_value=%pI6 (func=%u) (proto=%u, instance=%u, sessionId=%u), notifying all clients", +- __func__, +- srv6_sid_ctx2str(buf, sizeof(buf), ctx), +- &(*sid)->value, (*sid)->func, client->proto, +- client->instance, client->session_id); +- if (!listnode_lookup((*sid)->client_list, client)) +- listnode_add((*sid)->client_list, client); +- +- for (ALL_LIST_ELEMENTS_RO((*sid)->client_list, node, c)) +- zsend_srv6_sid_notify(c, ctx, &(*sid)->value, +- (*sid)->func, (*sid)->wide_func, +- (*sid)->locator +- ? (*sid)->locator->name +- : NULL, +- ZAPI_SRV6_SID_ALLOCATED); ++ __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx), sid_value, ++ (*sid)->func, client->proto, client->instance, ++ client->session_id); ++ zebra_srv6_sid_client_add(*sid, is_localonly, locator, client); ++ zebra_srv6_sid_clients_notify_all(*sid, locator, is_localonly, ++ ZAPI_SRV6_SID_ALLOCATED); + } + + return ret; + +From f669f4e68bcf21867d92ca3f85790bb5b1e2990f Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 17 May 2025 06:32:38 +0000 +Subject: [PATCH 17/25] zebra: Remove unused code in SRv6 SID Manager + +This commit removes some code in SRv6 SID Manager that is no longer +used. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 23 +++++++---------------- + zebra/zebra_srv6.h | 19 +++++-------------- + 2 files changed, 12 insertions(+), 30 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index a4beca158292..073b96c29c47 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -634,32 +634,27 @@ void zebra_srv6_sid_locator_block_release(struct srv6_locator *locator) + * Alloc and fill an SRv6 SID. + * + * @param ctx Context associated with the SID to be created +- * @param sid_value IPv6 address associated with the SID to be created + * @param locator Parent locator of the SID to be created + * @param sid_block Block from which the SID value has been allocated + * @param sid_func Function part of the SID to be created + * @param alloc_mode Allocation mode of the Function (dynamic vs explicit) + * @return The requested SID + */ +-struct zebra_srv6_sid * +-zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, struct in6_addr *sid_value, +- struct srv6_locator *locator, +- struct zebra_srv6_sid_block *sid_block, uint32_t sid_func, +- enum srv6_sid_alloc_mode alloc_mode) ++struct zebra_srv6_sid *zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, ++ struct srv6_locator *locator, ++ struct zebra_srv6_sid_block *sid_block, ++ uint32_t sid_func, enum srv6_sid_alloc_mode alloc_mode) + { + struct zebra_srv6_sid *sid; + +- if (!ctx || !sid_value) ++ if (!ctx) + return NULL; + + sid = XCALLOC(MTYPE_ZEBRA_SRV6_SID, sizeof(struct zebra_srv6_sid)); + sid->ctx = ctx; +- sid->value = *sid_value; +- sid->locator = locator; + sid->block = sid_block; + sid->func = sid_func; + sid->alloc_mode = alloc_mode; +- sid->client_list = list_new(); + zebra_srv6_sid_entry_list_init(&sid->entries); + + return sid; +@@ -674,7 +669,6 @@ void zebra_srv6_sid_free(struct zebra_srv6_sid *sid) + zebra_srv6_sid_entry_free(entry); + } + zebra_srv6_sid_entry_list_fini(&sid->entries); +- list_delete(&sid->client_list); + XFREE(MTYPE_ZEBRA_SRV6_SID, sid); + } + +@@ -1839,8 +1833,6 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + zebra_srv6_sid_clients_release_notify_all(zctx->sid); + zebra_srv6_sid_entry_delete_all(zctx->sid); + +- zctx->sid->value = *sid_value; +- zctx->sid->locator = locator; + zctx->sid->block = block; + zctx->sid->func = sid_func; + zctx->sid->wide_func = sid_func_wide; +@@ -1863,7 +1855,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + zctx->ctx = *ctx; + + /* Allocate the SID to store SID information */ +- *sid = zebra_srv6_sid_alloc(zctx, sid_value, locator, block, sid_func, ++ *sid = zebra_srv6_sid_alloc(zctx, locator, block, sid_func, + SRV6_SID_ALLOC_MODE_EXPLICIT); + if (!(*sid)) { + flog_err(EC_ZEBRA_SM_CANNOT_ASSIGN_SID, +@@ -1961,8 +1953,7 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + zctx->ctx = *ctx; + + /* Allocate the SID to store SID information */ +- *sid = zebra_srv6_sid_alloc(zctx, &sid_value, locator, block, sid_func, +- SRV6_SID_ALLOC_MODE_DYNAMIC); ++ *sid = zebra_srv6_sid_alloc(zctx, locator, block, sid_func, SRV6_SID_ALLOC_MODE_DYNAMIC); + if (!(*sid)) { + flog_err(EC_ZEBRA_SM_CANNOT_ASSIGN_SID, + "%s: failed to create SRv6 SID ctx %s (%pI6)", __func__, +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index cb63c3738cc8..15819c471fd6 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -181,12 +181,6 @@ struct zebra_srv6_sid { + */ + struct zebra_srv6_sid_ctx *ctx; + +- /* SID value (e.g. fc00:0:1:e000::) */ +- struct in6_addr value; +- +- /* Pointer to the SRv6 locator from which the SID has been allocated */ +- struct srv6_locator *locator; +- + /* Pointer to the SRv6 block from which the SID has been allocated */ + struct zebra_srv6_sid_block *block; + +@@ -203,9 +197,6 @@ struct zebra_srv6_sid { + /* SID allocation mode: dynamic or explicit */ + enum srv6_sid_alloc_mode alloc_mode; + +- /* List of clients that are using the SID */ +- struct list *client_list; +- + /* List of SID entries allocated for this SID */ + struct zebra_srv6_sid_entry_list_head entries; + }; +@@ -331,11 +322,11 @@ zebra_srv6_sid_block_lookup(struct prefix_ipv6 *prefix); + void zebra_srv6_sid_locator_block_alloc(struct srv6_locator *locator); + void zebra_srv6_sid_locator_block_release(struct srv6_locator *locator); + +-extern struct zebra_srv6_sid * +-zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, struct in6_addr *sid_value, +- struct srv6_locator *locator, +- struct zebra_srv6_sid_block *sid_block, uint32_t sid_func, +- enum srv6_sid_alloc_mode alloc_mode); ++extern struct zebra_srv6_sid *zebra_srv6_sid_alloc(struct zebra_srv6_sid_ctx *ctx, ++ struct srv6_locator *locator, ++ struct zebra_srv6_sid_block *sid_block, ++ uint32_t sid_func, ++ enum srv6_sid_alloc_mode alloc_mode); + extern void zebra_srv6_sid_free(struct zebra_srv6_sid *sid); + extern void delete_zebra_srv6_sid(void *val); + + +From 81f1b5b723aa1c93e7b63ad456abb6eb8dfa4f5a Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Wed, 14 May 2025 20:19:13 +0000 +Subject: [PATCH 18/25] zebra: Move SRv6 SIDs data structure under the block + +Currently, SID Manager stores all SRv6 SIDs that have been allocated in +a single srv6_sids data structure. + +This approach exhibits scalability issues when we allocate many SIDs +from many different blocks, because all SIDs are stored in a single +list and the SID lookup requires scanning the entire list in the worst +case. + +In order to improve performance, it's better to move the srv6_sids list +under the block. So each block keeps only a subset of SIDs, i.e. SIDs +allocated under it. This means that we have smaller srv6_sids list, +which can improve performance. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 129 ++++++++++++++++++++++++++--------------- + zebra/zebra_srv6.h | 9 +-- + zebra/zebra_srv6_vty.c | 94 ++++++++++++++++++------------ + 3 files changed, 145 insertions(+), 87 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 073b96c29c47..6e3389c3ced5 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -165,13 +165,13 @@ void delete_zebra_srv6_sid_ctx(void *val) + zebra_srv6_sid_ctx_free((struct zebra_srv6_sid_ctx *)val); + } + +-struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx *ctx) ++struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx *ctx, ++ struct zebra_srv6_sid_block *block) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_ctx *zctx; + struct listnode *node; + +- for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, zctx)) ++ for (ALL_LIST_ELEMENTS_RO(block->sids, node, zctx)) + if (memcmp(&zctx->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) + return zctx; + +@@ -213,8 +213,13 @@ struct srv6_sid_format *srv6_sid_format_lookup(const char *name) + static void zebra_srv6_sid_entry_del_by_locator(struct zebra_srv6_sid *sid, + struct srv6_locator *locator) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_block *block; ++ ++ if (!locator->sid_block) ++ return; ++ ++ block = locator->sid_block; + + frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) + if (entry->locator == locator) { +@@ -223,7 +228,7 @@ static void zebra_srv6_sid_entry_del_by_locator(struct zebra_srv6_sid *sid, + } + + if (zebra_srv6_sid_entry_list_count(&sid->entries) == 0) { +- listnode_delete(srv6->sids, sid->ctx); ++ listnode_delete(block->sids, sid->ctx); + zebra_srv6_sid_ctx_free(sid->ctx); + + zebra_srv6_sid_free(sid); +@@ -232,11 +237,16 @@ static void zebra_srv6_sid_entry_del_by_locator(struct zebra_srv6_sid *sid, + + void zebra_srv6_sid_entry_del_by_locator_all_sids(struct srv6_locator *locator) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *ctx; ++ struct zebra_srv6_sid_block *block; ++ ++ if (!locator->sid_block) ++ return; ++ ++ block = locator->sid_block; + +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) + zebra_srv6_sid_entry_del_by_locator(ctx->sid, locator); + } + +@@ -456,6 +466,10 @@ zebra_srv6_sid_block_alloc(struct srv6_sid_format *format, + block->sid_format = format; + block->prefix = *prefix; + ++ /* Init list to store SRv6 SIDs */ ++ block->sids = list_new(); ++ block->sids->del = delete_zebra_srv6_sid_ctx; ++ + if (format) { + if (format->type == SRV6_SID_FORMAT_TYPE_USID) { + uint32_t wlib_start, wlib_end, func; +@@ -585,11 +599,21 @@ static void zebra_srv6_sid_block_refcnt_increment(struct zebra_srv6_sid_block *b + static void zebra_srv6_sid_block_refcnt_decrement(struct zebra_srv6_sid_block *block) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); ++ struct listnode *node, *nnode; ++ struct zebra_srv6_sid_ctx *zctx; + + assert(block->refcnt > 0); + + block->refcnt--; + if (block->refcnt == 0) { ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, zctx)) { ++ if (zctx->sid) ++ zebra_srv6_sid_free(zctx->sid); ++ ++ listnode_delete(block->sids, zctx); ++ zebra_srv6_sid_ctx_free(zctx); ++ } ++ list_delete(&block->sids); + listnode_delete(srv6->sid_blocks, block); + zebra_srv6_sid_block_free(block); + } +@@ -624,6 +648,9 @@ void zebra_srv6_sid_locator_block_alloc(struct srv6_locator *locator) + + void zebra_srv6_sid_locator_block_release(struct srv6_locator *locator) + { ++ if (!locator->sid_block) ++ return; ++ + zebra_srv6_sid_block_refcnt_decrement(locator->sid_block); + locator->sid_block = NULL; + } +@@ -801,9 +828,11 @@ void zebra_srv6_sid_client_del(struct zebra_srv6_sid *sid, struct zebra_srv6_sid + + void zebra_srv6_sid_client_del_all(struct zebra_srv6_sid *sid, struct zserv *client) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_entry *entry; + struct zebra_srv6_sid_client *zclient; ++ struct zebra_srv6_sid_block *block; ++ ++ block = sid->block; + + frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) { + zclient = zebra_srv6_sid_client_lookup(sid, entry, client); +@@ -827,7 +856,7 @@ void zebra_srv6_sid_client_del_all(struct zebra_srv6_sid *sid, struct zserv *cli + release_srv6_sid_func(sid->ctx); + + /* Remove the SID context from the list and free memory */ +- listnode_delete(srv6->sids, sid->ctx); ++ listnode_delete(block->sids, sid->ctx); + zebra_srv6_sid_ctx_free(sid->ctx); + + /* Free the SID */ +@@ -1001,10 +1030,6 @@ struct zebra_srv6 *zebra_srv6_get_default(void) + format_uncompressed = create_srv6_sid_format_uncompressed(); + srv6_sid_format_register(format_uncompressed); + +- /* Init list to store SRv6 SIDs */ +- g_srv6.sids = list_new(); +- g_srv6.sids->del = delete_zebra_srv6_sid_ctx; +- + /* Init list to store SRv6 SID blocks */ + g_srv6.sid_blocks = list_new(); + g_srv6.sid_blocks->del = delete_zebra_srv6_sid_block; +@@ -1776,7 +1801,6 @@ static bool alloc_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, + struct in6_addr *sid_value, bool is_localonly) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_ctx *zctx = NULL; + uint32_t sid_func = 0, sid_func_wide = 0; + struct srv6_locator *locator = NULL; +@@ -1794,7 +1818,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + } + + /* Check if we already have a SID associated with the provided context */ +- zctx = zebra_srv6_sid_ctx_lookup(ctx); ++ zctx = zebra_srv6_sid_ctx_lookup(ctx, block); + + if (zctx) { + /* +@@ -1866,7 +1890,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + (*sid)->wide_func = sid_func_wide; + (*sid)->ctx = zctx; + zctx->sid = *sid; +- listnode_add(srv6->sids, zctx); ++ listnode_add(block->sids, zctx); + } + + zebra_srv6_sid_entry_add(*sid, locator->name, sid_value, is_localonly); +@@ -1895,7 +1919,6 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, + struct srv6_locator *locator, bool is_localonly) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_block *block; + struct srv6_sid_format *format; + struct zebra_srv6_sid_ctx *zctx; +@@ -1913,7 +1936,7 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + * If we already have a SID for the provided context, we return the existing + * SID instead of allocating a new one. + */ +- zctx = zebra_srv6_sid_ctx_lookup(ctx); ++ zctx = zebra_srv6_sid_ctx_lookup(ctx, block); + if (zctx) { + if (((format && format->type == SRV6_SID_FORMAT_TYPE_USID) || + (!format && CHECK_FLAG(locator->flags, SRV6_LOCATOR_USID))) && +@@ -1962,7 +1985,7 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + } + (*sid)->ctx = zctx; + zctx->sid = *sid; +- listnode_add(srv6->sids, zctx); ++ listnode_add(block->sids, zctx); + + zebra_srv6_sid_entry_add(*sid, locator->name, &sid_value, is_localonly); + +@@ -2475,14 +2498,16 @@ struct zebra_srv6_sid_client *zebra_srv6_sid_client_lookup(struct zebra_srv6_sid + int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, + struct srv6_locator *locator, bool is_localonly) + { +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + char buf[256]; + struct zebra_srv6_sid_entry *entry; + struct zebra_srv6_sid_client *zclient; ++ struct zebra_srv6_sid_block *block; + + if (!zctx || !zctx->sid) + return -1; + ++ block = zctx->sid->block; ++ + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: releasing SRv6 SID func %u associated with ctx %s (proto=%u, instance=%u)", + __func__, zctx->sid->func, +@@ -2529,7 +2554,7 @@ int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, + zctx->sid = NULL; + + /* Remove the SID context from the list and free memory */ +- listnode_delete(srv6->sids, zctx); ++ listnode_delete(block->sids, zctx); + zebra_srv6_sid_ctx_free(zctx); + } + +@@ -2648,8 +2673,10 @@ int release_daemon_srv6_sids(struct zserv *client) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct listnode *node, *nnode; ++ struct listnode *node_block; + struct zebra_srv6_sid_ctx *ctx; + int count = 0; ++ struct zebra_srv6_sid_block *block; + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: releasing SRv6 SIDs for client proto %s, instance %d, session %u", +@@ -2657,8 +2684,9 @@ int release_daemon_srv6_sids(struct zserv *client) + client->instance, client->session_id); + + /* Iterate over the SIDs and release SIDs used by the client daemon */ +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) +- zebra_srv6_sid_client_del_all(ctx->sid, client); ++ for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) ++ zebra_srv6_sid_client_del_all(ctx->sid, client); + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: released %d SRv6 SIDs", __func__, count); +@@ -2679,31 +2707,40 @@ static int srv6_manager_release_sid_internal(struct zserv *client, struct srv6_s + const char *locator_name, bool is_localonly) + { + int ret = -1; +- struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_ctx *zctx; + struct listnode *node, *nnode; + char buf[256]; + struct srv6_locator *locator = NULL; + struct in6_addr sid_value = {}; ++ struct zebra_srv6_sid_block *block = NULL; ++ struct zebra_srv6_sid_entry *entry = NULL; + + if (IS_ZEBRA_DEBUG_SRV6) + zlog_debug("%s: releasing SRv6 SID associated with ctx %s", + __func__, srv6_sid_ctx2str(buf, sizeof(buf), ctx)); + +- if (locator_name && locator_name[0] != '\0') { +- locator = zebra_srv6_locator_lookup(locator_name); +- if (!locator) { +- zlog_err("%s: invalid SM request arguments: SRv6 locator '%s' does not exist", +- __func__, locator_name); +- return -1; +- } ++ if (!locator_name || locator_name[0] == '\0') { ++ zlog_err("%s: invalid SM request arguments: SRv6 locator not provided", __func__); ++ return -1; ++ } ++ ++ locator = zebra_srv6_locator_lookup(locator_name); ++ if (!locator) { ++ if (IS_ZEBRA_DEBUG_SRV6) ++ zlog_debug("%s: SRv6 locator '%s' does not exist", __func__, locator_name); ++ return 0; + } + ++ block = locator->sid_block; ++ + /* Lookup Zebra SID context and release it */ +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, zctx)) ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, zctx)) + if (memcmp(&zctx->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) { +- if (zctx->sid) +- sid_value = zctx->sid->value; ++ if (zctx->sid) { ++ entry = zebra_srv6_sid_entry_lookup(zctx->sid, locator->name, ++ is_localonly); ++ sid_value = entry->sid_value; ++ } + + ret = release_srv6_sid(client, zctx, locator, is_localonly); + break; +@@ -2741,23 +2778,23 @@ void zebra_srv6_terminate(void) + list_delete(&g_srv6.locators); + } + +- /* Free SRv6 SIDs */ +- if (g_srv6.sids) { +- while (listcount(g_srv6.sids)) { +- sid_ctx = listnode_head(g_srv6.sids); +- +- listnode_delete(g_srv6.sids, sid_ctx); +- zebra_srv6_sid_ctx_free(sid_ctx); +- } +- +- list_delete(&g_srv6.sids); +- } +- + /* Free SRv6 SID blocks */ + if (g_srv6.sid_blocks) { + while (listcount(g_srv6.sid_blocks)) { + block = listnode_head(g_srv6.sid_blocks); + ++ /* Free SRv6 SIDs */ ++ while (listcount(block->sids)) { ++ sid_ctx = listnode_head(block->sids); ++ ++ zebra_srv6_sid_free(sid_ctx->sid); ++ ++ listnode_delete(block->sids, sid_ctx); ++ zebra_srv6_sid_ctx_free(sid_ctx); ++ } ++ ++ list_delete(&block->sids); ++ + listnode_delete(g_srv6.sid_blocks, block); + zebra_srv6_sid_block_free(block); + } +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 15819c471fd6..374ff7e97637 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -113,6 +113,9 @@ struct zebra_srv6_sid_block { + struct list *func_released; + } uncompressed; + } u; ++ ++ /* SRv6 SIDs */ ++ struct list *sids; + }; + + /** +@@ -232,9 +235,6 @@ struct zebra_srv6 { + /* SRv6 SID formats */ + struct list *sid_formats; + +- /* SRv6 SIDs */ +- struct list *sids; +- + /* SRv6 SID blocks */ + struct list *sid_blocks; + }; +@@ -370,6 +370,7 @@ extern int srv6_manager_get_sid_response(struct zebra_srv6_sid *sid, + extern struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_alloc(void); + extern void zebra_srv6_sid_ctx_free(struct zebra_srv6_sid_ctx *ctx); + extern void delete_zebra_srv6_sid_ctx(void *val); +-extern struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx *ctx); ++extern struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx *ctx, ++ struct zebra_srv6_sid_block *block); + + #endif /* _ZEBRA_SRV6_H */ +diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c +index 207ceb90c99d..61d163b2a9fd 100644 +--- a/zebra/zebra_srv6_vty.c ++++ b/zebra/zebra_srv6_vty.c +@@ -561,21 +561,25 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + struct zebra_srv6_sid_ctx *ctx; + struct listnode *node; + struct ttable *tt; ++ struct zebra_srv6_sid_block *block; ++ struct listnode *node_block; + char *table; + + if (json) { +- for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, ctx)) { +- /* Skip contexts not associated with any SID */ +- if (!ctx->sid) +- continue; ++ for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) { ++ for (ALL_LIST_ELEMENTS_RO(block->sids, node, ctx)) { ++ /* Skip contexts not associated with any SID */ ++ if (!ctx->sid) ++ continue; + +- /* Skip SIDs from locators we are not interested in */ +- if (locator && +- !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && +- !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) +- continue; ++ /* Skip SIDs from locators we are not interested in */ ++ if (locator && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) ++ continue; + +- do_show_srv6_sid_json(vty, json, locator, ctx); ++ do_show_srv6_sid_json(vty, json, locator, ctx); ++ } + } + } else { + /* Prepare table. */ +@@ -586,18 +590,20 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + ttable_restyle(tt); + ttable_rowseps(tt, 0, BOTTOM, true, '-'); + +- for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, ctx)) { +- /* Skip contexts not associated with any SID */ +- if (!ctx->sid) +- continue; ++ for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) { ++ for (ALL_LIST_ELEMENTS_RO(block->sids, node, ctx)) { ++ /* Skip contexts not associated with any SID */ ++ if (!ctx->sid) ++ continue; + +- /* Skip SIDs from locators we are not interested in */ +- if (locator && +- !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && +- !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) +- continue; ++ /* Skip SIDs from locators we are not interested in */ ++ if (locator && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && ++ !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) ++ continue; + +- do_show_srv6_sid_line(tt, ctx->sid); ++ do_show_srv6_sid_line(tt, ctx->sid); ++ } + } + + ttable_colseps(tt, 1, RIGHT, true, ' '); +@@ -637,6 +643,8 @@ DEFPY (show_srv6_sid, + json_object *json = NULL; + bool found = false; + struct zebra_srv6_sid_entry *entry; ++ struct zebra_srv6_sid_block *block = NULL; ++ struct listnode *node_block; + + if (uj) + json = json_object_new_object(); +@@ -653,18 +661,21 @@ DEFPY (show_srv6_sid, + } + + if (!IPV6_ADDR_SAME(&sid_value, &in6addr_any)) { +- for (ALL_LIST_ELEMENTS_RO(srv6->sids, node, c)) { +- if (!c->sid) +- continue; ++ for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) { ++ for (ALL_LIST_ELEMENTS_RO(block->sids, node, c)) { ++ if (!c->sid) ++ continue; + +- frr_each_safe (zebra_srv6_sid_entry_list, &c->sid->entries, entry) { +- if (IPV6_ADDR_SAME(&entry->sid_value, &sid_value)) { +- sid_ctx = c; +- break; ++ frr_each_safe (zebra_srv6_sid_entry_list, &c->sid->entries, entry) { ++ if (IPV6_ADDR_SAME(&entry->sid_value, &sid_value)) { ++ sid_ctx = c; ++ break; ++ } + } + } + } + ++ + if (!sid_ctx) { + if (uj) + vty_json(vty, json); /* Return empty json */ +@@ -731,19 +742,19 @@ DEFUN (no_srv6, + struct zebra_srv6_sid_block *block; + struct zebra_srv6_sid_ctx *ctx; + +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) { +- if (ctx->sid) +- zebra_srv6_sid_free(ctx->sid); +- +- listnode_delete(srv6->sids, ctx); +- zebra_srv6_sid_ctx_free(ctx); +- } +- + for (ALL_LIST_ELEMENTS(srv6->locators, node, nnode, locator)) { + block = locator->sid_block; + if (block) { + block->refcnt--; + if (block->refcnt == 0) { ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) { ++ if (ctx->sid) ++ zebra_srv6_sid_free(ctx->sid); ++ ++ listnode_delete(block->sids, ctx); ++ zebra_srv6_sid_ctx_free(ctx); ++ } ++ list_delete(&block->sids); + listnode_delete(srv6->sid_blocks, block); + zebra_srv6_sid_block_free(block); + } +@@ -806,7 +817,8 @@ DEFUN (no_srv6_locator, + return CMD_WARNING_CONFIG_FAILED; + } + +- for (ALL_LIST_ELEMENTS(srv6->sids, node, nnode, ctx)) { ++ block = locator->sid_block; ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) { + if (!ctx->sid) + continue; + +@@ -819,7 +831,7 @@ DEFUN (no_srv6_locator, + if (zebra_srv6_sid_entry_list_count(&ctx->sid->entries) == 0) { + zebra_srv6_sid_free(ctx->sid); + +- listnode_delete(srv6->sids, ctx); ++ listnode_delete(block->sids, ctx); + zebra_srv6_sid_ctx_free(ctx); + } + } +@@ -828,6 +840,14 @@ DEFUN (no_srv6_locator, + if (block) { + block->refcnt--; + if (block->refcnt == 0) { ++ for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) { ++ if (ctx->sid) ++ zebra_srv6_sid_free(ctx->sid); ++ ++ listnode_delete(block->sids, ctx); ++ zebra_srv6_sid_ctx_free(ctx); ++ } ++ list_delete(&block->sids); + listnode_delete(srv6->sid_blocks, block); + zebra_srv6_sid_block_free(block); + } + +From 23d8cd405e5c8acbded2eb7d4c97afbfccee4127 Mon Sep 17 00:00:00 2001 +From: Philippe Guibert +Date: Thu, 26 Jun 2025 12:21:05 +0200 +Subject: [PATCH 19/25] zebra: fix display 'show segment-routing srv6 locator + LOC1 sid' output + +The 'show segment-routing srv6 locator LOC1 sid' output displays +information from other locators. + +The current procedure displays all entries if at least one entry belongs +to the passed locator. Fix this by passing the locator parameter to the +function in charge of displaying the list. + +Signed-off-by: Philippe Guibert +--- + zebra/zebra_srv6_vty.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c +index 61d163b2a9fd..64439f8e2537 100644 +--- a/zebra/zebra_srv6_vty.c ++++ b/zebra/zebra_srv6_vty.c +@@ -340,7 +340,8 @@ static const char *show_srv6_sid_seg6_context(char *str, size_t size, const stru + return str; + } + +-static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid) ++static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid, ++ struct srv6_locator *locator) + { + struct zserv *client; + char clients[256]; +@@ -353,6 +354,8 @@ static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid) + int ret; + + frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) { ++ if (locator && locator != entry->locator) ++ continue; + /* Zclients */ + if (zebra_srv6_sid_client_list_count(&entry->clients_list)) { + bool first = true; +@@ -532,7 +535,7 @@ static void do_show_srv6_sid_specific(struct vty *vty, json_object **json, + return; + } + +- do_show_srv6_sid_line(tt, sid_ctx->sid); ++ do_show_srv6_sid_line(tt, sid_ctx->sid, locator); + + ttable_colseps(tt, 1, RIGHT, true, ' '); + ttable_colseps(tt, 2, LEFT, true, ' '); +@@ -601,8 +604,7 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && + !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) + continue; +- +- do_show_srv6_sid_line(tt, ctx->sid); ++ do_show_srv6_sid_line(tt, ctx->sid, locator); + } + } + + +From 96e52b6f7d3c2d17074a88b8407db0878ccdd147 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 27 Jun 2025 11:37:24 +0000 +Subject: [PATCH 20/25] zebra: Fix display 'show segment-routing srv6 sid + fcbb:bb01:1:fe10::' output + +The 'show segment-routing srv6 locator sid fcbb:bb01:1:fe10::' output +displays information from other SIDs. + +The current procedure displays all entries if at least one entry +belongs to the passed SID. Fix this by passing the SID value parameter +to the function in charge of displaying the list. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6_vty.c | 28 ++++++++++++++++++---------- + 1 file changed, 18 insertions(+), 10 deletions(-) + +diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c +index 64439f8e2537..efdd2607dbcc 100644 +--- a/zebra/zebra_srv6_vty.c ++++ b/zebra/zebra_srv6_vty.c +@@ -341,7 +341,7 @@ static const char *show_srv6_sid_seg6_context(char *str, size_t size, const stru + } + + static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid, +- struct srv6_locator *locator) ++ struct in6_addr *sid_value, struct srv6_locator *locator) + { + struct zserv *client; + char clients[256]; +@@ -356,6 +356,10 @@ static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid, + frr_each_safe (zebra_srv6_sid_entry_list, &sid->entries, entry) { + if (locator && locator != entry->locator) + continue; ++ ++ if (sid_value && !sid_same(sid_value, &entry->sid_value)) ++ continue; ++ + /* Zclients */ + if (zebra_srv6_sid_client_list_count(&entry->clients_list)) { + bool first = true; +@@ -413,7 +417,7 @@ static void do_show_srv6_sid_line(struct ttable *tt, struct zebra_srv6_sid *sid, + } + + static void do_show_srv6_sid_json(struct vty *vty, json_object **json, struct srv6_locator *locator, +- struct zebra_srv6_sid_ctx *sid_ctx) ++ struct zebra_srv6_sid_ctx *sid_ctx, struct in6_addr *sid_value) + { + json_object *json_sid_ctx = NULL; + json_object *json_sid = NULL; +@@ -432,7 +436,10 @@ static void do_show_srv6_sid_json(struct vty *vty, json_object **json, struct sr + + frr_each (zebra_srv6_sid_entry_list, &sid_ctx->sid->entries, entry) { + if (locator && entry->locator != locator) +- return; ++ continue; ++ ++ if (sid_value && !sid_same(sid_value, &entry->sid_value)) ++ continue; + + json_sid = json_object_new_object(); + json_sid_ctx = json_object_new_object(); +@@ -501,14 +508,15 @@ static void do_show_srv6_sid_json(struct vty *vty, json_object **json, struct sr + + static void do_show_srv6_sid_specific(struct vty *vty, json_object **json, + struct srv6_locator *locator, +- struct zebra_srv6_sid_ctx *sid_ctx) ++ struct zebra_srv6_sid_ctx *sid_ctx, ++ struct in6_addr *sid_value) + { + struct ttable *tt; + struct zebra_srv6_sid_entry *entry; + bool found = false; + + if (json) { +- do_show_srv6_sid_json(vty, json, locator, sid_ctx); ++ do_show_srv6_sid_json(vty, json, locator, sid_ctx, sid_value); + } else { + /* Prepare table. */ + tt = ttable_new(&ttable_styles[TTSTYLE_BLANK]); +@@ -535,7 +543,7 @@ static void do_show_srv6_sid_specific(struct vty *vty, json_object **json, + return; + } + +- do_show_srv6_sid_line(tt, sid_ctx->sid, locator); ++ do_show_srv6_sid_line(tt, sid_ctx->sid, sid_value, locator); + + ttable_colseps(tt, 1, RIGHT, true, ' '); + ttable_colseps(tt, 2, LEFT, true, ' '); +@@ -581,7 +589,7 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) + continue; + +- do_show_srv6_sid_json(vty, json, locator, ctx); ++ do_show_srv6_sid_json(vty, json, locator, ctx, NULL); + } + } + } else { +@@ -604,7 +612,7 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, false) && + !zebra_srv6_sid_entry_lookup(ctx->sid, locator->name, true)) + continue; +- do_show_srv6_sid_line(tt, ctx->sid, locator); ++ do_show_srv6_sid_line(tt, ctx->sid, NULL, locator); + } + } + +@@ -703,8 +711,8 @@ DEFPY (show_srv6_sid, + } + } + +- if (sid_ctx) +- do_show_srv6_sid_specific(vty, uj ? &json : NULL, locator, sid_ctx); ++ if (!IPV6_ADDR_SAME(&sid_value, &in6addr_any)) ++ do_show_srv6_sid_specific(vty, uj ? &json : NULL, locator, sid_ctx, &sid_value); + else + do_show_srv6_sid_all(vty, uj ? &json : NULL, locator); + + +From f404b17e9ffb96ba55a71c6b4c52f7dc8c386f7a Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 7 Jun 2025 00:04:41 +0000 +Subject: [PATCH 21/25] zebra: Verify SRv6 parent locator before allocating an + explicit SID + +When daemons request SID Manager to allocate a SID, they can specify +the parent locator from which the SID has to be allocated. Currently, +in the case of explicit allocation, SID Manager ignores the parent +locator provided by daemons. + +This commit extends SID Manager to take the parent locator in +consideration. Specifically, when SID Manager gets a request to +allocate an explicit SID, it checks that the requested SID comes from +the provided parent locator. If not, SID Manager considers the request +malformed and rejects the request. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 6e3389c3ced5..08fec8023859 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -1791,6 +1791,7 @@ static bool alloc_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + * + * @param sid SID returned + * @param ctx Context for which the SID has been requested ++ * @param locator Parent locator of the SID + * @param sid_value specific SRv6 SID value (i.e. IPv6 address) to be + * allocated explicitly + * @param is_localonly SID is local-only +@@ -1799,11 +1800,12 @@ static bool alloc_srv6_sid_func_dynamic(struct zebra_srv6_sid_block *block, + * 1 if a new SID has been allocated or the existing SID value has changed, -1 if an error occurred + */ + static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, +- struct in6_addr *sid_value, bool is_localonly) ++ struct srv6_locator *locator, struct in6_addr *sid_value, ++ bool is_localonly) + { + struct zebra_srv6_sid_ctx *zctx = NULL; + uint32_t sid_func = 0, sid_func_wide = 0; +- struct srv6_locator *locator = NULL; ++ struct srv6_locator *loc = NULL; + struct zebra_srv6_sid_block *block = NULL; + char buf[256]; + +@@ -1811,12 +1813,15 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + return -1; + + /* Get parent locator and function of the provided SID */ +- if (!zebra_srv6_sid_decompose(sid_value, &block, &locator, &sid_func, &sid_func_wide)) { ++ if (!zebra_srv6_sid_decompose(sid_value, &block, &loc, &sid_func, &sid_func_wide)) { + zlog_err("%s: invalid SM request arguments: parent block/locator not found for SID %pI6", + __func__, sid_value); + return -1; + } + ++ if (!locator) ++ locator = loc; ++ + /* Check if we already have a SID associated with the provided context */ + zctx = zebra_srv6_sid_ctx_lookup(ctx, block); + +@@ -2020,7 +2025,7 @@ int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, struct i + const char *locator_name, bool is_localonly) + { + int ret = -1; +- struct srv6_locator *locator; ++ struct srv6_locator *locator = NULL; + char buf[256]; + struct nhg_connected *rb_node_dep = NULL; + struct listnode *node; +@@ -2082,13 +2087,22 @@ int get_srv6_sid(struct zebra_srv6_sid **sid, struct srv6_sid_ctx *ctx, struct i + * Explicit SID allocation: allocate a specific SID value + */ + ++ if (locator_name) { ++ locator = zebra_srv6_locator_lookup(locator_name); ++ if (!locator) { ++ zlog_err("%s: invalid SM request arguments: SRv6 locator '%s' does not exist", ++ __func__, locator_name); ++ return -1; ++ } ++ } ++ + if (!sid_value) { + zlog_err("%s: invalid SM request arguments: missing SRv6 SID value, necessary for explicit allocation", + __func__); + return -1; + } + +- ret = get_srv6_sid_explicit(sid, ctx, sid_value, is_localonly); ++ ret = get_srv6_sid_explicit(sid, ctx, locator, sid_value, is_localonly); + } else { + /* + * Dynamic SID allocation: allocate any available SID value + +From 498af7a819446997477f138530c4e74992e9caee Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 14 Jun 2025 05:50:24 +0000 +Subject: [PATCH 22/25] zebra: Convert `srv6_sids` to double-linked list + +Convert srv6_sids data structure from `struct list` to type-safe +double-linked list. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 40 +++++++++++++++++----------------------- + zebra/zebra_srv6.h | 8 +++++++- + zebra/zebra_srv6_vty.c | 25 +++++++++++-------------- + 3 files changed, 35 insertions(+), 38 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 08fec8023859..0a8b8b3605db 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -169,9 +169,8 @@ struct zebra_srv6_sid_ctx *zebra_srv6_sid_ctx_lookup(const struct srv6_sid_ctx * + struct zebra_srv6_sid_block *block) + { + struct zebra_srv6_sid_ctx *zctx; +- struct listnode *node; + +- for (ALL_LIST_ELEMENTS_RO(block->sids, node, zctx)) ++ frr_each (zebra_srv6_sid_ctx_list, &block->sids, zctx) + if (memcmp(&zctx->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) + return zctx; + +@@ -228,7 +227,7 @@ static void zebra_srv6_sid_entry_del_by_locator(struct zebra_srv6_sid *sid, + } + + if (zebra_srv6_sid_entry_list_count(&sid->entries) == 0) { +- listnode_delete(block->sids, sid->ctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, sid->ctx); + zebra_srv6_sid_ctx_free(sid->ctx); + + zebra_srv6_sid_free(sid); +@@ -237,7 +236,6 @@ static void zebra_srv6_sid_entry_del_by_locator(struct zebra_srv6_sid *sid, + + void zebra_srv6_sid_entry_del_by_locator_all_sids(struct srv6_locator *locator) + { +- struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *ctx; + struct zebra_srv6_sid_block *block; + +@@ -246,7 +244,7 @@ void zebra_srv6_sid_entry_del_by_locator_all_sids(struct srv6_locator *locator) + + block = locator->sid_block; + +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, ctx) + zebra_srv6_sid_entry_del_by_locator(ctx->sid, locator); + } + +@@ -467,8 +465,7 @@ zebra_srv6_sid_block_alloc(struct srv6_sid_format *format, + block->prefix = *prefix; + + /* Init list to store SRv6 SIDs */ +- block->sids = list_new(); +- block->sids->del = delete_zebra_srv6_sid_ctx; ++ zebra_srv6_sid_ctx_list_init(&block->sids); + + if (format) { + if (format->type == SRV6_SID_FORMAT_TYPE_USID) { +@@ -599,21 +596,20 @@ static void zebra_srv6_sid_block_refcnt_increment(struct zebra_srv6_sid_block *b + static void zebra_srv6_sid_block_refcnt_decrement(struct zebra_srv6_sid_block *block) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +- struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *zctx; + + assert(block->refcnt > 0); + + block->refcnt--; + if (block->refcnt == 0) { +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, zctx)) { ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, zctx) { + if (zctx->sid) + zebra_srv6_sid_free(zctx->sid); + +- listnode_delete(block->sids, zctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, zctx); + zebra_srv6_sid_ctx_free(zctx); + } +- list_delete(&block->sids); ++ zebra_srv6_sid_ctx_list_fini(&block->sids); + listnode_delete(srv6->sid_blocks, block); + zebra_srv6_sid_block_free(block); + } +@@ -856,7 +852,7 @@ void zebra_srv6_sid_client_del_all(struct zebra_srv6_sid *sid, struct zserv *cli + release_srv6_sid_func(sid->ctx); + + /* Remove the SID context from the list and free memory */ +- listnode_delete(block->sids, sid->ctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, sid->ctx); + zebra_srv6_sid_ctx_free(sid->ctx); + + /* Free the SID */ +@@ -1895,7 +1891,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + (*sid)->wide_func = sid_func_wide; + (*sid)->ctx = zctx; + zctx->sid = *sid; +- listnode_add(block->sids, zctx); ++ zebra_srv6_sid_ctx_list_add_tail(&block->sids, zctx); + } + + zebra_srv6_sid_entry_add(*sid, locator->name, sid_value, is_localonly); +@@ -1990,7 +1986,7 @@ static int get_srv6_sid_dynamic(struct zebra_srv6_sid **sid, struct srv6_sid_ctx + } + (*sid)->ctx = zctx; + zctx->sid = *sid; +- listnode_add(block->sids, zctx); ++ zebra_srv6_sid_ctx_list_add_tail(&block->sids, zctx); + + zebra_srv6_sid_entry_add(*sid, locator->name, &sid_value, is_localonly); + +@@ -2568,7 +2564,7 @@ int release_srv6_sid(struct zserv *client, struct zebra_srv6_sid_ctx *zctx, + zctx->sid = NULL; + + /* Remove the SID context from the list and free memory */ +- listnode_delete(block->sids, zctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, zctx); + zebra_srv6_sid_ctx_free(zctx); + } + +@@ -2686,7 +2682,6 @@ static int srv6_manager_get_sid_internal(struct zebra_srv6_sid **sid, struct zse + int release_daemon_srv6_sids(struct zserv *client) + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); +- struct listnode *node, *nnode; + struct listnode *node_block; + struct zebra_srv6_sid_ctx *ctx; + int count = 0; +@@ -2699,7 +2694,7 @@ int release_daemon_srv6_sids(struct zserv *client) + + /* Iterate over the SIDs and release SIDs used by the client daemon */ + for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, ctx) + zebra_srv6_sid_client_del_all(ctx->sid, client); + + if (IS_ZEBRA_DEBUG_SRV6) +@@ -2722,7 +2717,6 @@ static int srv6_manager_release_sid_internal(struct zserv *client, struct srv6_s + { + int ret = -1; + struct zebra_srv6_sid_ctx *zctx; +- struct listnode *node, *nnode; + char buf[256]; + struct srv6_locator *locator = NULL; + struct in6_addr sid_value = {}; +@@ -2748,7 +2742,7 @@ static int srv6_manager_release_sid_internal(struct zserv *client, struct srv6_s + block = locator->sid_block; + + /* Lookup Zebra SID context and release it */ +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, zctx)) ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, zctx) + if (memcmp(&zctx->ctx, ctx, sizeof(struct srv6_sid_ctx)) == 0) { + if (zctx->sid) { + entry = zebra_srv6_sid_entry_lookup(zctx->sid, locator->name, +@@ -2798,16 +2792,16 @@ void zebra_srv6_terminate(void) + block = listnode_head(g_srv6.sid_blocks); + + /* Free SRv6 SIDs */ +- while (listcount(block->sids)) { +- sid_ctx = listnode_head(block->sids); ++ while (zebra_srv6_sid_ctx_list_count(&block->sids)) { ++ sid_ctx = zebra_srv6_sid_ctx_list_first(&block->sids); + + zebra_srv6_sid_free(sid_ctx->sid); + +- listnode_delete(block->sids, sid_ctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, sid_ctx); + zebra_srv6_sid_ctx_free(sid_ctx); + } + +- list_delete(&block->sids); ++ zebra_srv6_sid_ctx_list_fini(&block->sids); + + listnode_delete(g_srv6.sid_blocks, block); + zebra_srv6_sid_block_free(block); +diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h +index 374ff7e97637..47511baa2ffd 100644 +--- a/zebra/zebra_srv6.h ++++ b/zebra/zebra_srv6.h +@@ -60,6 +60,8 @@ struct wide_lib { + struct list *func_released; + }; + ++PREDECL_DLIST(zebra_srv6_sid_ctx_list); ++ + /* + * SRv6 SID block. + * +@@ -115,7 +117,7 @@ struct zebra_srv6_sid_block { + } u; + + /* SRv6 SIDs */ +- struct list *sids; ++ struct zebra_srv6_sid_ctx_list_head sids; + }; + + /** +@@ -223,8 +225,12 @@ struct zebra_srv6_sid_ctx { + + /* SID associated with the context. */ + struct zebra_srv6_sid *sid; ++ ++ struct zebra_srv6_sid_ctx_list_item item; + }; + ++DECLARE_DLIST(zebra_srv6_sid_ctx_list, struct zebra_srv6_sid_ctx, item); ++ + /* SRv6 instance structure. */ + struct zebra_srv6 { + struct list *locators; +diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c +index efdd2607dbcc..59a15d93070c 100644 +--- a/zebra/zebra_srv6_vty.c ++++ b/zebra/zebra_srv6_vty.c +@@ -570,7 +570,6 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_ctx *ctx; +- struct listnode *node; + struct ttable *tt; + struct zebra_srv6_sid_block *block; + struct listnode *node_block; +@@ -578,7 +577,7 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + + if (json) { + for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) { +- for (ALL_LIST_ELEMENTS_RO(block->sids, node, ctx)) { ++ frr_each (zebra_srv6_sid_ctx_list, &block->sids, ctx) { + /* Skip contexts not associated with any SID */ + if (!ctx->sid) + continue; +@@ -602,7 +601,7 @@ static void do_show_srv6_sid_all(struct vty *vty, json_object **json, struct srv + ttable_rowseps(tt, 0, BOTTOM, true, '-'); + + for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) { +- for (ALL_LIST_ELEMENTS_RO(block->sids, node, ctx)) { ++ frr_each (zebra_srv6_sid_ctx_list, &block->sids, ctx) { + /* Skip contexts not associated with any SID */ + if (!ctx->sid) + continue; +@@ -649,7 +648,6 @@ DEFPY (show_srv6_sid, + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct srv6_locator *locator = NULL; + struct zebra_srv6_sid_ctx *sid_ctx = NULL, *c; +- struct listnode *node; + json_object *json = NULL; + bool found = false; + struct zebra_srv6_sid_entry *entry; +@@ -672,7 +670,7 @@ DEFPY (show_srv6_sid, + + if (!IPV6_ADDR_SAME(&sid_value, &in6addr_any)) { + for (ALL_LIST_ELEMENTS_RO(srv6->sid_blocks, node_block, block)) { +- for (ALL_LIST_ELEMENTS_RO(block->sids, node, c)) { ++ frr_each (zebra_srv6_sid_ctx_list, &block->sids, c) { + if (!c->sid) + continue; + +@@ -757,14 +755,14 @@ DEFUN (no_srv6, + if (block) { + block->refcnt--; + if (block->refcnt == 0) { +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) { ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, ctx) { + if (ctx->sid) + zebra_srv6_sid_free(ctx->sid); + +- listnode_delete(block->sids, ctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, ctx); + zebra_srv6_sid_ctx_free(ctx); + } +- list_delete(&block->sids); ++ zebra_srv6_sid_ctx_list_fini(&block->sids); + listnode_delete(srv6->sid_blocks, block); + zebra_srv6_sid_block_free(block); + } +@@ -817,7 +815,6 @@ DEFUN (no_srv6_locator, + { + struct zebra_srv6 *srv6 = zebra_srv6_get_default(); + struct zebra_srv6_sid_block *block; +- struct listnode *node, *nnode; + struct zebra_srv6_sid_ctx *ctx; + struct srv6_locator *locator = zebra_srv6_locator_lookup(argv[2]->arg); + struct zebra_srv6_sid_entry *entry; +@@ -828,7 +825,7 @@ DEFUN (no_srv6_locator, + } + + block = locator->sid_block; +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) { ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, ctx) { + if (!ctx->sid) + continue; + +@@ -841,7 +838,7 @@ DEFUN (no_srv6_locator, + if (zebra_srv6_sid_entry_list_count(&ctx->sid->entries) == 0) { + zebra_srv6_sid_free(ctx->sid); + +- listnode_delete(block->sids, ctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, ctx); + zebra_srv6_sid_ctx_free(ctx); + } + } +@@ -850,14 +847,14 @@ DEFUN (no_srv6_locator, + if (block) { + block->refcnt--; + if (block->refcnt == 0) { +- for (ALL_LIST_ELEMENTS(block->sids, node, nnode, ctx)) { ++ frr_each_safe (zebra_srv6_sid_ctx_list, &block->sids, ctx) { + if (ctx->sid) + zebra_srv6_sid_free(ctx->sid); + +- listnode_delete(block->sids, ctx); ++ zebra_srv6_sid_ctx_list_del(&block->sids, ctx); + zebra_srv6_sid_ctx_free(ctx); + } +- list_delete(&block->sids); ++ zebra_srv6_sid_ctx_list_fini(&block->sids); + listnode_delete(srv6->sid_blocks, block); + zebra_srv6_sid_block_free(block); + } + +From 151147400dc77d6470eb9b96221dbd43833a1258 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Thu, 26 Jun 2025 14:43:03 +0000 +Subject: [PATCH 23/25] staticd: Extend SRv6 SID uninstall to provide behavior + and context + +Currently, staticd does not provide behavior and context information +when it uninstalls an SRv6 SID. + +This can make debugging and troubleshooting tricky for an operator, +as there is no way to know information about the sid that is going +to be deleted. + +For example: + +``` +2025/06/19 17:15:10.632888 STATIC: [HSZRA-C8FAP] static_zebra_send_localsid: |- Delete SRv6 SID fcbb:bb01:fff7:fe50:: behavior unspec +``` + +This commit extends staticd to provide action and context when +uninstalling an SRv6 SID. + +Signed-off-by: Carmine Scarpitta +--- + staticd/static_zebra.c | 78 +++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 74 insertions(+), 4 deletions(-) + +diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c +index b02156c847ec..28c2a42008e8 100644 +--- a/staticd/static_zebra.c ++++ b/staticd/static_zebra.c +@@ -838,19 +838,48 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + } + + switch (sid->behavior) { +- case SRV6_ENDPOINT_BEHAVIOR_END: + case SRV6_ENDPOINT_BEHAVIOR_END_PSP: +- case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END; ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_PSP); ++ break; ++ case SRV6_ENDPOINT_BEHAVIOR_END: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END; ++ break; + case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID_PSP: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END; ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_PSP); ++ break; ++ case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END; ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); + break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT6: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_DT6; ++ vrf = vrf_lookup_by_name(sid->attributes.vrf_name); ++ if (!vrf_is_enabled(vrf)) { ++ zlog_warn("Failed to install SID %pFX: VRF %s is inactive", &sid->addr, ++ sid->attributes.vrf_name); ++ return; ++ } ++ ctx.table = vrf->data.l.table_id; ++ ifp = if_get_vrf_loopback(vrf->vrf_id); ++ if (!ifp) { ++ zlog_warn("Failed to install SID %pFX: failed to get loopback for vrf %s", ++ &sid->addr, sid->attributes.vrf_name); ++ return; ++ } ++ break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT6_USID: ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_DT6; + vrf = vrf_lookup_by_name(sid->attributes.vrf_name); + if (!vrf_is_enabled(vrf)) { + zlog_warn("Failed to install SID %pFX: VRF %s is inactive", &sid->addr, + sid->attributes.vrf_name); + return; + } ++ ctx.table = vrf->data.l.table_id; + ifp = if_get_vrf_loopback(vrf->vrf_id); + if (!ifp) { + zlog_warn("Failed to install SID %pFX: failed to get loopback for vrf %s", +@@ -859,13 +888,31 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + } + break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT4: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_DT4; ++ vrf = vrf_lookup_by_name(sid->attributes.vrf_name); ++ if (!vrf_is_enabled(vrf)) { ++ zlog_warn("Failed to install SID %pFX: VRF %s is inactive", &sid->addr, ++ sid->attributes.vrf_name); ++ return; ++ } ++ ctx.table = vrf->data.l.table_id; ++ ifp = if_get_vrf_loopback(vrf->vrf_id); ++ if (!ifp) { ++ zlog_warn("Failed to install SID %pFX: failed to get loopback for vrf %s", ++ &sid->addr, sid->attributes.vrf_name); ++ return; ++ } ++ break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT4_USID: ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_DT4; + vrf = vrf_lookup_by_name(sid->attributes.vrf_name); + if (!vrf_is_enabled(vrf)) { + zlog_warn("Failed to install SID %pFX: VRF %s is inactive", &sid->addr, + sid->attributes.vrf_name); + return; + } ++ ctx.table = vrf->data.l.table_id; + ifp = if_get_vrf_loopback(vrf->vrf_id); + if (!ifp) { + zlog_warn("Failed to install SID %pFX: failed to get loopback for vrf %s", +@@ -874,13 +921,31 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + } + break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT46: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_DT46; ++ vrf = vrf_lookup_by_name(sid->attributes.vrf_name); ++ if (!vrf_is_enabled(vrf)) { ++ zlog_warn("Failed to install SID %pFX: VRF %s is inactive", &sid->addr, ++ sid->attributes.vrf_name); ++ return; ++ } ++ ctx.table = vrf->data.l.table_id; ++ ifp = if_get_vrf_loopback(vrf->vrf_id); ++ if (!ifp) { ++ zlog_warn("Failed to install SID %pFX: failed to get loopback for vrf %s", ++ &sid->addr, sid->attributes.vrf_name); ++ return; ++ } ++ break; + case SRV6_ENDPOINT_BEHAVIOR_END_DT46_USID: ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_DT46; + vrf = vrf_lookup_by_name(sid->attributes.vrf_name); + if (!vrf_is_enabled(vrf)) { + zlog_warn("Failed to install SID %pFX: VRF %s is inactive", &sid->addr, + sid->attributes.vrf_name); + return; + } ++ ctx.table = vrf->data.l.table_id; + ifp = if_get_vrf_loopback(vrf->vrf_id); + if (!ifp) { + zlog_warn("Failed to install SID %pFX: failed to get loopback for vrf %s", +@@ -889,6 +954,7 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + } + break; + case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID: ++ action = ZEBRA_SEG6_LOCAL_ACTION_END_X; + ctx.nh6 = sid->attributes.nh6; + ifp = if_lookup_by_name(sid->attributes.ifname, VRF_DEFAULT); + if (!ifp) { +@@ -896,6 +962,7 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + &sid->addr, sid->attributes.ifname); + return; + } ++ SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID); + break; + case SRV6_ENDPOINT_BEHAVIOR_END_PSP_USD: + case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID_PSP_USD: +@@ -904,12 +971,12 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + case SRV6_ENDPOINT_BEHAVIOR_END_X_PSP_USD: + case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID_PSP: + case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID_PSP_USD: +- case SRV6_ENDPOINT_BEHAVIOR_OPAQUE: +- case SRV6_ENDPOINT_BEHAVIOR_RESERVED: + case SRV6_ENDPOINT_BEHAVIOR_END_B6_ENCAPS: + case SRV6_ENDPOINT_BEHAVIOR_END_B6_ENCAPS_RED: + case SRV6_ENDPOINT_BEHAVIOR_END_B6_ENCAPS_NEXT_CSID: + case SRV6_ENDPOINT_BEHAVIOR_END_B6_ENCAPS_RED_NEXT_CSID: ++ case SRV6_ENDPOINT_BEHAVIOR_OPAQUE: ++ case SRV6_ENDPOINT_BEHAVIOR_RESERVED: + zlog_warn("unsupported behavior: %u", sid->behavior); + break; + } +@@ -949,6 +1016,9 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid) + + ctx.function_len = sid->addr.prefixlen - (ctx.block_len + ctx.node_len); + ++ ctx.flv.lcblock_len = sid->locator->block_bits_length; ++ ctx.flv.lcnode_func_len = ctx.node_len + ctx.function_len; ++ + zclient_send_localsid(static_zclient, ZEBRA_ROUTE_DELETE, &sid->addr.prefix, + sid->addr.prefixlen, ifp->ifindex, action, &ctx); + + +From 2c5553dbe39f85b1557476caba6d52b304f042eb Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Fri, 27 Jun 2025 23:57:31 +0000 +Subject: [PATCH 24/25] staticd: Uninstall SID from RIB when SID is released + +When staticd receives a SID release notification from SID Manager, it +should uninstall the SID from the RIB, as the SID is no longer valid. + +Signed-off-by: Carmine Scarpitta +--- + staticd/static_zebra.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c +index 28c2a42008e8..47e0b9bd88a0 100644 +--- a/staticd/static_zebra.c ++++ b/staticd/static_zebra.c +@@ -1495,6 +1495,11 @@ static int static_zebra_srv6_sid_notify(ZAPI_CALLBACK_ARGS) + + UNSET_FLAG(sid->flags, STATIC_FLAG_SRV6_SID_VALID); + ++ if (CHECK_FLAG(sid->flags, STATIC_FLAG_SRV6_SID_SENT_TO_ZEBRA)) { ++ static_zebra_srv6_sid_uninstall(sid); ++ UNSET_FLAG(sid->flags, STATIC_FLAG_SRV6_SID_SENT_TO_ZEBRA); ++ } ++ + break; + case ZAPI_SRV6_SID_FAIL_ALLOC: + zlog_err("SRv6 SID %pI6 %s: Failed to allocate", &sid_addr, + +From 21e21f81e007d17aa8fb54c4a07863752942b03f Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Sat, 10 May 2025 13:15:47 +0000 +Subject: [PATCH 25/25] tests: Add topotest to verify SRv6 multiple locators + +Add topotest to verify SRv6 static SIDs allocated from multiple locators + +Add a topotest that attempts to allocate and install SIDs from multiple +locators and verify that SIDs are allocated/installed correctly. + +Signed-off-by: Carmine Scarpitta +--- + .../__init__.py | 0 + .../expected_srv6_sids.json | 1196 +++++++++++++++++ + .../r1/frr.conf | 61 + + .../r1/setup.sh | 19 + + ...test_static_srv6_sids_multiple_locators.py | 82 ++ + 5 files changed, 1358 insertions(+) + create mode 100644 tests/topotests/static_srv6_sids_multiple_locators/__init__.py + create mode 100644 tests/topotests/static_srv6_sids_multiple_locators/expected_srv6_sids.json + create mode 100644 tests/topotests/static_srv6_sids_multiple_locators/r1/frr.conf + create mode 100644 tests/topotests/static_srv6_sids_multiple_locators/r1/setup.sh + create mode 100755 tests/topotests/static_srv6_sids_multiple_locators/test_static_srv6_sids_multiple_locators.py + +diff --git a/tests/topotests/static_srv6_sids_multiple_locators/__init__.py b/tests/topotests/static_srv6_sids_multiple_locators/__init__.py +new file mode 100644 +index 000000000000..e69de29bb2d1 +diff --git a/tests/topotests/static_srv6_sids_multiple_locators/expected_srv6_sids.json b/tests/topotests/static_srv6_sids_multiple_locators/expected_srv6_sids.json +new file mode 100644 +index 000000000000..ddbfe0014c07 +--- /dev/null ++++ b/tests/topotests/static_srv6_sids_multiple_locators/expected_srv6_sids.json +@@ -0,0 +1,1196 @@ ++{ ++ "fcbb:bb01:1::/48": [ ++ { ++ "prefix": "fcbb:bb01:1::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uN", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 0, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:1:fe10::/64": [ ++ { ++ "prefix": "fcbb:bb01:1:fe10::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf10", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT4", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 10 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:1:fe20::/64": [ ++ { ++ "prefix": "fcbb:bb01:1:fe20::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf20", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT6", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 20 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:1:fe30::/64": [ ++ { ++ "prefix": "fcbb:bb01:1:fe30::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf30", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 30 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:1:fe40::/64": [ ++ { ++ "prefix": "fcbb:bb01:1:fe40::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uA" ++ }, ++ "seg6localContext": { ++ "nh6": "2001::2" ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:2::/48": [ ++ { ++ "prefix": "fcbb:bb01:2::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uN", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 0, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:2:fe10::/64": [ ++ { ++ "prefix": "fcbb:bb01:2:fe10::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf10", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT4", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 10 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:2:fe20::/64": [ ++ { ++ "prefix": "fcbb:bb01:2:fe20::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf20", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT6", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 20 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:2:fe30::/64": [ ++ { ++ "prefix": "fcbb:bb01:2:fe30::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf30", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 30 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:2:fe40::/64": [ ++ { ++ "prefix": "fcbb:bb01:2:fe40::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uA" ++ }, ++ "seg6localContext": { ++ "nh6": "2001::2" ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:fe10::/48": [ ++ { ++ "prefix": "fcbb:bb01:fe10::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf10", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT4", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 10 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:fe20::/48": [ ++ { ++ "prefix": "fcbb:bb01:fe20::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf20", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT6", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 20 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:fe30::/48": [ ++ { ++ "prefix": "fcbb:bb01:fe30::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf30", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 30 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:fe40::/48": [ ++ { ++ "prefix": "fcbb:bb01:fe40::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uA" ++ }, ++ "seg6localContext": { ++ "nh6": "2001::2" ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:1::/48": [ ++ { ++ "prefix": "fcbb:bb02:1::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uN", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 0, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:1:fe10::/64": [ ++ { ++ "prefix": "fcbb:bb02:1:fe10::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf10", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT4", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 10 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:1:fe20::/64": [ ++ { ++ "prefix": "fcbb:bb02:1:fe20::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf30", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT6", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 30 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:1:fe30::/64": [ ++ { ++ "prefix": "fcbb:bb02:1:fe30::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf20", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 20 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:1:fe40::/64": [ ++ { ++ "prefix": "fcbb:bb02:1:fe40::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uA" ++ }, ++ "seg6localContext": { ++ "nh6": "2001::2" ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:2::/48": [ ++ { ++ "prefix": "fcbb:bb02:2::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uN", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 0, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:2:fe10::/64": [ ++ { ++ "prefix": "fcbb:bb02:2:fe10::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf10", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT4", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 10 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:2:fe20::/64": [ ++ { ++ "prefix": "fcbb:bb02:2:fe20::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf30", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT6", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 30 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:2:fe30::/64": [ ++ { ++ "prefix": "fcbb:bb02:2:fe30::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf20", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 20 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:2:fe40::/64": [ ++ { ++ "prefix": "fcbb:bb02:2:fe40::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uA" ++ }, ++ "seg6localContext": { ++ "nh6": "2001::2" ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:fe10::/48": [ ++ { ++ "prefix": "fcbb:bb02:fe10::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf10", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT4", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 10 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:fe20::/48": [ ++ { ++ "prefix": "fcbb:bb02:fe20::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf30", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT6", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 30 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:fe30::/48": [ ++ { ++ "prefix": "fcbb:bb02:fe30::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf20", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 16, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 20 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb02:fe40::/48": [ ++ { ++ "prefix": "fcbb:bb02:fe40::/48", ++ "prefixLen": 48, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "sr0", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uA" ++ }, ++ "seg6localContext": { ++ "nh6": "2001::2" ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:fff7:fe50::/64": [ ++ { ++ "prefix": "fcbb:bb01:fff7:fe50::/64", ++ "prefixLen": 64, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf50", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 0, ++ "funcLen": 32, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 50 ++ } ++ } ++ ] ++ } ++ ], ++ "fcbb:bb01:1:fff7:fe50::/80": [ ++ { ++ "prefix": "fcbb:bb01:1:fff7:fe50::/80", ++ "prefixLen": 80, ++ "protocol": "static", ++ "vrfId": 0, ++ "vrfName": "default", ++ "selected": true, ++ "destSelected": true, ++ "distance": 1, ++ "metric": 0, ++ "installed": true, ++ "table": 254, ++ "internalStatus": 16, ++ "internalFlags": 9, ++ "internalNextHopNum": 1, ++ "internalNextHopActiveNum": 1, ++ "nexthops": [ ++ { ++ "flags": 3, ++ "fib": true, ++ "directlyConnected": true, ++ "interfaceName": "Vrf50", ++ "active": true, ++ "weight": 1, ++ "seg6local": { ++ "action": "uDT46", ++ "sidStructure": { ++ "blockLen": 32, ++ "nodeLen": 16, ++ "funcLen": 32, ++ "argLen": 0 ++ } ++ }, ++ "seg6localContext": { ++ "table": 50 ++ } ++ } ++ ] ++ } ++ ] ++} +\ No newline at end of file +diff --git a/tests/topotests/static_srv6_sids_multiple_locators/r1/frr.conf b/tests/topotests/static_srv6_sids_multiple_locators/r1/frr.conf +new file mode 100644 +index 000000000000..7f52dea0b41e +--- /dev/null ++++ b/tests/topotests/static_srv6_sids_multiple_locators/r1/frr.conf +@@ -0,0 +1,61 @@ ++hostname r1 ++! ++segment-routing ++ srv6 ++ locators ++ locator LOC1 ++ prefix fcbb:bb01:1::/48 ++ format usid-f3216 ++ ! ++ locator LOC2 ++ prefix fcbb:bb01:2::/48 ++ format usid-f3216 ++ ! ++ locator LOC3 ++ prefix fcbb:bb02:1::/48 ++ format usid-f3216 ++ ! ++ locator LOC4 ++ prefix fcbb:bb02:2::/48 ++ format usid-f3216 ++ ! ++ ! ++ static-sids ++ sid fcbb:bb01:1::/48 locator LOC1 behavior uN ++ sid fcbb:bb01:1:fe10::/64 locator LOC1 behavior uDT4 vrf Vrf10 ++ sid fcbb:bb01:1:fe20::/64 locator LOC1 behavior uDT6 vrf Vrf20 ++ sid fcbb:bb01:1:fe30::/64 locator LOC1 behavior uDT46 vrf Vrf30 ++ sid fcbb:bb01:1:fe40::/64 locator LOC1 behavior uA interface sr0 nexthop 2001::2 ++ ! ++ sid fcbb:bb01:2::/48 locator LOC2 behavior uN ++ sid fcbb:bb01:2:fe10::/64 locator LOC2 behavior uDT4 vrf Vrf10 ++ sid fcbb:bb01:2:fe20::/64 locator LOC2 behavior uDT6 vrf Vrf20 ++ sid fcbb:bb01:2:fe30::/64 locator LOC2 behavior uDT46 vrf Vrf30 ++ sid fcbb:bb01:2:fe40::/64 locator LOC2 behavior uA interface sr0 nexthop 2001::2 ++ ! ++ sid fcbb:bb01:fe10::/48 locator LOC1 behavior uDT4 vrf Vrf10 ++ sid fcbb:bb01:fe20::/48 locator LOC1 behavior uDT6 vrf Vrf20 ++ sid fcbb:bb01:fe30::/48 locator LOC1 behavior uDT46 vrf Vrf30 ++ sid fcbb:bb01:fe40::/48 locator LOC1 behavior uA interface sr0 nexthop 2001::2 ++ ! ++ sid fcbb:bb02:1::/48 locator LOC3 behavior uN ++ sid fcbb:bb02:1:fe10::/64 locator LOC3 behavior uDT4 vrf Vrf10 ++ sid fcbb:bb02:1:fe20::/64 locator LOC3 behavior uDT6 vrf Vrf30 ++ sid fcbb:bb02:1:fe30::/64 locator LOC3 behavior uDT46 vrf Vrf20 ++ sid fcbb:bb02:1:fe40::/64 locator LOC3 behavior uA interface sr0 nexthop 2001::2 ++ ! ++ sid fcbb:bb02:2::/48 locator LOC4 behavior uN ++ sid fcbb:bb02:2:fe10::/64 locator LOC4 behavior uDT4 vrf Vrf10 ++ sid fcbb:bb02:2:fe20::/64 locator LOC4 behavior uDT6 vrf Vrf30 ++ sid fcbb:bb02:2:fe30::/64 locator LOC4 behavior uDT46 vrf Vrf20 ++ sid fcbb:bb02:2:fe40::/64 locator LOC4 behavior uA interface sr0 nexthop 2001::2 ++ ! ++ sid fcbb:bb02:fe10::/48 locator LOC3 behavior uDT4 vrf Vrf10 ++ sid fcbb:bb02:fe20::/48 locator LOC3 behavior uDT6 vrf Vrf30 ++ sid fcbb:bb02:fe30::/48 locator LOC3 behavior uDT46 vrf Vrf20 ++ sid fcbb:bb02:fe40::/48 locator LOC3 behavior uA interface sr0 nexthop 2001::2 ++ ! ++ sid fcbb:bb01:fff7:fe50::/64 locator LOC1 behavior uDT46 vrf Vrf50 ++ sid fcbb:bb01:1:fff7:fe50::/80 locator LOC1 behavior uDT46 vrf Vrf50 ++ ! ++! +\ No newline at end of file +diff --git a/tests/topotests/static_srv6_sids_multiple_locators/r1/setup.sh b/tests/topotests/static_srv6_sids_multiple_locators/r1/setup.sh +new file mode 100644 +index 000000000000..f419da0872de +--- /dev/null ++++ b/tests/topotests/static_srv6_sids_multiple_locators/r1/setup.sh +@@ -0,0 +1,19 @@ ++ip link add sr0 type dummy ++ip link set sr0 up ++ ++ip link add Vrf10 type vrf table 10 ++ip link set Vrf10 up ++ ++ip link add Vrf20 type vrf table 20 ++ip link set Vrf20 up ++ ++ip link add Vrf30 type vrf table 30 ++ip link set Vrf30 up ++ ++ip link add Vrf40 type vrf table 40 ++ip link set Vrf40 up ++ ++ip link add Vrf50 type vrf table 50 ++ip link set Vrf50 up ++ ++sysctl -w net.vrf.strict_mode=1 +diff --git a/tests/topotests/static_srv6_sids_multiple_locators/test_static_srv6_sids_multiple_locators.py b/tests/topotests/static_srv6_sids_multiple_locators/test_static_srv6_sids_multiple_locators.py +new file mode 100755 +index 000000000000..9e450281bb75 +--- /dev/null ++++ b/tests/topotests/static_srv6_sids_multiple_locators/test_static_srv6_sids_multiple_locators.py +@@ -0,0 +1,82 @@ ++#!/usr/bin/env python ++# SPDX-License-Identifier: ISC ++ ++# ++# test_static_srv6_sids_multiple_locators.py ++# ++# Copyright (c) 2025 by ++# Carmine Scarpitta ++# ++ ++""" ++test_static_srv6_sids_multiple_locators.py: ++Test for SRv6 static SIDs allocated from multiple locators ++""" ++ ++import os ++import sys ++import json ++import pytest ++import functools ++ ++CWD = os.path.dirname(os.path.realpath(__file__)) ++sys.path.append(os.path.join(CWD, "../")) ++ ++# pylint: disable=C0413 ++from lib import topotest ++from lib.topogen import Topogen, TopoRouter, get_topogen ++from lib.topolog import logger ++ ++pytestmark = [pytest.mark.staticd] ++ ++ ++def open_json_file(filename): ++ try: ++ with open(filename, "r") as f: ++ return json.load(f) ++ except IOError: ++ assert False, "Could not read file {}".format(filename) ++ ++ ++def setup_module(mod): ++ tgen = Topogen({None: "r1"}, mod.__name__) ++ tgen.start_topology() ++ for rname, router in tgen.routers().items(): ++ router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) ++ router.load_frr_config("frr.conf") ++ tgen.start_router() ++ ++ ++def teardown_module(): ++ tgen = get_topogen() ++ tgen.stop_topology() ++ ++ ++def test_srv6_static_sids(): ++ tgen = get_topogen() ++ if tgen.routers_have_failure(): ++ pytest.skip(tgen.errors) ++ router = tgen.gears["r1"] ++ ++ def _check_srv6_static_sids(router, expected_route_file): ++ logger.info("checking zebra srv6 static sids") ++ output = json.loads(router.vtysh_cmd("show ipv6 route static json")) ++ expected = open_json_file("{}/{}".format(CWD, expected_route_file)) ++ return topotest.json_cmp(output, expected) ++ ++ def check_srv6_static_sids(router, expected_file): ++ func = functools.partial(_check_srv6_static_sids, router, expected_file) ++ _, result = topotest.run_and_expect(func, None, count=15, wait=1) ++ assert result is None, "Failed" ++ ++ # FOR DEVELOPER: ++ # If you want to stop some specific line and start interactive shell, ++ # please use tgen.mininet_cli() to start it. ++ ++ logger.info("Test for srv6 sids configuration") ++ check_srv6_static_sids(router, "expected_srv6_sids.json") ++ ++ ++if __name__ == "__main__": ++ args = ["-s"] + sys.argv[1:] ++ sys.exit(pytest.loc1(args)) diff --git a/src/sonic-frr/patch/0099-zebra-Fix-SRv6-explicit-SID-allocation-to-use-the-provided-locator.patch b/src/sonic-frr/patch/0099-zebra-Fix-SRv6-explicit-SID-allocation-to-use-the-provided-locator.patch new file mode 100644 index 00000000000..b2cc53f9483 --- /dev/null +++ b/src/sonic-frr/patch/0099-zebra-Fix-SRv6-explicit-SID-allocation-to-use-the-provided-locator.patch @@ -0,0 +1,64 @@ +From 13fa4b71cfd97a9c0065052c2b3dda10715b4fd2 Mon Sep 17 00:00:00 2001 +From: Carmine Scarpitta +Date: Tue, 21 Oct 2025 12:21:20 +0200 +Subject: [PATCH] zebra: Fix SRv6 explicit SID allocation to use the provided + locator + +Currently, when staticd allocates an explicit SID using the CLI: + + segment-routing + srv6 + static-sids + sid fcbb:bbbb:1:fe00::/64 locator MAIN behavior uDT46 vrf Vrf10 + +staticd requests the SRv6 SID Manager to allocate SID fcbb:bbbb:1:fe00:: +from locator MAIN. However, the SID Manager incorrectly ignores the +provided locator MAIN and instead performs a lookup to find the first +locator that matches the SID prefix, then allocates the SID from that +locator regardless of which locator was requested. + +This behavior can lead to SIDs being allocated from unintended locators +when multiple locators have overlapping prefixes, violating the user's +explicit locator specification. + +This commit fixes the issue by adding a constraint in zebra_srv6_sid_decompose() +that enforces the SID Manager to allocate the SID only from the provided +locator when one is specified. The fix adds an early check in the locator +lookup loop to skip locators that don't match the caller-provided locator, +ensuring explicit SID allocation respects the user's locator choice. + +Signed-off-by: Carmine Scarpitta +--- + zebra/zebra_srv6.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c +index 4231233f0e..3f83ad03d0 100644 +--- a/zebra/zebra_srv6.c ++++ b/zebra/zebra_srv6.c +@@ -1322,10 +1322,14 @@ static bool zebra_srv6_sid_decompose(struct in6_addr *sid_value, + tmp_prefix.prefix = *sid_value; + + /* +- * Lookup the parent locator of the SID and return the locator and +- * the function of the SID. ++ * If parent locator of the SID is provided, use it to decompose the SID; ++ * otherwise lookup the parent locator. Return the locator and SID function. + */ + for (ALL_LIST_ELEMENTS_RO(srv6->locators, node, l)) { ++ /* Skip locators that don't match the provided locator */ ++ if (*locator != NULL && *locator != l) ++ continue; ++ + /* + * Check if the locator prefix includes the temporary prefix + * representing the SID. +@@ -1801,7 +1805,7 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid, struct srv6_sid_ct + { + struct zebra_srv6_sid_ctx *zctx = NULL; + uint32_t sid_func = 0, sid_func_wide = 0; +- struct srv6_locator *loc = NULL; ++ struct srv6_locator *loc = locator; + struct zebra_srv6_sid_block *block = NULL; + char buf[256]; + diff --git a/src/sonic-frr/patch/0100-bgpd-Allow-proper-shutdown-of-bgp-dynamic-peers.patch b/src/sonic-frr/patch/0100-bgpd-Allow-proper-shutdown-of-bgp-dynamic-peers.patch new file mode 100644 index 00000000000..4aea4059ab9 --- /dev/null +++ b/src/sonic-frr/patch/0100-bgpd-Allow-proper-shutdown-of-bgp-dynamic-peers.patch @@ -0,0 +1,52 @@ +From aadfa2b22ea22a07c240a16a7b883495ba37d652 Mon Sep 17 00:00:00 2001 +From: Donald Sharp +Date: Tue, 25 Nov 2025 13:12:07 -0500 +Subject: [PATCH] bgpd: Allow proper shutdown of bgp dynamic peers in rare case + +There exists a series of events that causes dynamic peers to +accept new connections on a existing connection and leaving +everything in a weird state. + +Series of events: + +a) Interface down event +b) BGP places peering on queue to be cleared in the future +*note* that BGP is completely swamped and doesn't get to +this in a timely manner +c) Interface comes up +d) Peer is not loaded and attempts to reconnect the dynamic +peer. + +At this point on the accept, BGP finds the existing dynamic +peer and decides to reuse the connection, runs peer_xfer_config +and messes up the CONFIG_NODE flag for the peer. This is because +dynamic peers are not meant to go through that code for handling +resolution of peering and it causes issues. + +Let's just prevent dynamic peers from accepting an existing connection. +This solves the issue. + +Signed-off-by: Donald Sharp +--- + bgpd/bgp_network.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c +index a751f6b01e74..df08afb0d965 100644 +--- a/bgpd/bgp_network.c ++++ b/bgpd/bgp_network.c +@@ -546,6 +546,14 @@ static void bgp_accept(struct event *event) + BGP_EVENT_ADD(incoming, TCP_connection_open); + } + ++ return; ++ } ++ } else { ++ if (CHECK_FLAG(peer->flags, PEER_FLAG_DYNAMIC_NEIGHBOR)) { ++ zlog_debug("Received an open connection for a peering %s that we have not fully closed down yet", ++ peer->host); ++ close(bgp_sock); ++ + return; + } + } diff --git a/src/sonic-frr/patch/0101-bgpd-send-EOR-during-GR-only-when-FIB-install-comple.patch b/src/sonic-frr/patch/0101-bgpd-send-EOR-during-GR-only-when-FIB-install-comple.patch new file mode 100644 index 00000000000..9e3dbe1d998 --- /dev/null +++ b/src/sonic-frr/patch/0101-bgpd-send-EOR-during-GR-only-when-FIB-install-comple.patch @@ -0,0 +1,330 @@ +From e623b92190e926c4ab797c6707c22ba15fa93eef Mon Sep 17 00:00:00 2001 +From: Stepan Blyschak +Date: Wed, 3 Dec 2025 15:43:18 +0000 +Subject: [PATCH] bgpd: send EOR during GR only when FIB install complete for + suppress-fib enabled + +Currently during GR, EOR is sent to neighbor prematurely for suppress fib enabled +case. below fix has be implemented. + keep a counter to track the routes installed in FIB.Increamnet + counter when bgp send route install to zebra, decreamnet counter when + fib install ack to received from zebra in bgp.when this count reaches + zero and route deferred count is 0 ad gr route syn pending is set, then + do further processing of sending EOR and zebra gr update complete. + This will send EOR as soon as last route fib install ack is received. + +Testing: +before: +2020:2025/08/19 21:23:53.786402 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s1.3 +2021:2025/08/19 21:23:53.786412 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv6 Unicast to swp1s0.3 +2022:2025/08/19 21:23:53.786415 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s0.3 +2511:2025/08/19 21:23:54.162310 BGP: [TN0HX-6G1RR] u1:s5 send UPDATE w/ attr: , origin ?, mp_nexthop ::(::), path 64900 56000 +2512:2025/08/19 21:23:54.162314 BGP: [H06SA-0JAPR] u1:s5 send MP_REACH for afi/safi IPv4/unicast +2513:2025/08/19 21:23:54.162316 BGP: [HVRWP-5R9NQ] u1:s5 send UPDATE 91.0.0.49/32 IPv4 unicast + +after: +4270:2025/08/22 17:41:41.631993 BGP: [HVRWP-5R9NQ] u2:s2 send UPDATE 2003:1::/125 IPv6 unicast +4271:2025/08/22 17:41:41.631998 BGP: [HVRWP-5R9NQ] u2:s2 send UPDATE 2003:7:2::/125 IPv6 unicast +4272:2025/08/22 17:41:41.632003 BGP: [WEV7K-2GAQ5] u2:s2 send UPDATE len 116 (max message len: 65535) numpfx 2 +4273:2025/08/22 17:41:41.632008 BGP: [JJ5V1-EZ0XX] u2:s2 swp1s1 send UPDATE w/ mp_nexthops 2003:0:1::1, fe80::1e34:daff:febe:4169 +4274:2025/08/22 17:41:41.632041 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv4 Unicast to swp1s1 +4275:2025/08/22 17:41:41.632054 BGP: [ZP3RE-J4Q8C] send End-of-RIB for IPv6 Unicast to swp1s1 + +Signed-off-by: Vijayalaxmi Basavaraj +Signed-off-by: Stepan Blyschak +--- + bgpd/bgp_fsm.c | 13 +++++ + bgpd/bgp_packet.c | 12 +++-- + bgpd/bgp_route.c | 123 +++++++++++++++++++++++++++++++++++++++------- + bgpd/bgp_route.h | 3 ++ + bgpd/bgp_zebra.c | 8 ++- + bgpd/bgpd.h | 11 +++-- + 6 files changed, 141 insertions(+), 29 deletions(-) + +diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c +index 540086c5e..eb8361e41 100644 +--- a/bgpd/bgp_fsm.c ++++ b/bgpd/bgp_fsm.c +@@ -847,6 +847,19 @@ static void bgp_graceful_deferral_timer_expire(struct event *thread) + safi = info->safi; + bgp = info->bgp; + ++ /* Check if graceful restart deferral completion is needed */ ++ if (BGP_SUPPRESS_FIB_ENABLED(bgp) && (bgp->gr_info[afi][safi].eor_required == bgp->gr_info[afi][safi].eor_received) && ++ !bgp->gr_info[afi][safi].gr_deferred && bgp->gr_route_sync_pending) { ++ if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) ++ zlog_debug("%s: Triggering GR deferral completion from timer expiry for %s", ++ bgp->name_pretty, get_afi_safi_str(afi, safi, false)); ++ bgp->gr_info[afi][safi].eor_required = 0; ++ bgp->gr_info[afi][safi].eor_received = 0; ++ XFREE(MTYPE_TMP, info); ++ bgp_process_gr_deferral_complete(bgp, afi, safi); ++ return; ++ } ++ + if (BGP_DEBUG(update, UPDATE_OUT)) + zlog_debug( + "afi %d, safi %d : graceful restart deferral timer expired", +diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c +index 13d610e1b..886adeffb 100644 +--- a/bgpd/bgp_packet.c ++++ b/bgpd/bgp_packet.c +@@ -2545,12 +2545,14 @@ static int bgp_update_receive(struct peer_connection *connection, + gr_info->eor_required, + "EOR RCV", + gr_info->eor_received); +- if (gr_info->t_select_deferral) { +- void *info = EVENT_ARG( +- gr_info->t_select_deferral); +- XFREE(MTYPE_TMP, info); ++ if (!BGP_SUPPRESS_FIB_ENABLED(peer->bgp)) { ++ if (gr_info->t_select_deferral) { ++ void *info = EVENT_ARG( ++ gr_info->t_select_deferral); ++ XFREE(MTYPE_TMP, info); ++ } ++ event_cancel(&gr_info->t_select_deferral); + } +- event_cancel(&gr_info->t_select_deferral); + gr_info->eor_required = 0; + gr_info->eor_received = 0; + /* Best path selection */ +diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c +index 6de269ea9..c743f56f1 100644 +--- a/bgpd/bgp_route.c ++++ b/bgpd/bgp_route.c +@@ -3930,6 +3930,7 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest, + * Ensure that on uninstall that the INSTALL_PENDING + * is no longer set + */ ++ bgp_dest_decrement_gr_fib_install_pending_count(dest); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + } + +@@ -4043,25 +4044,11 @@ void bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi) + + /* Send EOR message when all routes are processed */ + if (!bgp->gr_info[afi][safi].gr_deferred) { +- bgp_send_delayed_eor(bgp); +- /* Send route processing complete message to RIB */ +- bgp_zebra_update(bgp, afi, safi, +- ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE); +- bgp->gr_info[afi][safi].route_sync = true; +- +- /* If this instance is all done, check for GR completion overall */ +- FOREACH_AFI_SAFI_NSF (afi, safi) { +- if (bgp->gr_info[afi][safi].af_enabled && +- !bgp->gr_info[afi][safi].route_sync) { +- route_sync_pending = true; +- break; +- } +- } +- +- if (!route_sync_pending) { +- bgp->gr_route_sync_pending = false; +- bgp_update_gr_completion(); +- } ++ /* t_select_deferral will be NULL when either gr_route_fib_install_pending_cnt is 0 ++ * or deferral timer for fib install expires ++ */ ++ if (!BGP_SUPPRESS_FIB_ENABLED(bgp) || !bgp->gr_info[afi][safi].t_select_deferral) ++ bgp_process_gr_deferral_complete(bgp, afi, safi); + return; + } + +@@ -4079,6 +4066,104 @@ void bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi) + &bgp->gr_info[afi][safi].t_route_select); + } + ++void bgp_process_gr_deferral_complete(struct bgp *bgp, afi_t afi, safi_t safi) ++{ ++ bool route_sync_pending = false; ++ ++ bgp_send_delayed_eor(bgp); ++ /* Send route processing complete message to RIB */ ++ bgp_zebra_update(bgp, afi, safi, ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE); ++ bgp->gr_info[afi][safi].route_sync = true; ++ ++ /* If this instance is all done, check for GR completion overall */ ++ FOREACH_AFI_SAFI_NSF (afi, safi) { ++ if (bgp->gr_info[afi][safi].af_enabled && !bgp->gr_info[afi][safi].route_sync) { ++ route_sync_pending = true; ++ break; ++ } ++ } ++ ++ if (!route_sync_pending) { ++ bgp->gr_route_sync_pending = false; ++ bgp_update_gr_completion(); ++ } ++} ++ ++/* This function increments gr_route_fib_install_pending_cnt if needed based on BGP_NODE_FIB_INSTALL_PENDING flag */ ++void bgp_dest_increment_gr_fib_install_pending_count(struct bgp_dest *dest) ++{ ++ struct bgp_table *table = NULL; ++ struct bgp *bgp = NULL; ++ afi_t afi = AFI_UNSPEC; ++ safi_t safi = SAFI_UNSPEC; ++ ++ table = bgp_dest_table(dest); ++ if (!table) ++ return; ++ ++ bgp = table->bgp; ++ afi = table->afi; ++ safi = table->safi; ++ ++ if (BGP_SUPPRESS_FIB_ENABLED(bgp) && bgp->gr_route_sync_pending && ++ !CHECK_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING)) { ++ bgp->gr_info[afi][safi].gr_route_fib_install_pending_cnt++; ++ if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) ++ zlog_debug("%s: GR route FIB install count incremented to %u for %s (prefix: %pBD)", ++ bgp->name_pretty, ++ bgp->gr_info[afi][safi].gr_route_fib_install_pending_cnt, ++ get_afi_safi_str(afi, safi, false), dest); ++ } ++} ++ ++/* This function decrements gr_route_fib_install_pending_cnt if needed based on BGP_NODE_FIB_INSTALL_PENDING flag */ ++void bgp_dest_decrement_gr_fib_install_pending_count(struct bgp_dest *dest) ++{ ++ struct bgp_table *table = NULL; ++ struct bgp *bgp = NULL; ++ afi_t afi = 0; ++ safi_t safi = 0; ++ ++ table = bgp_dest_table(dest); ++ if (!table) ++ return; ++ ++ bgp = table->bgp; ++ afi = table->afi; ++ safi = table->safi; ++ ++ if (BGP_SUPPRESS_FIB_ENABLED(bgp) && bgp->gr_route_sync_pending && ++ CHECK_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING) && ++ bgp->gr_info[afi][safi].gr_route_fib_install_pending_cnt > 0) { ++ bgp->gr_info[afi][safi].gr_route_fib_install_pending_cnt--; ++ if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) ++ zlog_debug("%s: GR route FIB install count decremented to %u for %s (prefix: %pBD)", ++ bgp->name_pretty, ++ bgp->gr_info[afi][safi].gr_route_fib_install_pending_cnt, ++ get_afi_safi_str(afi, safi, false), dest); ++ } ++ ++ /* Check if graceful restart deferral completion is needed */ ++ if (!bgp->gr_info[afi][safi].gr_deferred && ++ !bgp->gr_info[afi][safi].gr_route_fib_install_pending_cnt && ++ bgp->gr_route_sync_pending) { ++ struct graceful_restart_info *gr_info = &(bgp->gr_info[afi][safi]); ++ ++ if (gr_info->t_select_deferral) { ++ void *info = EVENT_ARG(gr_info->t_select_deferral); ++ ++ XFREE(MTYPE_TMP, info); ++ } ++ event_cancel(&gr_info->t_select_deferral); ++ if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) ++ zlog_debug("%s: Triggering GR deferral completion from FIB notification for %s", ++ bgp->name_pretty, get_afi_safi_str(afi, safi, false)); ++ bgp_process_gr_deferral_complete(bgp, afi, safi); ++ } ++} ++ ++ ++ + static const char *subqueue2str(enum meta_queue_indexes index) + { + switch (index) { +diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h +index f3323b86a..fe486f12f 100644 +--- a/bgpd/bgp_route.h ++++ b/bgpd/bgp_route.h +@@ -975,6 +975,9 @@ extern int bgp_show_table_rd(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t + enum bgp_show_type type, void *output_arg, + uint16_t show_flags); + extern void bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi); ++extern void bgp_dest_increment_gr_fib_install_pending_count(struct bgp_dest *dest); ++extern void bgp_dest_decrement_gr_fib_install_pending_count(struct bgp_dest *dest); ++extern void bgp_process_gr_deferral_complete(struct bgp *bgp, afi_t afi, safi_t safi); + extern bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi, + uint8_t type, uint8_t stype, + struct attr *attr, struct bgp_dest *dest); +diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c +index c7773a676..045d0acf6 100644 +--- a/bgpd/bgp_zebra.c ++++ b/bgpd/bgp_zebra.c +@@ -1906,12 +1906,15 @@ void bgp_zebra_route_install(struct bgp_dest *dest, struct bgp_path_info *info, + * let's set the fact that we expect this route to be installed + */ + if (install) { +- if (BGP_SUPPRESS_FIB_ENABLED(bgp)) ++ if (BGP_SUPPRESS_FIB_ENABLED(bgp)) { ++ bgp_dest_increment_gr_fib_install_pending_count(dest); + SET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); ++ } + + if (bgp->main_zebra_update_hold && !is_evpn) + return; + } else { ++ bgp_dest_decrement_gr_fib_install_pending_count(dest); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + } + +@@ -2888,6 +2891,7 @@ static int bgp_zebra_route_notify_owner(int command, struct zclient *zclient, + case ZAPI_ROUTE_INSTALLED: + new_select = NULL; + /* Clear the flags so that route can be processed */ ++ bgp_dest_decrement_gr_fib_install_pending_count(dest); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + SET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); + if (BGP_DEBUG(zebra, ZEBRA)) +@@ -2924,6 +2928,7 @@ static int bgp_zebra_route_notify_owner(int command, struct zclient *zclient, + if (BGP_DEBUG(zebra, ZEBRA)) + zlog_debug("route: %pBD Failed to Install into Fib", + dest); ++ bgp_dest_decrement_gr_fib_install_pending_count(dest); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); + for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) { +@@ -2939,6 +2944,7 @@ static int bgp_zebra_route_notify_owner(int command, struct zclient *zclient, + zlog_debug("route: %pBD removed due to better admin won", + dest); + new_select = NULL; ++ bgp_dest_decrement_gr_fib_install_pending_count(dest); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING); + UNSET_FLAG(dest->flags, BGP_NODE_FIB_INSTALLED); + for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) { +diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h +index 5c674b1ee..f1669a340 100644 +--- a/bgpd/bgpd.h ++++ b/bgpd/bgpd.h +@@ -326,10 +326,11 @@ enum bgp_instance_type { + }; + + #define BGP_SEND_EOR(bgp, afi, safi) \ +- (!CHECK_FLAG(bgp->flags, BGP_FLAG_GR_DISABLE_EOR) \ +- && ((bgp->gr_info[afi][safi].t_select_deferral == NULL) \ +- || (bgp->gr_info[afi][safi].eor_required \ +- == bgp->gr_info[afi][safi].eor_received))) ++ (!CHECK_FLAG(bgp->flags, BGP_FLAG_GR_DISABLE_EOR) \ ++ && ((bgp->gr_info[afi][safi].t_select_deferral == NULL) \ ++ || (bgp->gr_info[afi][safi].eor_required \ ++ == bgp->gr_info[afi][safi].eor_received)) \ ++ && (!BGP_SUPPRESS_FIB_ENABLED(bgp) || !bgp->gr_info[afi][safi].t_select_deferral)) + + /* BGP GR Global ds */ + +@@ -346,6 +347,8 @@ struct graceful_restart_info { + struct event *t_select_deferral; + /* Routes Deferred */ + uint32_t gr_deferred; ++ /* Routes waiting for FIB install */ ++ uint32_t gr_route_fib_install_pending_cnt; + /* Best route select */ + struct event *t_route_select; + /* AFI, SAFI enabled */ +-- +2.39.5 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index a2ecd6a39d5..4d647366eb2 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -57,3 +57,7 @@ 0095-bgpd-Crash-due-to-usage-of-freed-up-evpn_overlay-att.patch 0096-bgpd-Notify-all-incoming-outgoing-on-peer-group-noti.patch 0097-mgmt-Note-that-a-DS-is-locked-or-not-in-output.patch +0098-SRv6-Add-support-for-multiple-SRv6-locators.patch +0099-zebra-Fix-SRv6-explicit-SID-allocation-to-use-the-provided-locator.patch +0100-bgpd-Allow-proper-shutdown-of-bgp-dynamic-peers.patch +0101-bgpd-send-EOR-during-GR-only-when-FIB-install-comple.patch diff --git a/src/sonic-genl-packet b/src/sonic-genl-packet index 829cc21762a..b6e6b1bfccb 160000 --- a/src/sonic-genl-packet +++ b/src/sonic-genl-packet @@ -1 +1 @@ -Subproject commit 829cc21762aa5a82b6b5b277da9111d7fc399fc8 +Subproject commit b6e6b1bfccb34ffd42a4fa4e3cc9454e94eedc4e diff --git a/src/sonic-gnmi b/src/sonic-gnmi index f429f10df8f..803f6247ebb 160000 --- a/src/sonic-gnmi +++ b/src/sonic-gnmi @@ -1 +1 @@ -Subproject commit f429f10df8f49df0d4fecbb61d093ad89bfe70de +Subproject commit 803f6247ebb95947253e77692eaaa9639ae70368 diff --git a/src/sonic-host-services b/src/sonic-host-services index abb627d5fc7..2826255cddc 160000 --- a/src/sonic-host-services +++ b/src/sonic-host-services @@ -1 +1 @@ -Subproject commit abb627d5fc73eca882996efc855ecc1e306ff3af +Subproject commit 2826255cddcd7fc2f56c137ab94eeb35b560e98a diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index e7fea60c1f3..c92aa5cd383 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit e7fea60c1f304a793c20b7f355ab1b05d06d0763 +Subproject commit c92aa5cd383dfab64f6a26596e1a5c1add3fa6b1 diff --git a/src/sonic-mgmt-common b/src/sonic-mgmt-common index 5b933684158..1e80bfad83e 160000 --- a/src/sonic-mgmt-common +++ b/src/sonic-mgmt-common @@ -1 +1 @@ -Subproject commit 5b9336841589df4a0c9c5af78f0b489d915bcb49 +Subproject commit 1e80bfad83ea6e2508a8ebc01c57554b3be30472 diff --git a/src/sonic-mgmt-framework b/src/sonic-mgmt-framework index 5b9c7a1d714..79619b682c9 160000 --- a/src/sonic-mgmt-framework +++ b/src/sonic-mgmt-framework @@ -1 +1 @@ -Subproject commit 5b9c7a1d71422d0311b5c3d52760836433d3e8f8 +Subproject commit 79619b682c939f4936e91389d04ec2f09a92cf57 diff --git a/src/sonic-nettools/debian/rules b/src/sonic-nettools/debian/rules index cbe925d7587..ccb48674b5d 100755 --- a/src/sonic-nettools/debian/rules +++ b/src/sonic-nettools/debian/rules @@ -1,3 +1,8 @@ #!/usr/bin/make -f %: dh $@ + +override_dh_auto_install: + # do nothing + : + diff --git a/src/sonic-platform-common b/src/sonic-platform-common index 6ac56928a6e..43001df877b 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit 6ac56928a6e811108b0f5c7cfcf7534914dae6c4 +Subproject commit 43001df877b830b968f2dc383c15b951aab05847 diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 8e2353f0285..9020d386157 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 8e2353f02858178dd7def12e9f66faf69d0318d1 +Subproject commit 9020d38615722f55b44a52ca8f617a4756e0fa14 diff --git a/src/sonic-platform-pde b/src/sonic-platform-pde index 8b44c3c537b..6e36a871aa4 160000 --- a/src/sonic-platform-pde +++ b/src/sonic-platform-pde @@ -1 +1 @@ -Subproject commit 8b44c3c537b476fc14ef2f057904e4d74d27a188 +Subproject commit 6e36a871aa4c6332aeab37e48c9c2a17b40e7f3b diff --git a/src/sonic-py-common/sonic_py_common/device_info.py b/src/sonic-py-common/sonic_py_common/device_info.py index 89848e90274..dd9891738b1 100644 --- a/src/sonic-py-common/sonic_py_common/device_info.py +++ b/src/sonic-py-common/sonic_py_common/device_info.py @@ -21,6 +21,8 @@ # Port configuration file names PORT_CONFIG_FILE = "port_config.ini" PLATFORM_JSON_FILE = "platform.json" +BMC_DATA_FILE = 'bmc.json' +BMC_BUILD_CONFIG_FILE = '/etc/sonic/bmc_config.json' # Fabric port configuration file names FABRIC_MONITOR_CONFIG_FILE = "fabric_monitor_config.json" @@ -979,6 +981,35 @@ def is_warm_restart_enabled(container_name): return wr_enable_state +def get_bmc_data(): + json_file = None + try: + platform_path = get_path_to_platform_dir() + json_file = os.path.join(platform_path, BMC_DATA_FILE) + if os.path.exists(json_file): + with open(json_file, "r") as f: + return json.load(f) + return None + except Exception: + return None + + +def get_bmc_build_config(): + """ + Get BMC build-time configuration + + Returns: + A dictionary containing the BMC build configuration, or empty dict if not available + """ + try: + if os.path.exists(BMC_BUILD_CONFIG_FILE): + with open(BMC_BUILD_CONFIG_FILE, "r") as f: + return json.load(f) + return None + except Exception: + return None + + # Check if System fast reboot is enabled. def is_fast_reboot_enabled(): state_db = SonicV2Connector(host='127.0.0.1') diff --git a/src/sonic-py-common/sonic_py_common/multi_asic.py b/src/sonic-py-common/sonic_py_common/multi_asic.py index dcba7c3d51a..24552172e32 100644 --- a/src/sonic-py-common/sonic_py_common/multi_asic.py +++ b/src/sonic-py-common/sonic_py_common/multi_asic.py @@ -152,6 +152,21 @@ def get_asic_device_id(asic_id): return None +def get_asic_sub_role(asic_id): + asic_conf_file_path = get_asic_conf_file_path() + if asic_conf_file_path is None: + return None + + with open(asic_conf_file_path) as asic_conf_file: + for line in asic_conf_file: + tokens = line.split('=') + if len(tokens) < 2: + continue + if tokens[0] == f"SUB_ROLE_ASIC_{asic_id}": + return tokens[1].strip() + + return None + def get_current_namespace(pid=None): """ This API returns the network namespace in which it is diff --git a/src/sonic-py-common/sonic_py_common/security_cipher.py b/src/sonic-py-common/sonic_py_common/security_cipher.py index d48d29cf7fd..1e0385cd341 100644 --- a/src/sonic-py-common/sonic_py_common/security_cipher.py +++ b/src/sonic-py-common/sonic_py_common/security_cipher.py @@ -2,7 +2,7 @@ A common module for handling the encryption and decryption of the feature passkey. It also takes -care of storing the secure cipher at root +care of storing the secure cipher at root protected file system ''' @@ -12,8 +12,11 @@ import syslog import os import base64 +import json from swsscommon.swsscommon import ConfigDBConnector +CIPHER_PASS_FILE = "/etc/cipher_pass.json" + class master_key_mgr: _instance = None _lock = threading.Lock() @@ -28,69 +31,60 @@ def __new__(cls): def __init__(self): if not self._initialized: - self._file_path = "/etc/cipher_pass" + self._file_path = CIPHER_PASS_FILE self._config_db = ConfigDBConnector() self._config_db.connect() - # Note: Kept 1st index NA intentionally to map it with the cipher_pass file - # contents. The file has a comment at the 1st row / line - self._feature_list = ["NA", "TACPLUS", "RADIUS", "LDAP"] - if not os.path.exists(self._file_path): - with open(self._file_path, 'w') as file: - file.writelines("#Auto generated file for storing the encryption passwords\n") - for feature in self._feature_list[1:]: # Skip the first "NA" entry - file.write(f"{feature} : \n") - os.chmod(self._file_path, 0o640) self._initialized = True - # Write cipher_pass file - def __write_passwd_file(self, feature_type, passwd): - if feature_type == 'NA': - syslog.syslog(syslog.LOG_ERR, "__write_passwd_file: Invalid feature type: {}".format(feature_type)) - return - - if feature_type in self._feature_list: - try: - with open(self._file_path, 'r') as file: - lines = file.readlines() - # Update the password for given feature - lines[self._feature_list.index(feature_type)] = feature_type + ' : ' + passwd + '\n' - - os.chmod(self._file_path, 0o640) - with open(self._file_path, 'w') as file: - file.writelines(lines) - os.chmod(self._file_path, 0o640) - except FileNotFoundError: - syslog.syslog(syslog.LOG_ERR, "__write_passwd_file: File {} no found".format(self._file_path)) - except PermissionError: - syslog.syslog(syslog.LOG_ERR, "__write_passwd_file: Read permission denied: {}".format(self._file_path)) - - - # Read cipher pass file and return the feature specifc - # password - def __read_passwd_file(self, feature_type): - passwd = None - if feature_type == 'NA': - syslog.syslog(syslog.LOG_ERR, "__read_passwd_file: Invalid feature type: {}".format(feature_type)) - return passwd - - if feature_type in self._feature_list: - try: - os.chmod(self._file_path, 0o644) - with open(self._file_path, "r") as file: - lines = file.readlines() - for line in lines: - if feature_type in line: - passwd = line.split(' : ')[1] - os.chmod(self._file_path, 0o640) - except FileNotFoundError: - syslog.syslog(syslog.LOG_ERR, "__read_passwd_file: File {} no found".format(self._file_path)) - except PermissionError: - syslog.syslog(syslog.LOG_ERR, "__read_passwd_file: Read permission denied: {}".format(self._file_path)) - - return passwd - - - def encrypt_passkey(self, feature_type, secret: str, passwd: str) -> str: + def _load_registry(self): + """ + Read cipher_pass.json file + """ + if not os.path.exists(CIPHER_PASS_FILE): + return {} + try: + with open(CIPHER_PASS_FILE, 'r') as f: + return json.load(f) + + except json.JSONDecodeError as e: + syslog.syslog( + syslog.LOG_ERR, + "_load_registry: Invalid JSON in {}: {}".format(CIPHER_PASS_FILE, e)) + return {} + except PermissionError as e: + syslog.syslog( + syslog.LOG_ERR, + "_load_registry: Permission denied reading {}: {}".format(CIPHER_PASS_FILE, e)) + return {} + except OSError as e: + syslog.syslog( + syslog.LOG_ERR, + "_load_registry: OS error reading {}: {}".format(CIPHER_PASS_FILE, e)) + return {} + + def _save_registry(self, data): + """ + Write cipher_pass.json file + """ + try: + with open(CIPHER_PASS_FILE, 'w') as f: + json.dump(data, f, indent=2) + os.chmod(self._file_path, 0o600) + + except PermissionError as e: + syslog.syslog( + syslog.LOG_ERR, + "_save_registry: Permission denied writing {}: {}".format(self._file_path, e)) + except OSError as e: + syslog.syslog( + syslog.LOG_ERR, + "_save_registry: OS error writing {}: {}".format(self._file_path, e)) + except TypeError as e: + syslog.syslog( + syslog.LOG_ERR, + "_save_registry: Invalid data format, not JSON serializable: {}".format(e)) + + def _encrypt_passkey(self, feature_type, secret: str, passwd: str) -> str: """ Encrypts the plaintext using OpenSSL (AES-128-CBC, with salt and pbkdf2, no base64) and returns the result as a hex string. @@ -109,24 +103,16 @@ def encrypt_passkey(self, feature_type, secret: str, passwd: str) -> str: ) encrypted_bytes = result.stdout b64_encoded = base64.b64encode(encrypted_bytes).decode() - self.__write_passwd_file(feature_type, passwd) - return b64_encoded + return b64_encoded except subprocess.CalledProcessError as e: - syslog.syslog(syslog.LOG_ERR, "encrypt_passkey: {} Encryption failed with ERR: {}".format((e))) + syslog.syslog(syslog.LOG_ERR, "_encrypt_passkey: {} Encryption failed with ERR: {}".format(e)) return "" - - def decrypt_passkey(self, feature_type, b64_encoded: str) -> str: + def _decrypt_passkey(self, feature_type, b64_encoded: str, passwd: str) -> str: """ Decrypts a hex-encoded encrypted string using OpenSSL (AES-128-CBC, with salt and pbkdf2, no base64). Returns the decrypted plaintext. """ - - passwd = self.__read_passwd_file(feature_type).strip() - if passwd is None: - syslog.syslog(syslog.LOG_ERR, "decrypt_passkey: Enpty password for {} feature type".format(feature_type)) - return "" - try: encrypted_bytes = base64.b64decode(b64_encoded) @@ -146,39 +132,122 @@ def decrypt_passkey(self, feature_type, b64_encoded: str) -> str: syslog.syslog(syslog.LOG_ERR, "decrypt_passkey: Decryption failed with an ERR: {}".format(e.stderr.decode())) return "" + def register(self, feature_type, table_info): + """ + Register a table_info for a feature type. + Feature types: TACPLUS, RADIUS, LDAP etc. + """ + data = self._load_registry() + if feature_type not in data: + data[feature_type] = {"table_info": [], "password": None} + if table_info not in data[feature_type]["table_info"]: + data[feature_type]["table_info"].append(table_info) + self._save_registry(data) + syslog.syslog(syslog.LOG_INFO, "register: table_info {} attached to {} feature".format(table_info, feature_type)) + + def deregister(self, feature_type, table_info): + """ + Deregister (remove) a table_info string (like "TACPLUS|global") for a feature type. + If, after removal, there are no more table_info entries for that feature, + remove the respective password as well. + """ + data = self._load_registry() + if feature_type in data: + if table_info in data[feature_type]["table_info"]: + data[feature_type]["table_info"].remove(table_info) + if not data[feature_type]["table_info"]: + # No more table_info left; remove password as well + data[feature_type]["password"] = None + syslog.syslog(syslog.LOG_INFO, "deregister: No more table_info for feature {}. Password also removed.".format(feature_type)) + self._save_registry(data) + syslog.syslog(syslog.LOG_INFO, "deregister: table_info {} removed from feature {}".format(table_info, feature_type)) + else: + syslog.syslog(syslog.LOG_ERR, "deregister: table_info {} not found for feature {}".format(table_info, feature_type)) + else: + syslog.syslog(syslog.LOG_ERR, "deregister: No table_info registered for {}".format(feature_type)) + + def set_feature_password(self, feature_type, password): + """ + Set a new password for a feature type. + It will not update if already exist. + """ + data = self._load_registry() + if feature_type not in data: + data[feature_type] = {"table_info": [], "password": None} + if data[feature_type]["password"] is not None: + syslog.syslog(syslog.LOG_INFO, "set_feature_password: Password already set for feature {}, not updating the new password.".format(feature_type)) + syslog.syslog(syslog.LOG_INFO, "set_feature_password: Note: Make use of rotate_feature_passwd() method for updating the existing pass") + return + data[feature_type]["password"] = password + self._save_registry(data) + syslog.syslog(syslog.LOG_INFO, "set_feature_password: Password set for feature {}".format(feature_type)) - # Check if the encryption is enabled - def is_key_encrypt_enabled(self, table, entry): - key = 'key_encrypt' - data = self._config_db.get_entry(table, entry) - if data: - if key in data: - return data[key] - return False - + def rotate_feature_passwd(self, feature_type, new_password): + """ + For each registered table_info, extract encrypted passkey, decrypt, re-encrypt with new password, and update. + """ + data = self._load_registry() + if feature_type not in data: + syslog.syslog(syslog.LOG_ERR, "No table_info registered for {} Feature".format(feature_type)) + return - def del_cipher_pass(self, feature_type): + old_password = data[feature_type]["password"] + table_infos = data[feature_type].get("table_info", []) + for table_info in table_infos: + table, entry = table_info.split("|") + db_entry = self._config_db.get_entry(table, entry) + encrypted_passkey = db_entry.get("passkey") + #Rotate only if valid passkey is present and 'key_encrypt' flag is True + if encrypted_passkey and str(db_entry.get("key_encrypt")).lower() == 'true': + # Decrypt with old password + plain_passkey = self._decrypt_passkey(feature_type, encrypted_passkey, old_password) + # Re-encrypt with new password + new_encrypted_passkey = self._encrypt_passkey(feature_type, plain_passkey, new_password) + # Update DB + db_entry["passkey"] = new_encrypted_passkey + self._config_db.set_entry(table, entry, db_entry) + syslog.syslog(syslog.LOG_INFO, "rotate_feature_passwd: Updated passkey for {}".format(table_info)) + else: + syslog.syslog(syslog.LOG_WARNING, "Either no passkey found or key_encrypt flag is not set to True for {}".format(table_info)) + + # Update stored password + data[feature_type]["password"] = new_password + self._save_registry(data) + syslog.syslog(syslog.LOG_INFO, "rotate_feature_passwd: Password for {} Feature has been updated.".format(feature_type)) + + def encrypt_passkey(self, feature_type, secret: str) -> str: """ - Removes only the password for the given feature_type while keeping the file structure intact. + Encrypts the plaintext and returns the result as a hex string. """ - try: - os.chmod(self._file_path, 0o640) - with open(self._file_path, "r") as file: - lines = file.readlines() + # Retrieve password from cipher_pass registry + data = self._load_registry() + passwd = None + if feature_type in data: + passwd = data[feature_type].get("password") + if not passwd: + raise ValueError(f"encrypt_passkey: No password set for feature {feature_type}") - updated_lines = [] - for line in lines: - if line.strip().startswith(f"{feature_type} :"): - updated_lines.append(f"{feature_type} : \n") # Remove password but keep format - else: - updated_lines.append(line) + return self._encrypt_passkey(feature_type, secret, passwd) - with open(self._file_path, 'w') as file: - file.writelines(updated_lines) - os.chmod(self._file_path, 0o640) + def decrypt_passkey(self, feature_type, b64_encoded: str) -> str: + """ + Decrypts a hex-encoded encrypted string using OpenSSL (AES-128-CBC, with salt and pbkdf2, no base64). + Returns the decrypted plaintext. + """ + # Retrieve password from cipher_pass registry + data = self._load_registry() + passwd = None + if feature_type in data: + passwd = data[feature_type].get("password") + if not passwd: + raise ValueError(f"decrypt_passkey: No password set for feature {feature_type}") - syslog.syslog(syslog.LOG_INFO, "del_cipher_pass: Password for {} has been removed".format((feature_type))) + return self._decrypt_passkey(feature_type, b64_encoded, passwd) - except Exception as e: - syslog.syslog(syslog.LOG_ERR, "del_cipher_pass: {} Exception occurred: {}".format((e))) + # Check if the encryption is enabled + def is_key_encrypt_enabled(self, table, entry): + data = self._config_db.get_entry(table, entry) + if data and 'key_encrypt' in data: + return data['key_encrypt'].lower() == 'true' + return False diff --git a/src/sonic-py-common/tests/multi_asic_test.py b/src/sonic-py-common/tests/multi_asic_test.py index e67c8f03c1b..179d9e42d15 100644 --- a/src/sonic-py-common/tests/multi_asic_test.py +++ b/src/sonic-py-common/tests/multi_asic_test.py @@ -1,6 +1,25 @@ +from unittest import mock from sonic_py_common import multi_asic class TestMultiAsic: def test_get_container_name_from_asic_id(self): assert multi_asic.get_container_name_from_asic_id('database', 0) == 'database0' + + def test_get_asic_sub_role(self): + # Mock asic.conf file + import textwrap + mock_asic_conf_content = textwrap.dedent(""" + NUM_ASIC=3 + DEV_ID_ASIC_0=01:00.0 + DEV_ID_ASIC_1=02:00.0 + DEV_ID_ASIC_2=03:00.0 + SUB_ROLE_ASIC_0=FrontEnd + SUB_ROLE_ASIC_1=BackEnd + """) + + with mock.patch('sonic_py_common.multi_asic.get_asic_conf_file_path', return_value='/mock/path/asic.conf'): + with mock.patch('builtins.open', mock.mock_open(read_data=mock_asic_conf_content)): + assert multi_asic.get_asic_sub_role(0) == 'FrontEnd' + assert multi_asic.get_asic_sub_role(1) == 'BackEnd' + assert multi_asic.get_asic_sub_role(2) == None diff --git a/src/sonic-py-common/tests/test_security_cipher.py b/src/sonic-py-common/tests/test_security_cipher.py index 792667c7eda..f43e22150ea 100644 --- a/src/sonic-py-common/tests/test_security_cipher.py +++ b/src/sonic-py-common/tests/test_security_cipher.py @@ -1,12 +1,14 @@ import sys +import json +import base64 +import pytest if sys.version_info.major == 3: from unittest import mock else: import mock -import pytest -from sonic_py_common.security_cipher import master_key_mgr +from sonic_py_common.security_cipher import master_key_mgr from .mock_swsscommon import ConfigDBConnector # TODO: Remove this if/else block once we no longer support Python 2 @@ -15,58 +17,141 @@ else: BUILTINS = "__builtin__" -DEFAULT_FILE = [ - "#Auto generated file for storing the encryption passwords", - "TACPLUS : ", - "RADIUS : ", - "LDAP :" - ] - -UPDATED_FILE = [ - "#Auto generated file for storing the encryption passwords", - "TACPLUS : ", - "RADIUS : TEST2", - "LDAP :" - ] +DEFAULT_JSON = { + "TACPLUS": {"table_info": [], "password": None}, + "RADIUS": {"table_info": [], "password": None}, + "LDAP": {"table_info": [], "password": None} +} +UPDATED_JSON = { + "TACPLUS": {"table_info": [], "password": None}, + "RADIUS": {"table_info": [], "password": "TEST2"}, + "LDAP": {"table_info": [], "password": None} +} class TestSecurityCipher(object): - def test_passkey_encryption(self): + def setup_method(self): + # Reset singleton for isolation + master_key_mgr._instance = None + + def test_set_feature_password_sets_password(self): + with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector), \ + mock.patch("os.chmod"), \ + mock.patch("{}.open".format(BUILTINS), mock.mock_open(read_data=json.dumps(DEFAULT_JSON))), \ + mock.patch("os.path.exists", return_value=True): + temp = master_key_mgr() + # Patch _save_registry to check written value + with mock.patch.object(temp, "_save_registry") as mock_save: + temp.set_feature_password("RADIUS", "testpw") + args = mock_save.call_args[0][0] + assert args["RADIUS"]["password"] == "testpw" + + def test_set_feature_password_does_not_overwrite_existing(self): + json_data = UPDATED_JSON.copy() with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector), \ - mock.patch("os.chmod") as mock_chmod, \ - mock.patch("{}.open".format(BUILTINS),mock.mock_open()) as mock_file: + mock.patch("os.chmod"), \ + mock.patch("{}.open".format(BUILTINS), mock.mock_open(read_data=json.dumps(json_data))), \ + mock.patch("os.path.exists", return_value=True): temp = master_key_mgr() + with mock.patch.object(temp, "_save_registry") as mock_save: + temp.set_feature_password("RADIUS", "should_not_overwrite") + mock_save.assert_not_called() - # Use patch to replace the built-in 'open' function with a mock - with mock.patch("{}.open".format(BUILTINS), mock.mock_open()) as mock_file, \ - mock.patch("os.chmod") as mock_chmod: - mock_fd = mock.MagicMock() - mock_fd.readlines = mock.MagicMock(return_value=DEFAULT_FILE) - mock_file.return_value.__enter__.return_value = mock_fd - encrypt = temp.encrypt_passkey("TACPLUS", "passkey1", "TEST1") - assert encrypt != "passkey1" + def test_register_table_info(self): + with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector), \ + mock.patch("os.chmod"), \ + mock.patch("{}.open".format(BUILTINS), mock.mock_open(read_data=json.dumps(DEFAULT_JSON))), \ + mock.patch("os.path.exists", return_value=True): + temp = master_key_mgr() + with mock.patch.object(temp, "_save_registry") as mock_save: + temp.register("RADIUS", "RADIUS|global") + args = mock_save.call_args[0][0] + assert "RADIUS|global" in args["RADIUS"]["table_info"] - def test_passkey_decryption(self): + def test_deregister_table_info(self): + # Use an in-memory registry that can be mutated + registry = { + "RADIUS": {"table_info": ["RADIUS|global", "RADIUS|backup"], "password": "radius_secret"} + } with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector), \ - mock.patch("os.chmod") as mock_chmod, \ - mock.patch("{}.open".format(BUILTINS), mock.mock_open()) as mock_file: + mock.patch("os.chmod"), \ + mock.patch("{}.open".format(BUILTINS), mock.mock_open()), \ + mock.patch("os.path.exists", return_value=True): + temp = master_key_mgr() + # Patch _load_registry to always return current registry + temp._load_registry = mock.Mock(side_effect=lambda: registry.copy()) + # Patch _save_registry to update our in-memory registry + def save_registry(data): + registry.clear() + registry.update(json.loads(json.dumps(data))) # Deep copy + temp._save_registry = mock.Mock(side_effect=save_registry) + + temp.deregister("RADIUS", "RADIUS|global") + assert registry["RADIUS"]["table_info"] == ["RADIUS|backup"] + assert registry["RADIUS"]["password"] == "radius_secret" + + temp.deregister("RADIUS", "RADIUS|backup") + assert registry["RADIUS"]["table_info"] == [] + assert registry["RADIUS"]["password"] is None + + def test_encrypt_and_decrypt_passkey(self): + # Use a known password and mock openssl subprocess + json_data = { + "RADIUS": {"table_info": [], "password": "secretpw"} + } + with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector), \ + mock.patch("os.chmod"), \ + mock.patch("{}.open".format(BUILTINS), mock.mock_open(read_data=json.dumps(json_data))), \ + mock.patch("os.path.exists", return_value=True): + temp = master_key_mgr() + # Mock subprocess for encryption + fake_cipher = b"\x01\x02\x03" + with mock.patch("subprocess.run") as mock_subproc: + mock_subproc.return_value = mock.Mock(stdout=fake_cipher) + encrypted = temp.encrypt_passkey("RADIUS", "plaintext") + assert base64.b64decode(encrypted) == fake_cipher + + # Mock subprocess for decryption + with mock.patch("subprocess.run") as mock_subproc: + mock_subproc.return_value = mock.Mock(stdout=b"plaintext") + decrypted = temp.decrypt_passkey("RADIUS", base64.b64encode(fake_cipher).decode()) + assert decrypted == "plaintext" + + def test_encrypt_raises_if_no_password(self): + with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector), \ + mock.patch("os.chmod"), \ + mock.patch("{}.open".format(BUILTINS), mock.mock_open(read_data=json.dumps(DEFAULT_JSON))), \ + mock.patch("os.path.exists", return_value=True): + temp = master_key_mgr() + with pytest.raises(ValueError): + temp.encrypt_passkey("RADIUS", "plaintext") + + def test_is_key_encrypt_enabled(self): + with mock.patch("sonic_py_common.security_cipher.ConfigDBConnector", new=ConfigDBConnector): + temp = master_key_mgr() + temp._config_db.get_entry = mock.Mock() + + # Test when key_encrypt is 'True' + temp._config_db.get_entry.return_value = {"key_encrypt": "True"} + assert temp.is_key_encrypt_enabled("TACPLUS", "global") is True + + # Test when key_encrypt is 'true' + temp._config_db.get_entry.return_value = {"key_encrypt": "true"} + assert temp.is_key_encrypt_enabled("TACPLUS", "global") is True - # Use patch to replace the built-in 'open' function with a mock - with mock.patch("{}.open".format(BUILTINS), mock.mock_open()) as mock_file, \ - mock.patch("os.chmod") as mock_chmod: - mock_fd = mock.MagicMock() - mock_fd.readlines = mock.MagicMock(return_value=DEFAULT_FILE) - mock_file.return_value.__enter__.return_value = mock_fd - encrypt = temp.encrypt_passkey("RADIUS", "passkey2", "TEST2") + # Test when key_encrypt is 'False' + temp._config_db.get_entry.return_value = {"key_encrypt": "False"} + assert temp.is_key_encrypt_enabled("TACPLUS", "global") is False - # Use patch to replace the built-in 'open' function with a mock - with mock.patch("{}.open".format(BUILTINS), mock.mock_open()) as mock_file, \ - mock.patch("os.chmod") as mock_chmod: - mock_fd = mock.MagicMock() - mock_fd.readlines = mock.MagicMock(return_value=UPDATED_FILE) - mock_file.return_value.__enter__.return_value = mock_fd - decrypt = temp.decrypt_passkey("RADIUS", encrypt) - assert decrypt == "passkey2" + # Test when key_encrypt is missing + temp._config_db.get_entry.return_value = {"foo": "bar"} + assert temp.is_key_encrypt_enabled("TACPLUS", "global") is False + # Test when entry is empty + temp._config_db.get_entry.return_value = {} + assert temp.is_key_encrypt_enabled("TACPLUS", "global") is False + # Test when entry is None + temp._config_db.get_entry.return_value = None + assert temp.is_key_encrypt_enabled("TACPLUS", "global") is False diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index 2107e8aa6dc..2502c89d58a 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit 2107e8aa6dc16afed7b71626b031ab987970e22f +Subproject commit 2502c89d58ac0cfdbd3bc2a0fdcf88edeb8f4c31 diff --git a/src/sonic-restapi b/src/sonic-restapi index f962d994091..1031be68ebc 160000 --- a/src/sonic-restapi +++ b/src/sonic-restapi @@ -1 +1 @@ -Subproject commit f962d9940918c212fd6ebd690e235aec290a4aec +Subproject commit 1031be68ebc1750d9e6f50617c196ec0185bd6a8 diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 52b91028767..bd820a06f23 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 52b910287674ed6e6040902968b8e3ddd541de61 +Subproject commit bd820a06f23ef08aaebb3f6b6a31c81eb73c92f6 diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index 6dac47cb255..3f0600e0e4f 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit 6dac47cb255bb191c8776f253bc7bf219ef9d987 +Subproject commit 3f0600e0e4f98bb986d11a0b477e701fe693711f diff --git a/src/sonic-stp b/src/sonic-stp index 6be37214e6b..586d842c6f9 160000 --- a/src/sonic-stp +++ b/src/sonic-stp @@ -1 +1 @@ -Subproject commit 6be37214e6b2f11aeb066fb7bdb8284af78075e4 +Subproject commit 586d842c6f982411d01bbbd5203e848213298616 diff --git a/src/sonic-supervisord-utilities-rs/Makefile b/src/sonic-supervisord-utilities-rs/Makefile index 94a343919ce..8b398c0e352 100644 --- a/src/sonic-supervisord-utilities-rs/Makefile +++ b/src/sonic-supervisord-utilities-rs/Makefile @@ -24,7 +24,7 @@ clean: # Install the binary install: build - cargo install --path . + cargo install --locked --path . # Run linting lint: diff --git a/src/sonic-supervisord-utilities-rs/debian/rules b/src/sonic-supervisord-utilities-rs/debian/rules index eb0857cfddd..5f7e8dfd743 100755 --- a/src/sonic-supervisord-utilities-rs/debian/rules +++ b/src/sonic-supervisord-utilities-rs/debian/rules @@ -9,9 +9,17 @@ override_dh_auto_build: cargo build --release --all +override_dh_auto_install: + # do nothing + : + override_dh_auto_clean: cargo clean --release +override_dh_auto_install: + # do nothing + : + override_dh_auto_test: # do nothing - : \ No newline at end of file + : diff --git a/src/sonic-supervisord-utilities/tests/test_listener.py b/src/sonic-supervisord-utilities/tests/test_listener.py index 5abbb0bb5be..a306d602e84 100644 --- a/src/sonic-supervisord-utilities/tests/test_listener.py +++ b/src/sonic-supervisord-utilities/tests/test_listener.py @@ -8,12 +8,24 @@ import signal from contextlib import contextmanager from unittest import mock -from imp import load_source from swsscommon import swsscommon from mock import Mock, MagicMock, patch +def load_source(modname, filename): + import importlib.util + import importlib.machinery + loader = importlib.machinery.SourceFileLoader(modname, filename) + spec = importlib.util.spec_from_file_location(modname, filename, loader=loader) + module = importlib.util.module_from_spec(spec) + # The module is always executed and not cached in sys.modules. + # Uncomment the following line to cache the module. + sys.modules[module.__name__] = module + loader.exec_module(module) + return module + + swsscommon.RestartWaiter = MagicMock() test_path = os.path.dirname(os.path.abspath(__file__)) diff --git a/src/sonic-swss b/src/sonic-swss index 9681bd0deb8..dbe0768ef15 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 9681bd0deb8ec849d6c07bc8454e70081e8944af +Subproject commit dbe0768ef159d76a22ba14c76be5affa781319e6 diff --git a/src/sonic-swss-common b/src/sonic-swss-common index de60fd3186b..eaaa592b339 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit de60fd3186ba84154e07cabd9f33e163a08aeb22 +Subproject commit eaaa592b339765e4c1367f027d36d9e5a8a9db79 diff --git a/src/sonic-swss.patch/0001-build-use-relative-path-when-building-cargo-dependen.patch b/src/sonic-swss.patch/0001-build-use-relative-path-when-building-cargo-dependen.patch new file mode 100644 index 00000000000..f4390fc92e1 --- /dev/null +++ b/src/sonic-swss.patch/0001-build-use-relative-path-when-building-cargo-dependen.patch @@ -0,0 +1,23 @@ +From 53a4bf4324752b7e9e246a7f8a53db189cc938d0 Mon Sep 17 00:00:00 2001 +From: Liu Shilong +Date: Wed, 10 Dec 2025 13:27:33 +0800 +Subject: [PATCH] [build] use relative path when building cargo dependency + swss-common. + +--- + Cargo.toml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index a2db894e..7484110a 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -64,7 +64,7 @@ itertools = "0.13" + uuid = { version = "1.15", features = ["v4"] } + + # SONiC specific dependencies +-swss-common = { git = "https://github.com/sonic-net/sonic-swss-common.git", branch = "master" } ++swss-common = { path = "../sonic-swss-common/crates/swss-common" } + + # Development dependencies + tempfile = "3.12" diff --git a/src/sonic-swss.patch/0002-Remove-lock-option-when-cargo-build.patch b/src/sonic-swss.patch/0002-Remove-lock-option-when-cargo-build.patch new file mode 100644 index 00000000000..aa769af55ef --- /dev/null +++ b/src/sonic-swss.patch/0002-Remove-lock-option-when-cargo-build.patch @@ -0,0 +1,22 @@ +From ce4922401e30fa0cf54c5ab239850b7ec22e4f38 Mon Sep 17 00:00:00 2001 +From: Liu Shilong +Date: Wed, 10 Dec 2025 17:56:29 +0800 +Subject: [PATCH] Remove --lock option when cargo build. + +--- + debian/rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/debian/rules b/debian/rules +index aa94a614..88cc1cd9 100755 +--- a/debian/rules ++++ b/debian/rules +@@ -42,7 +42,7 @@ override_dh_auto_configure: + override_dh_auto_build: + dh_auto_build + # Build and test countersyncd Rust project +- cargo build --release --locked ++ cargo build --release + + override_dh_auto_install: + dh_auto_install --destdir=debian/swss diff --git a/src/sonic-swss.patch/series b/src/sonic-swss.patch/series new file mode 100644 index 00000000000..7f5990b5356 --- /dev/null +++ b/src/sonic-swss.patch/series @@ -0,0 +1,2 @@ +0001-build-use-relative-path-when-building-cargo-dependen.patch +0002-Remove-lock-option-when-cargo-build.patch diff --git a/src/sonic-utilities b/src/sonic-utilities index 4f7a0e0419b..137d594bdf2 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 4f7a0e0419bca4ace1547f4956e9590553b1e519 +Subproject commit 137d594bdf2be4a4ff9c675f67377fd650178a9b diff --git a/src/sonic-yang-mgmt/sonic_yang_ext.py b/src/sonic-yang-mgmt/sonic_yang_ext.py index afbb303f6cd..30de8c32c75 100644 --- a/src/sonic-yang-mgmt/sonic_yang_ext.py +++ b/src/sonic-yang-mgmt/sonic_yang_ext.py @@ -35,9 +35,6 @@ ('BUFFER_PORT_INGRESS_PROFILE_LIST', 'profile_list'): ',', ('PORT', 'adv_speeds'): ',', ('PORT', 'adv_interface_types'): ',', - ('VNET_ROUTE_TUNNEL', 'endpoint'): ',', - ('VNET_ROUTE_TUNNEL', 'mac_address'): ',', - ('VNET_ROUTE_TUNNEL', 'vni'): ',', } """ diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index b39046037dc..4392c8874e3 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1766,13 +1766,14 @@ instead of data network. ``` ### MUX_CABLE -The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_type` and `soc_ipv4` objects are optional. +The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_type`, `soc_ipv4` and `neighbor_mode` objects are optional. ``` { "MUX_CABLE": { "Ethernet4": { "cable_type": "active-active", + "neighbor_mode": "prefix-route", "server_ipv4": "192.168.0.2/32", "server_ipv6": "fc02:1000::30/128", "soc_ipv4": "192.168.0.3/32", @@ -3480,7 +3481,7 @@ Like NTP global configuration, DASH HA global configuration must have one entry "global": { "vnet_name": "Vnet55", "cp_data_channel_port": "11362", - "dp_channel_port": "11368", + "dp_channel_dst_port": "11368", "dp_channel_src_port_min": "49152", "dp_channel_src_port_max": "53247", "dp_channel_probe_interval_ms": "100", @@ -3496,7 +3497,7 @@ Like NTP global configuration, DASH HA global configuration must have one entry **cp_data_channel_port**: Control plane data channel port, used for bulk sync. -**dp_channel_port**: Destination port when tunneling packets via DPU-to-DPU data plane channel. +**dp_channel_dst_port**: Destination port when tunneling packets via DPU-to-DPU data plane channel. **dp_channel_src_port_min**: Minimum source port used when tunneling packets via DPU-to-DPU data plane channel. diff --git a/src/sonic-yang-models/setup.py b/src/sonic-yang-models/setup.py index d21cd79bb68..63b12d560d9 100644 --- a/src/sonic-yang-models/setup.py +++ b/src/sonic-yang-models/setup.py @@ -216,6 +216,7 @@ def print_yang_files_validation_report(yang_files_list): 'sonic-wred-profile.yang', 'sonic-xcvrd-log.yang', 'sonic-ztp.yang', + 'sonic-fast-linkup.yang', ] class my_build_py(build_py): diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index 9398a4d5ae3..aaa6caff469 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -2479,7 +2479,8 @@ "endpoint": "192.168.1.1,192.168.1.2", "mac_address": "f9:22:83:99:22:a1,f9:22:83:99:22:a2", "vni": "10011,10012", - "consistent_hashing_buckets": "10" + "consistent_hashing_buckets": "10", + "metric": "0" } }, "PORT_QOS_MAP": { @@ -2598,6 +2599,7 @@ "Ethernet4": { "cable_type": "active-active", "prober_type": "software", + "neighbor_mode": "prefix-route", "server_ipv4": "192.168.0.2/32", "server_ipv6": "fc02:1000::30/128", "soc_ipv4": "192.168.0.3/32", @@ -3068,7 +3070,7 @@ "global": { "vnet_name": "Vnet55", "cp_data_channel_port": "11362", - "dp_channel_port": "11368", + "dp_channel_dst_port": "11368", "dp_channel_src_port_min": "49152", "dp_channel_src_port_max": "53247", "dp_channel_probe_interval_ms": "100", @@ -3194,6 +3196,13 @@ "product-name" : "product name", "serial-no" : "1234-5678-91A" } + }, + "SWITCH_FAST_LINKUP": { + "GLOBAL": { + "polling_time": "10", + "guard_time": "2", + "ber_threshold": "12" + } } }, "SAMPLE_CONFIG_DB_UNKNOWN": { diff --git a/src/sonic-yang-models/tests/yang_model_pytests/test_smart_switch.py b/src/sonic-yang-models/tests/yang_model_pytests/test_smart_switch.py index 367cb133bb4..1299d9529ac 100644 --- a/src/sonic-yang-models/tests/yang_model_pytests/test_smart_switch.py +++ b/src/sonic-yang-models/tests/yang_model_pytests/test_smart_switch.py @@ -454,7 +454,7 @@ def test_dash_ha_global_config(self, yang_model): "global": { "vnet_name": "Vnet55", "cp_data_channel_port": 11234, - "dp_channel_port": 11235, + "dp_channel_dst_port": 11235, "dp_channel_src_port_min": 11236, "dp_channel_src_port_max": 11237, "dp_channel_probe_interval_ms": 500, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json index 901a4e1e2fe..1c3c2299353 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json @@ -96,6 +96,9 @@ "DEVICE_METADATA_TYPE_SONIC_HOST_PATTERN": { "desc": "DEVICE_METADATA value as SonicHost for Type field" }, + "DEVICE_METADATA_TYPE_FILTER_LEAF_PATTERN": { + "desc": "DEVICE_METADATA value as FilterLeaf for Type field" + }, "DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": { "desc": "DEVICE_METADATA value as not-provisioned for Type field" }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/high_frequency_telemetry.json b/src/sonic-yang-models/tests/yang_model_tests/tests/high_frequency_telemetry.json index 3805d48eb4f..bbd1b3a332b 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/high_frequency_telemetry.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/high_frequency_telemetry.json @@ -6,6 +6,10 @@ "desc": "Invalid port.", "eStrKey": "Must" }, + "HIGH_FREQUENCY_TELEMETRY_INVALID_PFC": { + "desc": "Invalid PFC.", + "eStrKey": "Must" + }, "HIGH_FREQUENCY_TELEMETRY_INVALID_STATS": { "desc": "Invalid stats.", "eStrKey": "Must" diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/restapi.json b/src/sonic-yang-models/tests/yang_model_tests/tests/restapi.json index 22f44f211cf..84ceb718866 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/restapi.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/restapi.json @@ -7,10 +7,48 @@ "desc": "RESTAPI TABLE_WITH_INCORRECT_CLIENT failure.", "eStrKey": "Pattern" }, - "RESTAPI_TABLE_WITH_VALID_CONFIG": { - "desc": "RESTAPI TABLE WITH VALID CONFIG." + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_1": { + "desc": "RESTAPI TABLE_WITH_INCORRECT_WILDCARD_CLIENT_1 failure.", + "eStrKey": "Pattern" + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_2": { + "desc": "RESTAPI TABLE_WITH_INCORRECT_WILDCARD_CLIENT_2 failure.", + "eStrKey": "Pattern" + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_3": { + "desc": "RESTAPI TABLE_WITH_INCORRECT_WILDCARD_CLIENT_3 failure.", + "eStrKey": "Pattern" + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_4": { + "desc": "RESTAPI TABLE_WITH_INCORRECT_WILDCARD_CLIENT_4 failure.", + "eStrKey": "Pattern" + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_5": { + "desc": "RESTAPI TABLE_WITH_INCORRECT_WILDCARD_CLIENT_5 failure.", + "eStrKey": "Pattern" + }, + "RESTAPI_TABLE_WITH_VALID_CONFIG_1": { + "desc": "RESTAPI TABLE WITH VALID CONFIG (1)." + }, + "RESTAPI_TABLE_WITH_VALID_CONFIG_2": { + "desc": "RESTAPI TABLE WITH VALID CONFIG (2)." + }, + "RESTAPI_TABLE_WITH_VALID_CONFIG_3": { + "desc": "RESTAPI TABLE WITH VALID CONFIG (3)." + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_1": { + "desc": "RESTAPI TABLE WITH MULTIPLE CERTS (1)." + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_2": { + "desc": "RESTAPI TABLE WITH MULTIPLE CERTS (2)." + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_3": { + "desc": "RESTAPI TABLE WITH MULTIPLE CERTS (3)." + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_4": { + "desc": "RESTAPI TABLE WITH MULTIPLE CERTS (4)." }, - "RESTAPI_TABLE_WITH_MULTIPLE_CERTS": { - "desc": "RESTAPI TABLE WITH MULTIPLE CERTS." + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_5": { + "desc": "RESTAPI TABLE WITH MULTIPLE CERTS (5)." } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/vnet.json b/src/sonic-yang-models/tests/yang_model_tests/tests/vnet.json index 4aa44a76f10..e4db8b12ba5 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/vnet.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/vnet.json @@ -34,7 +34,7 @@ }, "VNET_ROUTE_TUNNEL_COMPLETE_TEST": { - "desc": "Complete VNET route tunnel configuration with all optional fields (including mac_address and vni) in VNET_ROUTE_TUNNEL_LIST table." + "desc": "Complete VNET route tunnel configuration with all optional fields (including mac_address, vni, and metric) in VNET_ROUTE_TUNNEL_LIST table." }, "VNET_ROUTE_TUNNEL_TEST_DUPLICATE_NAME": { @@ -53,8 +53,8 @@ }, "VNET_ROUTE_TUNNEL_TEST_INVALID_VNI": { - "desc": "VNET route tunnel configuration with invalid VXLAN ID (exceeding max value of 16777215) in VNET_ROUTE_TUNNEL_LIST table.", - "eStrKey": "Range" + "desc": "VNET route tunnel configuration with invalid VXLAN ID in VNET_ROUTE_TUNNEL_LIST table.", + "eStrKey": "Pattern" }, "VNET_ROUTE_TUNNEL_TEST_INVALID_NAME_FORMAT": { @@ -69,7 +69,7 @@ "VNET_ROUTE_TUNNEL_TEST_MISSING_ENDPOINT": { "desc": "VNET route tunnel configuration with missing mandatory attribute (endpoint) in VNET_ROUTE_TUNNEL_LIST table.", - "eStrKey": "MinElements" + "eStrKey": "Mandatory" }, "VNET_ROUTE_TUNNEL_TEST_NONEXISTENT_VNET": { @@ -105,7 +105,11 @@ "VNET_ROUTE_TUNNEL_TEST_INVALID_MULTI_VNI": { "desc": "VNET route tunnel configuration with invalid VNI in comma-separated vni list.", - "eStrKey": "Range" + "eStrKey": "Pattern" + }, + + "VNET_ROUTE_TUNNEL_TEST_DUPLICATE_VNI": { + "desc": "VNET route tunnel configuration with duplicate VNI values in comma-separated vni string." }, "VNET_ROUTE_TUNNEL_TEST_CONSISTENT_HASHING": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json index 8338d2b7a1a..36051c2ad2d 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json @@ -272,6 +272,16 @@ } } }, + "DEVICE_METADATA_TYPE_FILTER_LEAF_PATTERN": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "bgp_asn": "65002", + "type": "FilterLeaf" + } + } + } + }, "DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": { "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/high_frequency_telemetry.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/high_frequency_telemetry.json index 0a7ada84f27..a4e522b4ccd 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/high_frequency_telemetry.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/high_frequency_telemetry.json @@ -93,7 +93,22 @@ ], "object_counters": [ "IF_IN_OCTETS", - "OUT_CURR_OCCUPANCY_BYTES" + "IF_IN_UCAST_PKTS", + "IF_IN_DISCARDS", + "IF_IN_ERRORS", + "IN_CURR_OCCUPANCY_BYTES", + "IF_OUT_OCTETS", + "IF_OUT_DISCARDS", + "IF_OUT_ERRORS", + "IF_OUT_UCAST_PKTS", + "OUT_CURR_OCCUPANCY_BYTES", + "TRIM_PACKETS", + "PAUSE_RX_PKTS", + "PAUSE_TX_PKTS", + "PFC_0_RX_PKTS", + "PFC_7_RX_PKTS", + "PFC_0_TX_PKTS", + "PFC_7_TX_PKTS" ] }, { @@ -103,8 +118,12 @@ "egress_lossless_pool" ], "object_counters": [ + "DROPPED_PACKETS", + "CURR_OCCUPANCY_BYTES", "WATERMARK_BYTES", - "XOFF_ROOM_WATERMARK_BYTES" + "XOFF_ROOM_WATERMARK_BYTES", + "CURR_OCCUPANCY_CELLS", + "WATERMARK_CELLS" ] }, { @@ -116,7 +135,14 @@ ], "object_counters": [ "PACKETS", - "WRED_ECN_MARKED_PACKETS" + "BYTES", + "DROPPED_PACKETS", + "CURR_OCCUPANCY_BYTES", + "WATERMARK_BYTES", + "WRED_ECN_MARKED_PACKETS", + "TRIM_PACKETS", + "CURR_OCCUPANCY_CELLS", + "WATERMARK_CELLS" ] }, { @@ -127,8 +153,17 @@ "Ethernet4|3" ], "object_counters": [ + "PACKETS", + "BYTES", "CURR_OCCUPANCY_BYTES", - "XOFF_ROOM_WATERMARK_BYTES" + "WATERMARK_BYTES", + "XOFF_ROOM_CURR_OCCUPANCY_BYTES", + "XOFF_ROOM_WATERMARK_BYTES", + "DROPPED_PACKETS", + "CURR_OCCUPANCY_CELLS", + "WATERMARK_CELLS", + "XOFF_ROOM_CURR_OCCUPANCY_CELLS", + "XOFF_ROOM_WATERMARK_CELLS" ] }, { @@ -194,6 +229,49 @@ } } }, + "HIGH_FREQUENCY_TELEMETRY_INVALID_PFC": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet0", + "lanes": "0", + "speed": 25000 + }, + { + "name": "Ethernet4", + "lanes": "4", + "speed": 25000 + } + ] + } + }, + "sonic-high-frequency-telemetry:sonic-high-frequency-telemetry": { + "sonic-high-frequency-telemetry:HIGH_FREQUENCY_TELEMETRY_PROFILE": { + "HIGH_FREQUENCY_TELEMETRY_PROFILE_LIST": [ + { + "name": "invalid_pfc", + "stream_state": "enabled", + "poll_interval": 100 + } + ] + }, + "sonic-high-frequency-telemetry:HIGH_FREQUENCY_TELEMETRY_GROUP": { + "HIGH_FREQUENCY_TELEMETRY_GROUP_LIST": [ + { + "profile_name": "invalid_pfc", + "group_name": "PORT", + "object_names": [ + "Ethernet0" + ], + "object_counters": [ + "PFC_8_TX_PKTS" + ] + } + ] + } + } + }, "HIGH_FREQUENCY_TELEMETRY_INVALID_STATS": { "sonic-port:sonic-port": { "sonic-port:PORT": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json index 4a6512d178b..c61cef2ecba 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/mux_cable.json @@ -55,6 +55,7 @@ "ifname": "Ethernet4", "cable_type": "active-active", "prober_type": "software", + "neighbor_mode": "prefix-route", "server_ipv4": "192.168.0.2/32", "server_ipv6": "fc02:1000::30/128", "soc_ipv4": "192.168.0.3/32", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json index 754c97dca69..1b519268b0b 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json @@ -655,7 +655,7 @@ "alias": "etp1a", "lanes": "60, 61", "speed": 100000, - "subport": 13, + "subport": 9, "mode":"trunk" } ] diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/restapi.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/restapi.json index f2a3b15643c..7d04ea410ca 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/restapi.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/restapi.json @@ -23,7 +23,67 @@ } } }, - "RESTAPI_TABLE_WITH_VALID_CONFIG": { + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_1": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*client.sonic.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_2": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*.*.client.sonic.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_3": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "client.*.sonic.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_4": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "client.sonic.net.*" + } + } + } + }, + "RESTAPI_TABLE_WITH_INCORRECT_WILDCARD_CLIENT_5": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "cli*ent.sonic.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_VALID_CONFIG_1": { "sonic-restapi:sonic-restapi": { "sonic-restapi:RESTAPI": { "certs": { @@ -35,7 +95,31 @@ } } }, - "RESTAPI_TABLE_WITH_MULTIPLE_CERTS": { + "RESTAPI_TABLE_WITH_VALID_CONFIG_2": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*.client.sonic.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_VALID_CONFIG_3": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_1": { "sonic-restapi:sonic-restapi": { "sonic-restapi:RESTAPI": { "certs": { @@ -46,5 +130,53 @@ } } } + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_2": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*.client.sonic.net,clientds.prod.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_3": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "client.sonic.net,*.clientds.prod.net" + } + } + } + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_4": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*.client.sonic.net,*.com" + } + } + } + }, + "RESTAPI_TABLE_WITH_MULTIPLE_CERTS_5": { + "sonic-restapi:sonic-restapi": { + "sonic-restapi:RESTAPI": { + "certs": { + "ca_crt": "/etc/sonic/credentials/ame_root.pem", + "server_crt": "/etc/sonic/credentials/restapiserver.crt", + "server_key": "/etc/sonic/credentials/restapiserver.key", + "client_crt_cname": "*.client.sonic.net,test.client.sonic.io,*.com" + } + } + } } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/vnet.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/vnet.json index d1be6b59f1b..137fde4a246 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/vnet.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/vnet.json @@ -208,7 +208,7 @@ { "vnet_name": "Vnet1", "prefix": "10.0.0.0/24", - "endpoint": ["192.168.1.1"] + "endpoint": "192.168.1.1" } ] } @@ -248,14 +248,14 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "vni": "10011" }, { "vnet_name": "Vnet2", "prefix":"10.0.1.0/24", - "endpoint": ["192.168.1.2"], - "vni": ["10012"] + "endpoint": "192.168.1.2", + "vni": "10012" } ] } @@ -290,9 +290,10 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "mac_address": ["00:aa:bb:cc:dd:ee"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "mac_address": "00:aa:bb:cc:dd:ee", + "vni": "10011", + "metric": 1 } ] } @@ -327,14 +328,14 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "vni": "10011" }, { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.2"], - "vni": ["10012"] + "endpoint": "192.168.1.2", + "vni": "10012" } ] } @@ -369,8 +370,8 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["256.256.256.256"], - "vni": ["10011"] + "endpoint": "256.256.256.256", + "vni": "10011" } ] } @@ -405,9 +406,9 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "mac_address": ["GG:HH:II:JJ:KK:LL"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "mac_address": "GG:HH:II:JJ:KK:LL", + "vni": "10011" } ] } @@ -442,8 +443,8 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["16777216"] + "endpoint": "192.168.1.1", + "vni": "16777216" } ] } @@ -477,8 +478,8 @@ "VNET_ROUTE_TUNNEL_LIST": [ { "vnet_name": "Vnet1", - "endpoint": ["192.168.1.1"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "vni": "10011" } ] } @@ -513,8 +514,8 @@ { "vnet_name": "Vnet1", "prefix":"300.168.1.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "vni": "10011" } ] } @@ -549,7 +550,7 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "vni": ["10011"] + "vni": "10011" } ] } @@ -584,8 +585,8 @@ { "vnet_name": "NonexistentVnet", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["10011"] + "endpoint": "192.168.1.1", + "vni": "10011" } ] } @@ -620,7 +621,7 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1", "192.168.1.2", "192.168.1.3"] + "endpoint": "192.168.1.1,192.168.1.2,192.168.1.3" } ] } @@ -655,8 +656,8 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "mac_address": ["00:aa:bb:cc:dd:ee", "11:22:33:44:55:66", "aa:bb:cc:dd:ee:ff"] + "endpoint": "192.168.1.1", + "mac_address": "00:aa:bb:cc:dd:ee,11:22:33:44:55:66,aa:bb:cc:dd:ee:ff" } ] } @@ -691,8 +692,8 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["10011", "10012", "10013"] + "endpoint": "192.168.1.1", + "vni": "10011,10012,10013" } ] } @@ -727,9 +728,9 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1", "192.168.1.2"], - "mac_address": ["00:aa:bb:cc:dd:ee", "11:22:33:44:55:66"], - "vni": ["10011", "10012"] + "endpoint": "192.168.1.1,192.168.1.2", + "mac_address": "00:aa:bb:cc:dd:ee,11:22:33:44:55:66", + "vni": "10011,10012" } ] } @@ -764,7 +765,7 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1", "256.256.256.256", "192.168.1.3"] + "endpoint": "192.168.1.1,256.256.256.256,192.168.1.3" } ] } @@ -799,8 +800,8 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "mac_address": ["00:aa:bb:cc:dd:ee", "ZZ:YY:XX:WW:VV:UU", "11:22:33:44:55:66"] + "endpoint": "192.168.1.1", + "mac_address": "00:aa:bb:cc:dd:ee,ZZ:YY:XX:WW:VV:UU,11:22:33:44:55:66" } ] } @@ -835,8 +836,44 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], - "vni": ["10011", "16777216", "10013"] + "endpoint": "192.168.1.1", + "vni": "10011,00013" + } + ] + } + } + }, + + "VNET_ROUTE_TUNNEL_TEST_DUPLICATE_VNI": { + "sonic-vxlan:sonic-vxlan": { + "sonic-vxlan:VXLAN_TUNNEL": { + "VXLAN_TUNNEL_LIST": [ + { + "name": "vtep1", + "src_ip": "1.2.3.4" + } + ] + } + }, + + "sonic-vnet:sonic-vnet": { + "sonic-vnet:VNET": { + "VNET_LIST": [ + { + "name": "Vnet1", + "vxlan_tunnel": "vtep1", + "vni": "10001" + } + ] + }, + + "sonic-vnet:VNET_ROUTE_TUNNEL": { + "VNET_ROUTE_TUNNEL_LIST": [ + { + "vnet_name": "Vnet1", + "prefix":"10.0.0.0/24", + "endpoint": "192.168.1.1,192.168.1.2,192.168.1.3,192.168.1.4", + "vni": "10011,10012,10011,10013" } ] } @@ -871,7 +908,7 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], + "endpoint": "192.168.1.1", "consistent_hashing_buckets": 128 } ] @@ -907,7 +944,7 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], + "endpoint": "192.168.1.1", "consistent_hashing_buckets": 65535 } ] @@ -943,9 +980,9 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1", "192.168.1.2", "192.168.1.3"], - "mac_address": ["00:aa:bb:cc:dd:ee", "11:22:33:44:55:66", "aa:bb:cc:dd:ee:ff"], - "vni": ["10011", "10012", "10013"], + "endpoint": "192.168.1.1,192.168.1.2,192.168.1.3", + "mac_address": "00:aa:bb:cc:dd:ee,11:22:33:44:55:66,aa:bb:cc:dd:ee:ff", + "vni": "10011,10012,10013", "consistent_hashing_buckets": 256 } ] @@ -981,7 +1018,7 @@ { "vnet_name": "Vnet1", "prefix":"10.0.0.0/24", - "endpoint": ["192.168.1.1"], + "endpoint": "192.168.1.1", "consistent_hashing_buckets": 99999 } ] diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang index 73346b9178b..294aae5af73 100644 --- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang +++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang @@ -100,7 +100,7 @@ module sonic-device_metadata { leaf type { type string { length 1..255; - pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|MgmtLeafRouter|MgmtSpineRouter|MgmtAccessRouter|LowerMgmtAggregator|UpperMgmtAggregator|SpineRouter|UpperSpineRouter|FabricSpineRouter|LowerSpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|MiniTs|LeafTs|SpineTs|CoreTs|ConsoleServer|TerminalServer|SonicHost|SmartSwitchDPU|not-provisioned"; + pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|MgmtLeafRouter|MgmtSpineRouter|MgmtAccessRouter|LowerMgmtAggregator|UpperMgmtAggregator|SpineRouter|UpperSpineRouter|FabricSpineRouter|LowerSpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|MiniTs|LeafTs|SpineTs|CoreTs|ConsoleServer|TerminalServer|SonicHost|SmartSwitchDPU|FilterLeaf|not-provisioned"; } } @@ -342,10 +342,37 @@ module sonic-device_metadata { enum enabled; enum disabled; } - default disabled; + default enabled; } } /* end of container localhost */ + + container bmc { + description "BMC configuration information"; + + leaf bmc_if_name { + type string { + length 1..64; + } + description "BMC interface name"; + } + + leaf bmc_if_addr { + type inet:ipv4-address; + description "BMC interface IP address"; + } + + leaf bmc_addr { + type inet:ipv4-address; + description "BMC IP address"; + } + + leaf bmc_net_mask { + type inet:ipv4-address; + description "BMC network mask"; + } + } + /* end of container bmc */ } /* end of container DEVICE_METADATA */ } diff --git a/src/sonic-yang-models/yang-models/sonic-fast-linkup.yang b/src/sonic-yang-models/yang-models/sonic-fast-linkup.yang new file mode 100644 index 00000000000..4c8c4db8665 --- /dev/null +++ b/src/sonic-yang-models/yang-models/sonic-fast-linkup.yang @@ -0,0 +1,38 @@ +module sonic-fast-linkup { + yang-version 1.1; + namespace "http://github.com/sonic-net/sonic-fast-linkup"; + prefix sfl; + + organization "SONiC"; + contact "SONiC"; + description + "YANG model for SWITCH_FAST_LINKUP global configuration."; + + revision 2025-10-20 { + description "Initial revision."; + } + + container sonic-fast-linkup { + container SWITCH_FAST_LINKUP { + description "SWITCH_FAST_LINKUP part of config_db.json"; + + container GLOBAL { + leaf polling_time { + type uint16; + description "Polling time in seconds"; + } + leaf guard_time { + type uint8; + description "Guard time in seconds"; + } + leaf ber_threshold { + type uint8; + description "BER threshold exponent (e.g., 12 for 1e-12)"; + } + } + /* end of container GLOBAL */ + } + /* end of container SWITCH_FAST_LINKUP */ + } +} + diff --git a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang index dba71c1653e..d154f909823 100644 --- a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang +++ b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang @@ -201,6 +201,19 @@ module sonic-flex_counter { } } + container PORT_PHY_ATTR { + /* PORT_PHY_ATTR_FLEX_COUNTER_GROUP */ + leaf FLEX_COUNTER_STATUS { + type flex_status; + } + leaf FLEX_COUNTER_DELAY_STATUS { + type flex_delay_status; + } + leaf POLL_INTERVAL { + type poll_interval; + } + } + container QUEUE { /* QUEUE_STAT_COUNTER_FLEX_COUNTER_GROUP */ leaf FLEX_COUNTER_STATUS { diff --git a/src/sonic-yang-models/yang-models/sonic-high-frequency-telemetry.yang b/src/sonic-yang-models/yang-models/sonic-high-frequency-telemetry.yang index b412c4dfdb4..b69be2ad0ed 100644 --- a/src/sonic-yang-models/yang-models/sonic-high-frequency-telemetry.yang +++ b/src/sonic-yang-models/yang-models/sonic-high-frequency-telemetry.yang @@ -95,10 +95,10 @@ module sonic-high-frequency-telemetry { leaf-list object_counters { type string; - must "( ../group_name = 'PORT' and re-match(current(), 'IF_IN_OCTETS|IF_IN_UCAST_PKTS|IF_IN_DISCARDS|IF_IN_ERRORS|IN_CURR_OCCUPANCY_BYTES|IF_OUT_OCTETS|IF_OUT_DISCARDS|IF_OUT_ERRORS|IF_OUT_UCAST_PKTS|OUT_CURR_OCCUPANCY_BYTES|TRIM_PACKETS') )" - + " or ( ../group_name = 'BUFFER_POOL' and re-match(current(), 'DROPPED_PACKETS|CURR_OCCUPANCY_BYTES|WATERMARK_BYTES|CURR_OCCUPANCY_BYTES|XOFF_ROOM_WATERMARK_BYTES') )" - + " or ( ../group_name = 'INGRESS_PRIORITY_GROUP' and re-match(current(), 'PACKETS|BYTES|CURR_OCCUPANCY_BYTES|WATERMARK_BYTES|XOFF_ROOM_CURR_OCCUPANCY_BYTES|XOFF_ROOM_WATERMARK_BYTES|DROPPED_PACKETS') )" - + " or ( ../group_name = 'QUEUE' and re-match(current(), 'PACKETS|BYTES|DROPPED_PACKETS|CURR_OCCUPANCY_BYTES|WATERMARK_BYTES|WRED_ECN_MARKED_PACKETS|TRIM_PACKETS') )"; + must "( ../group_name = 'PORT' and re-match(current(), 'IF_IN_OCTETS|IF_IN_UCAST_PKTS|IF_IN_DISCARDS|IF_IN_ERRORS|IN_CURR_OCCUPANCY_BYTES|IF_OUT_OCTETS|IF_OUT_DISCARDS|IF_OUT_ERRORS|IF_OUT_UCAST_PKTS|OUT_CURR_OCCUPANCY_BYTES|TRIM_PACKETS|PAUSE_RX_PKTS|PAUSE_TX_PKTS|PFC_[0-7]_RX_PKTS|PFC_[0-7]_TX_PKTS') )" + + " or ( ../group_name = 'BUFFER_POOL' and re-match(current(), 'DROPPED_PACKETS|CURR_OCCUPANCY_BYTES|WATERMARK_BYTES|XOFF_ROOM_WATERMARK_BYTES|CURR_OCCUPANCY_CELLS|WATERMARK_CELLS') )" + + " or ( ../group_name = 'INGRESS_PRIORITY_GROUP' and re-match(current(), 'PACKETS|BYTES|CURR_OCCUPANCY_BYTES|WATERMARK_BYTES|XOFF_ROOM_CURR_OCCUPANCY_BYTES|XOFF_ROOM_WATERMARK_BYTES|DROPPED_PACKETS|CURR_OCCUPANCY_CELLS|WATERMARK_CELLS|XOFF_ROOM_CURR_OCCUPANCY_CELLS|XOFF_ROOM_WATERMARK_CELLS') )" + + " or ( ../group_name = 'QUEUE' and re-match(current(), 'PACKETS|BYTES|DROPPED_PACKETS|CURR_OCCUPANCY_BYTES|WATERMARK_BYTES|WRED_ECN_MARKED_PACKETS|TRIM_PACKETS|CURR_OCCUPANCY_CELLS|WATERMARK_CELLS') )"; } } diff --git a/src/sonic-yang-models/yang-models/sonic-mux-cable.yang b/src/sonic-yang-models/yang-models/sonic-mux-cable.yang index 7aa533faaaa..4d1c06f36da 100644 --- a/src/sonic-yang-models/yang-models/sonic-mux-cable.yang +++ b/src/sonic-yang-models/yang-models/sonic-mux-cable.yang @@ -59,6 +59,15 @@ module sonic-mux-cable { description "DualToR LinkMrgrd Icmp Prober mode."; } + leaf neighbor_mode { + type enumeration { + enum prefix-route; + enum host-route; + } + default host-route; + description "DualToR MUX neighbor mode."; + } + leaf server_ipv4 { type inet:ipv4-prefix; diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index fb71247fe76..5e9e183c20e 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -170,7 +170,7 @@ module sonic-port{ leaf subport { description "Logical subport(s) for physical port breakout"; type uint8 { - range 0..12; + range 0..8; } } @@ -241,6 +241,13 @@ module sonic-port{ type int32; } + leaf fast_linkup { + type boolean; + default "false"; + description "Enable or disable fast link-up on the port"; + } + + } /* end of list PORT_LIST */ } /* end of container PORT */ diff --git a/src/sonic-yang-models/yang-models/sonic-restapi.yang b/src/sonic-yang-models/yang-models/sonic-restapi.yang index 094ed18eb7b..d132898c368 100644 --- a/src/sonic-yang-models/yang-models/sonic-restapi.yang +++ b/src/sonic-yang-models/yang-models/sonic-restapi.yang @@ -45,7 +45,7 @@ module sonic-restapi { leaf client_crt_cname { type string { - pattern '([a-zA-Z0-9_\-\.]+,)*([a-zA-Z0-9_\-\.]+)'; + pattern '((\*\.)?[a-zA-Z0-9_\-\.]+,)*((\*\.)?[a-zA-Z0-9_\-\.]+)'; } description "Client cert name."; } diff --git a/src/sonic-yang-models/yang-models/sonic-smart-switch.yang b/src/sonic-yang-models/yang-models/sonic-smart-switch.yang index 74cb3cccd9d..a01ca7256fe 100644 --- a/src/sonic-yang-models/yang-models/sonic-smart-switch.yang +++ b/src/sonic-yang-models/yang-models/sonic-smart-switch.yang @@ -301,7 +301,7 @@ module sonic-smart-switch { type inet:port-number; } - leaf dp_channel_port { + leaf dp_channel_dst_port { description "Destination port when tunneling packets via DPU-to-DPU data plane channel"; type inet:port-number; } diff --git a/src/sonic-yang-models/yang-models/sonic-system-tacacs.yang b/src/sonic-yang-models/yang-models/sonic-system-tacacs.yang index e8a113954ee..43b79129d27 100644 --- a/src/sonic-yang-models/yang-models/sonic-system-tacacs.yang +++ b/src/sonic-yang-models/yang-models/sonic-system-tacacs.yang @@ -46,6 +46,12 @@ module sonic-system-tacacs { } } + typedef key_encrypt_type { + type boolean; + default false; + description "Indicates if the passkey is encrypted."; + } + container sonic-system-tacacs { container TACPLUS_SERVER { @@ -91,6 +97,10 @@ module sonic-system-tacacs { description "Authentication type"; } + leaf key_encrypt { + type key_encrypt_type; + } + leaf passkey { type string { length "1..256"; @@ -131,10 +141,9 @@ module sonic-system-tacacs { default 5; } - leaf key_encrypt { - type boolean; - description "Indicates if the passkey is encrypted."; - } + leaf key_encrypt { + type key_encrypt_type; + } leaf passkey { type string { diff --git a/src/sonic-yang-models/yang-models/sonic-vnet.yang b/src/sonic-yang-models/yang-models/sonic-vnet.yang index 21447d2aea3..f4acdf47a16 100644 --- a/src/sonic-yang-models/yang-models/sonic-vnet.yang +++ b/src/sonic-yang-models/yang-models/sonic-vnet.yang @@ -123,26 +123,31 @@ module sonic-vnet { type stypes:sonic-ip4-prefix; } - leaf-list endpoint { + leaf endpoint { description "Endpoint/nexthop tunnel IPs"; - type inet:ipv4-address; - min-elements 1; + type stypes:ipv4-address-list; + mandatory true; } - leaf-list mac_address { + leaf mac_address { description "Inner dest macs in encapsulated packet"; - type yang:mac-address; + type stypes:mac-address-list; } - leaf-list vni { + leaf vni { description "Valid and active vni values in encapsulated packet"; - type stypes:vnid_type; + type stypes:vnid-list; } leaf consistent_hashing_buckets { description "Number of consistent hashing buckets to use, if consistent hashing is desired"; type uint16; } + + leaf metric { + description "Value that can be set to categorize or determine the type of route. This value does not affect route behavior."; + type uint8; + } } /* end of list VNET_ROUTE_TUNNEL_LIST */ } diff --git a/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 b/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 index 8a003d545c1..df4c3a28894 100644 --- a/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 +++ b/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 @@ -51,6 +51,19 @@ module sonic-types { } } + typedef ipv4-address-list { + type string { + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?' + + '(,(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?)*'; + } + description + "Comma-separated IPv4 addresses"; + } + typedef admin_status { type enumeration { enum up; @@ -268,6 +281,14 @@ module sonic-types { } } + typedef mac-address-list { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5})(,([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}))*'; + } + description + "Comma-separated MAC addresses"; + } + typedef hostname { type string { length 1..63; @@ -282,6 +303,15 @@ module sonic-types { "VXLAN Network Identifier"; } + typedef vnid-list { + type string { + pattern '([1-9][0-9]{0,6}|1[0-5][0-9]{6}|16[0-6][0-9]{5}|167[0-6][0-9]{4}|1677[0-6][0-9]{3}|16777[01][0-9]{2}|1677720[0-9]|1677721[0-5])' + + '(,([1-9][0-9]{0,6}|1[0-5][0-9]{6}|16[0-6][0-9]{5}|167[0-6][0-9]{4}|1677[0-6][0-9]{3}|16777[01][0-9]{2}|1677720[0-9]|1677721[0-5]))*'; + } + description + "Comma-separated VNIs"; + } + typedef tc_type { type uint8 { range "0..15" { diff --git a/src/sonic-ztp b/src/sonic-ztp index f8fa833a9de..170acb039cd 160000 --- a/src/sonic-ztp +++ b/src/sonic-ztp @@ -1 +1 @@ -Subproject commit f8fa833a9de8cc5fa4dcbdbcd62f633a27dc03ca +Subproject commit 170acb039cd281ad74ccc2fa1170a49003a25542 diff --git a/src/supervisor b/src/supervisor index 99a3e3e240d..dbca8d457e6 160000 --- a/src/supervisor +++ b/src/supervisor @@ -1 +1 @@ -Subproject commit 99a3e3e240d9d13e143b306818731e224e1e73d2 +Subproject commit dbca8d457e61d8707c40f99c78330b87939483a3 diff --git a/src/swig/Makefile b/src/swig/Makefile index 429184dd97a..5e7f09c208f 100644 --- a/src/swig/Makefile +++ b/src/swig/Makefile @@ -7,9 +7,9 @@ DERIVED_TARGETS = $(SWIG) $(SWIG_DBG) $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -fr ./swig-$(SWIG_VERSION) *.deb - wget -O swig_$(SWIG_VERSION).orig.tar.gz 'https://packages.trafficmanager.net/public/swig_3.0.12.orig.tar.gz' - wget -O swig_$(SWIG_VERSION).dsc 'https://packages.trafficmanager.net/public/swig_3.0.12-2.dsc' - wget -O swig_$(SWIG_VERSION)-$(SWIG_SUBVERSION).debian.tar.xz 'https://packages.trafficmanager.net/public/swig_3.0.12-2.debian.tar.xz' + wget -O swig_$(SWIG_VERSION).orig.tar.gz '$(BUILD_PUBLIC_URL)/swig_3.0.12.orig.tar.gz' + wget -O swig_$(SWIG_VERSION).dsc '$(BUILD_PUBLIC_URL)/swig_3.0.12-2.dsc' + wget -O swig_$(SWIG_VERSION)-$(SWIG_SUBVERSION).debian.tar.xz '$(BUILD_PUBLIC_URL)/swig_3.0.12-2.debian.tar.xz' dpkg-source -x swig_$(SWIG_VERSION).dsc pushd ./swig-$(SWIG_VERSION) diff --git a/src/syslog-counter/debian/rules b/src/syslog-counter/debian/rules index eb0857cfddd..9771b9f0c79 100755 --- a/src/syslog-counter/debian/rules +++ b/src/syslog-counter/debian/rules @@ -9,9 +9,13 @@ override_dh_auto_build: cargo build --release --all +override_dh_auto_install: + # do nothing + : + override_dh_auto_clean: cargo clean --release override_dh_auto_test: # do nothing - : \ No newline at end of file + : diff --git a/src/system-health/health_checker/hardware_checker.py b/src/system-health/health_checker/hardware_checker.py index 1bde5a36bf1..f7c1bda2742 100644 --- a/src/system-health/health_checker/hardware_checker.py +++ b/src/system-health/health_checker/hardware_checker.py @@ -279,7 +279,6 @@ def _check_psu_status(self, config): def reset(self): self._info = {} - self.leaking_sensors = [] @classmethod def _ignore_check(cls, ignore_set, category, object_name, check_point): diff --git a/src/system-health/health_checker/service_checker.py b/src/system-health/health_checker/service_checker.py index c782d119cd4..554079aa830 100644 --- a/src/system-health/health_checker/service_checker.py +++ b/src/system-health/health_checker/service_checker.py @@ -25,7 +25,6 @@ def check_docker_image(image_name): DOCKER_CLIENT.images.get(image_name) return True except (docker.errors.ImageNotFound, docker.errors.APIError) as err: - logger.log_warning("Failed to get image '{}'. Error: '{}'".format(image_name, err)) return False class ServiceChecker(HealthChecker): @@ -153,6 +152,20 @@ def get_current_running_containers(self): lst = ctrs.list(filters={"status": "running"}) for ctr in lst: + # Check if this is a Kubernetes-managed container + labels = ctr.labels or {} + ns = labels.get("io.kubernetes.pod.namespace") + dtype = labels.get("io.kubernetes.docker.type") + kname = labels.get("io.kubernetes.container.name") + + if ns == "sonic": + # Kubernetes-managed container - add service name to running containers + # but skip critical process checking (k8s has its own health mechanisms) + if dtype == "container" and kname and kname not in ("", "POD"): + running_containers.add(kname) + continue + + # Regular Docker container - use the container name running_containers.add(ctr.name) if ctr.name not in self.container_critical_processes: self.fill_critical_process_by_container(ctr.name) @@ -388,7 +401,7 @@ def check_process_existence(self, container_name, critical_process_list, config, # it not always possible to get process cmdline in supervisor.conf. E.g, cmdline of orchagent is "/usr/bin/orchagent", # however, in supervisor.conf it is "/usr/bin/orchagent.sh" cmd = 'docker exec {} bash -c "supervisorctl status"'.format(container_name) - process_status = utils.run_command(cmd) + process_status = utils.run_command(cmd, timeout=15) if process_status is None: for process_name in critical_process_list: self.set_object_not_ok('Process', '{}:{}'.format(container_name, process_name), "Process '{}' in container '{}' is not running".format(process_name, container_name)) diff --git a/src/system-health/health_checker/sysmonitor.py b/src/system-health/health_checker/sysmonitor.py index 1f95006befc..e3f1e86afb7 100755 --- a/src/system-health/health_checker/sysmonitor.py +++ b/src/system-health/health_checker/sysmonitor.py @@ -19,6 +19,7 @@ REDIS_TIMEOUT_MS = 0 system_allsrv_state = "DOWN" spl_srv_list = ['database-chassis', 'gbsyncd'] +NON_BLOCKING_INACTIVE_REASONS = {"exec-condition"} SELECT_TIMEOUT_MSECS = 1000 QUEUE_TIMEOUT = 15 TASK_STOP_TIMEOUT = 10 @@ -311,7 +312,7 @@ def get_unit_status(self, event): try: service_status = "Down" service_up_status = "Down" - service_name,last_name = event.split('.') + service_name,last_name = event.rsplit('.', 1) sysctl_show = self.run_systemctl_show(event) @@ -352,7 +353,9 @@ def get_unit_status(self, event): service_status = "Stopping" service_up_status = "Stopping" elif active_state == "inactive": - if srv_type == "oneshot" or service_name in spl_srv_list: + if (srv_type == "oneshot" + or service_name in spl_srv_list + or fail_reason in NON_BLOCKING_INACTIVE_REASONS): service_status = "OK" service_up_status = "OK" unit_status = "OK" @@ -454,7 +457,7 @@ def check_unit_status(self, event): astate = "DOWN" self.publish_system_status(astate) - srv_name,last = event.split('.') + srv_name,last = event.rsplit('.', 1) # stop on service maybe propagated to timers and in that case, # the state_db entry for the service should not be deleted if last == "service": diff --git a/src/system-health/health_checker/utils.py b/src/system-health/health_checker/utils.py index 1a195c7c4c3..50177d94fb3 100644 --- a/src/system-health/health_checker/utils.py +++ b/src/system-health/health_checker/utils.py @@ -1,14 +1,58 @@ +import os +import signal +import logging import subprocess -def run_command(command): +from logging.handlers import SysLogHandler +from sonic_py_common.syslogger import SysLogger + + +logger = SysLogger( + log_identifier='healthd#utils', + log_facility=SysLogHandler.LOG_DAEMON, + log_level=logging.INFO, + enable_runtime_config=False +) + + +def run_command(command, timeout=None): """ Utility function to run an shell command and return the output. :param command: Shell command string. :return: Output of the shell command. """ try: - process = subprocess.Popen(command, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - return process.communicate()[0] + process = subprocess.Popen( + command, + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, + start_new_session=True + ) + return process.communicate(timeout=timeout)[0] + except subprocess.TimeoutExpired as err: + logger.log_warning("Failed to run command: {}".format(str(err))) + + # The child process is not killed if the timeout expires, + # so in order to cleanup properly a well-behaved application + # should kill the child process and finish communication + + logger.log_notice("Initiate stuck process cleanup: pid={}".format(process.pid)) + + try: + os.killpg(process.pid, signal.SIGKILL) + except Exception as e: + logger.log_error("Failed to kill process group: {}".format(str(e))) + + try: + process.communicate(timeout=1) + except Exception as e: + logger.log_error("Failed to wait for process: {}".format(str(e))) + + logger.log_notice("Cleanup is done: rc={}".format(process.returncode)) + + return None except Exception: return None diff --git a/src/system-health/tests/test_system_health.py b/src/system-health/tests/test_system_health.py index b27054a59d1..63ae36d8f77 100644 --- a/src/system-health/tests/test_system_health.py +++ b/src/system-health/tests/test_system_health.py @@ -17,7 +17,7 @@ import importlib.machinery from swsscommon import swsscommon -from mock import Mock, MagicMock, patch +from mock import Mock, MagicMock, patch, call from sonic_py_common import device_info from .mock_connector import MockConnector @@ -354,6 +354,144 @@ def test_service_checker_check_by_monit(mock_run): assert checker._info['diskCheck'][HealthChecker.INFO_FIELD_OBJECT_STATUS] == HealthChecker.STATUS_OK +@patch('swsscommon.swsscommon.ConfigDBConnector.connect', MagicMock()) +@patch('health_checker.service_checker.ServiceChecker._get_container_folder', MagicMock(return_value=test_path)) +@patch('sonic_py_common.multi_asic.is_multi_asic', MagicMock(return_value=False)) +@patch('docker.DockerClient') +@patch('health_checker.utils.run_command') +@patch('swsscommon.swsscommon.ConfigDBConnector') +def test_service_checker_k8s_containers(mock_config_db, mock_run, mock_docker_client): + """Test that service checker recognizes Kubernetes-managed containers by labels""" + setup() + mock_db_data = MagicMock() + mock_get_table = MagicMock() + mock_db_data.get_table = mock_get_table + mock_config_db.return_value = mock_db_data + mock_get_table.return_value = { + 'snmp': { + 'state': 'enabled', + 'has_global_scope': 'True', + 'has_per_asic_scope': 'False', + }, + 'restapi': { + 'state': 'enabled', + 'has_global_scope': 'True', + 'has_per_asic_scope': 'False', + } + } + + # Mock Kubernetes containers with labels + mock_containers = MagicMock() + mock_snmp_container = MagicMock() + mock_snmp_container.name = 'k8s_snmp_snmp-pod-test_sonic_12345678-1234-1234-1234-123456789abc_0' + mock_snmp_container.labels = { + 'io.kubernetes.pod.namespace': 'sonic', + 'io.kubernetes.docker.type': 'container', + 'io.kubernetes.container.name': 'snmp' + } + + mock_restapi_container = MagicMock() + mock_restapi_container.name = 'k8s_restapi_restapi-pod-test_sonic_87654321-4321-4321-4321-cba987654321_0' + mock_restapi_container.labels = { + 'io.kubernetes.pod.namespace': 'sonic', + 'io.kubernetes.docker.type': 'container', + 'io.kubernetes.container.name': 'restapi' + } + + # Mock POD container (should be ignored) + mock_pod_container = MagicMock() + mock_pod_container.name = 'k8s_POD_snmp-pod-test_sonic_12345678-1234-1234-1234-123456789abc_0' + mock_pod_container.labels = { + 'io.kubernetes.pod.namespace': 'sonic', + 'io.kubernetes.docker.type': 'container', + 'io.kubernetes.container.name': 'POD' + } + + mock_containers.list = MagicMock(return_value=[mock_snmp_container, mock_restapi_container, mock_pod_container]) + mock_docker_client_object = MagicMock() + mock_docker_client.return_value = mock_docker_client_object + mock_docker_client_object.containers = mock_containers + + mock_run.return_value = mock_supervisorctl_output + + checker = ServiceChecker() + config = Config() + checker.check(config) + + # Verify k8s containers are recognized by their label names + running_containers = checker.get_current_running_containers() + assert 'snmp' in running_containers + assert 'restapi' in running_containers + assert 'POD' not in running_containers + + # Verify k8s containers are NOT added to critical processes (k8s has its own health checks) + assert 'snmp' not in checker.container_critical_processes + assert 'restapi' not in checker.container_critical_processes + + +@patch('swsscommon.swsscommon.ConfigDBConnector.connect', MagicMock()) +@patch('health_checker.service_checker.ServiceChecker._get_container_folder', MagicMock(return_value=test_path)) +@patch('sonic_py_common.multi_asic.is_multi_asic', MagicMock(return_value=False)) +@patch('docker.DockerClient') +@patch('health_checker.utils.run_command') +@patch('swsscommon.swsscommon.ConfigDBConnector') +def test_service_checker_mixed_containers(mock_config_db, mock_run, mock_docker_client): + """Test that service checker handles both regular Docker and Kubernetes containers""" + setup() + mock_db_data = MagicMock() + mock_get_table = MagicMock() + mock_db_data.get_table = mock_get_table + mock_config_db.return_value = mock_db_data + mock_get_table.return_value = { + 'swss': { + 'state': 'enabled', + 'has_global_scope': 'True', + 'has_per_asic_scope': 'False', + }, + 'database': { + 'state': 'enabled', + 'has_global_scope': 'True', + 'has_per_asic_scope': 'False', + } + } + + mock_containers = MagicMock() + + # Regular Docker container + mock_swss_container = MagicMock() + mock_swss_container.name = 'swss' + mock_swss_container.labels = {} + + # Kubernetes container + mock_database_container = MagicMock() + mock_database_container.name = 'k8s_database_database-pod-test_sonic_12345678_0' + mock_database_container.labels = { + 'io.kubernetes.pod.namespace': 'sonic', + 'io.kubernetes.docker.type': 'container', + 'io.kubernetes.container.name': 'database' + } + + mock_containers.list = MagicMock(return_value=[mock_swss_container, mock_database_container]) + mock_docker_client_object = MagicMock() + mock_docker_client.return_value = mock_docker_client_object + mock_docker_client_object.containers = mock_containers + + mock_run.return_value = mock_supervisorctl_output + + checker = ServiceChecker() + config = Config() + checker.check(config) + + # Verify both types of containers are recognized + running_containers = checker.get_current_running_containers() + assert 'swss' in running_containers + assert 'database' in running_containers + + # Verify only regular Docker containers are monitored for critical processes + assert 'swss' in checker.container_critical_processes + assert 'database' not in checker.container_critical_processes # k8s container, not monitored + + def test_hardware_checker(): MockConnector.data.update({ 'TEMPERATURE_INFO|ASIC': { @@ -696,6 +834,40 @@ def test_utils(): assert output +@patch('health_checker.utils.logger.log_warning') +@patch('health_checker.utils.logger.log_notice') +@patch('health_checker.utils.logger.log_error') +@patch('os.killpg') +@patch('subprocess.Popen') +def test_utils_timeout(mock_popen, mock_killpg, mock_log_error, mock_log_notice, mock_log_warning): + # Mock the spawned process + from subprocess import TimeoutExpired + mock_process = MagicMock() + mock_process.pid = 1234 + mock_process.communicate.side_effect = [ + TimeoutExpired(cmd='cmd', timeout=0.01), # first call triggers timeout + ('', '') # second call during cleanup + ] + mock_popen.return_value = mock_process + + # Execute with a timeout to trigger the TimeoutExpired path + output = utils.run_command('cmd', timeout=0.01) + + # Expectations + assert output is None + + assert mock_process.communicate.call_count == 2 + mock_process.communicate.assert_has_calls([call(timeout=0.01), call(timeout=1)]) + + from signal import SIGKILL + mock_killpg.assert_called_once() + mock_killpg.assert_called_with(mock_process.pid, SIGKILL) + + assert mock_log_notice.call_count == 2 # cleanup + done + mock_log_warning.assert_called_once() # command timeout + mock_log_error.assert_not_called() # no errors + + @patch('swsscommon.swsscommon.ConfigDBConnector.connect', MagicMock()) @patch('sonic_py_common.multi_asic.is_multi_asic', MagicMock(return_value=False)) @patch('docker.DockerClient') @@ -1016,3 +1188,22 @@ def test_healthd_check_interval(mock_log_warning, mock_log_notice, mock_time): daemon.stop_event.wait.return_value = True assert not daemon._run_checker(manager, chassis) + + +@patch('health_checker.sysmonitor.Sysmonitor.get_all_service_list', MagicMock(return_value=['mock_snmp.service'])) +@patch('health_checker.sysmonitor.Sysmonitor.publish_system_status', MagicMock()) +def test_check_unit_status_multi_dot_unit_name(): + """Test that check_unit_status does not crash on unit names with multiple dots. + + Systemd device/mount units can have names like 'sys-devices-pci0000:00.device' + which contain multiple dots. Using str.split('.') would raise ValueError + (too many values to unpack). Using rsplit('.', 1) correctly handles this. + Regression test for issue #25291. + """ + sysmon = Sysmonitor() + # These should not raise ValueError + sysmon.check_unit_status('sys-devices-pci0000:00-0000:00:1f.0.device') + sysmon.check_unit_status('dev-disk-by\\x2did-wwn\\x2d0x5001.mount') + sysmon.check_unit_status('run-user-1000.mount') + # Normal service name should still work + sysmon.check_unit_status('mock_snmp.timer') diff --git a/src/systemd-sonic-generator/ssg-test.cc b/src/systemd-sonic-generator/ssg-test.cc index adbcfa41661..ab9678f35a0 100644 --- a/src/systemd-sonic-generator/ssg-test.cc +++ b/src/systemd-sonic-generator/ssg-test.cc @@ -475,6 +475,27 @@ class SsgMainTest : public SsgFunctionTest { /* Validate environment variables */ validate_environment_variable(cfg); + + /* Validate masked services */ + validate_masked_services(cfg); + } + + /* Validate systemd-networkd.service is masked on non-smart-switch platforms */ + void validate_masked_services(const SsgMainConfig &cfg) { + fs::path service_path{TEST_OUTPUT_DIR + "systemd-networkd.service"}; + bool should_be_masked = !cfg.is_smart_switch_npu && !cfg.is_smart_switch_dpu; + bool is_masked = false; + + if (fs::exists(service_path) && fs::is_symlink(service_path)) { + char resolved_path[PATH_MAX] = { 0 }; + realpath(service_path.c_str(), resolved_path); + if (strcmp(resolved_path, "/dev/null") == 0) { + is_masked = true; + } + } + + EXPECT_EQ(is_masked, should_be_masked) + << "Masked service validation failed for: " << service_path; } /* Save global variables before running tests */ diff --git a/src/systemd-sonic-generator/systemd-sonic-generator.cpp b/src/systemd-sonic-generator/systemd-sonic-generator.cpp index c3de7ef5159..74662c98247 100644 --- a/src/systemd-sonic-generator/systemd-sonic-generator.cpp +++ b/src/systemd-sonic-generator/systemd-sonic-generator.cpp @@ -984,6 +984,26 @@ static int render_network_service_for_smart_switch(const std::filesystem::path& } +static int mask_networkd_for_non_smart_switch(const std::filesystem::path& install_dir) { + if (smart_switch) { + return 0; + } + + auto service_path = install_dir / "systemd-networkd.service"; + + int r = symlink("/dev/null", service_path.c_str()); + + if (r < 0) { + if (errno == EEXIST) + return 0; + log_to_kmsg("Error masking %s: %s\n", service_path.c_str(), strerror(errno)); + return -1; + } + + return 0; +} + + int ssg_main(int argc, char **argv) { char* unit_files[MAX_NUM_UNITS]; std::string install_dir; @@ -1021,6 +1041,11 @@ int ssg_main(int argc, char **argv) { } } + // Mask systemd-networkd on non-smart-switch platforms + if (mask_networkd_for_non_smart_switch(install_dir) != 0) { + return -1; + } + // For each unit file, get the installation targets and install the unit for (int i = 0; i < num_unit_files; i++) { unit_instance = unit_files[i]; diff --git a/src/thrift/Makefile b/src/thrift/Makefile index c8317a5e15f..e9467ce8e81 100644 --- a/src/thrift/Makefile +++ b/src/thrift/Makefile @@ -10,7 +10,7 @@ DERIVED_TARGETS = libthrift-dev_$(THRIFT_VERSION_FULL)_$(CONFIGURED_ARCH).deb \ python-thrift_$(THRIFT_VERSION_FULL)_$(CONFIGURED_ARCH).deb \ thrift-compiler_$(THRIFT_VERSION_FULL)_$(CONFIGURED_ARCH).deb -THRIFT_LINK_PRE = https://packages.trafficmanager.net/public/debian +THRIFT_LINK_PRE = $(BUILD_PUBLIC_URL)/debian $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf thrift-$(THRIFT_VERSION) diff --git a/src/wpasupplicant/sonic-wpa-supplicant b/src/wpasupplicant/sonic-wpa-supplicant index b1699b6100a..9fc464bc05d 160000 --- a/src/wpasupplicant/sonic-wpa-supplicant +++ b/src/wpasupplicant/sonic-wpa-supplicant @@ -1 +1 @@ -Subproject commit b1699b6100ae4a157040b6f6854699d3a90a9863 +Subproject commit 9fc464bc05d453b43de52827b8bbd8cce35907c4